[Android Studio] Apalon3709:
Hello everyone, I am completely new to android studio. I am having trouble installing root on Android 11 and Android S. Here is the log of my installation. Magisk itself is installed, but there is no root

C:\Users\Administrator\Desktop\rootAVD-master>adb shell

emulator64_x86_64_arm64:/ $ exit

C:\Users\Administrator\Desktop\rootAVD-master>set PATH=%LOCALAPPDATA%\Android\Sdk\platform-tools;%PATH%

C:\Users\Administrator\Desktop\rootAVD-master>set PATH=%LOCALAPPDATA%\Android\Sdk\platform-tools;%PATH%

C:\Users\Administrator\Desktop\rootAVD-master>rootAVD.bat %LOCALAPPDATA%\Android\Sdk\system-images\android-S\google_apis_playstore\x86_64\ramdisk.img

Invalid folder name.

" [ * ] create File Backup"

Files copied: 1.

"[-] In any AVD using ADB you can run the code without root in /data/data/com.android.shell"

"[-] ADB connectoin possible"

"[*] looking for Magisk installer Zip"

"[*] Cleaning workspace ADB"

"[*] Creating the workspace ADB"

"[-] To copy the Magisk installer Zip"

C:\Users\Administrator\Desktop\rootAVD-master\Magisk.zip: ...ile pushed, 0 skipped. 59.4 MB/s (6720493 bytes in 0.108 s)

" [ * ] Copy the original AVD ramdisk. img to Magisk DIR"

C:\Users\Administrator\AppData\Local\Android\Sdk\system-im...ile pushed, 0 skipped. 69.5 MB/s (2322258 bytes in 0.032 s)

"[-] Copy script rootAVD in Magisk DIR"

rootAVD.sh: 1 file pushed, 0 ignored. 51.6 MB/s (22575 bytes in a 0.000 s)

"[-] The conversion of the script to the end Unix"

"[-] start to actually boot/Ramdisk/Kernel Patch Image Script"

"[*] by topjohnwu Magisk from and modded by NewBit XDA"

[!] We are in the emulator shell

[- ] Switch to the location of the script file

[ * ] Extracting busybox and Magisk.zip ...

[ - ] Checking the AVDs Internet connection...

[!] The AVD is online

[!] Check available versions of Magisk

[?] Select the version of Magisk to install and make it local

[1] Local '22.1' (ENTER)

[2] Canary fb8000b5(22104)

[3] Stable 22.1

[1] You select the local version of Magisk '22.1'

[ * ] Re-run rootAVD in Magisk Busybox STANDALONE (D)ASH

[!] We are in the emulator shell

[-] We are now in Magisk Busybox STANDALONE (D)ASH

[ * ] rootAVD with the Magisk '22.1'installer

[- ] Get flags

[*] System-as-root, keep dm/avb-verity

[- ] Encrypted data, store forceencrypt

[*] RECOVERYMODE=false

[-] KEEPVERITY=true

[*] KEEPFORCEENCRYPT=true

[- ] Api Level Arch Detection

[- ] Device platform: x64

[-] Device SDK API: 30

[-] ARCH32 x86

[- ] First API level: 31

[ * ] copy all files from /data/data/com. android. shell/Magisk/lib/x86 to /data/data/com. android. shell/Magisk

[ * ] ramdisk.img compression detection

[!] Ramdisk. img uses lz4_legacy compression

[- ] taken from the book of the jackalaki. MagiskOnEmulator/process.sh

[ * ] performing ramdisk partitioning / extracting / repacking

[- ] API level greater than 30

[ * ] Check if we need to repackage the ramdisk before patching ..

[- ] Multiple cpio archives detected

[ * ] Unpacking ramdisk ..

[ - ] Resetting from 0 to 1418329 ..

Detected format: [lz4_legacy]

[- ] Dumping from 1418329 to 2322258 ..

Detected format: [lz4_legacy]

[*] Repackaging ramdisk ..

[ - ] Check the patch status and perform a restore

[- ] Checking the ramdisk status

[- ] STATUS=0

[- ] A stock boot image was detected

[- ] ramdisk fix

[!] PATCHFSTAB=false

[!] Skipping the fstab.ranchu patch with /dev/block/sda

[?] If you want fstab. ranchu to be fixed, set PATCHFSTAB=true

[!] fix ramdisk with Magisk Init

Loading cpio: [ramdisk.cpio]

Add entry [init] (0750)

Create a directory [overlay.d] (0750)

Create a directory [overlay.d/sbin] (0750)

Add entry [overlay.d/sbin/magisk32. xz] (0644)

Add entry [overlay.d/sbin/magisk64. xz] (0644)

Patch with the KEEPVERITY=[true] KEEPFORCEENCRYPT=[true] flag]

Loading cpio: [ramdisk.cpio. orig]

Backup mismatch record: [init] - > [. backup/init]

Writing a new record: [overlay.d] - > [. backup/.rmlist]

Write a new record: [overlay.d/sbin] - > [. backup/. rmlist]

Write a new record: [overlay.d/sbin/magisk32. xz] - > [. backup/.rmlist]

Write a new record: [overlay.d/sbin/magisk64. xz] - > [. backup/. rmlist]

Create a directory [.backup] (0000)

Add an entry [.backup/.magisk] (0000)

cpio dump: [ramdisk.cpio]

[ * ] repackaging back to ramdisk.img format

[!] Rename Magisk.zip for Magisk.apk

"[-] After the ramdisk file.img will be corrected and compressed,"

"[*] pull it back to Magisk DIR"

/data/data/com.android.shell/Magisk/ramdiskpatched4AVD.img...ile pulled, 0 missed. 65,4 MB/s (2732968 byte 0,040 s)

"[-] pull Magisk.apk apps\"

/data/data/com.android.shell/Magisk/Magisk.apk: 1 file pulled, 0 skipped. 70,1 MB/s (6720493 bytes for 0,091 with)

"[- ] pull the Magisk.zip to applications\ "

adb: error: failed to stat remote object '/data/data/com.android.shell/Magisk/Magisk.zip': No such file or directory

"[ - ] Clear the ADB workspace"

"[ * ] Move and rename the patched ramdisk. img to the original AVD DIR " Files

copied: 1.

"[- ] Install all APK files located in the Apps folder"

"[ * ] Trying to install APPS\Magisk. apk "

Performing a Streaming Installation

Success

"[ - ] restart 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 and shakalaca"

My work System:

OS: Windows 10

Android Studio 4.1.3

AVD：Pixel 3, android 11(S) and Nexus5X android 11