Menu

Introduction

About one year ago I had the problem, that I could not restore my Sony PC Companion backup to my phone. Back then I was really frustrated, because I found no (free) solution to get to my phone book. After some research I found out, how the data is compressed, and I made a little program to decompress the data in a very simple way. With my solution you can extract data from Sony PC companion backup for free and the program works on all platforms. I for myself used it only to get my phone book, and this tutorial will be about how to get your phone book back, but in theory you can get back everything, if you know, where to search. The program won’t work if you encrypted your phone. If you want to get you messages back, take a look at this tutorial. If you want to do any of those I can help you via email.

My program got downloaded over 50.000 times and I got a lot of great responses, so chances this solution works for you, are rather high!
This tutorial is also available in German | Russian

Restore data in 12 easy steps

For this solution you need to install Java (RE)! Time estimation for the tutorial: 10 minutes

The program works on Windows, Mac and Linux, with this 12 step guide you will be able to restore your phone book, but you could use it for any other files too.

Navigate to the folder your backup is saved to. By default your backup is saved to C:\Users\YourUserName\Documents\Sony\Sony PC Companion\Phone Backups

You should find the backups with the file extension “.dbk”. Create a copy of your backup (ctrl+c, ctrl+v) just in case something goes wrong.

The dbk extension is actually just a zip file, so you can just rename the file. If you see the .dbk extension in the file name you can skip this the step. Otherwise you have to disable a windows explorer feature. For that click in your opened window on organize -> Folder and search options and there switch to the tab View and disable the feature Hide extensions for known file types.
show file extensions in windows 7

If you having this problem with an other version of windows just google “windows yourVersion show file extensions”.

Rename your file copy to backup.zip (F2)

Open your file (double click). If you have no program to open zips I highly recommend 7zip.

Now you have to navigate to your contacts file. There are different folders for different android versions and phone models. Here is a list of possible locations:Applications\com.sonyericsson.android.contactsimpoApplications\com.sonyericsson.android.socialphonebookApplications\com.sonyericsson.android.contactsimportApplications\com.sonyericsson.localcontacts
If none of these folders exist or has the wrong data, take a look at other folder in Applications\com.sonyericsson. If you find a new one please post a comment or send me an email.

In the folder is a file called fullbackupdata. Copy this file to your desktop (Just drag&drop it there).

Almost there! Now double click on “restoreData.jar”. Within a few seconds a file with the name “restore.tar” should show up. If it doesn’t make sure that you have java installed and both files are in the same directory (e.g. desktop).

Now navigate through the folders until you find a folder with the name “f”. In this folder you should find a file named “full_backup_vcard.vcf“. This is the one you’re looking for. You can use this file to get your contacts on your phone again or you can also import them to your windows contacts. If you don’t find the file, go back to step 6 and try a different folder.

For all interested, the program is a fork of Android Backup Extractor by Nikolay Elenkov. He actually did almost all work, I just added a few changes to make the program easier to use (for this particular problem). If you want to, you can download his program and compile it yourself, then you just have to fill in the needed arguments yourself.

If you want to restore encrypted files, this program won’t work directly, but I found a solution for those cases as well, so just send me an email then. For messages take a look at this tutorial.
I hope this program helped you. If so, I would be happy if you leave a comment or show your appreciation by clicking on the donate button. If you have any questions, leave a comment or write me an email. I’m also happy to hear from you, if you hadn’t had problems!

Are you sure it only contains one contact file. When you double click on the vcf file it will only show one contact, but when you interact with the window (either add contact or cancel) the next contact should pop up. You can Also open the file with a text editor (Notepad if you’re short of time, otherwise I suggest Notepad++) to see if there is only one contact.

It first didn’t work because the java script correctly threw an exception: version 2 not supported. (experia z1, Sony PC companion backup)
(run it at the command prompt to see the message)

So I simply opened the fullbackupdata file with a hex/binary/text editor (textpad) and changed line 2 from “2” into “1”. Gave it a try.

Now, the script produced the .tar file. When opened it did gave an error on one of its content files, but the other files were unharmed. Fine enough for me, I could read the notes.db file I needed (phone in repair).

After extracting restoreData.jar I could not find restore.jar file to create a .tar fromthe script.
I’ve used 7zip to extract ( your active download file is blocked in Saudi Arabia where I stay) I have download it from other website.

Hi. I renamed the .dbk file to .rar, I opened it, I have “com.sonyericsson.android.socialphonebook” folder, but there is no file called “fullbackupdata”. There are 12 files with nonsense names and beginning wit @, and one file without @. I opened it with Notepad, but it’s just the “CallLogList”. I need my contacts…

I’m not sure how you managed to open the zip file as a rar, is it really possible?!
But to your question: Try to look in other folders, have you tried all of these:
Applications\com.sonyericsson.android.contactsimpo
Applications\com.sonyericsson.android.socialphonebook
Applications\com.sonyericsson.android.contactsimport
Applications\com.sonyericsson.localcontacts
If not, do so, and if you can’t find a file and you are sure that you did include your contacts in the backup, then you can drop me an email (You can send me your backup, or I can help you via teamviewer).

Hi ! I just renamed the Back Up file as .rar and opened it with WinRAR. There was only “Applications\com.sonyericsson.android.socialphonebook” folder, but a file with a name “fullbackupdata” was not present.
Anyway, I added my Google profile, but there was no result. I mean – no contacts in the phonebook. Then I decided to remove the profile from the phone and tried many times to restore from the various Back Ups, that I made in the last year – Full Back Up, only contacts… but nothing happened. Only with my last (full) Back Up there was something interesting – my call list was restored and for a couple of seconds there were all the names of the contacts in the list, but then suddenly they were replaced with the numbers. And again no Contacts in the phone book – I had only my call list, SMS and pictures restored. But then I decided to add my Google profile again, I don’t know if I made something different this time – but after a couple of minutes all my contacts were there! I wonder now, if I should have made the Restore with my profile already added?
Anyway, I am happy now. Thank you for the quick response and the willingness to help. I downloaded a program called “My Phone explorer” and exported the contacts as a .csv (which I can open with Excel) and as a . vcf (which I think I can import back again in case something goes wrong again)

Hm, that is a pretty unsual way, but cool that you managed to find another way, and thanks for posting the solution, maybe somebody else can use it too, if my method doesn’t work for her or him 🙂

I guess it doesn’t really make a difference whether you activated your account on your phone or not.
What I would be interested in, is if you tried to find your contacts in gmail or not. Normally, if you have synchronization activated (which I hadn’t) you should find all contacts in gmail.

Actually, I wasn’t sure if my Sync was on before I flashed my phone, luckily it was 🙂 I thought that having a Back Up is enough. But in my case – it didn’t help at all. I have another phone – Samsung Galaxy S2, and restoring it’s backups worked every time well. And I can also open the backup file with the contacts without having the phone – through the Samsung software on my PC. Not the same here – I can not open the .spb file using Sony PC Companion. I have no idea what software use the best Sony models (since I use primary my Samsung, and my Sony Xperia U as a 2-nd phone), but Samsung Kies is much more useful than Sony PC Companion.

Well there can be a lot of possible Errors, try to use my program via the command line to get more feedback. Here is how you do it:
Press windowskey + r, type “cmd” and then hit the enter key. Now the windows command line tool should pop up. there navigate to the folder where your files are. In case you stored them on the Desktop, you just have to type “cd Desktop”. There you then have to execute the file, you do it with this command: “java -jar restoreData.jar”
If there is an error, you should get some information on where the problem lies.

If that is too complicated for you, you can also send me the file, and I will get the data out for you 🙂 (My email is send@johannesdeml.com)

Well with that much information I can’t really help you, but
– You can send me your fullbackupdata file and I restore it for you
– You can use the program with the console to get feedback on what went wrong and then post it here

I was using z1 compact now its in repair hence i was trying to get contacts from PC Companion backup i did all steps as per mentioned, I got a “restore.tar” file and open it with Win Zipper but i could not find subfolder F only folder i got is com.sonyericsson.localcontacts and now i am clue less what to do.Please help me with VCF file i am sharing my fullbackupdata with you on given Email ID.

Hello Johann, I really need to get my contacts from my Xperia z , whose display is a lost cause. Can you please help me recovering the files? i did everything fine till step 8 or 9 but then couldn’t succeed in retrieving my contacts.

The db folder sounds like the right one. I never used my program for anything but contacts, but it should work too. Mainfest files are not interesting for you, try to find .ics files or .db or something similar. With that little information, I can’t give you any more tips.

Hey Johannes, thank you for sharing this really useful utility!
Have you thought about submitting/posting it on the XDA Forums? I think even more people would find it useful!

I have a question:

I have a backup where I had a POP3 Hotmail account set up. I am wondering if it is possible to use your utility to extract any E-Mails that were in the backup, would you know?
Specifically, I am trying to get some of my Draft E-Mails. (When you have a POP3 account using the default E-Mail app in Android on the Xperia S the Drafts are saved locally and not synched with your Hotmail account).

Puh, your problem is pretty specific. I don’t know, how they the email app is saving drafts, I guess it will be in some binary format, which will make it hard to find the right right files, and then get them readable again. It is theoretically possible to restore everything with the utility, but I guess you could run into problems opening the drafts again (And first finding them). I never did this, bu I would try to first find out, in which folder the app is storing emails/drafts (with google, or just search through the files you find in the backup). Discard any _manifest files, they won’t be of any use for you, .eml files or db folders could be interesting, but I really don’t know, how they are managing the files…
If you find .eml files, you’re lucky, you could just open them with thunderbird or something similar, but yeah… I’m just guessing.

“EmailProvider.db” was the most useful for me, I used the really useful SQLite Administrator program to open the DB files (http://sqliteadmin.orbmu2k.de/ in case anyone is interested or it helps them).
I then searched through the tables to see what I could find.
The “Mailbox” table contained the id for each folder, so I found the id for the Drafts folder.
I then went to the “Message” table, found the field that represented the link to the Mailbox ID, “mailboxKey” then viewed the records sorted by that field and filtered only the Draft ID’s.
The only problem here is that the “Message” table doesn’t contain the whole message, only a “Snippet” field, but that was enough for me (200 characters).

“EmailProviderBody.db” contains all the messages, but I haven’t found which fields to use to tally the 2 databases up yet. But if you have the snippet from the first db you can tally this against the full messages in this db.

I hope this helps someone, while frustrating and time consuming it was satisfying to get it sorted!

Hm, this is an interesting problem, I never found a file with the name gaClientId so far. What I would suggest as the next step, is to try the other possible locations for the contacts (Those:
Applications\com.sonyericsson.android.contactsimpo
Applications\com.sonyericsson.android.socialphonebook
Applications\com.sonyericsson.android.contactsimport
Applications\com.sonyericsson.localcontacts )
If you can’t find them there, also skim the names of all application folders, maybe you find an other folder, which could hold the contacts (Please tell me, if you found one).
If you can’t find any solution, I’m willing to help you with direct support, so you can send me an email (send@johannesdeml.com) with your backup.

Thank you for sharing this info. I was able to use the Sony PC companion Xperia transfer module to restore most of my contacts and the call logs.
I had to select Xperia backup data on my computer and in that backup file, PC Companion was able to locate my stored contacts and call logs. I did not have to extract it manually.
I was mad because Sony PC companion did not save all of my contacts. Especially ones with a picture. They are lost forever. Also my phone accounts were not saved. I had to do a LOT of manual work to actually restore my phone after the backup. I had to reinstall my apps one after the other. I spent 1 day on it. It is crazy.

I recently took a backup of my Xperia P with PC companion and then upgraded my phone from oem to cyanogenmod. Of course the backup was no longer compatible with my device 🙁 . I managed to restore my contacts with your nifty little program but I am having difficulties restoring the smsmessages. I tried copying the mmssms.db & mmssms.db-journal from the backup to my phone, but this soft-bricked my phone. Luckily I had a clockworkmod-backup 🙂 . Any ideas to overcome this problem?

Funny that you got into the problem the same way I did. For me the messages where not that important, so I never tied to restore them. It seems like you’re on a good track though… maybe you could look into the db file on your computer… (Maybe with something like SQlite). I had similar problems with just copying a file from one phone to another… I guess it doesn’t always work that way, you will probably have to alter the files or maybe there are tools to reimport the files. Good luck, and please keep us up to date if you made any progress!

This is really strange, because the version number “2” is supported by nelenkovs neat little extractor. Could you send me you file via Email, than I can take a look at it… I guess there is maybe a formatting problem or something like it going on.

Hi, I am trying find the xperia T inbuilt note app data that was backed up, but is not supported on the new Z3 as I do not have the T as it was traded in. can you give any pointers to where it may be backed up and how to access it. kind regards john

You will probably find it in a folder that starts with Applications\com.sonyericsson.android just look for names that sound like they could be for the note app. I don’t know how they have structured the data in this app, but inside you will probably find some .db files, which you could look through with SQLite. I guess just reading the data is possible, transferring it to an other app, will be hard candy. Good luck 🙂

Many thanks to everyone here for their input. I’m not advanced in IT matter though did attempt the instructions above but to no avail.

I thought I’d post a reply and point those in a similar situation to myself in the direction of phoneMiner which is a “paid for solution” but works rather well. I managed to extract my contacts from my old backup and the day has been saved!

Yeah I found that one too, when I was trying to restore my contacts, and I got really fed up, that they are offering a trial, which would only restore a few contacts. What was too hard for you with my solution? I’m really interested, because I tried hard, to write the tutorial, so that everyone could execute it. Please let me know, so that more people are able to use the free version 🙂

Hi Johannes,
Thank you so much for creating and sharing this (and linking back to the source from which you forked, also useful). It helped me a lot with my new phone, this solved the exact problem I had (having not backed up properly with any other utility before unlocking the boot loader). The tutorial is super straightforward as well, which is excellent.

Thanks for the nice feedback, glad it helped! Funny, that you found the English version of my tutorial and not the German one. I guess this one just has more backlinks and better SEO. Anyways, cool to help a fellow Austrian 😀

Hey there! Congratulations, you got the hardest part behind you. Here’s how I would get the contacts back up your phone:

– Connect the phone to your laptop/desktop-PC via Micro-USB
– Drag the the vcf file on your sd card
– Open your contacts app on your phone
– Search for the settings, there will be most likely an option “Import contacts” or something similar
– Click on it and navigate to the file on your sd card
– Boom! You’re done 🙂

Also keep the vcf file on your laptop/desktop-PC. You can import the files there too, if you want to. VCF is an open standard, so a lot of programs and apps on your phone and computer can work with it.

I succeeded meanwhile to import the contacts to my phone, do you maybe now how to do all this with the messages. I came to the step where I have to choose from three folders db, r, and sp and also a file called manifest. What should I do now? Which file is the right one to get my messages back? Thanks

The manifest file is not interesting. You will most probably only need the stuff in the db folder. You can open the file there with something like SQLite Browser (http://sourceforge.net/projects/sqlitebrowser/).
I never did it myself, but I think somebody managed to get her or his messages back on the phone… Just look through the comments 🙂

Great goods from you, man. I’ve understand your stuff previous to and you’re just too magnificent. I actually like what you have acquired here, certainly like what you’re saying and the way in which you say it. You make it entertaining and you still care for to keep it wise. I can’t wait to read much more from you. This is really a terrific web site.

Hello Johannes, and thanks for your effort.
I have in my PC installed Nokia PC suite, which interferes with the .jar. I tried to manually open the file with java.exe and javaw.exe without success.
¿Can you help me? Thanks

That’s interesting, the nokia PC Suite is trying to open the program? My guess is, that you haven’t got the needed java version installed. If you right-click on the program and go to open with, you should find this item: http://i.imgur.com/dRVhJ1H.png

Sorry bothering you, when i tried again today, it worked. Maybe i didn’t kill properly the process the other day, i don’t know; but your solution works flawlessly.
Many thanks for your offer, many thanks for your effort in the tool, and also in taking the time for answering people in the comments. I’m sure you will make yourself a good career in software industry 😉

I’m glad everything worked out for you! Well, I don’t want to take all the credit for this work, a large part also comes from Nikolay Elenkov (Even though he didn’t develop his program for the sony PC companion).

And we will see. I’m actually not so interested in the software industry itself, but more into developing games. 😀

I backed up my Xperia phone alright before performing JB upgrade..due to some audio issue i did lot of experiments to get the phone OS downgraded back to the original one..it required rooting and manual flashing! However, restore from the backed up data simply refused to get my contacts back. It is because of your article i could restore my contacts back. Thank you ! 🙂 God bless .

hi,
I downloaded the file as you said I also got the file from the back up but the restoreData zip had just 2 files in it meta-inf and org I didn’t see anything called tar or restore tar anywhere. what am I doing wrong?

Hey there, your java version is correct and the program runs correctly, but did you download the correct version of my program (The one on my website: http://www.johannesdeml.com/data/out/restoreData.zip)? If you did, please send me your file, then I can take a look at it. 🙂

You’re welcome, thanks for the kind words! Well you’re giving credit by posting this comment. If you want to do more than that, just try to do one nice thing on the internet to another person. That would really make me happy (:

Hi,
Johannes
I had updated to Lollipop yesterday but had lots of issues with it, so decide to restore it from PC companion. Before doing that I had a full backup of my mobile in PC companion, but when I restored most of the things are working fine but most of my contacts are missing ?? I tried all the above discussed methods but not working, also I did full back up including contacts. Still i am not able to find only “_manifest ” file.

Ok now that is really strange. Did you try all of the suggested folders?
Applications\com.sonyericsson.android.contactsimpo
Applications\com.sonyericsson.android.socialphonebook
Applications\com.sonyericsson.android.contactsimport
Applications\com.sonyericsson.localcontacts

If so, check if you synchronized your contacts with google. Otherwise you can also send me a mail with your file, maybe I can find something else…

Hi,
did you find a solution? I have the same problem, after restoring backup it shows names for half a second, then it changes to numbers (so i think the contact list actually exist somewhere).. I searched in all the folders, there’s no .vcf file ):

Hey Johannes
I have a folder named “com.sonyericsson.android.socialphonebook” but don’t have file named ‘fullbackupdata’ all files start with @ . I m sure I have backup of my contacts and now my cell is lost ,and I am in need of my contacts,i tried all yhe steps you told to others as reply nothing is working ,as you told someone you can help solving this problem by teamviewer I kindly request you to do that for me .

Did you also try the other folders I suggested?
Applications\com.sonyericsson.android.contactsimpo
Applications\com.sonyericsson.android.socialphonebook
Applications\com.sonyericsson.android.contactsimport
Applications\com.sonyericsson.localcontacts

If not,m please do so, otherwise write me a mail and we can try to figure out the problem together.

You should actually have a restore.tar. If you want you can send me your backup and I’ll get the contacts for you. Otherwise read through the comments, I answered this problem already a couple of times.

Thanks ever so much for putting this up. I work freelance for a company and had saved all my worked hours in my phone calender and recently dropped it smashing the screen making it unuseable. I had backed the phone up recently and am now desperately trying to access the calender to pull off my hours for invoicing. Are you able to advise me on how to access the calender?

So you got a file instead of a folder? That is strange, I never heard of that before… Did you tray using my program with just the file you got? Otherwise you can send me the backup and I will take a look at it 🙂

€dit: For anyone who has such a problem: You probably did encrypt your phone, that’s why you got files instead of folders. They are AES-256 encrypted, so you first have to decrypt them, then you can use my program.

Hey there Ben!
I can’t quite follow your question. My tutorial doesn’t need a sony phone?! Or do you want to open a backup created with a software other than Sony PC companion? I guess there are quite a lot of them out there, so I can’t really give you an answer.

Hm interesting… So I guess you wrote something like
“java -jar RestoreConsole.jar 2016-06-21-195419\soyericsson.android.socialphonebook 1234”
And just left the password/pin aside right? Normally you would get a bad padding exception if you use the wrong password (Something like javax.crypto.BadPaddingException: Given final block not properly padded).
Did you alter the file in any way? The first few lines you sent me look totally fine, so there is no problem there.

What do you mean with OEM System? The contacts are normally not stored on the SD-Card, but rather on the internal storage. I fear, it will be hard for you describe the problem, but you can send me your backup via email (send@johannesdeml.com), then I can try to solve your problem.

My wife’s Xperia Z3 is in to be repaired for cracked back glass and she suddenly realised that she needed information contained in an SMS message on the phone. I followed your procedures and poked around to find the messages.

In case anyone else needs SMS messages, they were here:

Applications\com.android.providers.telephony\fullbackupdata

After following your procedures, the can be accessed here:

apps\com.android.providers.telephony\db\mmssms.db

I used SQLite as you recommended and found the message texts in the SMS table, body field. Phone numbers are in the address field in the same table.

I am so grateful to you and john for helping me find my sms messages. I dropped my phone last week and this was my last ditch effort before giving up and sending it in to the insurance company that sent a replacement phone.

I walked through john’s description perfectly (thanks John!!) but i am stuck at how to actually use sqlite to get the messages. Can you (john) walk me through that part of the process??? I’m almost there . . . . can’t believe my good fortune in finding you Johannes and your excellent program!!

Hey there Linda, thanks for the kind words! I’m glad that my program helped you. As for your messages: To get them back on your phone it is kind of a complicated process, gladly Huỳnh Giang Sơn who had the same problem found a solution to it. If you want to, you can send me your telephony backup and I’ll help you get the messages back on your phone. Otherwise, if you know a bit of java I can also send you the program to do it yourself. 🙂
My email is send@johannesdeml.com

Johannes-
Thank you for your offer to help me. I am trying to send the telephony file, but having a hard time attaching it, so I am sending the fullbackupdata file that is inside that folder. I hope that is what you need! Let me know if there is another way to send the entire folder.
Thanks again for your help- you are a gem!
Linda

Johannes-
I think I will try again putting it into a zip file. I haven’t done that before, but I can figure it out. It seems to be taking a long time for the attachment to load otherwise. You may end up getting the file twice, but hopefully it should arrive soon-

The only downside (and I don’t really care because it is worth it) is that they ALL show up with todays date and essentially preempt my most recent messages to the bottom of the list. I will resolve this by simply resending any important recent messages so that they will appear on top of the others.

Once again, THANK YOU SO MUCH JOHANNES!!! Everyone I asked told me it was virtually impossible to get my messages from a phone with a smashed screen, but you made it possible!!

I lost all my textmessages when upgrading to Lolliopop on my Xperia Z1 and followed Jons advice where to find it. But now what? Do I have to import it back to the phone with an app? I tried to put the files in the corresponding map on the phone but no luck.

I never did this so far, but I did some research and found this program: https://github.com/t413/SMS-Tools
It is able to handle your db file and I think it is able to convert it to a file format which apps can handle to import again. I guess that’s the easiest way. Please share with us if it worked for you 🙂

I can understand your suspicion, that’s why I linked to an open source program, so everybody can look at the source code and can see whether it does anything else with the data other then what it should do. Even though you probably won’t look through the code hopefully somebody else did, so you can mostly bet on the mass of people on the internet 😉

Hm, I can’t really give you a walkthrough because I never took the time to recover my text messages. Since you’re not the first person to ask me how to do it, maybe I should write an article on that too. If you want to, you can send me your backup (to send@johannesdeml.com) and I will try to recover your data for you. I can totally understand if you don’t want to trust an almost complete stranger on the internet with your data, but I won’t have the time to give you direct support via teamviewer, so you would need to find a way on your own.

Thank you! it worked for me. I had to go through a few folders (after deleting them off my desktop) to then find the right contact file with f in it. I then dragged that vcf file to my desktop and opened it using windows contacts. I now have all my old contacts from my Z1! Thanks.
BTW how do l put them onto another phone or is that now manual? My phone died so cant sync with new phone. luckily l did a backup 2 days before but all files wont go on new phone like pictures and contacts etc. any idea?

Hi there,
I tried all the steps but am at a loss. I have the .jar file but when I click on it I can’t get the .tar file. When I open the .jar it just takes me back into the unzip programme to unzip file again. what I have saved are the text messages from sony xperia z and I really need the info in them to use. Is there any way you can help with the fullbackup file? Many thanks

Well there can be a lot of possible Errors, try to use my program via the command line to get more feedback. Here is how you do it:
Press windowskey + r, type “cmd” and then hit the enter key. Now the windows command line tool should pop up. there navigate to the folder where your files are. In case you stored them on the Desktop, you just have to type “cd Desktop”. There you then have to execute the file, you do it with this command: “java -jar restoreData.jar”
If there is an error, you should get some information on where the problem lies.

If that is too complicated for you, you can also send me your files, and I will get the messages for you 🙂 (My email is send@johannesdeml.com)

Hi,
So managed a few more steps. Java wasn’t downloaded properly. Now I get the tar file and can extract with winzip. I can’t find any file with my conversations on, but I do know they are there. Have opened the original dbk file with trial version of phoneminer and it does show me five of the messages. I don’t want to pay £30 or whatever just for the full version to do this one task. Any ideas?

Thanks for this helpful guideline, I have an issue with manually retrieving the backup of the messages history (sms) and not the contacts, I was using Go SMS Pro as a primary messaging app and I found the folder “com.jb.gosms” inside this folder there is another “fullbackupdata” as the one found for contacts, I tried the Jar file but it did not generate anything on the desktop… can you kindly help out here so that I can retrieve the messages history? (perhaps small modification to the jar file could help?) The reason I can’t use normal restore via Sony suite is that the backup is from android 5.0 while I have downgraded to 4.4.

Hey
thank you for providing such a tool and the detailed tutorial.
I’m trying to run your program (restoreData.jar) on Windows 8
I have java 7
it says unable to launch application; via cmd gives the following output

c:\l>java -jar restoreData.jar
Exception in thread “main” java.lang.RuntimeException: java.io.FileNotFoundExcep
tion: fullbackupdata (The system cannot find the file specified)
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:196)
at org.nick.abe.Main.main(Main.java:38)
Caused by: java.io.FileNotFoundException: fullbackupdata (The system cannot find
the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(Unknown Source)
at java.io.FileInputStream.(Unknown Source)
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:55)
thank you very much in advance

Thanks a ton for the help !!
One suggestion though, I found that you have given comprehensive solutions to all our issues, and those should be put up in the user guide with the links, it would help a lot of people.
Thanks once again !!

Thank you for your thoughts on how to make the tutorial even better. I totally agree, I tried to deny that 180 something comments were too many to skim through them. I will add another section for troubleshooting when I find the time. 🙂

hey
I want to thank you very much for your help.
reinstalling JAVA fixed the initial problem and I was able to extract the fullbackupdata files.
I tried the smstools software to retrieve my messages to my phone, after several hours struggling with python I got stuck on a unicoding issue, I don’t know if it is related to arabic language in sms.

Hey Joseph,
I really can’t help if you only tell me that it didn’t work for you. Where did you have problems? If you want to you can send me your file and I’ll take a look at it. To get something other than your contacts you have to experiment a bit. Sadly my solution is not a “transfer your whole backup from Sony PC companion to whatever phone in whatever format you like”-solution. For contacts it works rather well, and you will also be able to get your pictures, calendar and messages if you are willing to put enough time into finding those files and transferring them.

Thanks so much, what a very useful piece of software, worked great to extract from a backup from my Xperia Z3 to get to a vcard then import and then export to a .csv to a temporary windows phone, really cool!
Kind Regards, Ian

Did your phone had an SD-Card? Then it is probably there in the folder DCIM/Camera. Otherwise try to sort the folders in 7zip according to their size. It is probably the largest or second largest folder you will get, if the pictures are in the backup.

Cool that you managed to get your file. I never worked with Greek letters in vcf files, but it appears to be a problem for windows: https://stackoverflow.com/questions/8617439/utf8-encoding-with-vcards-in-windows
You could try to change the character encoding as suggested in the thread, or maybe android will handle them correctly if you put them back on your phone. If you’re stuck you can also send me your file and I’ll take a look at it. I don’t speak Greek but I can distinguish between Greek and Chinese letters 😉

Hi,
I had some problems to extract contacts using your jar script. I tried to get vcf file from backup made from lollipop and latest PC companion version. I got message which says – do not how to handle version 3. But the trick mentioned by BJ at 3rd post to change the version in the backupfile (I changed from 3 to 1) save my data.
Thanks for this anyway 🙂

Hi Johannes,
i read thru those msg frm u and others. i think i need your help here. I hav follow all step you guide but i dun see any restoreData.jar in the folder. i have download the restoreData and unzip it with rar. Only 2 folders i see, META-INF & org. So can i know where i can get the restoreData.jar?

Hi Dickie,
All of the comments? You’re crazy 😀 I made a small screenshot of how the zip file you download in step 8 should look like: https://i.imgur.com/iLB6Bd0.png
If it does not contain the restoreData.jar file, that is really strange because normally winrar should be able to handle it. Anyways you could download 7zip instead to open it (I think 7zip is the better program anyways) or send me your file and I’ll extract the contacts for you 🙂

thanks so much! I had to send in my phone due to some problems and thought i had all my contacts on my sim-card. Like you can imagine when you read of me here, that wasn’t the case… Thanks to you i’m now able to get all my contacts back! I really appreciate your work, the good manual and the overall idea.

Well, that is because I wrote a tutorial for getting your contacts back. As for the images: Did your last phone had an SD card, which you still have? There you would find your images easily. They are stored under WhatsApp/Media/Whatsapp Images. If you don’t have the SD card and want to search it through your backup, I recommend trying to order the folders by size and look into the ones with a large file size. The file size of all your images is probably over 10 MB, so only take a look at those (Shouldn’t be that many).

Wow – I had just about given up hope of getting my contacts back, but followed your instructions and seems to have worked – thank you so much!

However, it has only worked for some, but not all of my contacts – I can’t see any pattern for which ones it has restored and which it has not.

So, I looked in the .dbk folder again and found another file which looked like it might have some contacts in (first one I did was sonyericsson.android.socialphonebook, this second one is called sonyericsson.localcontacts)

I followed this process again but when I get to step 12 and look in this folder the files are _manifest not .vcf. Can you tell me what I am doing wrong?

You are doing nothing wrong, there are just no contacts in the localcontacts in your case. If you think there are other contacts hidden in another folder, jsut look at the file size of the folder, it will give you a clue if there is anything interesting inside. I’m not sure why you are missing contacts from your first try though. Maybe you did the backup a while ago and only the recent contacts are missing?

I thought about the sim card as well. If you are using it in a new phone you should see the contacts that are on the sim. If you’re not lucky with your search, maybe google stored the contacts without your knowledge, maybe you find them here: https://contacts.google.com/preview/all

Hey there! Did you try all the folders I suggested? You can also take a look at the file size. If the fullbackupdata file is smaller than 10 KB there won’t be anything useful inside. Otherwise, if you can’t find them in any of the folders you probably didn’t add the contacts to your backup. You can also send me a mail if you want to and I’ll try to find the contacts for you.

This is actually a very different problem. The photos are probably stored on your micro-SD card. First I would just take a look if you can just find them by pluging in the phone to your PC. You should find the photos in the folder DCIM or Camera or 100ANDRO. You can also just search in the windows explorer for .jpg. That lists all JPEG files that are on the phone. If you can’t find them that way and you don’t have an internal storage that simulates the sd card, but have an actual Micro SD card you could try to put the SD-Card into another phone. Maybe you get lucky that way. Otherwise I’m not sure if you did a backup of your photos with the Sony PC comanion, could you restore it by just using the software? Or at least most of the photos?

Okay, then you probably have a problem with your java version as many other people in the comments. You can either send me your file via email or you use the command line to execute the file to see what the problem is.
Here is how you do it:
Press windowskey + r, type “cmd” and then hit the enter key. Now the windows command line tool should pop up. there navigate to the folder where your files are. In case you stored them on the Desktop, you just have to type “cd Desktop”. There you then have to execute the file, you do it with this command: “java -jar restoreData.jar”
If there is an error, you should get some information on where the problem lies.

Can you use this program to restore the xperia notes data too?
I was in a bad mood because I could not recover the xperia notes data using the
sony pc companion.

I don’t have to put the notes data back to my phone.
As long as I can retrieve my lost file I will be happy.
I have a file named fullbackupdata, which is 20MB in size, in a folder named com.sonyericsson.notes. I wonder if that file has my notes data.

Yep, I’m pretty certain you can do it. The file you need with have the extension .db (Something like notes.db). Extract that file. To see the date you need to download the program sqlitebrowser (http://sqlitebrowser.org/). Download it and then open the .db file with it. Afterwards switch to the tab “Browse data” and then choose notes from the dropdown menu. There you will be able to see your data again.

Hi. I have tried to get my contacts with this way but there is a problem. I got the file that’s name is fullbackupdata and run the jar file via Command Prompt. Although fullbackupdata and restoredata.jar are same directory, I get the error message:
C:\Windows\system32>java -jar C:\restoredata.jar
Exception in thread “main” java.lang.RuntimeException: java.io.FileNotFoundExcep
tion: fullbackupdata (Sistem belirtilen dosyayı bulamıyor)
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:180)
at org.nick.abe.Main.main(Main.java:35)
Caused by: java.io.FileNotFoundException: fullbackupdata (Sistem belirtilen dosyayı bulamıyor)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(Unknown Source)
at java.io.FileInputStream.(Unknown Source)
at java.io.FileInputStream.(Unknown Source)
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:52)
… 1 more
“Sistem belirtilen dosyayı bulamıyor” means The system could not find the file.

Hi there! So from your error message I gues you didn’t put the fullbackupdata file in the folder C:\ where you run my script… Is taht correct? Just put the fullbackupdata to the same folder and try it again 🙂

You can see the calendar entries inside the db file with sqlitebrowser: http://sqlitebrowser.org/
vcf is an extension type for contacts, so you would probably need .ics. If you find a method to convert the db file to an ics I would be very happy to hear it!

Hi there, I used this solution and everything went smoothly up until the very end. After opening the .tar file my contacts popped up one by one and I selected add to contacts. It opened up with outlook, however outlook wasn’t set up with my email account. So after adding all contacts, i tried to find the list i just created, but i dont know where they saved. In the outlook popup i checked address book which appears to be empty. Super confused? Any help would be greatly appreicated!

They haven’t been added to outlook but to your windows contacts (Yep, there is something like that, that probably nobody really uses…). You can find the directory under C:\Users\YourName\Contacts (Or just paste that into the explorer bar: %USERPROFILE%\Contacts).

I’m asking myself what you want to do… if you just want to add the contacts back to your phone just put the file onto the sd card of your phone, open the contacts app and search for import contacts in the settings. 🙂

Hi Johannes!
There’s an option called as back up and restore when I connect my Sony xperia ZR to my laptop. I clicked on that and then saved these files on my desktop but then I’m not able to open any of them. Please help me.

Unfortunately it did not work 🙁 I get the following error message on the console:

Exception in thread “main” java.lang.UnsupportedClassVersionError: org/nick/abe/Main : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Okay, that is kind of crazy. So the problem does not ly with any of your settings but with the version number, I guess they did an update on that one. If you open the fullbackupdata with a normal editor (e.g. notepad, notepad++) take a look at the first 4 lines… Is there a line with the number 51.0?
My quickfix would be:
Change the first 4 lines to be
ANDROID BACKUP
2
1
none

If that doesn’t work, please inform me again, then I will see if I can update my program as well. 🙂

After I did a back up using PC Companion, I did not get all of my photos back. Can your steps above help me do that? My backup file is over 3 Gb. But PC Companion only reads 10 or so music files for a total of 10 MB.

The first thing that comes into my mind is: Did your last phone have an SD-card built in? If so, the photos are most likly stored on that card, and you can read them either with another phone or an sd-card reader (if you have the phone still with you).

Otherwise, I’m pretty sure you will find the photos in the backup as well. If you have 7Zip installed, you could just follow my steps to step 6, and there go to Applications/ and then sort the folders by size. The photos folder will probably be the biggest or second biggest folder. Probably the name will be something like DCIM.
If you have any problems, I could try to help you via teamviewer or something similar 🙂

I’m glad I was able to help. As for text messages: This procedure is a bit more complicated, but if you send me your file (Which you can find in the folder Applications/com.android.providers.telephony/fullbackupdata).

As for the notes: this is a rather specific question. Look for a folder which includes the name notes. Probably there is a file inside that has the extension “.db”. You will need that file. With a tool like SQLite (http://sqlitebrowser.org/) you are able to read the data. I don’t know if there is a possibility to include the file again in your app, so maybe you have to add the entries manually again.

I got all my contacts and sms back from my old Xperia V back up file.
Just wanna ask another thing. Is there a way to import all these data to an Iphone?
I mean not with ios 9 android data trasfer but just with these extracted .db and .vcf files.

Cool, that you managed to use the program! I’m no iOS user so I’m not sure, but there for sure is an option to import the vcf-file, it is an extension that every operating system uses.
About the messages: I can offer to convert your .db files to .xml files. That file can be used by this app: https://play.google.com/store/apps/details?id=com.riteshsahu.SMSBackupRestore I’m not sure if there is a similar app for iOS

I am stuck on step 9. I downloaded the restoreData and 7zip but unable to proceed to the next step. The 7Zip file is not able to open the restore data as when I double clicked it – it kept extracting and reinstalling the 7zip file itself. And please advise which JRE I should download, the SU85 or SU86?

So I’m kind of confused? You were able to extract restoreData.jar from the zip file? The jar file should not be extracted as well with java, but should be opened with the java runtime. u86 is newer, so take that one 🙂

You have to extract the jar file, which can be a java executable. To run it with java, you have to right click -> open with -> then choose Java runtime as in this screenshot: https://i.imgur.com/1pFezez.png

You could also run the program via the commandline interface. For that you have to:
Press windowskey + r, type “cmd” and then hit the enter key. Now the windows command line tool should pop up. there navigate to the folder where your files are. In case you stored them on the Desktop, you just have to type “cd Desktop”. There you then have to execute the file, you do it with this command: “java -jar restoreData.jar”
If there is an error, you should get some information on where the problem lies.

If nothing works, you can also send me your file, and I’ll do the extraction for you.

Thanks a lot for providing this tool. It worked fine for me; contacts were successfully transferred from PC backup to new phone. Your methodical presentation approach is exemplary. I also see how you have taken the time to respond to comments and address issues. Please keep it up; I think career success usually takes this path.

Thanks a lot for the nice comment. I’m glad I was able to help you and it is great to hear that you liked the methodical approach. I’m not sure if this program will ever help my career (I’m working towards game development), but I feel like this is a small contribution for a more helpful Internet.

Dear Johannes
I broke my phone but had synced my data with the sony companion to my PC earlier. Is it possible for me to get my data transferred to my new phone and how? I wanted the whole data like photographs etc. I am a novice in this and this may sound very basic and silly to you. Please help me with this.
Thanks

Well if you get another sony phone I think it shouldn’t be a problem after all. If you will or already bought another phone you will probably have to do the migration by hand. With my tutorial you can get the contacts, but actually everything else as well if you are willing to search. I recommend sorting the folders in the zip file of the backup by their size. This way you will find the folders that contain a lot of media stuff -> your photos. If you had an SD-Card for your phone the photos will be stored there so that would be the easiest way. If you have any specific question I’m happy to help, it is kind of hard to answer to such a broad question.

I’ve already restore the file that I want from apps\com.android.providers.telephony\db\mmssms.db. You have mentioned before that the file need to be look with the sqlite browser. Unfortunately, I don’t know how to do that. Hopefully you can help me.

I actually found a pretty convenient way how to restore the messages you can get them back on your phone again. Therefore I need the .db file you extracted. Just send it per mail and I’ll fix it for you 🙂

The business-Card thing from windows shows only one contact at a time, but your file probably contains more than that… If you open the file with the notepad (right click -> open with) you should see way more data in there 🙂

I happened upon your tool as i also had the restoring problem with my phone. Was able to restore my contacts, so thank you very much!! 🙂 I also find it nice that most people lend insights here and that there is somehow that feeling of shared responsibility 🙂

I would also like to restore my messages though, may i ask for your assistance? Thank you and would appreciate your help!

Hello Mia!
I’m glad I was able to help and it is great to read that you were able to gain more insight through the comments, I had the feeling that now there are almost too many comments and that they wouldn’t really add more value because of the information overload.

As I wrote in my last comment (To the person above you), I finished building the user friendly program to be able to get the messages back on your phone. I will write a tutorial on it soon, sadly I don’t have that much time, so I guess it will be february when I finish it. I will drop you a mail with the new tutorial 🙂

Hello Johannes,
Thanks for the time and effort you put into this guide, I took the precaution of backing up my phone before getting a replacement, the transfer to the PC went well, however on trying to restore the data to my new phone the Sony PC companion wouldn’t complete the transfer and I thought my images were lost forever! Luckily I was able to recover them using your guide. Thanks again

Yes, RE 8u73 sounds like a good idea. So you installed it, or was there a problem as well?
You could test if you installed it right by opening the commandline tool and reading the java version. Therefor press Windows+R, type cmd into the box and press enter. Once the commandline opens, type java -version
You should get something like:
java version “1.8.0_71”
Java(TM) SE Runtime Environment (build 1.8.0_71-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.71-b15, mixed mode)

Hello Johannes, thank you a lot for this program and your help. My Xperia Z3 display died 2 months ago, I got Z5, Google did not have all my contacts, I was missing quite a few of them and finally decided to do something about it and found your program. Now I have them back and it took me 20 mins and everything worked well, 10mins to read instructions and 10mins to go through the discussion here to save you from questions that were already answered 😉

Hi Johannes,
Good stuff here, you look like you’ve done hard work to know how it all works.
Salut!
Maybe you know this: I created a backup from my damaged Z2 phone (incl. contacts) and restored it on my new Z2.
All is back but the “Myself contact” (top of the contacts list, next to ICE) is missing a lot of data still. No picture and no fields I did have in my old phone.
It only shows my emailaddress.
Any idea how to get this back? Or maybe where in the backup this information could be viewed in notepad to re-type it into the new phone? (wich fullbackupdata file?)
Kind regards,
Paul

Strange thing, I would guess that if the whole other backup worked as it should then you probably won’t find the data of yourself contact that is missing in the backup itself, because it’s not included. Still, you can give it a try by just following the whole tutorial and in the end opening the .vcf file with an editor like notepad or (What I would recommend) notepad++. If your contact has like a huge block of characters and numbers that make no sense then you just found the image which you would need to decode (I think it is encoded with base64).

Hello. I was hoping this would work for me to extract my contacts. However i am running into the issue when trying to open the restore.jar file, nothing happens. I have found my fullbackupdata file, but am stuck trying to extract the files.

I made a backup file of my contacts and data on my Xperia to My VAIO before reinstalling Android.
After re-install completion, I wanted to use PC Companion in order to transfer my back-up file from my VAIO to mu Xperia but instead of adding file, I clicked on remove button by mistake and my back-up file was removed unfortunately.
I had lots of data and contacts on my mobile.
Is there any way that I can restore back-up file which I deleted through PC Companion or it has been deleted permanently?
Please help me in order to get my data back.
Thank you in advance.

Uh that doesn’t sound too good… Hm, I don’t know how Sony PC companion deletes files, but the first thing you could do is take a look in your trash bin, maybe it was just moved there. Otherwise, it probably will be very hard to get the data back. As for the contacts: Maybe google synced them for you, take a look if you can find them here: https://contacts.google.com/u/0/preview/all
Sorry, my program won’t help you in any way with this problem.

Hi Johannes,
I have tried all folders for the fullbackupdata files, all folders have 1 with the same name (1 of which is considerably larger in size than the others). However, when I run the “restore.tar”, the options I am getting are folders “db, r, sp”, no “f” folder and no full_backup_vcard.vcf file.
Please HELP!

Do you have any of the suggested folders in your backup? The suggested folders are
Applications\com.sonyericsson.android.contactsimpo
Applications\com.sonyericsson.android.socialphonebook
Applications\com.sonyericsson.android.contactsimport
Applications\com.sonyericsson.localcontacts

I wasn’t able to follow your description. What do you mean with “1”? The fullbackdata you opened was probably from a different application. Oftentimes there are db folders in applications, that’s where they store application specific content. For example the messages folder has a db folder inside. As for the contacts, there won’t be a db folder in there.

Search for the four suggested folder paths. If you don’t have any of them, the backup doesn’t contain the contacts.

Hi..Thank you for your help. you really save my day. I use your method to get my notes. and i revover them with you program and reach them as a .db file. Then i download a browser for db files and halleluyah i reach my notes from my pc

I have tried using each of the “fullbackupdata” file above and then used restore.tar. Everytime, the result is same, with db, r and sp folders—NO f folder and no ull_backup_vcard.vcf file. What should I do next.

As for the other files: They seem too small to contain any useful data, I fear that something went wrong in the backup process. Maybe you are lucky and google synced your contacts (without you knowing). If that is the case you would find them here: https://contacts.google.com/u/0/preview/all
If you want to I can take a look at the socialphonebook file, maybe there is something in there you missed…

Hello , i made a backup of my Z3 android 5.1 using Xperia Companion because i wanted to try out Android N developer preview. Then comes the surprise i cannot restore the backup because the companion program cant even seem to find the backup files dbk.,the backup was made properly and the program said it was successful. So looking in the documents folder i find Sony/Xperia Companion/Backups then a long code name numbers letters etc. thats the backup folder that contains a programs folder, media folder and a manifest.xml file.

In none of those folders there is no single dbk.file everything is folders and files “File “extension i tuned on all folder options so the system would display all file types and still nothing only “File ” files.

I managed to extract my contacts out of these folders using your app they all contain a

Now my question, is there any method to retrieve my music/photo files from the Media folder ? It looks like all my music files /photos are there but they all have those jumbled code names and that “file” extension , i tried to rename them to rar/zip files and extract but it doesnt work sadly not that simple fix .

The thing that worked for him, was to just rename the file extension. For example to .mp3 or .jpg… Just try to find out which file it could be depending on the media you want to retrieve. That is hard work and I have no idea how the name is encoded (it is in hexadecimal, so each character has a value from 0 -9 and A to F). If you need those files that badly, this is the simple solution.

I followed all the steps, Java is installed but after extracting restoreData.jar I could not find restore.jar file to create a .tar fromthe script. It only appears two files: META-INF and org. Please help

The problem you are having (If I got it right) seems to be, that you are trying to open the archive rather than executing it. Jar (Java archive) can be used like let’s say .zip but also as an executable like .exe files.
Try to right click on the restoredata.jar file and click on open with. Then try to find the java SE binary file in the list (Looks like this: http://i.imgur.com/NgTClK7.png). If you don’t have it in the list you will have to search for it manually.

Hi Johannes… got my Xperia Z1 screen broken causing no access to phone itself. Desperately to get all contacts but always unsuccessful until I drop to this your article. Now, I already got all my contacts using your program. Thank you very much…!

Yes there is. Your phone is encrypted… Probably with your pin, or you set up a passphrase for it. The process to decrypt it is not that easy, just write me a mail and I will guide you through the process.

Hi there dude.
There seems to be lots of java choices on your top link?
I chose on, but when I tired to open the .jar, nothing happened at all.
Is there a sepcific java from the list I should be downloading?

Hi.
As for right now, I recommend downloading 8u92, and depending on your system architecture and operating system you have to select the right link. If you use Windows 7 or higher, the chances a re quite high that you have a 64 bit architecture, so the right choice would be this one:
Windows x64 59.16 MB jre-8u92-windows-x64.exe

Hi again Johannes.
Found and extracted the sony backup file from the right folder.
Installed the Java build you suggested (tried three in the end).
Downloaded your application.
Right-clicked, open with Java etc etc.
All I get is a very quick loading cursor image, and nothing happens.

I can use a mouse to get around my broken phone so I think I’ll just manually enter all the contacts into my new phone with a glass of scotch by my side this evening.
Thanks for the help all the same!

Hm, sadly there can be a variety of problems why java is not working the way it should… if you want to, you can also send me the file and I’ll do the restoring process for you 🙂 (send@johannesdeml.com)

Im sorry but i cant even find the stupid .dbk file! when i click on the backups folder i only see two other folder (i made two backups) and when i click on them i can only access the android.com, alarm.something.com etc. I cant locate the .dbk

Hm, interesting, maybe Sony PC Companion changed their storage tape in the last version… On which operating system are you working?
And if you have all the backups already in the folders, can you maybe just skip the step and just continue with step 6?

I did a backup using the Xperia Backup and Restore option in the mobile phone (not the PC Companion) and I couldn’t restore back because the phone was updated. I can view the backed up files (as they are not in dbk format) but they are encrypted with AES (probably with the PIN). For instance, the heading of the socialphonebook has the following 4 lines: ANDROID BACKUP
1
1
AES-256

It has been warm to see your kind help to many people over the years. Thank you very much for your hard work and this post. I’m having the same issue with Leonardo above.

However, my main intention to get the backup data is to check on the previous email being used to sync contacts in my Sony Xperia Z1 Compact.

I’m feeling so frustrated not being able to remember the email address used (my bad), but is it possible to check the email setting from com.android.email or com.android.settings or com.sony.snei.np.android.account? There are other available backup files, I’m just mentioning those that might be related.

So you also encrypted your phone/backup? maybe I should write a new article for just that, seems like more and more people use encryption (Which is awesome by the way!).
Hm, so you had some email settings on your phone and you want to find out which email address you used on your phone? Or did you send one specific email to an address that you can’t remember anymore and want to find that email?

I can either take a look at the possible files you were mentioning to see if there is any email / email account in there, or I can guide you through the process of decrypting your files so you can search for the email address yourself. Just write me an email and I will try to help 🙂

Thank you so much for this page Johannes. This is really helpful. I was able to open the androidsocialphonebook thanks to your description, using restore.tar but the file says no contacts were found. The other two files referring to contacts in my apps file are: 1) android.syncadapters.contacts and 2) localcontacts. Localcontacts seems to be empty (only manifest file). However the android.syncadapters.contacts has a file that looks promising but when I open it I get a file called “app_sslcache” and then another file that I cannot open. Is it possible that my contacts were not saved at all when I saved the data according to you? Or are they in this specific file I cannot open ? Happy to provide more information if it helps. Thanks!

Is there a .vcf file in socialphonebook? If so, how large is it? I know the other files you described and I’m very sure that those files don’t hold any contact specific information, more like server syncing information and protocols.
If the vcf file holds no information at all chances are sadly pretty high, that the sony pc companion app didn’t backup your contacts at all.

Thanks, I’m glad you like the blog. As for your problem -> try the other folders I mentioned, if you have them. Hopefully you will find the contacts there.

To get your contacts back to your iPhone you can import them via iCloud if you are comfortable with that. There is an webinterface with the iCloud contacts. there you can hit import and choose the vcf file. Maybe you will run into trouble with the import process because of the vcf version (I had trouble back then, maybe they fixed it to now). If that is the case, I can help you update your contacts, just write me a mail.

Greetings from Hamburg,
Johannes
Ps: There is also a German version of this tutorial, but I totally understand that you searched for an English version, I would have done the same 😉

Hi!
So after going through the entire thread, here is where I am stuck…
I have com.sonyericsson.android.socialphonebook file directly from the default backup and restore in my phone (Xperia M C1904 4.3).
I tried to decrypt the file in abe and then tried to unzip it but it went into an endless cycle,
I tried using restoreData after decryption but it is also not working…
Please help!

So when you use restoredata on the fullbackupdata file in socialphonebook, what happens? Did you try to use the program with the console to get a better information of what is happening? If you get a bad padding error, it can have two reasons:
– You have the wrong password
– You used Sony PC companion to encrypt the file rather than android itself.

For the latter I sadly have no solution.
Greetings from Germany,
Johannes

Congrats of getting through the process! So Restore data kind of decompresses a file. Think of the fullbackupdata file like a zip file, my program just knows how to interpret the encoding and decodes it, so a program like 7zip understands its data.
The other program (restoreSMStoXML) needs the sms.xsl file to understand how the data in the .db file is build up so it can convert the data to a more general file structure. So the xml file is kind of a combination from the data in the database as well as the additional information of how it is structured from the .xsl file. The result is more general and can be handled by other programs more easily because all the information is in just one file.

Did you download the file from another site or did you do any modifications of the file (Then the manifest would have problems interpreting its content)? I suggest downloading the file once again and if it still does not work try to run the program via the commandline. You will find the information on how to run the program in the commandline in the comments, e.g. here http://www.johannesdeml.com/blog/extract-data-sony-pc-companion-backup/#comment-2349

Hi, Need urgent help. I have the .jar file however when I double click the file or extract with 7-zip I get two folders org and META-INF, org further has directories bounce castle and nick. I do not get the .tar file I have tried with a number fullbackupdata files. Plz help

So the problem is that you are not running the jar file as an executable but rather just open it like a zip file (the jar extension offers both functionalities). Right click on the file and select open with. Then choose the program “Java(TM) SE Binary”. If you can’*t find it in the list, you either have not installed java re (http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html) or you have to search it manually.

Generally speaking, yes it is possible. For the specific case: I guess so, but keepass will probably have quite a lot o security doors in the way. Just try to search for the app name in your backup, something like com.android.keepass probably. If you are lucky you will find a .db file after restoring the fullbackupdata file. Take a look at the database with sqlitebrowser (http://sqlitebrowser.org/), see if you can find anything useful there. Sadly I can’t offer you a streamlined solution, every app stores its data quite differently. You have to figure it out on your own how to get the data back. Maybe you will also need to use some decryption stuff to get to the data. Just copying the data of an app from one phone to another doesn’t work, unless you created a backup with something like titanium backup.

Hello Johannes,
Excellent, I was struggling after replacing my Sony Experia mobile for an exchange. I had back up in my PC , thinking to restore to my new Le Eco le 2. It was a struggle after lot of search I tried your solution, now I have all my contacts backed up in my Gmail account. Fantastic and I thank you for the help. I uploaded the full backup v card VCF file to my google contacts.

Hey Johannes, tried everything but it is not working.
So the issue is, it does not execute the .tar file.
I tried the cmd method but it throws “fullbackupdata file not found” something like that
I thought this might be due to the fact that I don’t have a file o that name, rather I have a gibberish kinda file. So, I changed its name to fullbackupdata but a new type of error again from cmd.
please help.

Hm very interesting… So your files don’t have the name fullbackupdata? Are we talking about the contacts files or files somewhere in the media folder? If you want to, you can send me a file, and I’ll take a closer look.

Thanks for replying.
I actually am talking about the contacts file only.
Althoug I did found a file that might have all the contacts.
Again, the issue is of .tar file I guess
I updated the Java also but again it does not run.

It is not about your java version, the backup you created seems to differ a lot from the ones I’m used to. Are you using Windows, Mac or Linux? I think I need to look at the file to tell you what is going on. Otherwise open the file with a text editor and post the first 4 lines… is it something like :
ANDROID BACKUP
3
0
none

From your comment about the data of your file, it seems like you either have a really strange configuration or didn’t use Sony PC Companion. The file itself can’t be read with my program if it is looking like this. I have sadly no idea what went wrong in your case. If you send me the file I can take a look at it, but from what you told me the chances seem not very high that I can help you.

I came across this post when dealing with backup created by Xperia Backup & Restore (built into Xperia ROM), at /sdcard/Android/SonyBnR/.

There is an APPLICATION_DATA and an APPLICATION_DATA_meta file, and binwalk shows the first one contains an Android Backup encrypted with AES-256. The _meta file contains deviceId, signature, IV which may be used as encryption parameters, but I cannot seem to extract the exact encryption key.

Could you elaborate on the CONTACTS file? I’m not quite sure where you found it / What it is. Is it inside an App folder? or inside the already extracted data (so the file you got after using my program)? Hopefully I can help you once I know what you have right now 🙂

Hi Johannes,
I was actually more asking ‘hexchain’ since he was the one who had the problem, and you referred him to the next guy. But it seems you have been into these issues quite a bit, and given your dedication evident on this page I’m sure you may have some input if you decide to put time into it. 🙂
Anyhoow, the CONTACTS file is what you get stored in /sdcard/Android/SonyBnR/backup when doing a manual backup of the phone book to the SD card on my Z3 compact. I got a ~500k sized file and the CONTENTS_meta file contains the meta data:

My trouble is that the phone doesn’t load the contacts after trying to restore it after a reset. It recognizes the file, starts to import, but crashes. Perhaps the file got corrupt in the backup process so the meta data and the actual file don’t match… :/

If you have any leads as how to try to uncompress the file, feel free to chip in. Even if it is a different file structure etc than the full backup files you have worked with, I wouldn’t be surprised if the processing is similar.

So if its the first case, send me a mail, if its the second maybe there is a possiblity to use Sony PC Companion afterall or you got your contacts synced by google. Then you would find them here: https://www.google.com/contacts/u/0/

stupid fucking sony xperia products, i was recommended to perform a factory reset in order to unlock my phone to be able to use it with other cellular companies. i downloaded the sony pc companion crap and created 3 different complete backups of my data to take every possible precaution. the stupid program doesn’t even know if the backup worked or not, but as it is a useless official sony product so you just assume everything went well if it doesn’t give you any warnings.

anyway, once i had 3 separate backups, i performed the factory reset, unlocked the phone but ended up losing all my contacts and files from other programs, like a notepad i had downloaded.

the backup files in my pc are useless, i see that all 3 versions of the …localcontacts backup file are just 2 kbs in size which indicates there’s no data in them. i have tried the method you explain but i never get a .tar file when i execute the java tool. and you are right, there are a number of programs that could restore this information as it all is still in my phone, but they are all expensive and risky.

damn it, this is all stupid sony’s fault, how is it possible that their own official backup tool won’t work with their own stupid xperia phones and they won’t make an information recovery tool available? i will let them have it about this idiocy.

Wow I hear a lot of frustration from your post, your situation totally sucks! Maybe I can find a way to help you to make your day better:

– Is the android version you have now the same you had before the factory reset? I think that is required for putting the backup back on your phone.
– Maybe google also decided to sync your contacts. If they did you would find them here: https://contacts.google.com/

All in all I agree, it is kind of sad that Sony didn’t manage to create a proper program (I guess they are trying, but by adding encryption to it, the problem gets worse instead of better). Hopefully they will improve the tool or recommend to use something else instead.

I have just emailed you the file(s) extracted from my dbk file with my kind request to convert into vcf as I can’t get the Java working on my Flintstones laptop 😉
Please please please save my contacts from one of these files.

Hi, I am glad I found this website.
First, Thank u for all the effort. Could u help me ? I am getting the error with “Don’t know how to process version 3” when I run the CMD.
I need some files inside it :C

I’m happy as well you found it in the sea of information on the internet. If you’re getting the error with not supporting version 3, I’m pretty sure you got an old version of my program. Please try to download the program again from this link: http://www.johannesdeml.com/data/out/restoreData.zip

Dear Johannes,
My sony xperia M stuck in bootloop. Then I decided to reset it using xperia companion. I have dbk file in my laptop from my previous mobile (xperia neo V). When I try to restore it to my xperia M, nothing changed. I try to restore it to my xperia Neo V, but sadly the xperia companion cannot detect it.
Try to follow your guide, but I still couldn’t find vcf file though I have tried to search it carefully. And the f folder only contains a TempCallLogs file.
Please help.

This doesn’t sound too good! Did you try to find the other folders I wrote about? If not, please do so. Otherwise, I think your chances are really bad to restore your contacts for that file.
Maybe you can fix the problem by fixing the bootloader? So flashing the device and trying to boot the device afterwards? I guess you would need to dig through some tutorials, and it might also be interesting how you even got to the problem, but I guess it is worth a try.

As for the contacts: If you tried all folders I listed and they are not there, then they are not included in the backup. Maybe google synced them for you. Then you would find them here: https://www.google.com/contacts/

Dear Johannes
Your info and the conversations were of gr8 help to get back contacts, SMS and calendar from my Xperia.
.jar, .tar and sqlite worked just fine.
Very easy to follow.
Thanks a lot … to all who shared.

Der Johannes,
First of all, thank you for all this information you have shared with us. But I am having a problem, I could not find any .dbk files in my backup folder to restore. So I don’t know what to do?
I am looking forward to seeing your respond as soon as possible. Thank you for all your help.
Best regards,
muffin

PS: I remembered to add which model of Xperia I have been using, so I am using Xperia Z5 and the latest version of PC Companion.

Hm interesting. Nobody got to me with that question so far. I downloaded the xperia companion program to see if there is any option on where the backups are saved, sadly I couldn’t find one. On another note, I saw that there is an option to restore backups to a folder now… maybe that is of interest for you. (I found the button under restore).

Otherwise searching through your disk might lead you to the backup. You can easily search by pressing the windows key and typing .dbk afterwards. Maybe you need to click on the files icon afterwards (I’m assuming you’re on windows 10).

Firrstly I have to compliment you on your dedication to this thread. You’ve been helping people with this one issue since 2014! Needless to say when I ran into the same problem I happened upon this page and found it incredibly helpful, despite having no success myself, as yet.

I may have an answer for Muffin with the missing .dbk file. I backed up my Xperia Z C6603 several times using the latest version of Xperia companion, when I followed this guide and searched for the .dbk file in C:\Users\YourUserName\Documents\Sony\Xperia Companion\Backups, I didn’t find a .dbk file just a number of folders with “Date Modified” values corresponding to the dates I had created a new backup file rather than adding to the previous one. Inside each of those folders were more folders for the different times that I used that same backup and updated it. Inside of each of these folders were the folders I was looking for like \com.sonyericsson.android.socialphonebook\ with the fullbackupdata file inside.

I have all but lost hope but I was hoping you might advise me on my problem. Like Duncan in July 2015 I backed up for the first time the other day. I performed a software repair and then restored my phone using the backup only to find that many of my numbers were missing. Now I believe that google sync was turned off because most of the numbers missing were from the last few years and my bosses contacted name had reverted to the name of his predecessor who had the same mobile number.

I followed your guide and found full_backup_vcard.vcf in \com.sonyericsson.android.socialphonebook\ but it only contained 4 contacts. So where are all my other contact from the last couple of years? They must have been stored somewhere.

Now here is the really weird thing that I am hoping you might be able to explain:
If I reset and restore my phone with the original backup, then go to my recent calls list, all the numbers are accompanied by names, even for those contacts that I have lost. Within a second however, the contact names disappear. If I then scroll down through my call history I can see all my missing contacts for a second before they disappear. It is as if the information is stored in my call history but not in my contacts database. Is this possible, and if so can this information be extracted somehow?

Thanks for the kind words, trying to do a little bit to make the internet a nicer place. Sounds like the backup didn’t catch all your contacts somehow, but I fear if you find contacts in that backup it is quite unlikely that you find others in the other folders I mentioned. Did you try it anyway?

As for the recent calls: If I remember correctly they are stored in com.android.providers.telephony, but I will have a look when I get home. You will need to use a tool like sqlitebrowser in order to read the .db file. Sadly I also can’t provide a convenient solution on how to export them to a vcf file. You would need to move them one by one out of there.

I want to restore my Sony Xperia Z1 backup to my OnePlus 3T. I have successfully made it to step 10, but when I double click on “restoreData.jar”, I just get an error message saying “Windows can’t open this file”. The “restore.tar” file does not show up.

Seems like the java runtime is not linked to the .jar filetype. Make sure you installed the java runtime, then right click on the restareData.jar file and select Open with -> Choose Another App and Search for Java(TM) Platform SE binary (Here is a screenshot: https://i.imgur.com/urR2ODi.png). If you got problems with getting java running you can also send me the fullbackupdata file and I’ll do the process for you.

Transferring the file is actually really easy. Just connect your OnePlus with your computer and store it on your phone.

Then open the contacts app, click on the settings button (Probably three dots in the upper right corner) and select something like import contacts.
Then just select the file you just put on your phone and everything should work automagically 😉

Thanks for your your application. Unfortunately it did’nt work. It gave me an exception like

Exception in thread “main” java.lang.RuntimeException: java.lang.IllegalArgument
Exception: Don’t know how to process version 4
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:196)
at org.nick.abe.Main.main(Main.java:38)
Caused by: java.lang.IllegalArgumentException: Don’t know how to process version
4
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:68)

I use jre version 8.0_131.
Have you any idea about how I can solve this problem?

Thanks Johannes, So the mistype was just for here but i missed the space before the -. I am a little further the message reads “maximum allowed key-length seems smaller than needed. Please check that unlimited strength cryptography is available see README.md for details.
This back up is encrypted, please provide the password”
I can’t type the password into the command even though this is asking me for it. Any advice?

dear johannes
my sony xperia crashed, and i followed your abovementioned technique, and i successfully opened the F through restoredata.jar
all contacts keep opening one by one and i dont know, where are they gone,
wether saved in windows contacts or not

kindly guide me, how can i get the fullbackup.vca to my new android phone

So Do I get you right, that you have a folder called “com.sonyericsson.android.socialphonebook”? And in there there is only one file?
If that is the case, I would copy that file to lets say your desktop, rename it to fullbackupdata and then run my program on the desktop as well.
Otherwise you can also send me the file, and I’ll take a look at it.
Really happy that you appreciate my work and support!
All the best from Germany

In the zip file there is a readme on how to override the old policy. On Windows just go to C:\Program Files\Java\jre1.8.0_131\lib\security an copy the files local_policy.jar and US_export_policy.jar there.

Then you can run the program provided by me in the console.
First open up the console (windows + r, type cmd).
Move to the directory in which the restoreData.jar and fullbackupdatafile lies. Lets say it is on the desktop. Then type cd Desktop
Run the command: java -jar restoreData.jar 1234 (where 1234 is your password).
If you get an error reading “Exception in thread “main” java.lang.RuntimeException: javax.crypto.BadPaddingException: Given final block not properly padded” this means that you either used the wrong password, or the file is not encrypted by android.

I managed to transfer the contacts and media files from my backup in the PC, that I made from Xperia Z5 premium (which I broke it in the pool) to my new Xperia ZX (initially backup files did not work on it).
Thanks a lot my friend, I will recommend your method to others .
I’m very appreciative 🙂

Hi sir,I’m Bharath from India.I tried your steps.When I opened the the .jar file,Nothing happened.The .tar file isn’t coming up.I tried various steps like older and newer versions of both Java and your program,but it’s not coming.I tried cmd method and it’s asking for a password 🙁 Can you please help me ? I’ve lost all my contacts.I have also eMailed you the file.Can you please extract them and send them back to me ? Thanks a lot!!

It sounds like to you used a password to encrypt your data (either in PC Companion or your android system). Could that be? If you used PC Companion to set a password I sadly can’t help you, because they are not revealing their encryption method. Otherwise I hope I can help you. Sadly, I didn’t find a mail from you (My address is send@johannesdeml.com). Please send me the mail again, then I will take a look at it.

Hello Johannes,
First of all, thank you for your great tool. I have been able to extract my contacts and my phone call lists from the backup created with PC Companion.
But I’m still struggling with extracting the media files (photos, videos), as they are not named “fullbackupdata”, but have long alphanumeric names (e.g. “00c852c82c7a42c1d5e07c170fd696bc3f8cb1da”) without file endings.
I already tried renaming them to “fullbackupdata” and trying to extract them with “restoreData.jar” as I did with other files, but it didn’t work. No “restore.tar” file was created.
Do you have any idea how to work around this problem? I’d be most grateful.
Regards
Björn

Hello Johannes,
Thank you for pointing me to the fact that those files aren’t packed at all, but can be simply opened with the program I would normally use to open them (files I assume to be pictures (jugded by their size) I open with Windows Photo Viewer and so on). After being sure of their file type I re-equip them with the according file ending (.jpg, .mp4…).
Thanks again
Björn

Dude, you are an absolute genius! This worked perfectly to extract my important notes that would have been lost forever. Fuck Sony, those money sucking corporate bastards. I can see that you have single handedly put in more effort to help Sony customers over the past 3 years than Sony themselves. Really good work!

I cannot get the tar file because I get the “could not create java virtual machine” error. Even though I tried the fixes I found on the web, I’m still unable to get it. Can I send you the dbk file so you can convert it for me? Most of my contacts in the file are in Greek if that makes a difference for you..

I am trying to backup Xperia Sola (MT27i). I could see the folders you mentioned. However, in the folder “com.sonyericsson.android.socialphonebook”, there are many files, but no file by the name “fullbackupdata”.
What do I do now?

Also, I was not able to get restoredata.tar file from the .jar file. Tried the patches from the internet, but, did not help.
Please suggest a way to overcome this issue.
Let me know if I can share the dbk file with you?

Hi Paresh,
RestoreData.jar of course only works if there is a fullbackupdata file. Finding a lot of files in com.sonyericsson.android.socialphonebook sounds interesting, I think I never had anybody reporting that to me. Yeah sure, just send me the content from socialphonebook to send@johannesdeml.com and I’ll take a look at them.

Then we would get more information on why the process is failing. Otherwise you can also send me the file and I will take a look at it.
Just be aware that my program won’t work, if you encrypted your files by setting a password in Sony PC Companion.

First thank you for taking the time to read and reply to all those you have helped before.
This is actually the second time I used your program to get the contacts out of a phone.

The first time it worked really well.

However my wifes phone died Sony Xperia M4 and she needs thew contacts for her work. I followed the steps on the described above, put your program on the desktop with the fullbackup file and the .tar file did not appear, I did get an error message Could not find the main class: org.nick.abe.Main. Program will exit.

I also tried doing the command prompt java -jar restoreData.jar and got the same error, the phone was not encrypted.

The problem you are describing should either be connected to a wrong configuration of your jre or a wrong jar file. Did you download restoreData.jar from my website? Maybe double check and download it again. Otherwise I guess the JRE has some problem. Maybe reinstalling it solves the problem. Otherwise you can also send me the file and I’ll do the restore process for you.