人生不是马拉松!人生各自精彩! ------ 博客首页

adb无root手机给手机进行远程adb连接方法

bash InstallTools.sh

!/data/data/com.termux/files/usr/bin/bash

directory="$(pwd)"
echo
echo -e "\e[93mThis script will install ADB & FastBoot Tools in Termux."
echo
echo -e "\e[32m[] \e[34mDownloading wrapper script..."
mkdir $PREFIX/tmp/adbtemp
downpath="$PREFIX/tmp/adbtemp"
wget https://github.com/MasterDevX/Termux-ADB/raw/master/bin/adb -P $downpath/ -q
echo -e "\e[32m[
] \e[34mDownloading binaries..."
wget https://github.com/MasterDevX/Termux-ADB/raw/master/bin/adb.bin -P $downpath/ -q
wget https://github.com/MasterDevX/Termux-ADB/raw/master/bin/fastboot -P $downpath/ -q
wget https://github.com/MasterDevX/Termux-ADB/raw/master/bin/fastboot-armeabi -P $downpath/ -q
echo -e "\e[32m[] \e[34mCopying files to bin..."
cp $downpath/
$PREFIX/bin
echo -e "\e[32m[] \e[34mSetting execution permissions..."
files="$(ls $downpath)"
cd $PREFIX/bin
chmod +x $files
echo -e "\e[32m[
] \e[34mCreating workspace directory..."
cd $HOME
if [ ! -d "adbfiles" ]; then
mkdir adbfiles
fi
echo -e "\e[32m[*] \e[34mCleaning up..."
cd $directory
rm -rf $downpath
rm -rf InstallTools.sh
echo
echo -e "\e[32mTools were successfully installed!\e[39m"
echo

posted @ 2022-02-22 17:30  wqstu  阅读(477)  评论(0编辑  收藏  举报

这是一位学生的个人网站。主要用于日常学习过程中的积累,大部分都是来自于原创的笔记。不断参考,学习网上先驱者的经验分享以求更好。

致力于linux运维,Python的学习,关注互联网前沿技术与趋势。


python优质博客 | 大牛的Python学习