ubuntu 18.04 安装并配置adb
- 获取最新的adb包
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
- 将软件包解压到指定位置
sudo unzip -d /usr/local/sbin platform-tools-latest-linux.zip
- 获取adb、fastboot脚本
sudo wget -O /usr/local/sbin/adb https://raw.githubusercontent.com/NicolasBernaerts/ubuntu-scripts/master/android/adb
sudo wget -O /usr/local/sbin/fastboot https://raw.githubusercontent.com/NicolasBernaerts/ubuntu-scripts/master/android/fastboot
- 修改adb、fastboot权限
sudo chmod +x /usr/local/sbin/platform-tools/adb /usr/local/sbin/adb
sudo chmod +x /usr/local/sbin/platform-tools/fastboot /usr/local/sbin/fastboot
至此,adb已经成功下载安装,最新的ubuntu中,默认/usr/local/sbin不在环境变量中,所以我们需要将路径加入环境变量:
sudo vim /etc/profile
在文件的最后一行写入
export PATH=/usr/local/sbin:$PATH
最后执行source /etc/profile,刷新配置文件使得修改生效,如果个人配置文件中有配置受到影响,再执行一遍source ~/.profile即可。

本文详述了在Ubuntu18.04系统中安装并配置ADB及Fastboot工具的具体步骤,包括下载最新ADB包、解压、脚本获取、权限设置以及环境变量的添加,确保设备管理工具的顺利运行。

1062

被折叠的 条评论
为什么被折叠?



