After mucking around a bit, I have been able to get enough information to reconstruct my contacts information. Thank you to @Izzy for pointing it out to me.
I obtained my ContactsProvider.apk
from my backup and also data.tar.gz
and device_protected_files.tar.gz
.
I then unzipped my ContactsProvider.apk using unzip ContactsProvide.apk
and got:
databases/ files/ shared_prefs/
The databases
calllog.db contacts2.db profile.db
calllog.db-journal profile.db-journal
It would perhaps make sense that contacts2.db would have this information, so I looked into this sqlite3 file (as it is what I found below):
$ file contacts2.db
contacts2.db: SQLite 3.x database, user version 1400, last written using SQLite version 3022000
$ sqlite3 contacts2.db
SQLite version 3.36.0 2021-06-18 18:36:39
Enter ".help" for usage hints.
sqlite> .tables
_sync_state phone_lookup view_data_usage
_sync_state_metadata photo_files view_entities
accounts pre_authorized_uris view_groups
agg_exceptions presence view_metadata_sync
agg_presence properties view_metadata_sync_state
android_metadata raw_contacts view_raw_contacts
contacts search_index view_raw_entities
data search_index_content view_stream_items
data_usage_stat search_index_docsize view_v1_contact_methods
default_directory search_index_segdir view_v1_extensions
deleted_contacts search_index_segments view_v1_group_membership
directories search_index_stat view_v1_groups
groups settings view_v1_organizations
metadata_sync status_updates view_v1_people
metadata_sync_state stream_item_photos view_v1_phones
mimetypes stream_items view_v1_photos
name_lookup v1_settings visible_contacts
nickname_lookup view_contacts
packages view_data
Carrying on with the above, I did the following:
$sqlite contacts2.db
sqlite> .separator , # to get the information in a CSV file with comma separation
sqlite> .output raw_contacts.csv #Where to save the file
sqlite> select * from raw_contacts; # Get it from raw_contacts in in the table above
sqlite> .exit
Then the file raw_contacts.csv
has the information I want. There are several tables that have this information, and I just think that this one is fine from the ones I tried. Perhaps there are others that are better.