Closed flazouh closed 1 year ago
I tried :
adb root adb shell avbctl disable-verification adb reboot adb root adb remount
But I get
$ adb shell avbctl disable-verification
/system/bin/sh: avbctl: not found
But I don't get any popups such as "Requires additionnal setup" ...
I tried :
adb root adb shell avbctl disable-verification adb reboot adb root adb remount
But I get
$ adb shell avbctl disable-verification /system/bin/sh: avbctl: not found
But I don't get any popups such as "Requires additionnal setup" ...
You don't need these commands.
android-34 is not Android 7. Use the same ramdisk from the running avd.
[*] Install/Patch /sdcard/Download/fakeboot.img and hit Enter when done(max. 60s)
[!] Removing Temporarily installed Magisk
[!] No magisk_patched file could be found!
It seems you didn't patched the fake boot.img. Didn`t the Magisk App pop up after
[*] Install/Patch /sdcard/Download/fakeboot.img and hit Enter when done(max. 60s)
where do I find this boot.img? I don't see the instructions about that in the README.MD
/sdcard/Download/fakeboot.img
There is a video/gif and a passage about the fakeboot.img in the readme. Also some hints appear in the script, when it waits for you to patch it in Magisk. The script even openes Magisk for you, very simple, i thought.
Hi @newbit1
I tried your script again, but this time I couldn't find fakeboot.img.
is there something that must be done so that fakeboot.img appears? I have tried the fakeboot argument:
.\rootAVD.bat system-images\android-31\google_apis\x86_64\ramdisk.img FAKEBOOTIMG
and while [*] Install/Patch /sdcard/Download/fakeboot.img and hit Enter when done(max. 60s)
I try to emulator64_x86_64_arm64:/ $ ls /sdcard/Download/
but the directory is still empty
I use the canary version of magisk
no nothing special is needed. If the script says it is under /sdcard/Download/fakeboot.img
it should be there.
Can you post the full log? Perhaps there is a different issue before.
here's the full log:
PS C:\Users\Kyouma\Desktop\rootAVD> .\rootAVD.bat system-images\android-31\google_apis\x86_64\ramdisk.img FAKEBOOTIMG
[*] 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
[*] Testing the ADB working space
[!] /data/data/com.android.shell is available
[*] 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\Kyouma\Desktop\rootAVD\Magisk.zip: 1 file pushed, 0 skipped. 261.2 MB/s (12514269 bytes in 0.046s)
[-] Backup exists already
[*] Push ramdisk.img into /data/data/com.android.shell/Magisk/ramdisk.img
[-] C:\Android\system-images\android-31\google_apis\x86_64\ramdisk.img: 1 file pushed, 0 skipped. 267.5 MB/s (3689317 bytes in 0.013s)
[-] Copy rootAVD Script into Magisk DIR
rootAVD.sh: 1 file pushed, 0 skipped. 66.2 MB/s (79822 bytes in 0.001s)
[-] 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: 31
[-] First API Level: 31
[-] The AVD runs on Android 12
[-] 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 /data/data/com.android.shell/Magisk/lib/arm64-v8a/libbusybox.so
[*] Testing Busybox /data/data/com.android.shell/Magisk/lib/x86/libbusybox.so
[!] Found a working Busybox Version
[!] BusyBox v1.34.1-Magisk (2022-08-19 10:51:18 PDT) multi-call binary.
[*] Move busybox from lib to workdir
[-] Checking AVDs Internet connection...
[-] Checking AVDs Internet connection another way...
[!] AVD is online
[!] Checking available Magisk Versions
wget: can't connect to remote host: Network is unreachable
/data/data/com.android.shell/Magisk/rootAVD.sh[2838]: can't open canary.json: No such file or directory
/data/data/com.android.shell/Magisk/rootAVD.sh[2838]: can't open canary.json: No such file or directory
/data/data/com.android.shell/Magisk/rootAVD.sh[2838]: can't open canary.json: No such file or directory
wget: short read, have only 30
[?] Choose a Magisk Version to install and make it local
[s] (s)how all available Magisk Versions
[1] local stable 'ee34f775'(26105) (ENTER)
[2] stable 26.1
[3] canary ()
[4] alpha 82903582-alpha(26105)
[-] You choose Magisk local stable Version 'ee34f775'(26105)
[*] Re-Run rootAVD in Magisk Busybox STANDALONE (D)ASH
[-] We are now in Magisk Busybox STANDALONE (D)ASH
[*] rootAVD with Magisk 'ee34f775'(26105) Installer
[-] Get Flags
[*] System-as-root, keep dm/avb-verity
[-] Encrypted data, keep forceencrypt
[*] RECOVERYMODE=false
[-] KEEPVERITY=true
[*] KEEPFORCEENCRYPT=true
[-] copy all x86_64 files from /data/data/com.android.shell/Magisk/lib/x86_64 to /data/data/com.android.shell/Magisk
[-] copy 'stub.apk' from /data/data/com.android.shell/Magisk/assets to /data/data/com.android.shell/Magisk
[*] Detecting ramdisk.img compression
[!] Ramdisk.img uses lz4_legacy compression
[-] taken from shakalaca's MagiskOnEmulator/process.sh
[*] executing ramdisk splitting / extraction / repacking
[-] API level greater then 30
[*] Check if we need to repack ramdisk before patching ..
[-] Multiple cpio archives detected
[*] Unpacking ramdisk ..
[*] Searching for the real End of the 1st Archive
[-] Dumping from 0 to 1691779 ..
Detected format: [lz4_legacy]
[-] Dumping from 1691779 to 3689298 ..
Detected format: [lz4_legacy]
[*] Repacking ramdisk ..
[*] Processing fake Boot.img
[*] Creating a fake Boot.img
[!] Only a minimal header is required for Magisk to repack the ramdisk
[*] repacking ramdisk.img into /sdcard/Download/fakeboot.img
[*] Searching for pre installed Magisk Apps
[!] Temporarily installing Magisk
[*] Detecting current user
[-] Current user 0
[-] Starting Magisk
[*] Install/Patch /sdcard/Download/fakeboot.img and hit Enter when done(max. 60s)
[!] Removing Temporarily installed Magisk
[!] No magisk_patched file could be found!
[!] aborting the script
hm, it seems they are two but unrelated issues. First PS indicates you run the script with powershell, use cmd instead.
second, there is an wget issue, which doesn't break the script. Seems weird this way.
But you have put your canary version already as local, so no issue there.
Okay, I will give it a shoot on cmd:
C:\Users\Kyouma\Desktop\rootAVD> .\rootAVD.bat system-images\android-31\google_apis\x86_64\ramdisk.img FAKEBOOTIMG
[*] 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
[*] Testing the ADB working space
[!] /data/data/com.android.shell is available
[*] 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\Kyouma\Desktop\rootAVD\Magisk.zip: 1 file pushed, 0 skipped. 308.7 MB/s (12514269 bytes in 0.039s)
[-] Backup exists already
[*] Push ramdisk.img into /data/data/com.android.shell/Magisk/ramdisk.img
[-] C:\Android\system-images\android-31\google_apis\x86_64\ramdisk.img: 1 file pushed, 0 skipped. 278.8 MB/s (3689317 bytes in 0.013s)
[-] Copy rootAVD Script into Magisk DIR
rootAVD.sh: 1 file pushed, 0 skipped. 94.5 MB/s (79822 bytes in 0.001s)
[-] 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: 31
[-] First API Level: 31
[-] The AVD runs on Android 12
[-] 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 /data/data/com.android.shell/Magisk/lib/arm64-v8a/libbusybox.so
[*] Testing Busybox /data/data/com.android.shell/Magisk/lib/x86/libbusybox.so
[!] Found a working Busybox Version
[!] BusyBox v1.34.1-Magisk (2022-08-19 10:51:18 PDT) multi-call binary.
[*] Move busybox from lib to workdir
[-] Checking AVDs Internet connection...
[!] AVD is online
[!] Checking available Magisk Versions
[?] Choose a Magisk Version to install and make it local
[s] (s)how all available Magisk Versions
[1] local stable 'ee34f775'(26105) (ENTER)
[2] stable 26.1
[3] canary ee34f775(26105)
[4] alpha 82903582-alpha(26105)
[-] You choose Magisk local stable Version 'ee34f775'(26105)
[*] Re-Run rootAVD in Magisk Busybox STANDALONE (D)ASH
[-] We are now in Magisk Busybox STANDALONE (D)ASH
[*] rootAVD with Magisk 'ee34f775'(26105) Installer
[-] Get Flags
[*] System-as-root, keep dm/avb-verity
[-] Encrypted data, keep forceencrypt
[*] RECOVERYMODE=false
[-] KEEPVERITY=true
[*] KEEPFORCEENCRYPT=true
[-] copy all x86_64 files from /data/data/com.android.shell/Magisk/lib/x86_64 to /data/data/com.android.shell/Magisk
[-] copy 'stub.apk' from /data/data/com.android.shell/Magisk/assets to /data/data/com.android.shell/Magisk
[*] Detecting ramdisk.img compression
[!] Ramdisk.img uses lz4_legacy compression
[-] taken from shakalaca's MagiskOnEmulator/process.sh
[*] executing ramdisk splitting / extraction / repacking
[-] API level greater then 30
[*] Check if we need to repack ramdisk before patching ..
[-] Multiple cpio archives detected
[*] Unpacking ramdisk ..
[*] Searching for the real End of the 1st Archive
[-] Dumping from 0 to 1691779 ..
Detected format: [lz4_legacy]
[-] Dumping from 1691779 to 3689298 ..
Detected format: [lz4_legacy]
[*] Repacking ramdisk ..
[*] Processing fake Boot.img
[*] Creating a fake Boot.img
[!] Only a minimal header is required for Magisk to repack the ramdisk
[*] repacking ramdisk.img into /sdcard/Download/fakeboot.img
[*] Searching for pre installed Magisk Apps
[!] Temporarily installing Magisk
[*] Detecting current user
[-] Current user 0
[-] Starting Magisk
[*] Install/Patch /sdcard/Download/fakeboot.img and hit Enter when done(max. 60s)
[!] Removing Temporarily installed Magisk
[!] No magisk_patched file could be found!
[!] aborting the script
and inside adb shell with a 60s timeout:
emulator64_x86_64_arm64:/ $ ls /sdcard/Download/
emulator64_x86_64_arm64:/ $
as i said, unrelated issues.
this needs more investigation...
I'm trying to execute
$ ./rootAVD.sh system-images/android-34/google_apis_playstore/arm64-v8a/ramdisk.img FAKEBOOTIMG
But I get
It seems that it can't write the fakebook.img to the device, even though I'm launching it with :
/Users/alex/Library/Android/sdk/emulator/emulator @Pixel_3a_XL_API_25 -memory 4096 -writable-system