By user541686

2015-07-16 21:08:57 8 Comments

I ran adb backup with all the backup flags on my OnePlus One (which I had gradually upgraded from 44S to 05Q). Then I wiped it, reimaged it with a fresh image of 05Q, and tried to restore my SMS and call logs.

I managed to restore the SMS history by copying back the /data/data/ folder to my new phone and setting the permissions appropriately. But for the life of me I can't figure out how to restore my call logs -- I can't figure out which folder to restore from and I can't figure out where to restore it to. It seems to me that the two might be different because I originally upgraded the phone from a slightly older version of Cyanogenmod whereas the fresh copy is completely new, but either way I can't figure out how to do this. I have a nagging feeling that the call log might not have even been backed up, but that would be strange because the SMS log was...

Any ideas?


@Firelord 2015-07-17 00:43:14

Note: OP already knows the answer but the following info is for those souls who might be troubled with the same issue.


CM11 in OnePlus One (be it 44S or 05Q update) doesn't have any provision to get the Contacts and Call logs get backed up and restored using ADB.

So unfortunately, the answer is simple: your contacts and call logs were not backed up by ADB because the developer(s) of CM11 didn't allow it, and so, you should look for other ways to restore them (hint: Google Contacts Sync).

Also, if it matters:

  • /data/data/ is where you'll find the database for SMS/MMS
  • /data/data/ is where you'll see the Contacts and the Call logs

You can now stop reading if you're satiated by the answer, and I recommend to get busy in finding some recovery methods to regain access to Contacts and Call logs.

However, some souls want a reason for an event no matter what, so here we go with one such reason!

Why SMS/MMS were backed up and not the Contacts?

Why is that private content such as SMS/MMS were backed up but not the Contacts?

You've to note that since Jelly Bean was launched this has not been a common behavior exhibited in Android Open Source Code (AOSP) and neither by most of the stock ROMs to allow backup of said private content by ADB, i.e. both Telephony Provider (has SMS/MMS database) and Contacts Provider (has Contacts and Call logs) are usually developed to not to participate in backup and restore infrastructure of the Android system. However, CM11 has some changes which allows SMS/MMS to be backed up but leave the Contacts and Call logs in the dirt.

What are those changes?

My finding states that in CM11, a flag named android:allowBackup="false" was eventually removed from Telephony Provider but remained untouched in Contacts Provider. This flag is always introduced under the app's AndroidManifest.xml.

Google here has to say this regarding that flag:


Whether to allow the application to participate in the backup and restore infrastructure. If this attribute is set to false, no backup or restore of the application will ever be performed, even by a full-system backup that would otherwise cause all application data to be saved via adb. The default value of this attribute is true.

(Emphasis mine)

However, for some reason, CM12 reverted back this decision and now, both the apps doesn't allow backup from ADB at all.

If you intend to to see the source of the said packages, then take a look at AndroidManifest.xml of Telephony Providers for:

  • CM11 -- no such flag under <application ..
  • CM12 -- has that flag under <application ..

But for Contacts Provider both CM11 and CM12 has the flag untouched.

You can further verify this information from the AndroidManifest.xml of both the packages that you've in your CM11. You would find that the flag is present in one app and not in the other.

Note that the default behavior as mentioned in original source code of Android is to disallow backup in both apps for Kitkat release.

As for why CM11 developer(s) made such changes, I would advise asking them directly.

Done for now!

You may checkout my similar answer mentioned here for the question: Backup/Restore SMS/MMS via ADB on a non-rooted device?.

Related Questions

Sponsored Content

3 Answered Questions

1 Answered Questions

[SOLVED] Backup not listed to restore from on new Android device

1 Answered Questions

Connect OnePlus One through adb keep disconnecting

1 Answered Questions

[SOLVED] What will I lose if I install Cyanogenmod?

1 Answered Questions

[SOLVED] OnePlus One randomly soft-reboots after wipe

  • 2015-07-22 18:11:47
  • user541686
  • 1510 View
  • 1 Score
  • 1 Answer
  • Tags:   reboot oneplus-one

Sponsored Content