[Android Studio] AndroidX:
i try again coz i was doing smthg wrong so now i give cmd like

C:\adb\platform-tools>adb shell

generic_x86_arm:/ $ rootAVD.bat

/system/bin/sh: rootAVD.bat: inaccessible or not found

127|generic_x86_arm:/ $ rootAVDs.bat

/system/bin/sh: rootAVDs.bat: inaccessible or not found

127|generic_x86_arm:/ $

now it showing like this

and i tried another way too

C:\adb\platform-tools>rootAVD.bat %LOCALAPPDATA%\Android\Sdk\system-images\android-30\google_apis_playstore\x86_64\ramdisk.img

rootAVD A Script to root AVD by NewBit XDA

Usage: rootAVD [DIR/ramdisk.img] [OPTIONS] | [EXTRA_CMDS]

or: rootAVD [ARGUMENTS]

Arguments:

ListAllAVDs Lists Command Examples for ALL installed AVDs

EnvFixTask Requires Additional Setup fix

- construct Magisk Environment manual

- only works with an already Magisk patched ramdisk.img

- without [DIR/ramdisk.img] [OPTIONS] [PATCHFSTAB]

- needed since Android 12 (S) rev.1

- Grant Shell Su Permissions will pop up a few times

- the AVD will reboot automatically

InstallApps Just install all APKs placed in the Apps folder

Main operation mode:

DIR a path to an AVD system-image

- must always be the 1st Argument after rootAVD

ADB Path | Ramdisk DIR:

[M]ac/Darwin: export PATH=~/Library/Android/sdk/platform-tools:\$PATH

~/Library/Android/sdk/system-images/android-\$API/google_apis_playstore/x86_64/

[L]inux: export PATH=~/Android/Sdk/platform-tools:\$PATH

~/Android/Sdk/system-images/android-\$API/google_apis_playstore/x86_64/

[W]indows: set PATH=%LOCALAPPDATA%\Android\Sdk\platform-tools;%PATH%

%LOCALAPPDATA%\Android\Sdk\system-images\android-$API\google_apis_playstore\x86_64\

$API: 25,29,30,S,etc.

Except for EnvFixTask, ramdisk.img must be untouched (stock).

Options:

restore restore all existing .backup files, but doesn't delete them

- the AVD doesn't need to be running

- no other Argument after will be processed

InstallKernelModules install custom build kernel and its modules into ramdisk.img

- kernel (bzImage) and its modules (initramfs.img) are inside rootAVD

- both files will be deleted after installation

InstallPrebuiltKernelModules download and install an AOSP prebuilt kernel and its modules into ramdisk.img

- similar to InstallKernelModules, but the AVD needs to be online

Options are exclusive, only one at the time will be processed.

Extra Commands:

DEBUG Debugging Mode, prevents rootAVD to pull back any patched file

PATCHFSTAB fstab.ranchu will get patched to automount Block Devices like /dev/block/sda1

- other entries can be added in the script as well

- a custom build Kernel might be necessary

GetUSBHPmodZ The USB HOST Permissions Module Zip will be downloaded into /sdcard/Download

Extra Commands can be combined, there is no particular order.

Notes: rootAVD will

- always create .backup files of ramdisk.img and kernel-ranchu

- replace both when done patching

- show a Menu, to choose the Magisk Version (Stable || Canary), if the AVD is online

- make the choosen Magisk Version to its local

- install all APKs placed in the Apps folder

Command Examples:

rootAVD.bat

rootAVD.bat ListAllAVDs

rootAVD.bat EnvFixTask

rootAVD.bat InstallApps

rootAVD.bat %LOCALAPPDATA%\Android\Sdk\system-images\android-30\google_apis_playstore\x86\ramdisk.img

rootAVD.bat %LOCALAPPDATA%\Android\Sdk\system-images\android-30\google_apis_playstore\x86\ramdisk.img DEBUG PATCHFSTAB GetUSBHPmodZ

rootAVD.bat %LOCALAPPDATA%\Android\Sdk\system-images\android-30\google_apis_playstore\x86\ramdisk.img restore

rootAVD.bat %LOCALAPPDATA%\Android\Sdk\system-images\android-30\google_apis_playstore\x86\ramdisk.img InstallKernelModules

rootAVD.bat %LOCALAPPDATA%\Android\Sdk\system-images\android-30\google_apis_playstore\x86\ramdisk.img InstallPrebuiltKernelModules

rootAVD.bat %LOCALAPPDATA%\Android\Sdk\system-images\android-30\google_apis_playstore\x86\ramdisk.img InstallPrebuiltKernelModules GetUSBHPmodZ PATCHFSTAB DEBUG

C:\adb\platform-tools>

then i got this what should i do now? i never run scripts before so i dont knw too much about scripting things i appericate if you could help