新天。为有牺牲多壮志,敢教日月换

Mac系统安装adb

热烈欢迎,请直接点击!!!

进入博主App Store主页,下载使用各个作品!!!

注:博主将坚持每月上线一个新app!!

The Android Debug Bridge (ADB) is a command-line tool that can be used to install, uninstall and debug apps, transfer files and access the device's shell.

adb全称Android Debug Bridge,简单说就是通过命令行调试手机,特别是当手机gg进不了系统时会很有用。
安装homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Homebrew 安装:
brew reinstall --cask android-platform-tools
配置环境变量:
打开终端,入当前用户的home目录
打开.bash_profile文件,如果不存在先创建,可以用vim
open .bash_profile
在文末加入:
export ANDROID_HOME=/Users/yourname/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools
在终端输入:
source .bash_profile
输入adb devices,验证是否安装成功,成功如下:
strengthen@strengthen ~ % adb devices
List of devices attached
UQG5T20526008152    device
常用ADB命令:
adb push 电脑端路径 手机端路径 用于将文件推送到手机
adb push D:/DCIM /sdcard/ 即可从将D盘的DCIM文件夹复制到存储根目录
adb reboot 参数
adb reboot 手机会正常重启
adb reboot recovery 手机会重启到recovery卡刷模式
adb reboot bootloader 手机会重启到bootloader(fastboot)线刷模式

 

posted @   为敢技术  阅读(728)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!
历史上的今天:
2019-03-17 [Swift]LeetCode806. 写字符串需要的行数 | Number of Lines To Write String
2019-03-17 [Swift]LeetCode805. 数组的均值分割 | Split Array With Same Average
2019-03-17 [Swift]LeetCode804. 唯一摩尔斯密码词 | Unique Morse Code Words
2019-03-17 [Swift]LeetCode803. 打砖块 | Bricks Falling When Hit
2019-03-17 [Swift]LeetCode802. 找到最终的安全状态 | Find Eventual Safe States
2019-03-17 [Swift]LeetCode801. 使序列递增的最小交换次数 | Minimum Swaps To Make Sequences Increasing
2019-03-17 [Swift]LeetCode799. 香槟塔 | Champagne Tower
点击右上角即可分享
微信分享提示
西雅图
11°
00:14发布
西雅图
00:14发布
11°
北风
2级
空气质量
相对湿度
64%
今天
5°/11°
周六
2°/13°
周日
小雨
6°/14°