当前位置:网站首页>adb指令整理
adb指令整理
2022-07-27 05:58:00 【唔嗯雯的学习笔记】
【参考文档】
[1] Google Doc
1.简介
ADB,即 Android Debug Bridge 是一种允许模拟器或已连接的 Android 设备进行通信的命令行工具。
2.主要功能
手机端与客户端之间互相沟通的桥梁。
(1)在设备上运行Shell命令;
(2)将本地APK软件安装至模拟器或Android设备;
(3)管理设备或手机模拟器上的预定端口。
3.组成
(1)客户端
eg.手机
该组件发送命令。客户端在开发计算机上运行。您可以通过发出 adb 命令从命令行终端调用客户端。
(2)后台程序
eg.功能性程序
该组件在设备上运行命令。后台程序在每个模拟器或设备实例上作为后台进程运行。
(3)服务器
eg.计算机
该组件管理客户端和后台程序之间的通信。服务器在开发计算机上作为后台进程运行。
4.常用指令
| 命令 | 功能 |
|---|---|
| adb help | adb说明文档 |
| adb device | 查看连接的设备号 |
| adb shell | 进入adb调试前的第一条指令 |
| adb install apk包名 | 电脑里的apk文件安装到手机端 |
| adb root | root手机,超级用户权限 |
| adb reboot | 重启手机 |
| adb remount | 有替换文件的权限 |
adb push <电脑路径> <手机路径> | 从电脑上传文件到手机 |
adb pull<手机路径><电脑路径> | 把手机上的文件复制到电脑上 |
注:adb remount’ 将 ‘/system’ 部分置于可写入的模式,默认情况下 ‘/system’ 部分是只读模式的。应用在系统的默认场景。
这个命令只适用于已被 root 的设备。‘adb remount’ 的作用相当于 ‘adb shell mount -o rw,remount,rw /system’。
5.出现的问题
(1)如果连接不成功
重启手机或者电脑,adb start-serve 先结束adb服务,adb kill-serve重新打开adb服务。
(2)adb权限不对
adb: error: stat failed when trying to push to /product/overlay/: Permission denied
adb root 获取root权限
adb disable-verity 关闭分区检测功能
adb reboot 执行adb disable-verity后需要重启设备
adb root 设备重启后再次获取root权限
adb remount 使system分区为可读可写模式
边栏推荐
- Analysis of strong tennis cup 2021 PWN competition -- babypwn
- Dajiang livox customized format custommsg format conversion pointcloud2
- 仿真模型简单介绍
- Peptide nucleic acid oligomer containing azobenzene monomer (nh2-tnt4, n-pnas) Qiyue biological customization
- String类的用法
- 端口转发小结
- MySQL query operation index optimization practice
- Why can cross entropy loss be used to characterize loss
- Algorithm -- Fibonacci sequence (kotlin)
- VIM editor deletes all file contents
猜你喜欢

Bert and RESNET can also be trained on mobile phones?!

DNA modified zinc oxide | DNA modified gold nanoparticles | DNA coupled modified carbon nanomaterials

把Excel转换成CSV/CSV UTF-8

Drools (5): drools basic syntax (3)

Working principle analysis of deepsort

Significance of NVIDIA SMI parameters

(转帖)eureka、consul、nacos的对比2

Digital image processing Chapter 1 Introduction

(转帖)eureka、consul、nacos的对比1

Pytorch uses data_ Prefetcher improves data reading speed
随机推荐
How to implement Devops with automation tools | including low code and Devops application practice
R2LIVE代码学习记录(3):对雷达特征提取
PNA peptide nucleic acid modified peptide suc Tyr Leu Val PNA | suc ala Pro Phe PNA 11
使用反射实现动态修改@Excel的注解属性
36 - 新的 Promise 方法:allSettled & any & race
MySQL quickly compares database table data
Drools (5): drools basic syntax (3)
Gbase 8C technical features
Golang encapsulates the packages involved in MySQL and the differences between sqlx and Gorm
Watermelon book learning notes - Chapter 1 and 2
Vscode connection remote server development
newest! SASAC releases new measures for digital transformation of state-owned enterprises
Music website management system based on SSM
Shell programming specifications and variables
二叉树--天然的查找语义(1)基础篇
线性表 -- 栈和队列
ESP8266(ESP-12F) 第三方库使用 -- SparkFun_APDS9960 (手势识别)
Instruction set x digital technology accelerates the digital transformation of government and enterprises, and builds Unicorn enterprise alliance in DT field
A Competitive Swarm Optimizer for Large Scale Optimization
2022 0726 顾宇佳 学习笔记