当前位置: 代码迷 >> Android >> android模拟器 sdcard上装配apk
  详细解决方案

android模拟器 sdcard上装配apk

热度:105   发布时间:2016-05-01 10:33:54.0
android模拟器 sdcard上安装apk

打开DDMS
Eclipse -> Window -> open perspective ->DDMS
if want push file to Emulator then you can use?
DDMS->select the emulator ->then open file explorer ->select SDcard(mnt/sdcard)->
then click push button on right top to browse the file.

[2013-04-24 16:25:28 - ddms] transfer error: Read-only file system
[2013-04-24 16:25:28] Failed to push selection: Read-only file system


just go to


C:\Documents and Settings\<adminstrator>\.android\avd
take 'properties' of your avd folder(there is a folder for each of the avds)..uncheck 'Read only'->ok

D:\adt-bundle-windows-x86-20130219\sdk\platform-tools>adb devices
List of devices attached
emulator-5554 ? device
查看sdcard目录权限
D:\adt-bundle-windows-x86-20130219\sdk\platform-tools>adb shell
[email protected]:/ # cd /sdcard/
cd /sdcard/
[email protected]:/sdcard # ls -al
ls -al
d--------- root ? ? root ? ? ? ? ? ? ?2013-04-24 09:08 .android_secure
d---rwxr-x system ? sdcard_rw ? ? ? ? ?2013-04-24 08:59 LOST.DIR
----rwxr-x system ? sdcard_rw ? 467531 2013-02-12 23:34 foo.txt
d---rwxr-x system ? sdcard_rw ? ? ? ? ?2013-04-24 08:59 myfolder
[email protected]:/sdcard # mkdir myfolder
mkdir myfolder
mkdir failed for myfolder, File exists

[email protected]:/sdcard # exit
exit

向emulator sdcard中push文件
D:\adt-bundle-windows-x86-20130219\sdk\platform-tools>adb push myapp.apk ?/sdcard/
myfolder/myapp.apk
195 KB/s (1654639 bytes in 8.278s)
D:\adt-bundle-windows-x86-20130219\sdk\platform-tools>

安装emulator sdcard卡下的apk文件
D:\adt-bundle-windows-x86-20130219\sdk\platform-tools>adb shell
[email protected]:/ # adb install /sdcard/myfolder/myapp.apk
adb install /sdcard/myfolder/myapp.apk
1492 KB/s (1654639 bytes in 1.082s)
? ? ? ? pkg: /data/local/tmp/myapp.apk
Success
[email protected]:/ #

  相关解决方案