Enable MIUI ADB by Ylarod lets you use adb install on MIUI and HyperOS without logging in to a Xiaomi account or inserting a SIM card, which Xiaomi normally requires. It needs root and only works on Xiaomi's ROMs.
What it changes
- Enables USB debugging (Security settings):
persist.security.adbinput=1. - Enables fastboot:
persist.fastboot.enable=1. This step is optional. - Turns on "Install via USB" by setting
security_adb_install_enableto true in the Security Center's preferences file. - Turns off the install intercept:
permcenter_install_intercept_enabled=false.
The preferences live in /data/data/com.miui.securitycenter/shared_prefs/remote_provider_preferences.xml. If that file doesn't exist, the script stops and says the phone probably isn't running MIUI or HyperOS.
How to run it
- Recent KernelSU managers: it's a one-shot script in the KernelSU module store. Open it and tap Run. Nothing is installed and no reboot is needed. The option Also enable fastboot is on by default.
- Older KernelSU managers and Magisk: install the zip, then tap the module's Action button. No reboot is needed, and you can uninstall the module afterwards.
- From a shell: download
module/action.shfrom the repository and run it withsu -c sh. SetKSU_PARAM_ENABLE_FASTBOOT=falseto skip fastboot.
MIT licensed. The method is credited to a write-up on leadroyal.cn.