Enable persistent debug/developer mode from adb/shell

(sorry for not linking all relevant info, as a new user I can only add two links)

Hi,

I’m affected by the issue where the lower part of the touch screen suddenly no longer works (search the forum, need my link quota for other things). I’ve contacted support and got an RMA, but before I send in my phone I want to back it up. That’s not trivial to do with only a partially functional touch screen.

Here’s where I am currently:

  • you can perform a partial backup from within recovery mode (search the Fairphone support pages). Problem: it backs up to /data/sdcard, which on the Fairphone with the standard/original layout is actually just the “data” partition. I.e., you cannot backup to the real sd card this way.
  • if you create a backup that way, you can still make a copy of it though: you can subsequently boot the phone into Factory Mode by holding “volume down” after turning it on. Once it’s started in that mode, usb debug mode automatically will be activated even if it wasn’t enabled in the system settings (without selecting any of the menu options you see; I don’t know what they do and they’re not necessary). You can now use the Android sdk adb tool to get the backup created in recovery mode from /data/sdcard (and/or copy it to /storage/sdcard1, which is the real sd card)

However, I would like to create a full backup, and this is where I’m stuck:

  • I managed to get rid of the pin code by following the steps listed in the first two “code” section of the reddit post linked in step 4 here (can’t link to it directly, link quota exceeded)
  • I then tried to enable adb by changing /system/build.prop as described here (using the last “code” section, except for the modification to “default.prop” as those are overwritten on boo) and by also making the modification to to my settings.db as described in the actual step 4 of the first link above (link quota…)

However, when I reboot normally, adb over usb is still disabled.

Some other things I’ve tried:

  • after removal of the pin code, going into the settings to enable developer mode there. Result: not possible, the developer settings are in the bottom 25% of the screen
  • after removal of the pin code, going into the settings and pairing the phone with a bluetooth mouse. Result: not possible, the button to look for devices to pair with is at the bottom of the screen
  • after removal of the pin code, going into the “Backup and Restore” app to create a full backup that way. Result: not possible, in step 3 you have to push a button at the bottom of the screen
  • create a backup using adb while booted in the aforementioned factory mode (using “./adb backup -f ffbackup -apk -obb -shared -all”). Result: not possible, adb exits after saying “Now unlock your device and confirm the backup operation.” – and there is no “unlock device” functionality in the factory mode.

In short, my question is: what other settings changes does enabling the debug mode in the Android/Fairphone settings app make other than the ones I did above? Once debugging mode becomes available in a regular boot, I would be able to perform screen touch operations programmatically via adb (as described in the links above) and hence I could do whatever I want.

Thanks,

Jonas

I had the same problem with the FP of a friend of mine. The solution was to install the Xposed Framework and Gravity Box and enable Allow all rotations (and Navigation Bar), to switch the lower non-working part of the phone to the upper part.

After having tried everything with ADB etc… the most trivial idea struck me! Here it comes:

  1. Download the Xposed Framework and Gravity Box to another phone.
  • Activate Bluetooth on the broken FP (do so through the notification bar). If you are having troubles with pairing, try to access the settings.
  • Send the Xposed-apk with the other phone to your FP. The file will appear at the top of the screen, so no need to use the lower part. If having troubles during installation, use the landscape mode. (Before installing the Gravity Box module, a restart is required. Edit: Be sure to disable any PINs / screen locks before that!)
  • After the restart do the same with the Gravity Box module.
  • To access the Xposed Framework, once again go to Settings > Xposed Framework > Launch.
  • In the Gravity Box module, check Allow all rotations (and Navigation Bar).

Does this work for you?
This kind of is my first tutorial, so please tell me, if I can improve understanding.

Thanks for the suggestion! However, I don’t have another (smart)phone available. I’ll try it with a colleague at work tomorrow if I haven’t managed to solve it yet.

Another thing I realised this morning is that the original Fairphone software release contained a bug that made it enable developer mode on every reboot. So another thing I could try would be to boot into factory mode, upload the original Fairphone software to the internal “sdcard” partition via adb, reboot into recovery mode and then flash it.

Doesn’t this make a backup unnecessary?

You could try to just move the apks via USB to the FP and try to access them with the File explorer.