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
root@android:/ # cd /sdcard/
cd /sdcard/
root@android:/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
root@android:/sdcard # mkdir myfolder
mkdir myfolder
mkdir failed for myfolder, File exists

1|root@android:/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
root@android:/ # 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
root@android:/ #

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值