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=