Chinaunix首页 | 论坛 | 博客
  • 博客访问: 256284
  • 博文数量: 79
  • 博客积分: 3450
  • 博客等级: 中校
  • 技术积分: 875
  • 用 户 组: 普通用户
  • 注册时间: 2006-06-18 13:12
文章分类

全部博文(79)

文章存档

2011年(1)

2010年(3)

2009年(19)

2008年(23)

2007年(15)

2006年(18)

我的朋友

分类: 嵌入式

2009-12-01 16:47:49

常需要安装编译好的 *.apk 、*.so、 *.bin 文件到 Android emulator 模拟器中测试,会遇到很多命令,在此留下我操作的方法供参考

1、启动与调试命令
启动两个emulator模拟器
~/android-sdk-linux_x86-1.5_r2/tools $ ./emulator -avd avdname1
~/android-sdk-linux_x86-1.5_r2/tools $ ./emulator -avd avdname2

显示emulator模拟器驱动
~/android-sdk-linux_x86-1.5_r2/tools $ ./adb devices

修改system目录的属性为可读写
~/android-sdk-linux_x86-1.5_r2/tools $ ./adb -s emulator-5554 remount

push到指定的目录
~/android-sdk-linux_x86-1.5_r2/tools $ ./adb -s emulator-5554 push /out/system-app/*.apk /system/app
~/android-sdk-linux_x86-1.5_r2/tools $ ./adb -s emulator-5554 push /out/system-bin/*.bin /system/bin
~/android-sdk-linux_x86-1.5_r2/tools $ ./adb -s emulator-5554 push /out/system-lib/*.so /system/lib


2、运行
启动指定 emulator 驱动 shell 命令
~/android-sdk-linux_x86-1.5_r2/tools $ ./adb -s emulator-5554 shell

修改 *.bin的执行权限
# chmod 777 /system/bin/*.bin

修改根文件系统为可读写权限
# mount -o remount rw /

启动 *.bin 进程
# /system/bin/*.bin

查看服务进程是否加入
# service list

查看eth0 IP地址
# ifconfig eth0

启动 *.apk 进程
在 emulator 模拟器中运行 *.apk 程序图标

启动调试查看启动后效果
~/android-sdk-linux_x86-1.5_r2/tools $ ./ddms

这样即可运行 
阅读(993) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~