From f4704399c776381adae44ff80257146d932e04db Mon Sep 17 00:00:00 2001 From: NewBit <37043777+newbit1@users.noreply.github.com> Date: Thu, 14 Jan 2021 11:43:46 +0100 Subject: [PATCH] Add Windows Batch File --- rootAVD.bat | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 rootAVD.bat diff --git a/rootAVD.bat b/rootAVD.bat new file mode 100644 index 0000000..75d7ac6 --- /dev/null +++ b/rootAVD.bat @@ -0,0 +1,104 @@ +@echo off +SetLocal EnableDelayedExpansion +REM ########################################################################################## +REM # +REM # Magisk Boot Image Patcher - original created by topjohnwu and modded by shakalaca's +REM # modded by NewBit XDA for Android Studio AVD +REM # Successfully tested on Android API: +REM # [Dec. 2019] - 29 Google Apis Play Store x86_64 Production Build +REM # [Jan. 2021] - 30 Google Apis Play Store x86_64 Production Build +REM # +REM ########################################################################################## + +if "%1" == "" ( + echo "rootAVD needs a path with file to an AVD ramdisk" + echo "rootAVD.bat %LOCALAPPDATA%\Android\Sdk\system-images\android-30\google_apis_playstore\x86_64\ramdisk.img" + echo "rootAVD will backup your ramdisk.img and replace it when finished" + exit /B 0 +) + +set RAMDISKFILE=%1 +set BACKUPFILE=%RAMDISKFILE%.bak +set ROOTAVD="%cd%" + +IF NOT EXIST %RAMDISKFILE% ( + echo "[!] %RAMDISKFILE% doesn't exist" + exit /B 0 +) + +IF NOT EXIST %BACKUPFILE% ( + echo "[*] create Backup File" + copy %RAMDISKFILE% %BACKUPFILE% +) ELSE ( + echo "[-] Backup exists already" +) +set ADBWORKS= +adb shell -n echo true > tmpFile +set /P ADBWORKS=