From c6eca6468de4a39a5a904da9d72f4ccd57539b09 Mon Sep 17 00:00:00 2001 From: NewBit Date: Tue, 6 Apr 2021 21:04:45 +0200 Subject: [PATCH] Added Option to Download the USB HOST Permissions Module --- README.md | 5 +++++ rootAVD.sh | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/README.md b/README.md index b876159..e8b70f2 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ A Script to root your Android Studio Virtual Device (AVD), with Magisk within se ### Preconditions * the AVD is running +* a working Internet connection for the Menu * a command prompt / terminal is opened * `adb shell` will connect to the running AVD @@ -51,6 +52,8 @@ rootAVD.bat %LOCALAPPDATA%\Android\Sdk\system-images\android-S\google_apis_plays * If you set `PATCHFSTAB=true` * fstab.ranchu will get patched to automount Block Devices like /dev/block/sda1 * !! a custom build Kernel is needed !! +* If you set `GetUSBHPmodZ=true` + * The USB HOST Permissions Module Zip will be downloaded into `/sdcard/Download` ### Links * [XDA [GUIDE] Build / Mod [Kernel 5.4][GKI][Android 11 (R)][kernel-ranchu][goldfish][AVD][Google Play Store API]](https://forum.xda-developers.com/t/guide-build-mod-kernel-5-4-gki-android-11-r-kernel-ranchu-goldfish-avd-google-play-store-api.4220697) @@ -79,6 +82,8 @@ rootAVD.bat %LOCALAPPDATA%\Android\Sdk\system-images\android-S\google_apis_plays * [[Jan. 2021] - Android 7 (Nougat) API 24 Google Apis Play Store x86 r19 Production Build](https://dl.google.com/android/repository/sys-img/google_apis_playstore/x86-24_r19.zip) ### Change Logs +#### [Apr. 2021] +* [rootAVD.sh] - Added Option to Download the USB HOST Permissions Module #### [Mar. 2021] * [General] - Add a Download Manager Function for bad TLS record using wget * [rootAVD.bat] - Adjustments to run with the updated rootAVD.sh diff --git a/rootAVD.sh b/rootAVD.sh index 707440a..0b70905 100755 --- a/rootAVD.sh +++ b/rootAVD.sh @@ -352,6 +352,15 @@ GetPrettyVer() { echo "$PRETTY_VER" } +GetUSBHPmod() { + USBHPZSDDL="/sdcard/Download/usbhostpermissons.zip" + USBHPZ="https://github.com/newbit1/usbhostpermissons/releases/download/v1.0/usbhostpermissons.zip" + if [ ! -e $USBHPZSDDL ]; then + echo "[*] Downloading usbhostpermissons Module" + $BB wget -q -O $USBHPZSDDL --no-check-certificate $USBHPZ + fi +} + CheckAvailableMagisks() { if [ -z $MAGISKVERCHOOSEN ]; then @@ -451,6 +460,13 @@ CheckAvailableMagisks() { MAGISKVERCHOOSEN=true PrepBusyBoxAndMagisk fi + + # Set GetUSBHPmodZ=true to download the usbhostpermissons module + GetUSBHPmodZ=false + #GetUSBHPmodZ=true + if ("$GetUSBHPmodZ"); then + $AVDIsOnline && GetUSBHPmod + fi fi export MAGISK_VER export MAGISKVERCHOOSEN