MiCode / MiCode/Xiaomi_Kernel_OpenSource
How can I programmatically switch off VBUS / OTG 5 V power on Redmi Turbo 4 without unplugging the cable?
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 9.9k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
I’m trying to understand whether the Redmi Turbo 4 exposes any developer-accessible way to turn the USB-OTG 5 V rail on/off in software.
The device currently keeps VBUS powered as soon as an OTG peripheral is detected, and the only way to stop the power is to physically disconnect the cable.
My questions:
- Is there an existing API (either public, hidden, or via sysfs) that lets an app or an adb shell command disable/enable the 5 V line while leaving the data connection intact? If yes, please share the exact node or API call and any required SELinux context/permissions.
- Are there any kernel command-line tweaks or build. prop flags known to expose OTG power control on this device?
Any pointers to documentation, commits, or source snippets would be greatly appreciated.
Thanks!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file, test, or entry point is named. Start by searching the device kernel sources and documentation for USB-OTG VBUS controls, sysfs nodes, SELinux permissions, kernel command-line options, and build.prop flags. The issue is done only when a supported control method, or a clear confirmation that none exists, is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, linux
- Domain
- embedded-iot, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100