Mac上android模拟器使用

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u010164190/article/details/84894545
0.首先在eclipse或者android studio创建android模拟器
 注意:选择armv7或armv8都可以,模拟器版本建议选择比较新的

1.配置环境
# emacs /etc/profile
#NDK
export PATH=~/android-sdks/ndk-bundle
#SDK                                                                                                                                                                                                            
export PATH=~/android-sdks/platform-tools                                                                                                                                                              
export PATH=~/android-sdks/tools                                                                                                                                                                                                                                                                                                                                                                                     

2.启动模拟器(arm-*)
# 查看
# 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



猜你喜欢

转载自blog.csdn.net/u010164190/article/details/84894545