Recover contacts

I have /e/ on a Le x526 (One of the first phones supported by /e/). The screen has cracked and the touch interface is un-usable. Some of my contacts are synced with but not all, the newer ones are missing. Almost none of my photos and videos are synced with the cloud due to the size limit.

I can mount the internal storage on my laptop via usb cable when the phone is in recovery. I have recovered the pictures and videos from this file system.

How can I get the contacts off the phone?Are the contacts stored in a file accessible on this drive or are they on another partition? If on another partition how can I mount it?

Is there a way to use /e/ without the touch interface? e.g. connecting a mouse?



If your device have USB debugging activated, you can try

Android in general has mouse drivers built-in. I just tried myself and they are present in /e/, too.
Just connect a USB mouse or the USB receiver of a wireless mouse to the phone via a USB OTG adapter.
As long as you can still see what you are doing on the screen, this should work.
(A physical keyboard would work this way, too.)

Thanks smu44,

scrcpy looks promising.

However, I am struggling to activate adb in /e/. The only mode that the phone is accessible in is via adb while in recovery mode.
When I boot into /e/ adb is not activated any more.
I tried to activate adb in /e/ from recovery mode by following this and this but not joy. Is there a way to achieve this?

Is there a way to query the /e/ contacts form adb in recovery mode?



Let’s take it one at a time :wink:

Yes you can export contacts while in recovery (TWRP) :slight_smile:
It’s quite simple, they are stored in a SQLite database.

First, while in recovery, connect from an ADB-enabled computer :
adb devices

Then copy the databases (you may notice the calllog BTW) :
adb pull /data/data/

Now you can browse and export data from contacts2.db using SQLite tools like SQLiteStudio or DB Browser for SQLite.
Hint : take a look at “view_data” view :wink:

Special tools may be available to extract data in usable layout. For example, this one may worth a try :

Or you can try to put the database files as-is in another Android phone (this will overwrite the whole database, of course).

If your contacts have photos, you can also dig into /data/data/ from an adb shell.

Master Yoda mode : adb tools also includes a command-line mode SQLite3 tool :sweat:


I spent some time trying to activate Developer mode & USB debugging from TWRP, I didn’t succeed :frowning:
I think that your best option would be to buy an OTG adapter and connect a mouse …

1 Like

I was lucky enough to come back with a method to activate ADB from TWRP recovery :slight_smile:

But it’s not easy …

First, grab a text editor and a hex editor. On my Windows computer, I used the excellent Notepad++ with the HexEdit plugin (it can be installed directly from Notepad++ plugins manager) .

Next, boot your device to TWRP, ensure “Data” is mounted using TWRP touch interface, then grab the files :

adb pull /data/system/users/0/settings_global.xml
adb pull /data/property/persistent_properties

We have to edit these files, as usual make a backup copy using your favorite tool :wink:

For the settings_global.xml :

  • simply open it with a text editor
  • search for development_settings_enabled and put a 1 in “value” and “defaultValue”
  • search for adb_enabled and also put a 1 in both values
  • save the file, take care to not to convert lines endings

Now the hard part with persistent_properties :

  • open it with a text editor that will not corrupt binary characters (Notepad++ works fine for that)
  • search for persist.sys.usb.config enter adb after the NUL :
  • unfortunately we’ll have to change 2 binary values, switch to HexEdit and locate our line:
  • between the words “config” and “adb” we have 2 values x12 and x00, change the x00 to x03 :
  • also, going upward, before the word “persist” we have the values x0a x1a x0a x16, change the x1a to x1d :
  • take a breath, save the file
    Why do we have to do that ? Well, both values are binary lengths (3 for value, 29 for the whole line). It’s not very common for Android nowadays, but we have to deal with it …

All we have left to do is to put back the files :

adb push settings_global.xml /data/system/users/0/
adb push persistent_properties /data/property/

Then reboot …

Next, still connected with USB to the computer, launch scrcpy :

I couldn’t figure how to activate “Root access” or “ADB over network” using command-line TWRP, but it’s easy to change now :slight_smile:

1 Like

@smu44 Thanks v much for this. Worked well. My goodness Android contacts database seems like a mess!! I opened with DBbrowser and just copied and pasted the one or two new key contacts that were not synced at the time of screen breakage.


Thanks for your feedback !

I wrote an how-to from my post, thanks to you others may be able to recover their contacts :slight_smile: .

If you dare to try my proposal for USB ADB activation, please keep me posted as well.