Related
Today I lost all the data on my phone.. no problem I thought, I shall do a restore using my backup activesync makes every time i plug my phone in, so all is fine and dandy. When it gets about half way through the restoration, activesync crashes (always at the same point). It is during processing a file called fldr1001dd8.
This means I cannot fully restore my device - very annoying!!
Can anyone help with this... can I make it so it skips errors instead of crashing? Any help at all appreciated!! Device is a Blue Angel, using ActiveSync 4.1
You want to download a free utility called STGViewer - this utility allows you to examine the contents of the backup file activesync creates so you can identify which data you want restored. If there is a corrupt file then you can decide not to restore that particular one but retrieve everything else.
Thankyou so much, I will try that!!
OK I have found it, but I cant work out how to delete a file from the archive with it. All it seems able to do is 'copy' files out of the archive :-(
Any tips?
You cannot delete individual files from the .stg file but the program does allow you to restore selected folders and files. So you can restore Program Files folder all at once - if that works then restore My Documents folder and so on.
You may find that by restoring individually there may not be any corrupt files. But if there are, then you just select everything else except the corrupted file - you can use drag and highlight to speed things up. A little bit tedious but at least you can get all your files back from a bad .stg file.
BTW, the file you mentioned is in Pegasus Databases which are system files
Have you used the program yourself Ian? If so could you please help me with the restore folder button.. when I select a folder, then the restore folder option on the menu, nothing happens. This is very frustrating!
Also, when I extract the files from the pegasus database and put them on the phone, the pegasus folder shows in the phone's file manager (obviously, because I just put it there). How do I restore them to the (presumably hidden) folder, where they are meant to be?
I appreciate all help on this matter, all I need back are my contacts, appointments and message data etc, the rest I can start afresh with.
No I have not used this to restore an entire phone, only to retrieve individual files. It does sound like you will need to start afresh and just use STGViewer to recover personal files from My Documents etc. Most installed programs in Program Files will work fine if restored via STGViewer- there is often no need to actually use an installation program as many programs work as standalone folders.
If you have synced with your PC previously, all your contacts, notes and messages will be in Microsoft Outlook so you can use Activesync to restore these back onto your phone. (assuming you had opted to sync these items)
I would suggest in future that you use Xbackup in the Programs folder to regularly save your contacts/notes data into permanent Storage. I also from time to time make a copy of my .stg file so that I do not need to start anew if my current .stg file is corrupted. Good luck!
Hi
I made the silly mistake of not backing up my contacts before updating ROM ( i know... very stupid)
I copied the entire device to computer prior to updating but for some reason, it didnt copy the windows folder from the PDA.
I'm guessing the contacts would have been stored somewhere in the windows folder. I was running WM6.
Have i lost the contacts...? or are they stored in a different location which would have been backed up ?
Thanks
what exactly did you copy?
the following directories and files
Application data
ConnMgr (empty)
Documents and Settings (empty)
Music
My Documents
Program Files
Pim.vol
WMPinfo
Thanks
as far as i know, if i am not wrong, the pim.vol is the one that contain your pim data especially contacts,.
but, you cant just changed it, or replace it, if i am not wrong you need to use mortscript to do that with force deleting the original one and replacing with the new one,.
i will try to look into it, just keep all your data that you have backed up,.
Thank you !
I really appreciate it.
Not yet solved
Note to admin
this topic has not yet been resolved. I simply said thank you to -G- for saying he will look into it.
Thanks
tag removed
yup... pim.vol can't just be copied inside the root to be read.. it is somehow attached to your system.
BUT, if i'm not mistaken, you can use PIM Backup to load the info from the file.
try it.
http://forum.xda-developers.com/showthread.php?t=299705
btw.. i think SPB Backup can read pim.vol as well.
heyy
nope didnt work. i tried both PIM Backup and SPB Backup but neither of them accept the pim.vol as a valid file to restore from.
Actually, you should be able to just do a copy and paste of this file wherever you got it from. Try to use File Explorer (might not work). The option that works best for me with System locked files is via ActiveSync. If it doesn't work, try soft resetting and replace the file right away before the system gets a chance to access the file. Give it a shot, it might just solve your problem.
Alternatively, read this. It pretty much says the same thing that has been said so far...
http://frommypocket.pocketprimer.com/2007/09/29/backing-up-and-deleting-pim-data-wm50-only.aspx
Good luck to you
strange. i'll get back to you on this..
Im confused.
so will it work to just replace the pim file like egzthunder1 suggested ? Or is that going to mess up contacts completely ?
Go there.. use the emulator.. and get your contacts back.
http://forum.xda-developers.com/showthread.php?t=309351
also, please DO try to just put the pim.vol file in your root dir of your device to see if it's movable.. so other people could use that info.
If you ever lost your phone due to an accident, or just had to use a temporary phone for some reason...
And you're one of those who hates to lose history, even if you know you hardly look at it...
This tool is for you.
Pre-requisites:
Neither of your phones where your whatsapp is installed need be rooted.
You must enable USB debugging on both devices
You must have Android SDK, we will be using the Android Debug Bridge (ADB)
Have Android Backup Extractor ready, we will use it.
Instructions:
Connect the phone which holds your old database to your computer, and enable USB debugging.
Use ADB to make a backup of the whatsapp database
Code:
adb.exe backup -f whatsapp.ab com.whatsapp
Use 'Android Backup Extractor' to extract whatsapp.ab to whatsapp.tar
Open whatsapp.tar with 7zip (or any other compression utility) and extract the file called 'msgstore.db'
Rename the file to 'old.db'
Repeat the above steps for your new phone, but rename the file to 'new.db'
Run merjapp in the following fashion:
Code:
java.exe -jar merjapp.jar -old old.db -new new.db
You can also use the -simulation mode if you like, it will not create any output database, and you will be able to read the log created in the working directory.
If you want extra debug information you can use the -debug mode.
If everything went correctly and "Done!' is displayed, rename output.db (which is your merged database) to msgstore.db
Connect your new phone to your computer, open the Whatsapp/Databases directory on the internal SD card and backup its contents to some other location.
Copy msgstore.db created in the previous steps to this directory
Clear whatsapp's data from your new phone and force stop it.
Open whatsapp and when prompted, elect to restore from backup, and voila!
Download
Download merjapp v141201 (runnable jar file)
Backup
Backup
Just registered to say thank you. It works!
Official whatsapp method wasn't working for me: "unable to recover chat history". So your tool saved me. Thanks!
namnoops said:
If you ever lost your phone due to an accident, or just had to use a temporary phone for some reason...
And you're one of those who hates to lose history, even if you know you hardly look at it...
This tool is for you.
Pre-requisites:
Neither of your phones where your whatsapp is installed need be rooted.
You must enable USB debugging on both devices
You must have Android SDK, we will be using the Android Debug Bridge (ADB)
Have Android Backup Extractor ready, we will use it.
Instructions:
Connect the phone which holds your old database to your computer, and enable USB debugging.
Use ADB to make a backup of the whatsapp database
Code:
adb.exe backup -f whatsapp.ab com.whatsapp
Use 'Android Backup Extractor' to extract whatsapp.ab to whatsapp.tar
Open whatsapp.tar with 7zip (or any other compression utility) and extract the file called 'msgstore.db'
Rename the file to 'old.db'
Repeat the above steps for your new phone, but rename the file to 'new.db'
Make back-ups of both old.db and new.db, as merjapp will make changes in them
Run merjapp in the following fashion:
Code:
java.exe -jar merjapp.jar -old old.db -new new.db
You can also use the -simulation mode if you like, it will not change your databases and you will be able to read the log created in the working directory.
If you want extra debug information you can use the -debug mode.
If everything went correctly and "Done!' is displayed, rename old.db (which is your merged database now) to msgstore.db
Connect your new phone to your computer, open the Whatsapp/Databases directory on the internal SD card and move its contents to some other location
Copy msgstore.db created in the previous steps to this directory
Clear whatsapp's data from your new phone and force stop it.
Open whatsapp and when prompted, elect to restore from backup, and voila!
Download
Download merjapp v141005 (runnable jar file)
Click to expand...
Click to collapse
A pretty neat tool!
I was trying to merge two databases. It seemed that everything went okay and all with the "Done!" message. However, there seems to be no changes made two any of the database. Their filesizes remains the same for old.db and new.db.
I tried loaded the old.db anyway since you said that is the merged one. However, I am getting only the old one.
Please advise.
And you didn't use the '-simulation' flag by chance, right?
Can you attach the log file?
Hi,
I think I have done everything as instructed above. But the phone doesn't seem to recognize the new mgstore.db backup file.
I notice that the new file isn't crypt7 as the original mgstore.db file from the internal drive. Is that causing my problems? How do I fix it?
Greetz
clevernam said:
mgstore.db
Click to expand...
Click to collapse
Did you make a typo with the file like you did here? It should be msgstore.db, not mgstore.db.
No, it doesn't have to be encrypted in order for whatsapp to recognize it.
namnoops said:
Did you make a typo with the file like you did here? It should be msgstore.db, not mgstore.db.
No, it doesn't have to be encrypted in order for whatsapp to recognize it.
Click to expand...
Click to collapse
Nope, that's not it, just checked.
Do i have to put it into the msgstore.tar file? Where i extracted new and old from?
Greetz (thanks for helping btw., if this works, its a realy big help to me!!)
Nope, you just have to place msgstore.db inside the 'whatsapp' directory on your internal SD card (I'd make sure it's the only file there).
Then clear data on whatsapp, force close it, and run it.
Is that exactly what you're doing?
Multiple Databases
Can this app merge multiple databases...
Like if i want to merge 3-4 old databases into one? is it possible? if either one of these databases have same data, will that be duplicated?
It can merge more than one, but that's under the assumption they're mutually exclusive (in terms of messages - i.e., no message appears twice)
So if you used one phone (1), started with a clean whatsapp on a second phone (2), then another clean whatsapp on a third (3), and so on...
You'll merge (1) as 'old' and (2) as 'new', then use the output as 'old' and merge it with (3) as 'new', etc.
namnoops said:
Nope, you just have to place msgstore.db inside the 'whatsapp' directory on your internal SD card (I'd make sure it's the only file there).
Then clear data on whatsapp, force close it, and run it.
Is that exactly what you're doing?
Click to expand...
Click to collapse
Yes, thats exactly what i did. Any other idea what could be wrong?
I'm sorry - it should be under WhatsApp/Databases like the opening post says...
namnoops said:
I'm sorry - it should be under WhatsApp/Databases like the opening post says...
Click to expand...
Click to collapse
That's what i figured, because I was already thinking about all the other files with dates like msgstore-2014-10-12.1.db.crypt7 that i took out of the Database folder.
namnoops said:
I'm sorry - it should be under WhatsApp/Databases like the opening post says...
Click to expand...
Click to collapse
The output file, that I renamed to msgstore.db has "gear wheels" as an icon, but the msgstore file from the database of the phone has no icon at all. Is that somehow significant? Does that maybe lead you to my mistacke?
The fact the the output file has the 'gear wheel' icon just means Windows detects it as a database, I think it's quite meaningless...
The other files it didn't give this icon are *.db? Or are you referring to the encrypted databases? They encrypted ones probably won't have this icon.
It seems to me you're doing everything right:
Renaming the file to 'msgstore.db'
Put it in your internal SD card under WhatsApp/Databases
Making sure there's no other file there except this file
Force closing whatsapp, clearing data, opening the app...
So you're doing all this, and when whatsapp loads it initializes from scratch and doesn't tell you a backup has been found?
It just goes on to initialize an empty database as though you just installed whatsapp for the first time?
namnoops said:
The fact the the output file has the 'gear wheel' icon just means Windows detects it as a database, I think it's quite meaningless...
The other files it didn't give this icon are *.db? Or are you referring to the encrypted databases? They encrypted ones probably won't have this icon.
It seems to me you're doing everything right:
Renaming the file to 'msgstore.db'
Put it in your internal SD card under WhatsApp/Databases
Making sure there's no other file there except this file
Force closing whatsapp, clearing data, opening the app...
So you're doing all this, and when whatsapp loads it initializes from scratch and doesn't tell you a backup has been found?
It just goes on to initialize an empty database as though you just installed whatsapp for the first time?
Click to expand...
Click to collapse
Precisley. Nothing comes, when I reinstall whatsapp.
It is not like when I put the normal backup data back in the databse folder. Then whatsapp realises that there is a backup file in the internal memory and gives me the option to restore the history. Not so with the merged file.
Btw. I have no sd card. I connect the phone with usb. I figured that it is an unessencial diffrence? Am I wrong? My phone btw. is Motorola Moto G. If that helps
I'll check, if the old an new are mutually exclusive. I think in the progress I got a message on the new and old one. What would happen in that case? Would your program do the job, but then creat a bad "output" file?
If the only problem was, that I messed up the historys, I'm sorry, namnoops.
Are you using the latest version of whatsapp?
iclumyc Doctrine
namnoops said:
Are you using the latest version of whatsapp?
Click to expand...
Click to collapse
Well if I didn't then, now I do. And it still doesn't work
I checked if there are any intersecting messages... It turns out there weren't any.
@namnoops: Does the oldest message in the new history have to be more recent then any old message from the old history? I mean: Is it a problem for merjapp if the timelines intersect in any way, although there are no double messages?
Thanks for your help in advance
So yesterday My phone, Sony Xperia S, decided to go into bootloop and not boot at all, no matter what I did. Tried flashing stock PRF, stock firmware, some stock based firmware, but it would get stuck in bootloop. The reason for this being I was not formatting the data partition, which I needed to preserve since it had all My sms, contacts, call logs and other app data. Luckily, I had a working recovery(TWRP) and was able to take a backup. Then using I was able to recover My contacts, sms, call logs and app data. After a lot of Google searches, I was finally able to work it out. The process is as follows:
Needed software:
Code:
yaffs-mmssmsdb-calls-extractor.zip from [URL="http://forum.xda-developers.com/showthread.php?t=1585957"]here[/URL].
Firefox Browser
Firefox addon of SQLite manager : [URL="https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager"]link[/URL].
Excel macro to convert .db contacts to .csv : [URL="http://thydzik.com/downloads/convert-contacts2.db-data-to-vcard-vcf.xlsm"]link[/URL].
Software for csv to vcard conversion (Windows) : [URL="http://www.csvtovcard.com/"]link[/URL].
CSV to vcard conversion (online) : [URL="http://labs.brotherli.ch/vcfconvert/"]link[/URL].
SMS Backup & Restore android app : [URL="https://play.google.com/store/apps/details?id=com.riteshsahu.SMSBackupRestore"]link[/URL].
Call Log Backup and Restore app : [URL="https://play.google.com/store/apps/details?id=com.riteshsahu.CallLogBackupRestore"]link[/URL].
The procedure is a lot crude as of yet, I would update as more universal and convenient options are found.
I know there is Titanium backup app which can restore contact, sms etc from nandroid backups, but You need a paid version of the app.
First we need to extract the data partition of nandroid
Rename the data.ext4.win to data.ext4.tar.gz . If Your files are like data.ext4.win000, data.ext4.win001, then rename each of them to data.ext4.tar.gz in separate folders.
On windows, now You can directly extract them using WinRaR or 7zip application, although You don’t need to extract it entirely.
On linux, You can do so using the following command. It is recommended to store the file in a separate folder as the file gets extracted directly.
Code:
tar –xf data.ext4.tar.gz
Now we need to find two files contacts2.db and mmssms.db . The contacts2.db files is for contacts as well as the call logs and the mmssms.db is for messages. The contacts2.db is constant across most ROM’s and OEM firmware apps. The mmssms.db file may vary as per app and ROM’s. So what You need to do is look for a .db file inside the SMS app You have been using with the firmware/ROM.
We will restore the SMS and Call logs first.
Currently it is limited to Windows OS only.
Extract the contents of yaffs-mmssmsdb-calls-extractor.zip to a folder.
Copy the mmssms.db file and contacts2.db file to the above folder.
Now open a command prompt at location of the above folder. This can be done by opening the folder, right clicking using shift key pressed in blank space. You get the “Open command window here” option.
In it type:
Code:
extract -s mmssms.db
It will ask You to enter a name for the output .xml file, You can press enter to let it give a default name. This will convert Your sms to a .xml file .
Then type:
Code:
extract –c contacts2.db
It will also ask You to enter a name for the output .xml file, You can press enter to let it give a default name. This will convert Your call logs to a .xml file .
Copy both of these files to Your newly formatted phone and then use the two before mentioned apps (Call Log backup& Restore and SMS Backup & Restore) to restore Your SMS and call logs.
Now retrieving contacts. It is a bit lengthy, but simple process.
Start firefox browser. In it, after You have installed the addon do following to enable the addon
Go to options (3 horizontal lines).
Select “Customize” and drag the “SQLite Manager” to the blue bordered box.
Now open options and select SQLite Manager. In it select Database>Connect Database. In the opened dialog box, select All Files(*.*). Then select Your contacts2.db .
From the left side tree structure in the SQLite Manager window, right click on “data” and select “Export Table”.
Now in right side part of the window, You will get CSV tab and SQL tab. Under CSV tab, simply press OK button without changing any other options.
It will ask You to save Your .csv file. Save it.
Now if You try to open this file directly, You will notice that file is not properly arranged.
To arrange it properly, open the convert-contacts2.db-data-to-vcard-vcf.xlsm file. If You don’t know how to enable Macros don the following:
It will show You a warning “Security Warning Macros have been disabled. Options..”
Press the Options button. Select “Enable this content” and press ok.
Now Press the office button present at left top corner. In it select “Excel Options”.
Select Customize tab from left side. Then from “Choose commands from:” drop down menu, select Macros.
Now add convertDatatoContacts and writeContactstovCard to right pane from left pane by selecting them and pressing add. Press OK button.
Now as You can see two white square icons have been added at top right corner next to save undo redo options.
Select the first white square icon. Select “Enable Macros” button. Now select Your .csv file in the opened dialog box.
Now the file must have opened in a separate excel. The format should be 4 rows with they being First Name, Last Name, Phone 1 and Phone 2.
Then select Save As>Excel Workbook>Save Type as CSV(Comma delimited).csv . Press ok and yes on the two warnings generated.
At the left bottom, right click on “contacts” sheet and press delete. Save and close the file.
Run CSV to vCard software and open the above saved .csv file. Here You can save all contacts as single vCard file or separate files.
In the “Properties” section on the window, in front of “Phone 1” and “Phone 2” select “Mobile Phone” from options. Press “Convert” button.
Alternative to above two steps, You can also convert .csv to vcard using the website.
Now a .vcf file will be created where the .csv file was stored.
Now simply copy the .vcf file to phone and import using the phone contacts app!
Done!
Credits and sources:
@abbot2
[TOOL] yaffs extractor, mmssms.db & contacts2.db converter
http://thydzik.com/export-android-contacts-contacts2-db-to-vcard-vcf-on-windows/
Reserved.
Awesome concept
Thanks for posting this! Im working on a sprint S4 that is bootlooping. ive extracted all data and am attempting to recover contacts with your method. I am getting an error with the yaffs extract.exe that im hoping you could give me some direction on.
**EDIT**
I was never successful using yaffs (dependency issue perhaps) but i downloaded firefox and was able to extract everything with the sqlite extension. THANK YOU!!!! This tool is one of those things you dont need often, but when you do it's a godsend!
when i issue the contacts extraction command i get this output
C:\Users\PartSwap\Desktop\DB_xtract>extract -c contacts2.db
Read 0 calls
Failed to extract calls: list index out of range
contacts2.db is present in the yaffs folder.
Any ideas/suggestions would be greatly appreciated!
This doesn't work anymore, just puts 0 in all of the phone number fields, you can even see the numbers before hand, just jumbled up, so this script needs to be updated.
Stillworks July 2020
This worked in July 2020 to restore SMS messages (I didn't need contacts). I tried to restore selectively from a full OrangeFox (OF) NANDroid backup (a full restore didn't work, encryption/password issues) with Titanium Backup (TB), but this didn't work (maybe I simply didn't know what to restore?). I tried the old Nandroid Manager's facility to restore SMS from a NANDdroid backup, but it hung.
I then successfully extracted mmssms.db as described here and further extracted the xml file with the yaff extractor. TB's "Restore data from XML" hung, but SMS Backup & Restore worked fine.
Xiaomi Redmi Note 7 (lavender), all software current as of July 2020: xiaomi.eu 20-07-23 weekly ROM, TB 8.4.0.2, others downloaded today. A useful way to find the SMS file if it has a different name than mmssms.db: after extracting from the tar.gz, search the extracted files for a string that only appears in your SMS (I used "bekonscot").
Incidentally, a note on Titanium Backup, which can restore either from its own files or a NANDroid backup: the directory for the NANDroid file is hard-wired to the directories used by TWRP and CWM. I use the current OrangeFox instead of TWRP, and it uses a different directory. But the OF backup is compatible with TWRP; moving it to /storage/emulated/0/TWRP/BACKUPS/ works.
HTH
I used a Note 4 (Android 6) full nandroid to Note9 (Android 10). For contacts I just copied the .db to the new location (the directories where .db are located might not be the same) and rebooted - it worked (on rooted), but this will remove any contacts already made, replacing them with the backup.
SMS and Call logs were restored as described, but I used a newer version of the app (which combines both SMS and logs restoration), searched the backup archives with ZArchiver, and I ran the python2 version of the converter (https://github.com/abbot/android-restore-tools) on TermuxArch (meaning that, unlike the Windows version in the tutorial, this should work on any OS supporting python2, allowing me to do all steps on my phone).
Also, in the directories where. db files are located there are big .db-wal files, too, which might contain some data that aren't in the .db yet, so you might need to VACUUM with sqlite3 (https://stackoverflow.com/questions...f-sqlite-3-7-wal-file-into-main-database-file). I did it on TermuxArch as well, but the size of the db didn't change much, while the wal disappeared, so I don't know if that did anything.
P.S. Sqlite3 wouldn't open db at all just on Termux for some reason, opened on TermuxArch. Python2 also exists for Termux, didn't try but should work.
My phone recently died and I have to factory reset it. I managed to use TWRP to recover some of my data first which included the Squid files.
According to their website rooted users can backup the database file and the required pages but it doesn't mention restoring them. I've tried copying the files back to the Squid data folder but they don't show up. I've also tried editing a papyrus.bak file (it's a zip) and adding my database/pages but when trying to restore them using the app it says restore failed.
Any ideas how I can do this?
I've got slightly further now. I managed to get Squid to load the database file after copying the backed up files to the data file. When I load Squid it shows the correct number of notes but they're all blank.
Yay! I fixed it. Apart from one file but I'm happy with that. The database I was trying to restore was looking for one extra page which didn't copy across when I was wiping my phone. Loaded up SQLiteBrowser, removed the entry from there, inserted everything into the papyrus.bak file and it restored them. Yay
hello i have a problem i save my note from squid becfause i reinstalled my rom but when i want to restore papyrus.bak it say wait for restoring datyabase... but it don't restore i waited all the night and it stay in that message.... is there another way to restore my data thanks for the help...
its very not good becfause i writed my journal of what i do in the journay and so i lost 1 month of journal..... i'm sad.... but i have the cfomplete papyrus.bak file it make 66,7 mb when i open it in a text software there is lot of text but i don't know what it say xd
Did you make a manual backup of the papyrus.bak file? And that's not working when you try to restore it with Squid?
The papyrus.bak file is a zip file with a database and other files so you need to rename it to .zip if you want to open it.
Thank you very much i restored all with winrar i repaired the papyrus. Zip and with the .pages and root explorer i renamed the blank squid notes with the pages from the papyrus. Zip and i restored all my Diary its too cool and without you i never can do it thank you and have a good day!