1,建立一个工作目录
touch .bash_profile open .bash_profile
2,配置各种环境变量
export ANDROID_SDK_ROOT=/Users/jianan/dev/adt-bundle-mac-x86_64-20130911/sdk export ANDROID_NDK_ROOT=/Users/jianan/dev/android-ndk-r9d export COCOS2DX_ROOT=/Users/jianan/dev/cocos2d-x-3.2 export NDK_ROOT=/Users/jianan/dev/android-ndk-r9d export PATH=${PATH}:${ANDROID_SDK_ROOT} export PATH=${PATH}:${ANDROID_NDK_ROOT} export ANT_ROOT=/Users/jianan/dev/apache-ant-1.8.2 export PATH=${PATH}:${ANT_ROOT}/bin export PATH=/Users/jianan/dev/adt-bundle-mac-x86_64-20130911/sdk/platform-tools/:$PATH #Add environment variable COCOS_CONSOLE_ROOT for cocos2d-x export COCOS_CONSOLE_ROOT=/Users/jianan/dev/cocos2d-x-3.2/tools/cocos2d-console/bin export PATH=$COCOS_CONSOLE_ROOT:$PATH
3,adb
adb kill-server
adb start-start
当你的环境变量路径不确定时,可以拖到终端看环境变量
4,打开小米调试模式
拨号 *#*#717717#*#*
然后打开调试模式
然后,小米终于可以连接上mac了!!!
注意拨号一次是打开,第二次则是关闭。当出现:diag usb port enable时就可以了。