I have an obscure Chinese android device which has developer options locked behind a password. Clicking the model number multiple times brings up a password dialog.
I have managed to get this exception out of the device:
android.view.WindowLeaked: Activity com.android.settings.Settings$DeviceInfoSettingsActivity has leaked window DecorView@13a83c[Please enter password] that was originally added here
at android.view.ViewRootImpl.<init>(ViewRootImpl.java:485)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:346)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:93)
at android.app.Dialog.show(Dialog.java:330)
at com.android.settings.deviceinfo.FirmwareVersionPreferenceController.PasswordDialog(FirmwareVersionPreferenceController.java:219)
at com.android.settings.deviceinfo.FirmwareVersionPreferenceController.handlePreferenceTreeClick(FirmwareVersionPreferenceController.java:136)
at com.android.settings.dashboard.DashboardFragment.onPreferenceTreeClick(DashboardFragment.java:169)
at android.support.v7.preference.Preference.performClick(Preference.java:1125)
at android.support.v7.preference.Preference.performClick(Preference.java:1100)
at android.support.v7.preference.Preference$1.onClick(Preference.java:170)
at android.view.View.performClick(View.java:6294)
at android.view.View$PerformClick.run(View.java:24772)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
This shows that the password dialog comes from:
com.android.settings.deviceinfo.FirmwareVersionPreferenceController.PasswordDialog(FirmwareVersionPreferenceController.java:219)
I tried decompiling the Settings app, but this class is not in the apk. There is almost no java code inside it. I suppose it works differently.
I would like to have a look at the FirmwareVersionPreferenceController.java because I am hoping to find something about the password there and maybe find a way to bypass it.
Does anyone have any idea how to get that file from the device? Where it may be or how to get an instance of the dialog programmatically?
This returns that the class was not found:
String target = "com.android.settings.deviceinfo.FirmwareVersionPreferenceController";
Class<?> c = Class.forName(target);
Thanks.