Fork me on GitHub

随笔 - 997  文章 - 5  评论 - 181  阅读 - 300万 
  1. 获取最新的adb包

wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip

  1. 将软件包解压到指定位置

sudo unzip -d /usr/local/sbin platform-tools-latest-linux.zip

  1. 获取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

  1. 修改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即可。

 

1参考文档:
A https://www.jianshu.com/p/588df81117ce

posted on   虚生  阅读(6190)  评论(0编辑  收藏  举报
编辑推荐:
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
阅读排行:
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战
历史上的今天:
2018-11-15 python 中argparse 实例解析
点击右上角即可分享
微信分享提示