[Android Studio] Peterlymo:
here

[*] 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\peter\Downloads\Compressed\rootAVD-master\rootAVD-master\Magisk.zip: 1 file pushed, 0 skipped. 26.1 MB/s (11278270 bytes in 0.413s)
[*] create Backup File
[*] Push ramdisk.img into /data/data/com.android.shell/Magisk
[-] C:\Users\peter\AppData\Local\Android\Sdk\system-images\android-23\google_apis\x86\ramdisk.img: 1 file pushed, 0 skipped. 63.2 MB/s (1260583 bytes in 0.019s)
[-] Copy rootAVD Script into Magisk DIR
rootAVD.sh: 1 file pushed, 0 skipped. 34.4 MB/s (7853574 bytes in 0.217s)
[-] 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 x86 only
[-] Device SDK API: 23
[-] First API Level:
[-] The AVD runs on Android 6.0
[-] Switch to the location of the script file
[*] Extracting busybox from script ...
[!] There is no busybox behind the script
[*] Trying to Download the Up-To-Date Script Version
[!] Temporarily installing Magisk
[!] Removing Temporarily installed Magisk
[-] Checking AVDs Internet connection...
[!] AVD is offline
[*] Extracting Magisk.zip ...
/data/data/com.android.shell/Magisk/rootAVD.sh[2528]: /data/data/com.android.shell/Magisk/busybox: can't execute: Permission denied
[*] Re-Run rootAVD in Magisk Busybox STANDALONE (D)ASH
[-] We are now in Magisk Busybox STANDALONE (D)ASH
[*] rootAVD with Magisk Installer
[-] Get Flags
[-] Encrypted data, keep forceencrypt
[*] RECOVERYMODE=false
[-] KEEPVERITY=false
[*] KEEPFORCEENCRYPT=true
[-] copy all x86 files from /data/data/com.android.shell/Magisk/lib/x86 to /data/data/com.android.shell/Magisk
[*] Detecting ramdisk.img compression
[!] Ramdisk.img uses gzip compression
[-] taken from shakalaca's MagiskOnEmulator/process.sh
[*] executing ramdisk splitting / extraction / repacking
[*] After decompressing ramdisk.img, magiskboot will work
Detected format: [gzip]
[-] Test patch status and do restore
[-] Checking ramdisk status
[-] STATUS=0
[-] Stock boot image detected
[-] Patching ramdisk
[*] adding overlay.d/sbin folders to ramdisk
Loading cpio: [ramdisk.cpio]
Create directory [overlay.d] (0750)
Create directory [overlay.d/sbin] (0750)
Dump cpio: [ramdisk.cpio]
[!] PATCHFSTAB=false
[!] Skipping fstab.ranchu patch with /dev/block/sda
[?] If you want fstab.ranchu patched, Call rootAVD with PATCHFSTAB
[!] AddRCscripts=false
[!] Skip adding *.rc scripts into ramdisk.img/sbin/*.rc
[?] If you want *.rc scripts added into ramdisk.img/sbin/*.rc, Call rootAVD with AddRCscripts
[!] patching the ramdisk with Magisk Init
Loading cpio: [ramdisk.cpio]
Add entry [init] (0750)
Add entry [overlay.d/sbin/magisk32.xz] (0644)
Patch with flag KEEPVERITY=[false] KEEPFORCEENCRYPT=[true]
Found fstab file [fstab.goldfish]
Found fstab file [fstab.ranchu]
Found fstab file [fstab.ranchu-encrypt]
Loading cpio: [ramdisk.cpio.orig]
Backup mismatch entry: [init] -> [.backup/init]
Record new entry: [overlay.d] -> [.backup/.rmlist]
Record new entry: [overlay.d/sbin] -> [.backup/.rmlist]
Record new entry: [overlay.d/sbin/magisk32.xz] -> [.backup/.rmlist]
Create directory [.backup] (0000)
Add entry [.backup/.magisk] (0000)
Dump cpio: [ramdisk.cpio]
[*] repacking back to ramdisk.img format
[!] Rename Magisk.zip to Magisk.apk