Activate Debugging from Android Studio on a GPS device

ADB is the tools to debug a device on Android. On Android 4.4, if you have a system apps (installed in priv-app), you can activate the debug process with the following command :



Settings.Secure.putInt(caniGPSApplication.getapplicationContext().getContentResolver(), Settings.Global.ADB_ENABLED, 1);

Settings.Secure.putInt(caniGPSApplication.getapplicationContext().getContentResolver(), Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 1);

Settings.Secure.putInt(caniGPSApplication.getapplicationContext().getContentResolver(), Settings.Global.INSTALL_NON_MARKET_APPS, 1);

 

You can also activate adb in the firmware directly by editing the file build.prop in the system, add :



persist.service.adb.enable=1

persist.service.debuggable=1

persist.sys.usb.config=mtp,adb

The apps Shell.apk is required.

Categories:

Tags:

Comments are closed