1

Is it possible to make a zip file, similar to the one that installs GApps, that stores ADB debug mode as a system setting? Maybe somehow modify a system bootup script to change the ADB debug mode setting to on? I'm setting up a testing environment, and I can't have a factory reset turn off ADB.

update: I think I've almost got it - I have a rooted deice using CWM recovery, and I am using SuperSU for root permission management. I unpacked the .zip that the CWM installs su from, and added a modified /system/build.prop to the update, as well as a command to turn on adb in /data/data/com.android.providers.settings/databases/settings.db using sqlite3, but I think it require root access, and SuperSU has default access to su set to 'prompt'. Is there a way I can modify it to be 'grant' by default?

useful links: https://stackoverflow.com/questions/13326806/enable-usb-debugging-through-clockworkmod-with-adb

2

For those who are looking for an answer to this question: you can enable adb from a zip file that you install through recovery. I modified Superuser.zip from http://download.chainfire.eu/351/SuperSU/UPDATE-SuperSU-v1.65.zip What I did was I modified system/build.prop and added persist.service.adb.enable=1 at the bottom, I also added ro.setupwizard.mode=DISABLED to disable the setup wizard which gets annoying if you wipe or flash often. Then I added a precompiled sqlite3 (don't have a link, I got it from my company's repo) to system/bin and the line sqlite3 /data/data/com.android.providers.settings/databases/settings.db "UPDATE global SET value=1 WHERE name='adb_enabled'" to system/etc/install-recovery.sh (although some people say modifying settings.db is optional.)

Unfortunately it seems adb still requires you to accept the rsa certificate until you unpack boot.img and modify /default.prop

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.