命令行运行android模拟器

创建模拟器

  1. android create avd --name avd_4.1 --target "android-16" --abi armeabi-v7a  
  2. Android 4.1 is a basic Android platform.  
  3. Do you wish to create a custom hardware profile [no]     
  4. Created AVD 'avd_4.1' based on Android 4.1, ARM (armeabi-v7a) processor,  
  5. with the following hardware config:  
  6. hw.lcd.density=240  
  7. vm.heapSize=48  
  8. hw.ramSize=512  



运行模拟器

  1. emulator -avd "avd_4.1"  
  2. 2012-10-28 13:47:12.086 emulator-arm[1069:1107] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.  
  3. emulator: emulator window was out of view and was recentered  



安装apk到模拟器

  1. adb install ./bin/AntTest-debug.apk   
  2. 82 KB/s (37443 bytes in 0.442s)  
  3. pkg: /data/local/tmp/AntTest-debug.apk  
  4. Success  



卸载apk

  1. adb uninstall com.doodoobird.anttest  
  2. Success  
原文地址:https://www.cnblogs.com/Free-Thinker/p/4058614.html