Utilizzo dell'emulatore android: Difference between revisions

From RVM Wiki
Jump to navigation Jump to search
m Created page with "* Scaricarlo ed installarlo da [http://developer.android.com/sdk/index.html Android SDK | Android Developers] * Lanciarlo e scaricare una piattaforma (2.3.3) cd tools ./android…"
 
mNo edit summary
 
Line 12: Line 12:


* Copiare la system image:
* Copiare la system image:
cd $SDKPATH
  cp android-sdk-linux/platforms/android-10/images/system.img ~/.android/avd/Test.avd
  cp android-sdk-linux/platforms/android-10/images/system.img ~/.android/avd/Test.avd


Line 21: Line 22:


* Copiare il file build.prop
* Copiare il file build.prop
  android-sdk-linux/platform-tools/adb -s emulator-554 pull  /system/build.prop .
  android-sdk-linux/platform-tools/adb -s emulator-5554 pull  /system/build.prop .


* Editarlo:
* Editarlo:
Line 29: Line 30:


* Trovare il device della partizione system:
* Trovare il device della partizione system:
cd $SDKPATH/android-sdk-linux/platform-tools/
  ./adb -s emulator-5554 shell mount | grep system
  ./adb -s emulator-5554 shell mount | grep system


* Montare la partizione system in rw
* Montare la partizione system in rw
  ./adb -s emulator-5554 shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system
  ./adb -s emulator-5554 shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system
* Settare permission per spoter scrivere:
./adb -s emulator-5554 shell chmod 777 /system/app


* Copiare il file:
* Copiare il file:
Line 38: Line 43:


* Copiare i prerequisiti per android market:
* Copiare i prerequisiti per android market:
  ./adb -s emulator-5554 push Vending.apk /system/app/.
  ./adb -s emulator-5554 push ~/Desktop/Vending.apk /system/app/.
  ./adb -s emulator-5554 push ~/Desktop/GoogleServicesFramework.apk /system/app/.
  ./adb -s emulator-5554 push ~/Desktop/GoogleServicesFramework.apk /system/app/.


Line 55: Line 60:
==Riferimenti==
==Riferimenti==
*[http://www.howtogeek.com/howto/21831/how-to-test-drive-google-android-on-your-pc-without-buying-a-phone/ How to Test Drive Google Android on Your PC Without Buying a Phone - How-To Geek]
*[http://www.howtogeek.com/howto/21831/how-to-test-drive-google-android-on-your-pc-without-buying-a-phone/ How to Test Drive Google Android on Your PC Without Buying a Phone - How-To Geek]
*[http://www.tech-recipes.com/rx/10004/accessing-android-market-from-android-sdk/ How Do I Install the Android Market on Android SDK]
*[http://blog.varunkumar.me/2010/11/how-to-install-android-market-in-google.html Varun's ScratchPad: [How to] Install Android market on Emulator]
*[http://blog.varunkumar.me/2010/11/how-to-install-android-market-in-google.html Varun's ScratchPad: [How to] Install Android market on Emulator]

Latest revision as of 17:31, 29 March 2012

cd tools
./android
  • Dal menu (se si usa unity, dall barra in alto !!!)
Tool - Manage AVD
  • Creare un Android Virtual Device chiamato "Test"
SD 1Gb
SD Support yes
  • Copiare la system image:
cd $SDKPATH
cp android-sdk-linux/platforms/android-10/images/system.img ~/.android/avd/Test.avd
  • Avviarlo con la partizione dati da 100Mb
android-sdk-linux/tools/emulator -avd Test -partition-size 100
  • Trovare il nome del device:
android-sdk-linux/platform-tools/adb devices
  • Copiare il file build.prop
android-sdk-linux/platform-tools/adb -s emulator-5554 pull  /system/build.prop .
  • Editarlo:
vi build.prop
ro.config.nocheckin=1
  • Trovare il device della partizione system:
cd $SDKPATH/android-sdk-linux/platform-tools/
./adb -s emulator-5554 shell mount | grep system
  • Montare la partizione system in rw
./adb -s emulator-5554 shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system
  • Settare permission per spoter scrivere:
./adb -s emulator-5554 shell chmod 777 /system/app
  • Copiare il file:
./adb -s emulator-5554 push build.prop /system/.
  • Copiare i prerequisiti per android market:
./adb -s emulator-5554 push ~/Desktop/Vending.apk /system/app/.
./adb -s emulator-5554 push ~/Desktop/GoogleServicesFramework.apk /system/app/.
  • Cancellare questo file:
./adb -s emulator-5554 shell rm /system/app/SdkSetup.apk
  • Spegnere l'emulatore tenendo premuto poweroff
  • Cacnellare i files:
cd ~/.android/avd/Test.avd
rm userdata.img userdata-qemu.img cache.img

  • Lanciare l'emulatore:
./emulator @Test

Riferimenti