Alternative method to enable adb It seems that daily, I see some question along the lines of "issue X is causing my phone to be inoperable, and debugging is off. How do I enable ADB to get my data?"

I understand that this issue can be fairly common, so i thought i would put out a way to re-enable adb - using nothing but root privileges and a custom recovery.

This can also be used when, say, my developer options cannot be opened for some reason.

I know this will not eliminate this kind of question, but it can help with some of them.

See answer for method. Had to upload this as a "answer your own question" thing
You are going to need the following:


Root (YAY!)
A custom recovery, specifically TWRP (Untried on a different recovery, anyone let me know if it works on any other)
A PC/device with a way of editing SQLite .db files
An SD card


Method


If you have not already, boot into Recovery mode. Ensure you mount 'data' and 'External SD card'
Smack that 'advanced' button, open a terminal shell, and type su (then smack enter)
Run this command:

cp /data/data/com.android.providers.settings/databases/settings.db /path_to/external_sd/


(Thanks to the guys at SO for providing that.) If you don't have cp or busybox installed, you could use cat instead:

cat /data/data/com.android.providers.settings/databases/settings.db &gt; /path_to/external_sd/settings.db

Power off, and remove your SD. Stick it in the device with the .db editor.
Load the file
Go to the 'secure' table, and find the line adb_enabled. In my case, this was line 59. The value should be 0 if ADB is disabled. Change it to 1, and save.
With the modified file in tow, poke the SD card back into your device, and boot back into recovery. Again, make sure 'data' and 'External SD card' are mounted.
Reverse the copy you did above:

cp /path_to/external_sd/settings.db /data/data/com.android.providers.settings/databases/


or

cat /path_to/external_sd/settings.db &gt; /data/data/com.android.providers.settings/databases/settings.db

Done! Now, to get authorization, you will need to use Firelord's post and follow his master plan there :) Alternatively, you can use the accepted answer to This post on Stack Overflow. Those guys are helpful, eh?


Note: If you can boot your device, you can download SQLite editor and cut out the need for another device, an SD card, and, well, anything else. It is paid, however! Ifmyou want to save money, you can use the free a SQLite Manager instead.