Last active
July 16, 2024 16:49
-
-
Save mmtrt/5dfbd2559ea988dfbe56277347ac6c96 to your computer and use it in GitHub Desktop.
[ROOT] [Magisk] [Service.d] [Script] [Fix] DriveDroid on Android 9+
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# run while loop for boot_completed status & sleep 10 needed for magisk service.d | |
while [ "$(getprop sys.boot_completed | tr -d '\r')" != "1" ]; do sleep 1; done | |
sleep 10 | |
# save currently active function name | |
echo "$(ls -al /config/usb_gadget/g1/configs/b.1/)" | grep -Eo f1.* | awk '{print $3}' | cut -d/ -f8 > /data/adb/.fixdd | |
# loop | |
# run every 0.5 seconds | |
while true | |
do | |
# check the app is active | |
chkapp="$(pgrep -f drivedroid | wc -l)" | |
# check currently active function | |
chkfn=$(echo "$(ls -al /config/usb_gadget/g1/configs/b.1/)" | grep -Eo f1.* | awk '{print $3}' | cut -d/ -f8) | |
# load previous active function | |
chkfrstfn="$(cat /data/adb/.fixdd)" | |
if [ "$chkapp" -eq "1" ] && [ "$chkfn" != "mass_storage.0" ]; then | |
# add mass_storage.0 config & function and remove currently active function | |
rm /config/usb_gadget/g1/configs/b.1/f* | |
mkdir -p /config/usb_gadget/g1/functions/mass_storage.0/lun.0/ | |
ln -s /config/usb_gadget/g1/functions/mass_storage.0 /config/usb_gadget/g1/configs/b.1/f1 | |
elif [ "$chkapp" -eq "0" ] && [ "$chkfn" = "mass_storage.0" ]; then | |
# remove mass_storage.0 function & restore previous function | |
rm /config/usb_gadget/g1/configs/b.1/f* | |
ln -s /config/usb_gadget/g1/functions/"$chkfrstfn" /config/usb_gadget/g1/configs/b.1/f1 | |
if [ "$chkfrstfn" = "ffs.adb" ]; then | |
setprop sys.usb.config adb | |
elif [ "$chkfrstfn" = "ffs.mtp" ]; then | |
setprop sys.usb.config mtp | |
fi | |
fi | |
sleep 0.5 | |
done |
first create an image in drivedroid and then connect it to your computer
and create a bootable flash drive in it and that’s it
ср, 22 нояб. 2023 г., 18:46 Anime Gamer ***@***.***>:
… ***@***.**** commented on this gist.
------------------------------
I got drivedroid working but it cannot really boot any ISO
I tried with Pop os
Below are the attached images
[image: P_20231122_191425]
<https://user-images.githubusercontent.com/71986052/284924043-e7c20416-7ff2-4089-a955-74deb2481317.jpg>
After booting from drivedroid the grub menu appears as expected
[image: P_20231122_191445]
<https://user-images.githubusercontent.com/71986052/284924149-4900c671-3cba-4aea-b521-bfe5cd50f039.jpg>
But pressing enter doesn't boots the iso instead throws an error saying
kernel cannot be found
It could be a mounting issue
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/mmtrt/5dfbd2559ea988dfbe56277347ac6c96#gistcomment-4769425>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BDATXNGWHB7KMQHE66W4Q6LYFX64ZBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFQKSXMYLMOVS2I5DSOVS2I3TBNVS3W5DIOJSWCZC7OBQXE5DJMNUXAYLOORPWCY3UNF3GS5DZVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTANRRGAYDGMZXU52HE2LHM5SXFJTDOJSWC5DF>
.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
Worked on Samsung A03 Core (crDroid GSI ROM, Android 13)
I booted Archlinux with it :D
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got drivedroid working but it cannot really boot any ISO
I tried with Pop os
Below are the attached images
After booting from drivedroid the grub menu appears as expected
But pressing enter doesn't boots the iso instead throws an error saying kernel cannot be found
It could be a mounting issue