Skip to content

Notification of usb connected is still appearing after unplugging #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ahmedfamhy3 opened this issue Feb 16, 2023 · 1 comment
Open
Labels

Comments

@ahmedfamhy3
Copy link

Screenshot_20230216-024702_Neo Launcher_1
This is from the notification shade

Screenshot_20230216-024824_Settings_1
This is the options appearing when you open it

Android: 12 LineageOS no gapps

@Netdex
Copy link
Owner

Netdex commented Feb 10, 2024

Sorry for the late response... didn't see this until now.

If you still care about this and for future people that have this issue - it's probably caused by the app failing to restore the system USB gadget 1, which is how Android implements stuff like MTP and USB audio 2. Unfortunately, the way Android uses configfs to set up USB gadgets varies wildly between Android versions and vendors so it's hard to get it working for all devices. I only have one device to test this app with (w/ LOS 13).

As a workaround, you can restart your device and the system USB gadget will be restored.

Footnotes

  1. https://github.com/Netdex/android-usb-script/blob/5befba1e10526eec44f36669dfff4a48c4a7dc6a/app/src/main/java/org/netdex/androidusbscript/configfs/UsbGadget.java#L95

  2. https://android.googlesource.com/platform/system/core/+/master/rootdir/init.usb.configfs.rc

@Netdex Netdex added the bug label Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants