mac adb环境变量配置

1、找到mac 下adb的路径:

在cmd命令下:

首先说一下命令的用法 touch filename

常用用法:touchfilename
如果filename存在,使用touch指令可更改这个文件或目录的日期时间,包括存取时间和更改时间;
如果filename不存在,touch指令会在当前目录下新建一个空白文件filename

1) touch .bash_profile

2) open .bash_profile

打开一个文本文件,如果是新创建的一般为空

再这个文件配置以下adb的路径信息

export PATH=${PATH}:sdkpath/platform-tools,其中sdkpath 是自己的idk的真实路径。


如果默认shell换成zsh 

则在.zshrc 加入adb的路径信息


3)关闭并保存这个文件,再次输入命令adb,会看到如下信息 ,配置成功

Android Debug Bridge version 1.0.32
Revision 09a0d98bebce-android


 -a                            - directs adb to listen on all interfaces for a connection
 -d                            - directs command to the only connected USB device
                                 returns an error if more than one USB device is present.
 -e                            - directs command to the only running emulator.
                                 returns an error if more than one emulator is running.
 -s <specific device>          - directs command to the device or emulator with the given
                                 serial number or qualifier. Overrides ANDROID_SERIAL
                                 environment variable.
 -p <product name or path>     - simple product name like 'sooner', or
                                 a relative/absolute path to a product
                                 out directory like 'out/target/product/sooner'.
                                 If -p is not specified, the ANDROID_PRODUCT_OUT
                                 environment variable is used, which must
                                 be an absolute path.
 -H                            - Name of adb server host (default: localhost)
 -P                            - Port of adb server (default: 5037)





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值