-
Notifications
You must be signed in to change notification settings - Fork 0
/
monitor-helper.bat
57 lines (49 loc) · 1.25 KB
/
monitor-helper.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@echo off
setlocal
set installFile=%1
echo %installFile%
adb start-server
rem adb connect 192.168.56.101:5555
adb connect 192.168.56.102:5555
set count=1
set suffix=%~x1
if "%suffix%"==".tsk" goto install_skin
if "%suffix%"==".apk" goto install_apk
goto unsupported_install
:install_skin
echo "将安装皮肤文件: "
adb remount
adb push %installFile% /sdcard/ttpod/skin/
goto install_success
:install_apk
if %count% equ 2 goto install_failed
echo "将安装应用文件: "
rem =========================
rem adb install -r %installApk%
rem =========================
adb install -r %installFile% | findstr /Q "Failure"
rem =========================
rem install failed
if %ERRORLEVEL% equ 0 goto reinstall_apk
rem =========================
rem install succeed
goto install_success
:reinstall_apk
echo "应用安装失败,正在自动重新安装........"
adb uninstall "com.sds.android.ttpod"
set count=2
goto install_apk
:install_success
echo "安装成功!!!!"
goto start_ttpod
rem goto end
:install_failed
echo "无法安装,去找开发人员吧!"
goto end
:unsupported_install
echo "该文件不支持,去找开发人员吧!"
goto end
:start_ttpod
adb shell am start -n "com.sds.android.ttpod/com.sds.android.ttpod.EntryActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
:end
pause