Reputation: 19
I want to enable Developer Options
by default on android source?
Is it possible? Please let me know.
Upvotes: 1
Views: 2702
Reputation: 63
The default depends on the Android build type.
For user
or userdebug
builds, you need to jump through the hoops of tapping the build number seven times.
For eng
builds, Developer options are enabled by default.
As of Android Q, the codepath lies in frameworks/base/packages/SettingsLib/src/com/android/settingslib/development/DevelopmentSettingsEnabler.java.
final boolean settingEnabled = Settings.Global.getInt(
context.getContentResolver(),
Settings.Global.DEVELOPMENT_SETTINGS_ENABLED,
/* Default if preference not yet set: */
Build.TYPE.equals("eng") ? 1 : 0) != 0;
You can change this to the following:
final boolean settingEnabled = Settings.Global.getInt(
context.getContentResolver(),
Settings.Global.DEVELOPMENT_SETTINGS_ENABLED,
1) != 0;
...and development settings will be enabled by default, while still allowing you to toggle its enablement on and off in the UI.
For enabling (insecure) ADB connections without approving them beforehand to enable faster early-stage bringups, look into ro.adb.secure
.
Upvotes: 4
Reputation: 483
I am not clear what you are asking for. But if your requirement is to enable Developer Options on android phone then follow below steps :
1.Open the Settings app.
2.select About phone
3.Scroll to the bottom and tap Build number 7 times.
4.Return to the previous screen to find Developer options near the bottom
5.Now, you can toggle the options on and off
Upvotes: 1