跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • 用 BAT 调用 ADB 命令,第一条能运行,第二条显示不是内部命令,请问怎么弄。。。
未分類
26 6 月 2020

用 BAT 调用 ADB 命令,第一条能运行,第二条显示不是内部命令,请问怎么弄。。。

用 BAT 调用 ADB 命令,第一条能运行,第二条显示不是内部命令,请问怎么弄。。。

資深大佬 : AzsharR 11

我在 bat 这方面是个新手,不是很了解,网上查了 也查不到 就想做个半自动安装的 bat 脚本

adb devices ::adb shell ::查询手机连接情况

@set /p path=APK path:

adb install %path%

::echo end pause

大佬有話說 (6)

  • 資深大佬 : greed1is9good

    自己看下 adb 命令+linux shell 命令

  • 資深大佬 : hu8245

    用 powershell 吧, 很好用。

  • 資深大佬 : ye4tar

    你调用了 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

  • 資深大佬 : no1xsyzy

    跟 ADB 没关系,你覆盖了 PATH 环境变量

  • 資深大佬 : RIcter

    @set /p path=APK path:
    …

  • 資深大佬 : dingwen07

    set /p apkpath=APK path:

    adb install %apkpath%

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具