替换APK操作脚本

@echo off 
adb root
adb remount
set APK_PATH=%cd%


for /f "delims=" %%i in ('dir /b /a-d /s %APK_PATH%') do (
if %%~xi==.apk (
echo.
echo --------------- replace %%~nxi ---------------
adb shell rm -rf system/priv-app/%%~ni/oat
adb shell rm system/priv-app/%%~ni/%%~nxi
adb push %APK_PATH%\%%~nxi system/priv-app/%%~ni/
 ) 


)




:ask
set /p o=Need reboot system ? (y n):
if /i "%o%"=="y" goto yes
if /i "%o%"=="n" goto no
goto ask
:yes
adb reboot
adb shell exit
:no
adb shell exit

你可能感兴趣的:(替换APK操作脚本)