newbit1 / rootAVD

Script to root AVDs running with QEMU Emulator from Android Studio
GNU General Public License v3.0
1.45k stars 186 forks source link

Cannot run EnvFixTask #69

Closed marioparaschiv closed 1 year ago

marioparaschiv commented 1 year ago

After running rootAVD, I get prompted with the alert that is mentioned in the command description of "EnvFixTask": image

However, I cannot run this command.

rootAVD took 6s
➜  .\rootAVD.bat EnvFixTask DEBUG
[!] We are in Debug Mode
[*] Set Directorys
[-] Test if ADB SHELL is working
[-] ADB connectoin possible
[-] In any AVD via ADB, you can execute code without root in /data/data/com.android.shell
[*] looking for Magisk installer Zip
[*] Cleaning up the ADB working space
[*] Creating the ADB working space
[*] Push Magisk.zip into /data/data/com.android.shell/Magisk
[-] C:\Users\eternal\Downloads\rootAVD\Magisk.zip: 1 file pushed, 0 skipped. 328.7 MB/s (11825390 bytes in 0.034s)
[-] Copy rootAVD Script into Magisk DIR
rootAVD.sh: 1 file pushed, 0 skipped. 203.9 MB/s (7856627 bytes in 0.037s)
[-] 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
[*] Extracting busybox and Magisk.zip ...
[*] 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 '709f25f6-alpha'(26101) (ENTER)
[2] stable 26.1
[3] canary d0c93842(26101)
[4] alpha 709f25f6-alpha(26101)
4
[-] You choose Magisk alpha Version 709f25f6-alpha(26101)
[*] Deleting local Magisk '709f25f6-alpha'(26101)
[*] Downloading Magisk alpha 709f25f6-alpha(26101)
wget: got bad TLS record (len:2019) while expecting encrypted data
 03 03 40 18 e7 d9 98 35 96 93 7f f9 16 79 ef d7 db 14 77 7a 62 b3 c5 74 69 ff 6f 4a 67 be f3 34 79 f5 d9 c4 31 4d f6 4c dd 88 38 8b 53 b8 49 fb 52 33 2c 54 c6 2f 5a a3 b9 03 f9 86 bb af e4 9c c4 92 7b 5c 0c 72 5d 07 a0 e6 0a 2c cf ac 59 4f 63 70 7d e7 1a 7f 47 a2 f2 e3 1e dd 25 67 b1 6d cc 2e 8b
wget: connection closed prematurely
[!] Error while downloading Magisk alpha 709f25f6-alpha(26101)
[-] patching it together
wget: short read, have only 30
[!] Error while downloading Magisk alpha 709f25f6-alpha(26101)
[-] patching it together
wget: got bad TLS record (len:2019) while expecting encrypted data
 03 03 40 18 04 1e 53 4a 75 e4 a2 f0 42 92 ec c3 1e cb 05 58 b7 f4 92 01 ad 1a bf df 45 65 f5 dd 08 3f c2 ad 96 c1 8f 68 32 8c 4e f4 fb 1b 6e a3 5d 14 87 50 af 97 1a 81 86 b8 50 38 2c d2 08 5f 9f 06 ba d0 31 ac cb ba fd 97 3a 8e 7c ee b7 11 ad 6c 19 06 d8 1a f7 18 ed 31 35 b3 6d 21 dc 8e ce 5d 7c
wget: connection closed prematurely
[!] Downloading Magisk alpha 709f25f6-alpha(26101) complete!
[-] Switch to the location of the script file
[*] Extracting busybox and Magisk.zip ...
[*] Move busybox from lib to workdir
[*] Re-Run rootAVD in Magisk Busybox STANDALONE (D)ASH
[-] We are now in Magisk Busybox STANDALONE (D)ASH
[*] rootAVD with Magisk 709f25f6-alpha(26101) 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
xxd: /data/data/com.android.shell/Magisk/ramdisk.img: No such file or directory
[!] Ramdisk.img uses UNKNOWN compression
[!] aborting the script
marioparaschiv commented 1 year ago

image

newbit1 commented 1 year ago

Hi, the command argument is EnvFixTask is obsolete. you dont need anymore. Once you get the pop up screen from your first screenshot, you are good to go.

marioparaschiv commented 1 year ago

Can I ignore the popup?

newbit1 commented 1 year ago

No! Ignore the command, dont use it. If the pop up comes, it means magisk is installed, hit ok, reboot and you are fine.

If it is Magisk 26.x, use the FAKEBOOTIMG argument to install it.

marioparaschiv commented 1 year ago

It's a loop, it happens everytime I reboot but it seems to be working fine.

I'll give FAKEBOOTIMG a try.

marioparaschiv commented 1 year ago

Can confirm using FAKEBOOTIMG fixed it.

newbit1 commented 1 year ago

Thanks for the feedback. Yes the new popup confuses me all the time. There is an explanation why Magisk must do this, please check the readme notes about it.