Mac上android emulator模拟器使用
0.首先在eclipse或者android studio创建android模拟器
注意:选择armv7或armv8都可以,模拟器版本建议选择比较新的
1.配置环境
# emacs /etc/profile
#NDK
export PATH=$PATH:~/android-sdks/ndk-bundle
#SDK
export PATH=$PATH:~/android-sdks/platform-tools
export PATH=$PATH:~/android-sdks/tools
2.启动模拟器(arm-*)
注意:先使用android studio创建一个android虚拟机
# 查看
# android list avd
#启动模拟器
# cd ~/android-sdks/emulator
# ./emulator -help
Android Emulator usage: emulator [options] [-qemu args]
options:
-list-avds list available AVDs
-writable-system make system & vendor image writable after 'adb remount'
-memory <size> physical RAM size in MBs
....
//第一次启动执行
# ./emulator @模拟器名字
//对system分区可以读、写、删除操作,RAM为4G
# emulator -avd 模拟器名字 -writable-system -memory 4096
//Or
# ./emulator @模拟器名字 -writable-system -memory 4096
3.在模拟器pull/push文件
# adb root && adb remount
# adb push test.sh /system/bin