centos adb

2021-04-12  本文已影响0人  王国的荣耀

centos pip install

# freeze生成的 requirements.txt 文件包含当前环境的完全列表,不相关的依赖包也会包含进来。
pip freeze > requirements.txt
pip install -r requirements.txt 

# pipreqs只会包含项目 imports 的包,包含列表不是很完全
pip install pipreqs

cd /User/projiect/mulu
pipreqs ./ 

# 安装 pigar
pip install pigar

# pip 删除库
 pip uninstall douyin-open-VideoCreateAwemeCreate

centos adb install

# 进入opt文件夹
cd /opt
# 创建androidSdk 文件夹用来放sdk
mkdir androidSdk
# 下载sdk
wget https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
# 解压
unzip sdk-tools-linux-3859397.zip
# 配置环境变量
vim /etc/profile

#  下载platform-tools_r31.0.2-linux.
wget https://dl.google.com/android/repository/platform-tools_r31.0.2-linux.zip
unzip platform-tools_r31.0.2-linux.zip
mv platform-tools ./androidSdk/

# vim  /etc/profile
# 环境变量如下
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
export PATH=$PATH:/opt/androidSdk/tools/bin
export PATH=$PATH:/opt/androidSdk/platform-tools


sdkmanager --list
# 安装
sdkmanager "build-tools;30.0.3"

# 生效
source /etc/profile

which adb
/opt/androidSdk/platform-tools/adb

adb connect ip Connection refused

adb连接失败

使用ADB连接Android客户端时,连接失败

➜  ~ adb connect 192.168.9.159
failed to connect to '192.168.9.159:5555': Connection refused

可在Android客户端上,打开终端模拟器,输入:

setprop service.adb.tcp.port 5555
stop adbd
start adbd
➜  ~ adb connect 192.168.9.159
connected to 192.168.9.159:5555

多台设备中,选择一台设备进行连接等

adb -s device-name shell

➜  ~ adb devices
List of devices attached
adfafa   device
192.168.12.138:5555 device

adb -s adfafa shell
xiaomi:/ $ su root
xiaomi:/ # exit
xiaomi:/ $   
上一篇下一篇

猜你喜欢

热点阅读