我在 bat 这方面是个新手,不是很了解,网上查了 也查不到 就想做个半自动安装的 bat 脚本
adb devices ::adb shell ::查询手机连接情况
@set /p path=APK path:
adb install %path%
::echo end pause
1
greed1is9good 2020-06-18 14:29:30 +08:00 via Android
自己看下 adb 命令+linux shell 命令
|
2
hu8245 2020-06-18 14:32:08 +08:00
用 powershell 吧, 很好用。
|
3
LLaMA2 2020-06-18 14:35:01 +08:00
你调用了 adb shell
之后执行的命令回显管道已经没有了 你可以试着如下 举例 @echo off :begin adb disconnect set input= set /p input=please input your device IP: adb connect %input% echo rooting this device! adb root echo remounting adb remount adb shell content query --uri content://telephony/carriers/preferapn echo replace APNs config file adb push apns-conf.xml /system/etc adb push apns-conf.xml.bakforspec /system/etc echo restoring default APN adb shell "content delete --uri content://telephony/carriers/restore" echo this device id is adb shell "settings get secure android_id" echo show file stat adb shell "busybox stat /system/etc/apns-conf.xml" adb shell "busybox stat /system/etc/apns-conf.xml.bakforspec" echo press any key for continue! pause>nul goto begin |
4
no1xsyzy 2020-06-18 14:41:40 +08:00
跟 ADB 没关系,你覆盖了 PATH 环境变量
|
6
dingwen07 2020-06-18 16:38:37 +08:00
set /p apkpath=APK path:
adb install %apkpath% |