Closed gaz2030 closed 1 year ago
Hi, can you please copy your cmd output after rootavd.bat?
You dont have to use the localappdata env var anymore, this has changed due the android_home env var.
See the command examples
C:\Users\gaz20\Downloads\rootAVD-master\rootAVD-master>rootAVD.bat system-images\android-33\google_apis_playstore\x86_64\ramdisk.img
[*] Set Directorys
[-] Test IF ADB SHELL is working
[-] ADB connection possible
[-] In any AVD via ADB, you can execute code without root in /data/data/com.android.shell
[*] Cleaning up the ADB working space
[*] Creating the ADB working space
[*] looking for Magisk installer Zip
[*] Push Magisk.zip into /data/data/com.android.shell/Magisk
[-] C:\Users\gaz20\Downloads\rootAVD-master\rootAVD-master\Magisk.zip: 1 file pushed, 0 skipped. 59.7 MB/s (11278270 bytes in 0.180s)
[-] Backup exists already
[*] Push ramdisk.img into /data/data/com.android.shell/Magisk/ramdisk.img
[-] C:\Users\gaz20\AppData\Local\Android\Sdk\system-images\android-33\google_apis_playstore\x86_64\ramdisk.img: 1 file pushed, 0 skipped. 87.2 MB/s (3588708 bytes in 0.039s)
[-] Copy rootAVD Script into Magisk DIR
rootAVD.sh: 1 file pushed, 0 skipped. 22.4 MB/s (77313 bytes in 0.003s)
[-] run the actually Boot/Ramdisk/Kernel Image Patch Script
[*] from Magisk by topjohnwu and modded by NewBit XDA
[!] We are in a ranchu emulator shell
[-] Api Level Arch Detect
[-] Device Platform is x64 only
[-] Device SDK API: 33
[-] First API Level: 33
[-] The AVD runs on Android 13
[-] Switch to the location of the script file
[*] Looking for an unzip binary
[-] unzip binary found
[*] Extracting busybox and Magisk.zip via unzip ...
[*] Finding a working Busybox Version
[*] Testing Busybox ...
[!] Found a working Busybox Version
[!] BusyBox v1.34.1-Magisk (2022-03-22 04:11:29 PDT) multi-call binary.
[*] Move busybox from lib to workdir
[-] Checking AVDs Internet connection...
[!] AVD is offline
[*] Re-Run rootAVD in Magisk Busybox STANDALONE (D)ASH
[-] We are now in Magisk Busybox STANDALONE (D)ASH
[*] rootAVD with Magisk '25.2' Installer
[-] Get Flags
Error running /data/data/com.android.shell/Magisk/busybox: Unable to get realpath of grepError running /data/data/com.android.shell/Magisk/busybox: Unable to get realpath of grepError running /data/data/com.android.shell/Magisk/busybox: Unable to get realpath of grepError running /data/data/com.android.shell/Magisk/busybox: Unable to get realpath of grepError running /data/data/com.android.shell/Magisk/busybox: Unable to get realpath of grep[-] Encrypted data, keep forceencrypt
[*] RECOVERYMODE=false
[-] KEEPVERITY=false
[*] KEEPFORCEENCRYPT=true
Error running /data/data/com.android.shell/Magisk/busybox: Unable to get realpath of mvError running /data/data/com.android.shell/Magisk/busybox: Unable to get realpath of mvError running /data/data/com.android.shell/Magisk/busybox: Unable to get realpath of mvError running /data/data/com.android.shell/Magisk/busybox: Unable to get realpath of mvError running /data/data/com.android.shell/Magisk/busybox: Unable to get realpath of mv[-] copy all x86_64 files from /data/data/com.android.shell/Magisk/lib/x86_64 to /data/data/com.android.shell/Magisk
Error running /data/data/com.android.shell/Magisk/busybox: Unable to get realpath of chmod[*] Detecting ramdisk.img compression
Error running /data/data/com.android.shell/Magisk/busybox: Unable to get realpath of xxd[!] Ramdisk.img uses UNKNOWN compression
[!] aborting the script
[*] Pull Magisk.zip into
[-] /data/data/com.android.shell/Magisk/Magisk.zip: 1 file pulled, 0 skipped. 20.6 MB/s (11278270 bytes in 0.521s
[-] Clean up the ADB working space
[-] Install all APKs placed in the Apps folder
[-] Shut-Down and Reboot [Cold Boot Now] the AVD and see IF it worked
[-] Root and Su with Magisk for Android Studio AVDs
[-] Modded by NewBit XDA - Jan. 2021
[*] Huge Credits and big Thanks to topjohnwu, shakalaca and vvb2060
[-] Trying to shut down the AVD
[!] If the AVD doesnt shut down, try it manually!
Can you please give me the download link to this AVD image? You will get this when you download it the first time over SDK Manager. Perhaps you have to delete first, in order to be able to re-download it.
I have a similar AVD, but I don't get this issue of yours. It seems, a busybox command that is used in the Get Flaqs routine crashes on your AVD, but not on mine.
Preparing "Install SDK Patch Applier v4 (revision: 1)". Downloading https://dl.google.com/android/repository/3534162-studio.sdk-patcher.zip "Install SDK Patch Applier v4 (revision: 1)" ready. Installing SDK Patch Applier v4 in C:\Users\gaz20\AppData\Local\Android\Sdk\patcher\v4 "Install SDK Patch Applier v4 (revision: 1)" complete. "Install SDK Patch Applier v4 (revision: 1)" finished. Preparing "Install Android Emulator (revision: 32.1.13)". Downloading https://dl.google.com/android/repository/emulator-windows_x64-10086546.zip "Install Android Emulator (revision: 32.1.13)" ready. Installing Android Emulator in C:\Users\gaz20\AppData\Local\Android\Sdk\emulator "Install Android Emulator (revision: 32.1.13)" complete. "Install Android Emulator (revision: 32.1.13)" finished. Preparing "Install Google APIs Intel x86_64 Atom System Image (revision: 6)". Downloading https://dl.google.com/android/repository/sys-img/google_apis/x86_64-34_r06.zip "Install Google APIs Intel x86_64 Atom System Image (revision: 6)" ready. Installing Google APIs Intel x86_64 Atom System Image in C:\Users\gaz20\AppData\Local\Android\Sdk\system-images\android-34\google_apis\x86_64 "Install Google APIs Intel x86_64 Atom System Image (revision: 6)" complete. "Install Google APIs Intel x86_64 Atom System Image (revision: 6)" finished. Preparing "Install Android Emulator hypervisor driver (installer) (revision: 2.0.0)". Downloading https://dl.google.com/android/repository/gvm-windows_v2_0_0.zip "Install Android Emulator hypervisor driver (installer) (revision: 2.0.0)" ready. Installing Android Emulator hypervisor driver (installer) in C:\Users\gaz20\AppData\Local\Android\Sdk\extras\google\Android_Emulator_Hypervisor_Driver "Install Android Emulator hypervisor driver (installer) (revision: 2.0.0)" complete. "Install Android Emulator hypervisor driver (installer) (revision: 2.0.0)" finished. Preparing "Install Intel x86 Emulator Accelerator (HAXM installer) (revision: 7.6.5)". Downloading https://dl.google.com/android/repository/extras/intel/haxm-windows_v7_6_5.zip "Install Intel x86 Emulator Accelerator (HAXM installer) (revision: 7.6.5)" ready. Installing Intel x86 Emulator Accelerator (HAXM installer) in C:\Users\gaz20\AppData\Local\Android\Sdk\extras\intel\Hardware_Accelerated_Execution_Manager "Install Intel x86 Emulator Accelerator (HAXM installer) (revision: 7.6.5)" complete. "Install Intel x86 Emulator Accelerator (HAXM installer) (revision: 7.6.5)" finished. Preparing "Install Android SDK Platform 34 (revision: 1)". Downloading https://dl.google.com/android/repository/platform-34-ext7_r01.zip "Install Android SDK Platform 34 (revision: 1)" ready. Installing Android SDK Platform 34 in C:\Users\gaz20\AppData\Local\Android\Sdk\platforms\android-34 "Install Android SDK Platform 34 (revision: 1)" complete. "Install Android SDK Platform 34 (revision: 1)" finished. Preparing "Install Android SDK Build-Tools 34 (revision: 34.0.0)". Downloading https://dl.google.com/android/repository/build-tools_r34-windows.zip "Install Android SDK Build-Tools 34 (revision: 34.0.0)" ready. Installing Android SDK Build-Tools 34 in C:\Users\gaz20\AppData\Local\Android\Sdk\build-tools\34.0.0 "Install Android SDK Build-Tools 34 (revision: 34.0.0)" complete. "Install Android SDK Build-Tools 34 (revision: 34.0.0)" finished. Preparing "Install Android SDK Platform-Tools (revision: 34.0.3)". Downloading https://dl.google.com/android/repository/platform-tools_r34.0.3-windows.zip "Install Android SDK Platform-Tools (revision: 34.0.3)" ready. Installing Android SDK Platform-Tools in C:\Users\gaz20\AppData\Local\Android\Sdk\platform-tools "Install Android SDK Platform-Tools (revision: 34.0.3)" complete. "Install Android SDK Platform-Tools (revision: 34.0.3)" finished. Parsing C:\Users\gaz20\AppData\Local\Android\Sdk\build-tools\34.0.0\package.xml Parsing C:\Users\gaz20\AppData\Local\Android\Sdk\emulator\package.xml Parsing C:\Users\gaz20\AppData\Local\Android\Sdk\extras\google\Android_Emulator_Hypervisor_Driver\package.xml Parsing C:\Users\gaz20\AppData\Local\Android\Sdk\extras\intel\Hardware_Accelerated_Execution_Manager\package.xml Parsing C:\Users\gaz20\AppData\Local\Android\Sdk\patcher\v4\package.xml Parsing C:\Users\gaz20\AppData\Local\Android\Sdk\platform-tools\package.xml Parsing C:\Users\gaz20\AppData\Local\Android\Sdk\platforms\android-34\package.xml Parsing C:\Users\gaz20\AppData\Local\Android\Sdk\system-images\android-34\google_apis\x86_64\package.xml Android SDK is up to date. Running Intel® HAXM installer Intel HAXM reinstalled successfully! Running Android Emulator Hypervisor Driver installer
SERVICE_NAME: gvm
TYPE : 1 KERNEL_DRIVER
STATE : 1 STOPPED
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
[SC] DeleteService SUCCESS
SERVICE_NAME: gvm
TYPE : 1 KERNEL_DRIVER
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
PID : 0
FLAGS :
Creating Android virtual device
Android virtual device Pixel_3a_API_34_extension_level_7_x86_64 was successfully created
I also tried 33 Packages to install: - Google APIs Intel x86_64 Atom System Image (system-images;android-33;google_apis;x86_64) Preparing "Install Google APIs Intel x86_64 Atom System Image (revision: 12)". Downloading https://dl.google.com/android/repository/sys-img/google_apis/x86_64-33_r12.zip
Thanks, but there is not the PlayStore Image within, only Google Apis.
i just tried on linux, and came up with the same busybox error. Then I used an older fork https://github.com/bulutg/rootAVD and it worked sort of. No error with busybox but it only installed magisk apk it didnt install to system .34
Ill try a different device.
Old version worked on version 33 pixel 6 pro
Ok, this doesnt relly help to fix the issue. But good to know
So the Windows AVD image is the same as it is for Darwin.
https://dl.google.com/android/repository/sys-img/google_apis_playstore/x86_64-33_r07.zip
But in both scenarios, I don't get this issue. Is there anything else you might have changed? Some conditions, like running the script while the AVD is on an early bootstage.
Or did you temper with something else? Like the wifi connection, as it says in your log, your AVD is offline.
I even tried it offline as well, but also didn't get any errors.
Did you use a special Magisk Version? Anything else I should know about?
I might have run rootAVD it in early stages of boot. I will try again and see if I can get it to work. I did install Intel® HAXM installer
Thanks, idealy i can reproduce the issue, so i can really fix it.
i just tried on linux, and came up with the same busybox error. Then I used an older fork https://github.com/bulutg/rootAVD and it worked sort of. No error with busybox but it only installed magisk apk it didnt install to system .34
Ill try a different device.
Old version worked on version 33 pixel 6 pro
can confirm this alternative is working fine with fakebootimg whereas this one is getting the realpath erros
Thanks, but still, doesn't help finding the cause of that issue. I might have found it though, should be fixed now. Please try it and report back.
Thanks, but still, doesn't help finding the cause of that issue. I might have found it though, should be fixed now. Please try it and report back.
Apologies for the late response, got lost in our inbox lol.
But working great now 👍
Hi after a new install of Windows and Android Studio when running any rootAVD.bat command I am greeted with the Usage/Arguments command. Not sure but looking through the folder locations after running
rootAVD.bat %LOCALAPPDATA%\Android\Sdk\system-images\android-33\google_apis\x86_64\ramdisk.img
Even running rootAVD.bat ListAllAVDs brings up Usage/Arguments it looks like google_apis_playstore is no longer used and it is just google_apis