How to save settings in developer mode on Xiaomi

Owners of Xiaomi, Redmi and Poco smartphones often face an obsession with the MIUI and HyperOS shell: the system automatically turns off developer mode every time you reboot the device.This is not a bug, but a specific security measure designed to protect the user from malware, but for enthusiasts it becomes a serious obstacle.

If you're debugging apps through ADB, taking screenshots of the system, or using your phone as a webcam, constantly resetting the settings is annoying, and you have to re-activate the hidden menu every time you turn on the options you want.

There's a proven method to trick the system into remembering your choices, and we'll take a look at the technical details of the settings flag and provide a step-by-step algorithm that's guaranteed to work on current firmware versions.

Why Xiaomi is resetting developer parameters

The fundamental reason is the Android security architecture that Xiaomi engineers have adapted to suit their needs: The developer mode is designed solely for testing applications and debugging code, not for everyday use by ordinary users.

When you activate. USB-When you debug, you have deep access to the file system and system processes, and any application that has the appropriate permissions can theoretically copy your data or change critical system settings.

⚠️ Warning: Forced saving of developer settings reduces device security.Make sure you trust apps that will connect to your smartphone via a device USB.

System Demon SettingsProvider in the shell MIUI programmed to drop the global flag development_settings_enabled This behavior is standard for many manufacturers, but it was Xiaomi that implemented it most aggressively, ignoring the manual selection of the user in the menu.

Preparation for System Flag Change

Before you make changes to your system spreadsheets, you have to access the hidden menu. The standard path is known to everyone: Settings β†’ About the phone. Here you have to quickly click 7-10 times on the field of the MIUI version or OS version.

When the "You've become a developer" notification appears, go to the extended menu, which is usually in the "Additional" section or immediately in the settings list, depending on the shell version. USB-Debugging and activating it.

β˜‘οΈ Check before modification

Done: 0 / 1

It is important to understand that without the included USB-You can debug the computer and make sure that the confirmation windows don't pop up. RSA-Keys if you have not previously authorized your computer.

Conservation method through ADB-team

The most reliable way to fix the settings is to use the Android Debug Bridge toolkit. You will need a computer (Windows, macOS or Linux) and a USB cable. Connect your smartphone and enter a command to check the connection: adb devices.

If the device is displayed in the list, you can move on to implementing the system key. We need to change the value in the global table, which is responsible for the behavior of the system when you reboot.

adb shell settings put global development_settings_enabled 1

But just switching on isn't enough. The key is the command that prevents the system from resetting this parameter.

adb shell settings put global development_persistent 1

⚠️ Attention: After entering the command development_persistent 1 The phone may require confirmation of the action on the screen. Be sure to press "Allow" within 30 Seconds, otherwise the team will not be completed.

This instruction tells the operating system that the user consciously wants to keep the debugging mode active all the time, and unlike the manual switch, this flag has a higher priority for system demons.

What if the ADB can’t see the phone?
Make sure the driver is installed ADB Interface. Try another one. USB-On the phone screen, when you connect, select File Transfer Mode and confirm debugging.

Alternative method through the Activity application

If you find using the command line difficult, you can use third-party utilities that have access to system settings, and one of the most popular tools is the Activity Launcher app or specialized tweakers like SetEdit.

To work SetEdit will still require a single connection ADB for the grant of rights: adb shell pm grant com.setedit.android android.permission.WRITE_SECURE_SETTINGS. After that, the application will be able to directly edit the settings database.

You need to find a line. development_persistent and change the meaning of 1. Also make sure that development_settings_enabled equally 1.

  • πŸ“± Download SetEdit (Settings Database Editor) from a trusted source.
  • πŸ”Œ Apply the application with the right through ADB (higher).
  • ✏️ Find the parameter. development_persistent and change the meaning.
  • πŸ’Ύ Press Save Change and restart the device.

The advantage of this method is that it has a visual interface where you can see all the parameters immediately, but be careful: changing other values in this database can lead to unstable MIUI operation.

πŸ“Š How do you prefer to install Android?
Through ADB-commands, with root-rights, through special applications, No, I'm satisfied with the standard

Table of key parameters of the registry

For a deeper understanding of the process, below is a table of the main parameters that affect the operation of the developer mode. Change these values in the settings.db database determines the behavior of the system.

ParameterValue 0Value 1Impact
development_settings_enabledMenu hiddenMenu availableOpens access to settings
development_persistentResetting on restartPreservation for goodKey parameter for Xiaomi
adb_enabledDebugging off.Debugging is on.Allows USB connection
usb_configurationJust charging.MTP/ADBMode of work USB-port

Please note that the parameter usb_configuration If it's in charge-only mode, the computer won't see the phone, even if debugging is on.

Changing these values requires accuracy, and one extra letter in the parameter name will cause a command to run or create a new, unused registry entry.

Checking the result and eliminating problems

After you've done all the manipulations, you need to restart your smartphone, not just turn it off and on, but complete the full Reboot cycle. Once you turn it on, go back to the developer settings.

If the sliders are still active and the computer is detected in the console by the adb device command without re-confirmation, then the procedure was successful.

πŸ’‘

If the settings reset again after the reboot, try running the command adb shell settings put global. development_persistent 1 Repeatedly, pre-disconnected and turned on USB-manually.

In rare cases, especially on newer versions of HyperOS, antivirus mechanisms can be strengthened. If standard methods do not work, the only solution is to obtain Root rights, which allows you to modify system files directly, bypassing the standard restrictions.

⚠️ Note: Getting root rights (via Magisk) voids the warranty and can cause banking applications to break. Use this method only if you are an experienced user.

Safety and best practices

Constantly enabled USB debugging makes the device vulnerable if it falls into the wrong hands or is connected to public charging stations ("juice jacking").

It is recommended to use the Wi-Fi debugging function only on trusted networks, and regularly check the list of authorized computers in the developer menu and remove unknown devices.

  • πŸ”’ Do not leave the developer mode on unnecessarily.
  • 🚫 Avoid connecting to public services USB-port-of-war.
  • πŸ‘οΈ Watch for access confirmation pop-up windows.

Use of the flag development_persistent This is the most effective way to save settings, but the responsibility for data security lies with the device owner.

πŸ’‘

The main purpose of the modification is to change the global parameter. development_persistent per unit, which blocks the automatic reset of the developer settings by the system MIUI.

Frequently Asked Questions (FAQ)

Will the settings reset after the firmware update?
Yes, when you upgrade to Recovery or switch from MIUI to HyperOS, you often reset to factory settings, and you have to repeat the flag activation procedure.
Can I save the settings without a computer?
It's very difficult to do this without a PC, and you either need root access with a file manager or you need to use it. OTG-Cable and mouse for command input, if the terminal on the device itself is supported.
Does this affect the work of Google Pay and banking applications?
The very fact of the included debugging USB usually NFC-However, if you get a Root to set up more deeply, banks can stop working without additional cloaking (Magisk Hide).
Why the button Β«USB-debugging is grey and not pressed?
This happens if the cable is not connected to the computer or the drivers are not installed, and the button may not be available if the "Charge Only" mode in the notification curtain is enabled.