-
-
Save mmtrt/5dfbd2559ea988dfbe56277347ac6c96 to your computer and use it in GitHub Desktop.
#!/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 |
Does it solve this problem?
Yes. I also had this problem on my sm-a137f. Just install this
Hello everyone! I solved my problems with Xiaomi Mi Note 10 lite and created simpe Magisk module for auto-config https://github.com/overzero-git/DriveDroid-fix-Magisk-module
and make macro
use macrodroid to create a macro that will kill the app once its closed. then the script will automatically restore the normal usb-function without force stopping the app every time. most of you probably already figured that out.
anyone have any script or fix for driverdroid on my samsung a30?
Use it with that script, and remember to replace all 'mass_storage.0' to 'mass_storage.usb0' in that script.
ai có tập lệnh hoặc bản sửa lỗi nào cho driverdroid trên samsung a30 của tôi không?
Sử dụng nó với lệnh tập tin đó.
Hi can you teach me how to use that script I don't know how to use it, thanks
Hi can you teach me how to use that script I don't know how to use it, thanks
There is a way: Download Termux, then run commands follow one by one.
wget https://gist.github.com/mmtrt/5dfbd2559ea988dfbe56277347ac6c96/raw/478204e0d0107f14ec0af3e0d4b4774e6f598838/fixdd
chmod 0755 ./fixdd
su -c ./fixdd
Open the app.
Xin chào, bạn có thể dạy tôi cách sử dụng tập lệnh đó không. Tôi không biết cách sử dụng nó, cảm ơn
Có một cách: Tải Termux về rồi chạy lệnh lần lượt.
wget https://gist.github.com/mmtrt/5dfbd2559ea988dfbe56277347ac6c96/raw/478204e0d0107f14ec0af3e0d4b4774e6f598838/fixdd chmod 0755 ./fixdd su -c ./fixdd
Mở ứng dụng.
Hey, is this fixed yet
Not yet, bro, there are three commands, you need to exec it line by line..
Này, cái này đã sửa chưa
Chưa đâu bác, có 3 câu lệnh, phải thực hiện từng dòng một..
so can you tell me not to give the full order
Sos sos
Samsung a305f
Description:
DriveDroid cannot find any USB devices
Type of this Android device:
Additional information:
log:
Exception:
com.softwarebakery.drivedroid.components.support.SubmitReportFailed: Failed to submit report
at com.softwarebakery.drivedroid.components.support.SupportActivity$onAccept$3.a(SourceFile:148)
at com.softwarebakery.drivedroid.components.support.SupportActivity$onAccept$3.a(SourceFile:25)
at rx.internal.util.ActionSubscriber.a(SourceFile:44)
at rx.observers.SafeSubscriber.b(SourceFile:153)
at rx.observers.SafeSubscriber.a(SourceFile:115)
at rx.internal.operators.OperatorSubscribeOn$1$1.a(SourceFile:59)
at rx.internal.operators.OperatorSubscribeOn$1$1.a(SourceFile:59)
at rx.observers.Subscribers$5.a(SourceFile:230)
at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.a(SourceFile:87)
at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.a(SourceFile:273)
at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.a(SourceFile:216)
at rx.internal.schedulers.ScheduledAction.run(SourceFile:55)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8653)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Caused by: com.softwarebakery.drivedroid.components.downloads.sources.RepositoryHttpException: Failed to retrieve repository: failed to retrieve HTTP response
at com.softwarebakery.common.rx.RxHttp$enqueue$1$2.onFailure(SourceFile:24)
at okhttp3.RealCall$AsyncCall.execute(SourceFile:161)
at okhttp3.internal.NamedRunnable.run(SourceFile:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
Caused by: javax.net.ssl.SSLHandshakeException: Chain validation failed
at com.android.org.conscrypt.SSLUtils.toSSLHandshakeException(SSLUtils.java:362)
at com.android.org.conscrypt.ConscryptEngine.convertException(ConscryptEngine.java:1134)
at com.android.org.conscrypt.ConscryptEngine.readPlaintextData(ConscryptEngine.java:1089)
at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:876)
at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:747)
at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:712)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:849)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.access$100(ConscryptEngineSocket.java:722)
at com.android.org.conscrypt.ConscryptEngineSocket.doHandshake(ConscryptEngineSocket.java:238)
at com.android.org.conscrypt.ConscryptEngineSocket.startHandshake(ConscryptEngineSocket.java:217)
at okhttp3.internal.connection.RealConnection.connectTls(SourceFile:302)
at okhttp3.internal.connection.RealConnection.establishProtocol(SourceFile:270)
at okhttp3.internal.connection.RealConnection.connect(SourceFile:162)
at okhttp3.internal.connection.StreamAllocation.findConnection(SourceFile:257)
at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(SourceFile:135)
at okhttp3.internal.connection.StreamAllocation.newStream(SourceFile:114)
at okhttp3.internal.connection.ConnectInterceptor.intercept(SourceFile:42)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:121)
at okhttp3.internal.cache.CacheInterceptor.intercept(SourceFile:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:121)
at okhttp3.internal.http.BridgeInterceptor.intercept(SourceFile:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:147)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(SourceFile:126)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(SourceFile:200)
at okhttp3.RealCall$AsyncCall.execute(SourceFile:147)
... 4 more
Caused by: java.security.cert.CertificateException: Chain validation failed
at com.android.org.conscrypt.TrustManagerImpl.verifyChain(TrustManagerImpl.java:724)
at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:554)
at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:575)
at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:620)
at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:620)
at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:620)
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:510)
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:428)
at com.android.org.conscrypt.TrustManagerImpl.getTrustedChainForServer(TrustManagerImpl.java:356)
at android.security.net.config.NetworkSecurityTrustManager.checkServerTrusted(NetworkSecurityTrustManager.java:94)
at android.security.net.config.RootTrustManager.checkServerTrusted(RootTrustManager.java:90)
at com.android.org.conscrypt.ConscryptEngineSocket$2.checkServerTrusted(ConscryptEngineSocket.java:161)
at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:250)
at com.android.org.conscrypt.ConscryptEngine.verifyCertificateChain(ConscryptEngine.java:1644)
at com.android.org.conscrypt.NativeCrypto.ENGINE_SSL_read_direct(Native Method)
at com.android.org.conscrypt.NativeSsl.readDirectByteBuffer(NativeSsl.java:568)
at com.android.org.conscrypt.ConscryptEngine.readPlaintextDataDirect(ConscryptEngine.java:1095)
at com.android.org.conscrypt.ConscryptEngine.readPlaintextData(ConscryptEngine.java:1079)
... 30 more
Caused by: java.security.cert.CertPathValidatorException: timestamp check failed
at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:135)
at sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:222)
at sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:140)
at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:79)
at java.security.cert.CertPathValidator.validate(CertPathValidator.java:301)
at android.sec.enterprise.certificate.DelegatingCertPathValidator.engineValidate(DelegatingCertPathValidator.java:63)
at java.security.cert.CertPathValidator.validate(CertPathValidator.java:301)
at com.android.org.conscrypt.TrustManagerImpl.verifyChain(TrustManagerImpl.java:720)
... 47 more
Caused by: java.security.cert.CertificateExpiredException: Certificate expired at Sat Apr 18 19:00:00 GMT+07:00 2020 (compared to Wed Aug 16 14:58:18 GMT+07:00 2023)
at com.android.org.conscrypt.OpenSSLX509Certificate.checkValidity(OpenSSLX509Certificate.java:269)
at sun.security.provider.certpath.BasicChecker.verifyTimestamp(BasicChecker.java:194)
at sun.security.provider.certpath.BasicChecker.check(BasicChecker.java:144)
at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:125)
... 54 more
post output of ls -al /config/usb_gadget/g1/functions/
also this as well with usb connected to PC ls -al /config/usb_gadget/g1/configs/b.1/
without using any script.
IT DOESN'T WORK ANYONE HELP ME PLEASE!!!?
@mmtrt Windows 10 ISO file gives this error: No device drivers were found. Still this error after choosing CD-ROM option to host
SAME ISSUEE I HAVE
It doesn't really work when i write this on termux
~ $ su -c "curl -sL https://gist.github.com/mmtrt/5dfbd2559ea988dfbe56277347ac6c96/raw/478204e0d0107f14ec0af3e0d4b4774e6f598838/fixdd > /data/adb/service.d/fixdd && chmod +x /data/adb/service.d/fixdd"
/system/bin/sh: can't create /data/adb/service.d/fixdd: No such file or directory
~ $ su
xdd && chmod +x /data/adb/service.d/fixdd" <
/system/bin/sh: can't create /data/adb/service.d/fixdd: No such file or directory
1|:/data/data/com.termux/files/home #
Not working on Redmi 5 LOS 20 Please help me
overzero-git
Hello everyone! I solved my problems with Xiaomi Mi Note 10 lite and created simpe Magisk module for auto-config https://github.com/overzero-git/DriveDroid-fix-Magisk-module
Confirmed!
Galaxy S9 - Android 13
Oh, guys, stop talking this, just see what you have in your phone's dir /config/usb_gadget/g1/functions, if there is mass_storage.0, then use the script above, and if there is mass_storage.usb0 instead, just do this.
Or you have anything else, just edit the droid apk yourself.
Worked on Samsung A03 Core (crDroid GSI ROM, Android 13)
I booted Archlinux with it :D
I have an INFINIX SMART 5
And I have got this
/system/bin/sh: curl: inaccessible or not found
I think bc I need to download something,but IDK how
Can someone please help me
I have an INFINIX SMART 5 And I have got this /system/bin/sh: curl: inaccessible or not found I think bc I need to download something,but IDK how Can someone please help me
You should install busybox I guess
I have an INFINIX SMART 5 And I have got this /system/bin/sh: curl: inaccessible or not found I think bc I need to download something,but IDK how Can someone please help me
You should install busybox I guess
Thanks I Will try
I have an INFINIX SMART 5 And I have got this /system/bin/sh: curl: inaccessible or not found I think bc I need to download something,but IDK how Can someone please help me
You should install busybox I guess
Does not work :/
@mmtrt can you tell me how can I make it work
@zak-ink-5 try this also make sure termux packages are updated.
curl -sL https://gist.github.com/mmtrt/5dfbd2559ea988dfbe56277347ac6c96/raw/478204e0d0107f14ec0af3e0d4b4774e6f598838/fixdd > fixdd && chmod +x fixdd
just manually run the script whenever want to use dd run these commands
su
then
./fixdd
Use it
Hello, thanks but this app doesn't work
just gonna add my 2cents from the recent week aswell, cause this script seems to evolve.
see line 64 here for the code: https://github.com/tejado/android-usb-gadget/blob/master/app/src/main/java/net/tjado/usbgadget/GadgetShellApi.kt#L64
maybe someone can work that in, cause the config-path seems to be different for many devices and versions.
echo "" > /config/usb_gadget/g1//UDC
then add the modes and reattach it withgetprop sys.usb.controller > /config/usb_gadget/g1//UDC
because all that stuff is still cached in the sysprop.