April 30, 2022

Getting my contacts, part 2

First I am going to use a USB cable along with the adb shell and see if I can find some file with my contacts (this turns out to be a waste of time).

Adb

Where is adb on my linux system? A bit of searching leads me to:
/u1/android-sdk-linux/platform-tools/adb
/u1/android-sdk-linux/platform-tools/fastboot

/u1/home/tom/Android/Sdk/platform-tools/adb
/u1/home/tom/Android/Sdk/platform-tools/fastboot
The first two are from my old SDK install (2015?), and the last two are from the install I did earlier today.

These are both elf executables and will probably run standalone. They do, but are command line tools with lots of switches.

Typing "adb shell" looks quite useful.

I grab my old Samsung S4, and launch Settings, then "MORE", then find "Developer options". The USB debugging box is already checked. I grab a micro USB cable and plug it into my linux system. I see:

Apr 30 19:46:50 trona kernel: usb 1-1.2: New USB device found, idVendor=05c6, idProduct=9015, bcdDevice= 2.28
Apr 30 19:46:50 trona kernel: usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 30 19:46:50 trona kernel: usb 1-1.2: Product: SAMSUNG_Android
Apr 30 19:46:50 trona kernel: usb 1-1.2: Manufacturer: SAMSUNG
Apr 30 19:46:50 trona kernel: usb-storage 1-1.2:1.1: USB Mass Storage device detected
Now I type "./adb shell" and voila! I have a shell on the android system.

I look in some recommended places for the contacts database. One is

data/data/com.Android.providers.contacts/databases/contacts.DB
Howver, I can cd to data/data but get permission errors after that. What I do next is this:
adb shell | tee phone
ls -lR
There are a lot of files! The game will be to search for "contact" and see how lucky I get.

I see:

/mnt/shell/emulated/0/Download/contact.vcf (dated 7-3-2020))
/system/app/EasyFavoritesContactsWidget (directory, dated 2014)
The VCF file has just one contact (for a friends SAT phone), and the other is just an idea about looking into other contact apps.

Use a third party contact app!! (Contact Backup)

I go to the Play Store and install "My Contacts". It finds my contacts, but if it has a way to back them up, I certainly cannot find it. This is a total loser.

Next we try "Contacts Backup and Transfer App". This wants to store my contacts on their server (encrypted), but it stalls presenting me with a full screen Facebook ad. Another loser.

Now we try "Phone Backup and Restore". This won't run and just crashes.

Now we try "Contact Backup". It looks pretty good. It only mentions 222 contacts and offers to send them to me via email. I get a warning about some services that gmail requires not running, but I can just ignore that, it has a vcf file set up to mail as an attachment, and all I do is type in my email address and hit the send button.

This actually worked great, but why 222 contacts when my phone said there were 313? Whatever the case, 222 is a lot better than zero.

What seems to have happened is that any contact that only had an email address (but no phone) was deleted. The contact info on my old phone is littered with duplicate information. When I had two entries for the same person with phone numbers (as I sometimes do), it would keep them both. Most assuredly some hand cleanup and merging is in order.


Have any comments? Questions? Drop me a line!

Tom's Cell Phones / tom@mmto.org