[SM-G991B/DS] How to access to Outlook cache - General Questions and Answers

Hi there ! Greetings from France
I got a Samsung Galaxy S21 5G "classic" 128GB
I'm currently in dispute with my insurer, my automobile expert and my garage.
I'd like to access the Outlook cache because I viewed a photo of my car (taken by the expert), bodywork done, before painting, via the Edge browser integrated into Outlook, without being able to save it.
I didn't insist because I didn't think it would end up in litigation, serious mistake, because the expert deleted all the photos in the file (oddly)
They claim to have removed my quarter window, and not to have removed my front bumper, this photo would prove the opposite, if I manage to recover it
But I can't.
I tried via samsung explorer, also on windows, it's impossible without root, but root will wipe all my data...
In the android "applications" section, when I click on Outlook (4.2247.1), there's written :
App 236MB
Data 1.45GB
Cache 181MB
Total 1.87GB of inaccessible data
What do you guys think ?
I'd really like to recover this photo, to shut them up, although it's provable even without a photo, there would be no further discussion if I managed to get it back.
Thanks

gr3g68 said:
Hi there ! Greetings from France
I got a Samsung Galaxy S21 5G "classic" 128GB
I'm currently in dispute with my insurer, my automobile expert and my garage.
I'd like to access the Outlook cache because I viewed a photo of my car (taken by the expert), bodywork done, before painting, via the Edge browser integrated into Outlook, without being able to save it.
I didn't insist because I didn't think it would end up in litigation, serious mistake, because the expert deleted all the photos in the file (oddly)
They claim to have removed my quarter window, and not to have removed my front bumper, this photo would prove the opposite, if I manage to recover it
But I can't.
I tried via samsung explorer, also on windows, it's impossible without root, but root will wipe all my data...
In the android "applications" section, when I click on Outlook (4.2247.1), there's written :
App 236MB
Data 1.45GB
Cache 181MB
Total 1.87GB of inaccessible data
What do you guys think ?
I'd really like to recover this photo, to shut them up, although it's provable even without a photo, there would be no further discussion if I managed to get it back.
Thanks
Click to expand...
Click to collapse
Sorry, the only way to access the cache is either with root or by flashing TWRP then using TWRP to create a android backup of all data on your device and then extracting the data you are looking for from the nandroid backup. If your bootloader is locked, you would have to unlock the bootloader to install TWRP, which would wipe your data.
It is "possible" to unlock the bootloader(this will wipe your data) then root the device then recover the deleted data using one of the several different data recovery software on PC, this is commonly done to retrieve lost data from rooted devices. There is no guarantee that you will be able to retrieve your data intact.

outlook is email right? so why you don't just open the email again?
depending on app manifest you can copy app data (including cache files) to PC with adb backup.
this app will find cached pictures and thumbnails in emulated storage (existing only, impossible to recover deleted files)
FindMyPhoto – Recover Photos o - Apps on Google Play
A truely free app to recover deleted photos on Android devices.
play.google.com
beware of noobs advise! unlocking bootloader is just nonsense, it's simply impossible to recover just a single file from factory reset!

aIecxs said:
outlook is email right? so why you don't just open the email again?
depending on app manifest you can copy app data (including cache files) to PC with adb backup.
this app will find cached pictures and thumbnails in emulated storage (existing only, impossible to recover deleted files)
FindMyPhoto – Recover Photos o - Apps on Google Play
A truely free app to recover deleted photos on Android devices.
play.google.com
beware of noobs advise! unlocking bootloader is just nonsense, it's simply impossible to recover just a single file from factory reset!
Click to expand...
Click to collapse
The pictures were stored in my personal space of the expert's site, he sent me the link via email, and my client is Outlook.
So I opened it in Outlook, with the (s***ty) integrated lite version of Edge
Thank you very much, I'll try these two solutions !
OK I'll not unlock my BL

link only pictures might stored in browser cache. check for each app manifest if backup is allowed.

I tried "Findmyphotos" without success
Now I'll install DevToolsPro and I'll tell you

android:allowBackup="false" =[
I think that I have also opened it in Samsung Internet browser, but backup is also not allowed

as that flag should be ignored for apps targeting API level 30+ you can try anyway (leave password blank)
Code:
adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all] [-system|nosystem] [-keyvalue|-nokeyvalue] [<packages...>]
Android 11 forces apps to support local backups but not cloud backups
It's no secret that backing up and restoring apps and data sucks on Android, especially when switching devices. Android 11 is slightly making things better.
www.xda-developers.com
if no app data is backed up it should at least work with D2D transfer software like Samsung Smart Switch (not sure it can decrypted though)
How to decode Samsung Smart Switch .enc files
Made a backup of my Galaxy S9 to the desktop with Samsung Smart Switch. Inside the folder APKFILE there is say org.mozilla.firefox.enc so how can I decode it to see its contents?
forum.xda-developers.com

My SGS 21 is running android 13
What does the code mean ?
"adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all] [-system|nosystem] [-keyvalue|-nokeyvalue] [<packages...>]"

First, on Smartphone, enable hidden menu Developer options. this is done by tapping buildno (7x) seven times (settings - about phone).
In settings - developer options - enable usb-debugging.
you need computer for adb backup. I will describe for windows.
download platform-tools then connect device with usb-debugging enabled and install usb drivers. now add platform-tools directory to path (or navigate to directory with 'cd') in cmd.exe
if adb is available you should see device serialno when typing 'adb devices' (requires confirmation on phone).
then get the package name of the app and create backup (requires confirmation on phone)
Code:
adb devices
adb backup com.android.chrome
you can unpack backup.ab with abe.jar + 7-zip.
https://nelenkov.blogspot.com/2012/06/unpacking-android-backups.html
Code:
java.exe -jar abe.jar unpack backup.ab backup.tar [password]
[GUIDE] How to extract, create or edit android adb backups
What is an android adb backup? An adb backup is a file with ab extension, generated by android's backup manager when we request it via adb shell. This allows you to backup some data of the phone, but is not a replacement of a clockworkmod backup...
forum.xda-developers.com

Thank you for the tutorial, I'll try this tomorrow after a good sleep
It seems to be a little bit tricky, although I studied electronics, I have not practiced for 10 years =D

try with app that allows backup, first. like Chrome (com.android.chrome)

OK, I have to move platform tools directory in C:\ (root)
Is that right ?

location doesn't matter. you can place it Program files (x86) or Desktop. I have it in C:\Android directory

Sorry I can't post here with my computer since my Last message, the forum shows "we ran into some problems, please try again later..."
So I don't understand this :
now add platform-tools directory to path (or navigate to directory with 'cd') in cmd.exe

maybe that helps
https://duckduckgo.com/?q=How+to+set+the+path+and+environment+variables+in+Windows

Thank you for your help alecxs, my insurance sent me the pictures !
So I don't need to tweak my phone

Related

[Q] [Android] MMSSMS.DB restore?

Greetings,
Just to make things clear, I have used the search feature. However, I am not clear on the answers that I am reading.
I need to restore or export 1 SMS thread (or entire mmssms.db, doesn't matter) from an old ROM.
Last week my ROM crashed, and I had to switch to a new ROM.
It was a Sense 3.0 ROM (phone is HTC Droid Incredible 2). I was playing around with the different lockscreen options, applied the Stocks Lockscreen, and when I locked/unlocked my phone to see how it looked, nothing but My wallpaper and the top status bar showed up. There was no way to unlock the phone. I had to yank battery to reboot. The phone feature still worked, as I could see the text messages come through on the status bar, and my phone rang, but no notifications cam up on the screen. I was stuck. I did a ClockworkMod backup (aka Nandroid?) and switched to another ROM.
I used unyaffs on my Ubuntu Machine to extract the contents of data.img.
I have the mmssms.db file from /data/com.android.providers.telephony/databases backed up.
Using "SQLite database browser" I can see a preview of the SMS thread.
Technically, I don't need the SMS thread on my phone. If I have a .txt that is neat, organized, and readable, that will be fine. I just assume that I should reinsert the thread (or entire mmssms.db) into my current ROM so I can use SMS Backup and Restore.
My ultimate goal is to be able to get the SMS thread into a text document or large screenshot, which I can send to some friends. It involves a joke/prank, and is quite funny....a bit hard to explain.
How can I get the old mmssms.db (or just one thread) into my current ROM, or into a text document (or something of the like)? I have read something that mentions adb...which I am now Googling to find out what it stands for....so you can guess the amount of knowledge I have on it...
I believe I made that clear....if it is not, let me know, and I'll edit/repost.
tl;dr?
* Need SMS message thread from old ROM
* 1) Old ROM crashed.
* a) Can't get in
* i) Made a backup
* 2) Unyaffed backup
* a) Saved mmssms.db
How to get SMS thread (or entire mmssms.db into new ROM or into text document on computer?
Thanks for all the help!
[::AP::]
Try this on your console, if you have usb debugging enabled.
It should let your phone boot without auto activating the lockscreen.
Code:
adb -d shell
# sqlite3 data/data/com.android.providers.settings/databases/settings.db
sqlite> update system set value=0 where name='lock_pattern_autolock';
sqlite> .exit
# exit
adb reboot
Edit: Wasnt there a post before saying, if you could get in, it would be enough?
Thanks for the response.
Yes, getting into the old ROM would be enough, so I could use a SMS Backup tool, email the texts, and forget about it.
However, I am pretty new to Android. I'm a bit lost with your explanation.
Console meaning....the terminal in Ubuntu (phone connected?)....Android SDK?
If you could go into more detail, that would be great. Thanks.
[::AP::] said:
Thanks for the response.
Yes, getting into the old ROM would be enough, so I could use a SMS Backup tool, email the texts, and forget about it.
However, I am pretty new to Android. I'm a bit lost with your explanation.
Console meaning....the terminal in Ubuntu (phone connected?)....Android SDK?
If you could go into more detail, that would be great. Thanks.
Click to expand...
Click to collapse
First thing you need to do is make sure you have the android sdk. The sdk are the tools that let you "communicate" with your mobile device through the computer. If you don't have it, google android sdk installation and you should be able to fnd the link. I tried to put the actuall link but I was able to because I don't have more than 8 posts, sorry.
Now you can remove and install files from your android device as needed.
1. Connect your phone to your computer.
2. Using your Linux Terminal, change directory to the platform-tools folder. On my Windows computer I type cd c:\android-sdk\platform-tools but your sdk folder might have a different name so you should type something like this: cd /sdk-folder-name/platform-tools
3. Now type in: adb devices and your devices should be listed. If you get a message saying No Device Found then you need turn on usb debug mode or you need the drivers installed on your computer for your phone.
4.If your device is found, you need to back up your current database by typing: adb pull /data/data/com.android.providers.telephony/databases "directory on your linux machine where you want the files to be save"
5. Now type: adb push "path to the mmssms.db file" /data/data/com.android.providers.telephony/databases and do the same for the telephony.db file. Both of these files must be pushed onto your device in order to see the text messeges.
6. You should be able to see your texts from your old rom now on your new rom. Once you're done just push your backed up mmssms.db and telephony.db file from your newer rom back into your phone.
I don't know of a way to combine the text so this is the way I do it. I hope that helps!
Sorry for the late response - I have been quite busy.
I'll try this out and let you know.
Thanks a ton,
[::AP::]
This is an old thread but I'd like to share my recent experience with restoring SMS messages. Today decided to try mod on my Nexus 6 running rooted stock Nougat. Did full backup with TWRP, tried the mod, didn't have use for it and did full restore. All SMS messages were gone. Checked mmssms.db sure enough size was 0. So why TWRP didn't restore is a good question.
The way is was restored is by extracting mmssms.db and journal from TWRP backup using Nandroid Manager and copying to my location /data/user_de/0/com.android.providers.telephony. Started messenger but still no messages. Opened terminal app and changed ownership and group on both files. After that everything was restored to prebackup state.
I'm trying to do the same thing between a Droid Turbo and GS4. The Turbo screen died, but the phone boots and can go to recovery.
VZW GS4 - 5.0.1
VZW Droid Turbo - 6.0
- I copied the entire /data/data/com.android.provider.telephone directory from the Turbo using ADB
- Copied Turbo mmssms.db to the S4 (renamed the old S4 file mmssms.db.bak)
- Set permissions to 660, radio:radio (as per the old S4 file)
After a restart, Messages showed the old S4 text messages, even though I renamed the original mmssms.db file.
In other words, the S4 shows the old message history, even though the mmssms.db file has changed!
- There were two other files, mmssms.db-shm, mmssms.db-wal
- Renamed these to *.bak
After a restart, Messages now shows no text message history.
When I copied the telephony.db files over, the Phone app went into a bootloop, with a constant repeating dialog that it had crashed. I had to go into adb to reset the files.
It looks like something else is needed to make Messages see the new sms db.
Dear Hjicons,
Could you please give exact commands and what to type in adb shell to change the ownership and group of the mmssms.db and the journal?
Thanks in advance.
I did it "on the fly" without adb, only using MiXplorer
On a rooted Moto G XT1032 running KK
Copy (replace) backed up .db files in data/data/com.android.providers.telephony/databases
set permission to 600 rw-rw---- and owner, group to 1001 radio on all newly replaced files
Terminate (kill) message app, relaunch it and you're good to go, without even rebooting.
I set long press back key to terminate (kill) app via GravityBox
The same you can do with phone calls .db (same dir), or Whatsapp .db, in com.whatsapp/databases, permission to 600 and owner/group Whatsapp, then kill and relaunch

[GUIDE] Internal Memory Data / Deleted Files Recovery

This is the same tutorial written by Wartickler at this link. Thanks for his efforts, his work is appreciated.
Here we bring minor changes to the tutorial for those of you who are facing problems accomplishing the procedures.
The Problem
Internal Memory doesn't mount as a drive like external memory does. External memory would allow you to use data recovery tools that scan for deleted files and return them to a usable state. These tools work because most operating systems don't go through and set all of those 1's and 0's to just 0's when you delete a file. Usually the operating system will just delete the reference pointer in the index that says that a file exists with such-and-such name and it's located at this position on the hard disk / memory location. There are destructive delete tools out there that will overwrite the spot of a deleted file multiple times to discourage recovery in just this manner. The issue is that data recovery tools need an actual mounted drive in order to dig deep and unearth those funny pictures of cats you so tragically deleted by accident. These newest batches of phones don't have external SDcards which are super easy to mount as drives. Internal memory mounts as MTP/PTP which is not treated as a mounted drive and cannot be scanned by these data recovery tools. But still there is a hope.....
The Process
My phone is the Samsung Galaxy s4 (GT-I9500) though I imagine this should work for ANY phone with Internal Memory. We will be using a Windows 7 machine to:
back up the entire internal memory partition to your computer as a single, massive .RAW file,
convert the .RAW file output to a VHD,
mount the VHD as a disk in Disk Manager,
scan the attached VHD volume for files that have been deleted and recover them,
The Requirements
A rooted Android phone, (try to root with a non-destructive method as this appears to protect those who must root from wiping the device data a second time),
BusyBox installed on your device,
Cygwin installed to [c:\cygwin] with pv and util-linux from the repo (at the package selection screen search for pv then util-linux and click on Default to change it to Install). Make sure to open Cygwin once to make sure that the /bin folder is created. Also, I made a folder at [c:\cygwin\samsung] to put the exported .RAW file,
Netcat (download the ZIP file and extract nc.exe to [c:\cygwin\bin]),
ADB - You can use minimal adb and fastboot which is 2MB only. Attached, find the link at the bottom of this post. (make sure adb.exe is in your path. Path is in System Properties -> Advances -> Environment Variables -> System variables -> Path and add to the end: ";C:\Program Files\Android\sdk\platform-tools" or where ever you placed your adb.exe),
USB Debugging enabled on your device,
VHD tool from the mighty M$. Put the VhdTool.exe file in [c:\cygwin\samsung],
Piriform Recuva or your favorite data recovery tool, (it appears Recuva only finds the more common file types like images, videos, etc. Those were the file types in which I was interested. If you are after more exotic file types perhaps you might share the software you used.)
A calm sense of peace and serenity that you will get your files back... :fingers-crossed:
The Work
*****Based on the number of people having trouble with this step it is now my recommendation that you choose to recover your entire memory block instead of just the data partition. In my phone's case that is mmcblk0. Please discover if yours is different.
[*]*****For identifying which block/partition you want to recover, install DiskInfo from Playstore. Open the app and click on Data (USERDATA) to see the partition name for yours. For our purpose here we are seeking to recover the userdata partition: /dev/block/mmcblk0p21
Turn on your phone
Connect the phone in ADB mode
Unlock the screen.
Open a Cygwin terminal and enter (This assumes your BusyBox installation is at [/system/bin/busybox]. It may be at [/system/xbin/busybox]):
*Remember to enter codes line-by-line. After you enter su, you have to grant permission on your mobile phone at the same time
Code:
adb forward tcp:5555 tcp:5555
adb shell
su
/system/bin/busybox nc -l -p 5555 -e /system/bin/busybox dd if=/dev/block/mmcblk0p21
Open another Cygwin terminal and enter:
Code:
adb forward tcp:5555 tcp:5555
cd /samsung
nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0p21.raw
[*]Depending on the size of partition it may take a while to backup.
We need to convert the .RAW file to a virtual hard drive. VhdTool.exe basically just puts a VHD footer on the end of the .RAW file. Open a Windows command prompt, go to [c:\cygwin\samsung], and type:
Code:
VhdTool.exe /convert mmcblk0p21.raw
Now we need to mount the VHD in Windows. Select the Start button-->right-click Computer-->select Manage.
Select Storage-->Disk Management.
In the menu select Action-->Attach VHD.
For Location enter [c:\cygwin\samsung\mmcblk0p21.raw] and select the OK button.
Right-click on the name (e.g. "Disk 1") to the left of the Unallocated space and select Initialize Disk.
Select the GPT (GUID Partition Table) radio button and select the OK button.
Right-click on the Unallocated space and select New Simple Volume...
In the Wizard select Next>, leave the default for the volume size, select Next>, select a drive letter (e.g. K), select Next>, MAKE SURE to select the 'Do not format this volume' radio button, select Next>, select Finish.
A box will pop up asking you to format the drive. You DO NOT want to format the drive at this time.
Right-click on the RAW space and select Format... MAKE SURE to change the File system to FAT32. Set the Allocation unit size dropdown to 'Default.' MAKE SURE that the Perform a quick format checkbox is CHECKED. You do not want to overwrite the entire new drive with all zeroes (0's) and destroy your data. Quick Format means that it will only attempt to destroy the index for the drive by establishing a new index. Without this box checked the Windows operating system will write zeroes (0's) across the entire volume, potentially destroying your data. Select the OK button.
A box will pop up saying that Formatting this volume will erase all data on it. That would be doubly true if you actually didn't check the 'Perform a quick format' checkbox. Double check that you actually did check the box and select the OK button. (Don't worry. This essentially leaves the volume in the exact same state that your phone's internal memory is living in right now: there is data on the drive...you just can't see it. It's coming back, I promise!)
Open the Piriform Recuva application. In the wizard select the 'Next >' button. Select the 'Other' radio button and select Next >. Select the 'In a specific location' radio button and enter: k:\ (assuming K is the drive letter you chose...) Select the Next > button. Select the Enable Deep Scan checkbox. This is the magical setting that finds files that have been deleted...but not really deleted. Select the Start button.
The application may take about an hour to do the 'Deep Scan.' It's time for more laps around the house! Once the application has returned its results you can choose which files to recover using the checkboxes. Select the 'Recover...' button and choose the location to which you wish to output your files.
?
Profit! :victory:
Good Luck :good:
help
M S T F said:
This is the same tutorial written by Wartickler at this link. Thanks for his efforts, his work is appreciated.
Here we bring minor changes to the tutorial for those of you who are facing problems accomplishing the procedures.
Good Luck :good:
Click to expand...
Click to collapse
You should add that the x86 version of Cygwin is needed, not the x64.
Do you also know that as of Android 4.3 this method doesn't work anymore?
yes
Lennyz1988 said:
Do you also know that as of Android 4.3 this method doesn't work anymore?
Click to expand...
Click to collapse
it works with 4.4.x and 5.1.1, it probably also works with 4.3. it's just an adb command after all.
Filoppi said:
it works with 4.4.x and 5.1.1, it probably also works with 4.3. it's just an adb command after all.
Click to expand...
Click to collapse
No its not that. As of Android 4.3 Google enabled Trim on our decives. That means when you delete a file its really gone. Not even a professional company can get it back.
I have tried the above methode and I could not get any data back. Thats when I started reading about Google enabling Trim and found out its impossible to get it back.
Did you try it on Android 4.3+?
try
Lennyz1988 said:
Do you also know that as of Android 4.3 this method doesn't work anymore?
Click to expand...
Click to collapse
Lennyz1988 said:
No its not that. As of Android 4.3 Google enabled Trim on our devices. That means when you delete a file its really gone. Not even a professional company can get it back.
I have tried the above method and I could not get any data back. Thats when I started reading about Google enabling Trim and found out its impossible to get it back.
Did you try it on Android 4.3+?
Click to expand...
Click to collapse
I have tried on my previous Samsung galaxy s3 (i9300) and my one plus one, both 64gb, i got at least 20% of the pictures back (.png, .jpg, ...), possibly even 50% since i had no idea how many i had on the device, some zip, most of .pdf and .doc and some other random stuff.
In both cases i did not manually delete the files from the phone, instead, i screwed up the partitions by deleting some system file, so after restarting, the SDcard/used data partition was empty.
i noticed though that even if my phone only had 500mb of free space available, the .raw partitions i extracted with this method were mostly empty, they only had about 10% of the data, so i guess some happened when android restarted, maybe yeah, some kind of trimming.
i think its worth trying anyway. just remember to not open any program or copy any file in the memory, as it would lower the chances to get anything back.
Filoppi said:
I have tried on my previous Samsung galaxy s3 (i9300) and my one plus one, both 64gb, i got at least 20% of the pictures back (.png, .jpg, ...), possibly even 50% since i had no idea how many i had on the device, some zip, most of .pdf and .doc and some other random stuff.
In both cases i did not manually delete the files from the phone, instead, i screwed up the partitions by deleting some system file, so after restarting, the SDcard/used data partition was empty.
i noticed though that even if my phone only had 500mb of free space available, the .raw partitions i extracted with this method were mostly empty, they only had about 10% of the data, so i guess some happened when android restarted, maybe yeah, some kind of trimming.
i think its worth trying anyway. just remember to not open any program or copy any file in the memory, as it would lower the chances to get anything back.
Click to expand...
Click to collapse
Yes but that's something different I think. Then you never deleted the files, they were there but not accessible.
If you look for example in the last 10 pages of the main thread, then no one is able to recover anything. Because it's simple not possible anymore. That's just how Trim works.
Lennyz1988 said:
Yes but that's something different I think. Then you never deleted the files, they were there but not accessible.
If you look for example in the last 10 pages of the main thread, then no one is able to recover anything. Because it's simple not possible anymore. That's just how Trim works.
Click to expand...
Click to collapse
I'm sorry for your loss.
Filoppi said:
I'm sorry for your loss.
Click to expand...
Click to collapse
What kind of response is that?
gonna try.
for those of u who want to know the blocks and partitions to recover the user data..
ls -l /dev/block/platform/*/by-name
after the adb shell will list them
127.0.0.1 5555 | pv -i 0.5 > mmcblk0p16.raw 0 B 0:00:02 [ 0 B/s]
i stuck at step 7 which is
0 B/s transfer rate
GoGopowerRanger said:
i stuck at step 7 which is
0 B/s transfer rate
Click to expand...
Click to collapse
That su is the most important part of command, if you miss it adb will not be able to transfer any data
M S T F said:
That su is the most important part of command, if you miss it adb will not be able to transfer any data
Click to expand...
Click to collapse
You should be honest with people. You should put in the op that it will only work on Android versions below 4.3. People are just getting false hope and wasting their time.
This method does NOT work anymore.
Lennyz1988 said:
You should be honest with people. You should put in the op that it will only work on Android versions below 4.3. People are just getting false hope and wasting their time.
This method does NOT work anymore.
Click to expand...
Click to collapse
This is not my method nor I have, my self said that 100% you will get what you have deleted. I have only brought minor changes to the tutorial for the sake of successful transfer of data to the pc.
Now if you feel responsible for the feeling of people, definitely I will appreciate if you find another way.
M S T F said:
This is not my method nor I have, my self said that 100% you will get what you have deleted. I have only brought minor changes to the tutorial for the sake of successful transfer of data to the pc.
Now if you feel responsible for the feeling of people, definitely I will appreciate if you find another way.
Click to expand...
Click to collapse
That's the thing. You just copy paste a tutorial that does not work. Why would you do that? I can imagine that you did not know that it would not work anymore. But now you do know. What do you hope to achieve? Raising your thanks meter? You give people false hope and you waste their time.
And about me finding another way....There is not even a professional company that can do it. It's impossible at the moment.
Lennyz1988 said:
That's the thing. You just copy paste a tutorial that does not work. Why would you do that? I can imagine that you did not know that it would not work anymore. But now you do know. What do you hope to achieve? Raising your thanks meter? You give people false hope and you waste their time.
And about me finding another way....There is not even a professional company that can do it. It's impossible at the moment.
Click to expand...
Click to collapse
I don't need thanks... why I should do.... it doesnt give me anything... I have got my own forum with its nice members.... if someone is in need of thanks, thats is you which is trying to show himself as a defender of others feeling, time, blah blah.......
I have recovered my file on a 4.4.2 android after a system crash which I had to reset the phone. if someone is in desperate need of something s/he will try anything and as far as I know trying this one doesn't harm anyone.
for you I have a recommendation, go and drink something cold and calm down!!!
Errr...
Awesome....the raw extraction worked on my S6 running Android 5.0.2. This time I tried it on a Mac and used Homebrew to install PV. Is there a way to get the entire image, even with the unused space?
Great
Thank you!
Worked on my sm-g900f
If you get nc/pv command not found , try this:
When you open cygwin terminal, start with this line: export PATH="/cygdrive/c/cygwin/bin";$PATH
The terminal should now know the location of them.
Same if you get that "adb: command not found" just type: export PATH=/cygdrive/c/XXXXX";$PATH
Just replace that XXXXX= to your location of adb.exe.
Hope it helps someone out of this ****

[HOW TO] Fully Backup & Restore Android Device

NOTE:
I'm not a developer or something even near to that. I'm a newbie and will be, seems so. All information provided here is copied and compiled from different internet sources. This information is according to best of my knowledge and comprehension and is just for curious souls like me who want to understand things in quite simple words.
I have tested this on different devices. I'll not be responsible for any harm to you or your device. It works perfectly for me. You may try it on your own risk.
Encrypted memory may cause problem in backing up and restoring data. So better decrypt it before proceeding. Or the Recovery should support decryption of /data partition.
WHY YOU NEED TO BACKUP YOUR DATA
For security, in case if device is lost. Read here more about the risks.
If you are going to change your device.
If your device is running out of memory space.
If your device is slowing down or giving random errors and you want a clean start i.e. by factory data reset.
If you are upgrading your Factory Firmware or ROM (OS).
If you are a curious soul like me and interested in experimenting with device.
WHAT TO BACKUP
Backup is a broad term used in many contexts.
PERSONAL DATA
On an android device, backing up personal data like pictures, music, videos, documents, e-books etc. means backing up Internal Memory (/data/media/) and SD card (if you use one). If you have disabled internal memory (D.I.M), your SD Card would be working as Internal Memory.
Personal data might be created by apps (like Camera, Facebook, WhatsApp etc) or imported from internet or other devices by yourself.
APPS & APPS DATA
If you are upgrading your ROM permanently, you might be interested in backing up your apps and their data as well. So that you don't lose important data and don't have to install apps again. System apps are stored in different folders under /system/ while user apps under /data/.
Apps typically store their data in /data/data/ but it's not a rule. Many apps save / backup their data on Internal Memory and/or SD Card as well. That's why you see folders named 'Android', 'data' etc. on Internal Memory and SD Card. Also, there are numerous folders named after app names. These folders may contain Personal Data as well, created by that certain app.
Contacts and messages are also stored in their default apps' data folder i.e. in /data/data/ and are not usually backed up manually.
OPERATING SYSTEM & APPS & APPS DATA
If you are going to install new ROM temporarily, you may want a complete backup so that you don't have to go through the hassle of installing apps and setting up / personalizing your device again. It usually includes /system, /boot and /data partitions.
OS consists of SYSTEM and BOOT. While user apps & apps data is stored in DATA.
PARTITION IMAGES
From a developer's perspective, one may want to backup the whole device partitions, in case if something goes wrong during experimenting.
Read here more about android partitions.
WHERE TO BACKUP
INTERNAL MEMORY (/sdcard) (/storage/sdcard0) (/data/media/0)
This memory can be used to save data if you are not going to wipe / clean it. A Factory Data Reset usually doesn't wipe this but it can. It depends on the device. Similarly, Recoveries usually don't wipe internal memory but you can manually do so. However, formatting /data would certainly erase internal memory. Formatting might be a part of flashable zip if you are going to install new ROM. Flashing Factory Firmware using flasher will also erase internal memory.
EXTERNAL SD CARD (/external_sd) (/storage/sdcard1)
This is a more safer place to save / backup data because it is not wiped unless done manually or accidentally.
PERSONAL COMPUTER (USB Flash drive or Internal / External Hard Disk)
This is the safest place to keep data with abundant space and the least chances of losing / corrupting data.
ONLINE / CLOUD STORAGE
Some apps, including Google offer backing up your data online and auto-synchronizes it. You should certainly avail this option particularly for sensitive and light weight data like contacts, messages, documents, saved passwords, bookmarks, financial transactions etc. WhatsApp also has a good online backup option. You can use apps like Drive, SMS Backup & Restore, FolderSync, KeepSafe etc. to better utilize this option. But technically, this is a limited option.
HOW TO BACKUP
FILE EXPLORER APPS
You can use a file explorer like ES Explorer or Solid Explorer to manually copy files from, say, Internal Memory to SD Card to back it up.
BACKUP APPS
Some default apps have built-in feature to backup data and settings locally and online e.g. GO-SMS, Tasker etc. You can check apps for this feature.
Also, special backup apps like Titanium Backup can backup almost all of your user and system apps and their data. It can also backup contacts, messages, device settings etc. It can create a flashable zip of backed up data to flash through recovery. However, backups from one ROM may not fully work with other ROM's.
CUSTOM RECOVERY
Backing up data when ROM is running isn't safe. When files are being used by OS, they might not be written / read sometimes. So, a custom recovery is the best option to backup/restore data. Custom recoveries (TWRP/CWM) can backup / restore partitions SYSTEM, BOOT and DATA (excluding internal memory) for sure. Some new recoveries offer backing up more (or all) partitions on device. You can choose where to save backup files i.e. Internal Memory or SD Card. Then you can transfer these files to PC as well.
You can also use recovery's File Explorer to copy Internal Memory to SD Card. However, it's a slower process if you have a large number of files to backup.
PC
You can use PC in multiple ways to backup/restore data within device or from/to PC.
First of all, you will often come across different software advertised on net claiming to fully backup your device when connected to PC. They work but are not much useful / reliable according to my experience. Give them a try, if you want to.
Secondly, you can use USB cable to directly connect your device (as MTP in ROM or recovery) to PC or use apps like Wi-Fi File Transfer to wirelessly connect (in ROM) and then explore Internal Memory and SD Card. FTP or SFTP (SSH) server may also be setup on Android to remotely access it from PC if both are on same network.
Thirdly, you can mount SD Card as flash drive (UMS in ROM) or switch off your device, remove SD Card and then insert directly into PC through card reader to manually copy files. This method is faster, to copy large data. However, mounting as UMS in running ROM isn't recommended, particularly if you are using D.I.M. It will crash apps.
In Android 5+ UMS may not be available in USB settings as it has been deprecated in favor of MTP to avoid problems. However, to copy large data from internal SD card is really problematic without direct USB connection. Or what if we need to recover accidentally deleted data from internal memory? We can directly attach internal memory (as in UMS) to PC by a little hacking.
Fourthly and ultimately, like a boss , you can use life saving ADB feature of android to backup/restore your data as well as recovering your device from difficult situations and doing a lot of stuff. It's the best and fastest method to backup Internal Memory to SD Card and then restore (COPY WHOLE FOLDER (within device)). Or you can COPY WHOLE FOLDER (From/To PC) or COPY WHOLE PARTITION IMAGE (within device) or BACKUP / RESTORE APPS & DATA (From/To PC) in seconds.
Read here more about android partitions.
Another application that you can use to backup your phone to computer is Apowersoft Phone Manager. This works greatly in managing your devices plus it make sure that all your files are secured from being corrupted or loss.
doublematteo said:
Another application that you can use to backup your phone to computer is Apowersoft Phone Manager. This works greatly in managing your devices plus it make sure that all your files are secured from being corrupted or loss.
Click to expand...
Click to collapse
I can't determine the efficiency of the Apowersoft tool, but if you want to backup data , this is right way , after the phone data is backuped ,you don't have to worry about the deleted data unable be recovered back ,
The backup files is the best way to recover deleted data from phone
Kindly guide me on restoring app data alone from a nandroid to newer version of an app..
The scenario is that ,I upgraded to a higher android OS but find some of my apps(with no cloud storage),restored from my nandroid ,crashing; probably prompted by the change in OS.
I downloaded the compatible version of the app from playstore,but am clueless how to sync restored app data from nandroid to this version.
DIGVIJAY24 said:
Kindly guide me on restoring app data alone from a nandroid to newer version of an app..
The scenario is that ,I upgraded to a higher android OS but find some of my apps(with no cloud storage),restored from my nandroid ,crashing; probably prompted by the change in OS.
I downloaded the compatible version of the app from playstore,but am clueless how to sync restored app data from nandroid to this version.
Click to expand...
Click to collapse
Would you please mention apps names? Don't uninstall previous version. Just install compatible version over it. It should automatically have previous app data.
The backup program is much simpler than the android recovery program,
I came here looking for the best way to back up my internal storage before activities like flashing a new ROM or firmware. Previously, I'd plug my phone into my PC and just drag and drop the internal storage partition to a folder on my computer, but I'd often have to do it a few times because some file would get hung up, or the phone would randomly disconnect (even though my phone, cables, and computer are all new and high quality).
I'm currently using the TWRP file explorer to copy /sdcard to /external-sd/!InternalBackup, but there is no running log or progress indicator... So, this approach is less than ideal.
I'm still looking for the best method (not necessarily a software that will do it for me) that will do it fast, not get interrupted, and provide good feedback on if it's working and how much longer it will take. (The TWRP method above checks the first 2 criteria, but the 3rd is woefully insufficient.
I'm thinking that the best way to back up the internal SD will be in recovery, otherwise something might be in use and will halt the process.
Any suggestions?
DrPhant0m said:
I came here looking for the best way to back up my internal storage before activities like flashing a new ROM or firmware. Previously, I'd plug my phone into my PC and just drag and drop the internal storage partition to a folder on my computer, but I'd often have to do it a few times because some file would get hung up, or the phone would randomly disconnect (even though my phone, cables, and computer are all new and high quality).
I'm currently using the TWRP file explorer to copy /sdcard to /external-sd/!InternalBackup, but there is no running log or progress indicator... So, this approach is less than ideal.
I'm still looking for the best method (not necessarily a software that will do it for me) that will do it fast, not get interrupted, and provide good feedback on if it's working and how much longer it will take. (The TWRP method above checks the first 2 criteria, but the 3rd is woefully insufficient.
I'm thinking that the best way to back up the internal SD will be in recovery, otherwise something might be in use and will halt the process.
Any suggestions?
Click to expand...
Click to collapse
Commandline solutions are always best. You have better control over them. Use TWRP built-in terminal to run commands.
Simply 'cp' with verbose option "-v" is what fulfills your needs. 'rsync' is better if you want to save time by automatically skipping unchanged existing files. If you want to preserve file attributes and permissions, use 'tar'. Added compression can be achieved by 'xz' or '7za'. All of these commands are stable solutions, with high speed and ability to handle/resume broken/interrupted operations.
TWRP comes with busybox bundled. Busybox utilities have limited functionality and mostly suffice the need but rarely we face unexpected behavior. Instead you can use full static binaries of these commands.
Typing lengthy commands in TWRP shell terminal is somewhat challenging. Either use 'adb shell' or for repeated use, create a shell script and place it in internal memory or SD card. Or you can unpack TWRP image and save script in /sbin directly to run it just as a normal command. Another easy way is to create a flashable zip of your script. This way you can also see progress bar moving if you write a proper script for it.
Hope it helped.
mirfatif said:
Commandline solutions are always best. You have better control over them. Use TWRP built-in terminal to run commands.
Simply 'cp' with verbose option "-v" is what fulfills your needs. 'rsync' is better if you want to save time by automatically skipping unchanged existing files. If you want to preserve file attributes and permissions, use 'tar'. Added compression can be achieved by 'xz' or '7za'. All of these commands are stable solutions, with high speed and ability to handle/resume broken/interrupted operations.
TWRP comes with busybox bundled. Busybox utilities have limited functionality and mostly suffice the need but rarely we face unexpected behavior. Instead you can use full static binaries of these commands.
Typing lengthy commands in TWRP shell terminal is somewhat challenging. Either use 'adb shell' or for repeated use, create a shell script and place it in internal memory or SD card. Or you can unpack TWRP image and save script in /sbin directly to run it just as a normal command. Another easy way is to create a flashable zip of your script. This way you can also see progress bar moving if you write a proper script for it.
Hope it helped.
Click to expand...
Click to collapse
That's a lot of help... But I lack the basic understanding and experience to make use of it all. I'll have to Google it a bit and look at some examples. Thanks!
UPDATE: I did a little research, and I succeeded in using "cp" to do a test move in TWRP (I had to use -r and -v), but even using -v didn't create a progress bar or any indication that files were being moved. It just finished and went to the next new line. Is this expected?
Also... my version of TWRP doesn't seem to have rsync available. When I try to use rsync in TWRP, I get
Code:
sh: rsync: not found
So it seems that TWRP's terminal doesn't have rsync. I'm using TWRP 3.0.2-1
So... I'm currently using the Termux app to do the cp operation. I'd prefer to use rsync, which is supported in Termux, however, unless I do "su" first, it says it doesn't have access to the destination folder. And, when I use "su" I can't use rsync. I get pretty much the same message as when I try to use it in TWRP... something like "rsync not found"
Does this mean that when Termux is using root, it can't use rsync? Does that make sense?
Any help?
Thanks!
DrPhant0m said:
I did a little research, and I succeeded in using "cp" to do a test move in TWRP (I had to use -r and -v), but even using -v didn't create a progress bar or any indication that files were being moved. It just finished and went to the next new line. Is this expected?
Click to expand...
Click to collapse
'cp -r' copies recursively i.e. files/directories under directories and so on. So it's definitely required if you want to copy directories. 'cp -v' shows each file which is being copied, but not the progress during a single file copying. Check 'cp --help' for options.
Also... my version of TWRP doesn't seem to have rsync available. When I try to use rsync in TWRP, I get
Code:
sh: rsync: not found
So it seems that TWRP's terminal doesn't have rsync. I'm using TWRP 3.0.2-1
Click to expand...
Click to collapse
TWRP uses busybox which doesn't have rsync built-in. You can get a copy of static (independently working) rsync binary from many sources like this. Aarch64 will be a bit faster. Check 'getrpop | grep ro.product.cpu' to find your CPU architecture if it's 64-bit or 32. When in TWRP, place binary in /sbin directory. Then do 'chmod 0777 /sbin/rsync' to make it executable. Now you can use rsync. 'rsync --help' will show you options and basic help. Do note, /sbin is on volatile filesystem i.e. it will be gone on reboot. Don't expect it to be permanently there. You can also use rsync from other locations like sd card but that will need to call binary with full path and filesystem may put restrictions on execution.
So... I'm currently using the Termux app to do the cp operation. I'd prefer to use rsync, which is supported in Termux, however, unless I do "su" first, it says it doesn't have access to the destination folder. And, when I use "su" I can't use rsync. I get pretty much the same message as when I try to use it in TWRP... something like "rsync not found"
Does this mean that when Termux is using root, it can't use rsync? Does that make sense?
Click to expand...
Click to collapse
It's expected. When we do 'su' on Termux, it's environment is gone and PATH is set to /system/bin etc. So any binaries which Termux downloaded to /data/data/com.termux/files/usr/bin won't work. There are better options, but easiest is to use 'tsu' instead of 'su' on Termux. It will handle things for you to run Termux binaries in superuser mode. Do 'apt install tsu' when connected to internet. Once installed, simply execute 'tsu'. Now you can use Termux rsync binary.
Or use rsync static bianry instead as explained above. Copy rsync to /system/bin/ or /system/xbin/ etc. and set permissions. SELinux may interfere if it's set to "Enforcing". Do 'getenforce' to check and 'setenforce 0' to set it "Permissive".
DrPhant0m said:
That's a lot of help... But I lack the basic understanding and experience to make use of it all. I'll have to Google it a bit and look at some examples. Thanks!
UPDATE: I did a little research, and I succeeded in using "cp" to do a test move in TWRP (I had to use -r and -v), but even using -v didn't create a progress bar or any indication that files were being moved. It just finished and went to the next new line. Is this expected?
Also... my version of TWRP doesn't seem to have rsync available. When I try to use rsync in TWRP, I get
So it seems that TWRP's terminal doesn't have rsync. I'm using TWRP 3.0.2-1
So... I'm currently using the Termux app to do the cp operation. I'd prefer to use rsync, which is supported in Termux, however, unless I do "su" first, it says it doesn't have access to the destination folder. And, when I use "su" I can't use rsync. I get pretty much the same message as when I try to use it in TWRP... something like "rsync not found"
Does this mean that when Termux is using root, it can't use rsync? Does that make sense?
Any help?
Thanks!
Click to expand...
Click to collapse
This reply is probably a bit late for you, but...
If you install tsu (pkg install tsu) in TermUX and use tsu rather than su, it'll work.
Tsu sets up the runtime context for su properly.
Sent from my OnePlus3T using XDA Labs
BillGoss said:
This reply is probably a bit late for you, but...
If you install tsu (pkg install tsu) in TermUX and use tsu rather than su, it'll work.
Tsu sets up the runtime context for su properly.
Sent from my OnePlus3T using XDA Labs
Click to expand...
Click to collapse
Hey, it's never too late to refine your backup strategy. Thanks for letting me know.
I installed tsu in Termux, and when it finished, I tried to use rsync with su, and got the same "rsync: not found" error. Please see the following output, with my entries in Bold[/B].
Code:
$ [B]pkg install tsu[/B]
[COLOR="Gray"][I]~~
~~[LOTS OF LINES DETAILING THE INSTALLATION OF TSU]~~
~~[/I][/COLOR]
Setting up tsu (1.1)...
$ [B]su[/B]
elsa:/data/data/com.termux/files/home # [B]rsync[/B]
sh: rsync: not found
127|elsa:/data/data/com.termux/files/home #
*** Though I did enjoy watching the movie with my son, I did not pick the name Elsa for my device. That's just what LG called the carrier-free V20, Model US996.
Am I doing something wrong? To be clear.. I just did "rsync" without any commands/switches to see if it would produce the help info. I knew it wouldn't actually attempt to copy anything.
DrPhant0m said:
Hey, it's never too late to refine your backup strategy. Thanks for letting me know.
I installed tsu in Termux, and when it finished, I tried to use rsync with su, and got the same "rsync: not found" error. Please see the following output, with my entries in Bold[/B].
*** Though I did enjoy watching the movie with my son, I did not pick the name Elsa for my device. That's just what LG called the carrier-free V20, Model US996.
Am I doing something wrong? To be clear.. I just did "rsync" without any commands/switches to see if it would produce the help info. I knew it wouldn't actually attempt to copy anything.
Click to expand...
Click to collapse
Lol! You missed the key point: use tsu instead of su.
Instead of typing "su", type "tsu".
But don't take it too hard - I did the same thing when I first started.
Sent from my OnePlus3T using XDA Labs
Got it. Worked just fine. Thanks!
DrPhant0m said:
I installed tsu in Termux, and when it finished, I tried to use rsync with su, and got the same "rsync: not found" error. Please see the following output, with my entries in Bold[/B].
Click to expand...
Click to collapse
I mentioned to use 'tsu' instead of 'su' but probably you missed that.
mirfatif said:
When we do 'su' on Termux, it's environment is gone and PATH is set to /system/bin etc. So any binaries which Termux downloaded to /data/data/com.termux/files/usr/bin won't work. There are better options, but easiest is to use 'tsu' instead of 'su' on Termux. It will handle things for you to run Termux binaries in superuser mode. Do 'apt install tsu' when connected to internet. Once installed, simply execute 'tsu'. Now you can use Termux rsync binary.
Click to expand...
Click to collapse
/data/data/com.termux/files/bin/tsu is just a wrapper i.e. a shell script that sets environment variables for Termux and then executes 'su'.
mirfatif said:
I mentioned to use 'tsu' instead of 'su' but probably you missed that.
/data/data/com.termux/files/bin/tsu is just a wrapper i.e. a shell script that sets environment variables for Termux and then executes 'su'.
Click to expand...
Click to collapse
I see it now. I gave a thanks, though admittedly late. Sorry!
Is backup feasible when sd external card has been mounted extending the internal storage (Android 6.0), working as internal storage as well?
Can some expert comment on this, just not to go crazy for nothing. I don't want to upgrade with last rom by manufacturer and lose my data.
I have ADB , fastboot and usb drivers, but trying and use Helium backup I was unable to pair, even though the phone is connected (I can select onscreen for instance PTP or usb storage, tried both, nothing).
Not even sure about nandroid backup also.
HeyRicardo said:
Is backup feasible when sd external card has been mounted extending the internal storage (Android 6.0), working as internal storage as well?
Can some expert comment on this, just not to go crazy for nothing. I don't want to upgrade with last rom by manufacturer and lose my data.
I have ADB , fastboot and usb drivers, but trying and use Helium backup I was unable to pair, even though the phone is connected (I can select onscreen for instance PTP or usb storage, tried both, nothing).
Not even sure about nandroid backup also.
Click to expand...
Click to collapse
Yes it's feasible but depends on what, how and where you want to backup.
mirfatif said:
Yes it's feasible but depends on what, how and where you want to backup.
Click to expand...
Click to collapse
Any solution is fine to me, I just want to be able to restore apps and launcher (Nova launcher prime) with icons arranged as they are, without having to start all over from scratch.
Other data are on the cloud, so if I can possibly backup some folder (from phone or sd card, if the difference matter in my case) good, or I'll take care of it in advance.
Just having the phone upgraded but not reset from the beginning.
If necessary I can try rooting it. Thx for replying.
how to use a twrp data backup for oder rom?

Looking for a solution to make a backup image of my SM-N900V

As the title says, I am looking for a solution to make a backup image of my SM-N900V. I did not post this in the Note 3 forum as this seems like it should be a generic task but I have been unable to find anything related to this online.
I don't want to just backup photos, docs, etc. I want to take an entire image which I could later restore and the phone would return to the exact state it was at when I took the image. Just like when you image a PC.
Is this just not possible with phones? Or am I missing something here?
Thank you in advance for any help you can provide.
you will need twrp for that
You may use
[TOOL][ADB][WIN]Android Partitions Backupper / Cloner
Hi all, wrote a Windows CMD script that backups / clones partitions of an Android device via ADB because I wasn't content with any 3rd-party APK what claims to do this job. The backups /clones are stored on Windows computer as...
forum.xda-developers.com
Back up your android phone on the device itself is not a wise choice.
While devices that have Android 4.0 and above can be backed up from the Android SDK and saved to a file on your PC. This process will allow you to have all of the data from your phone placed into a backup file on your computer.
You will need to download and set up the Android SDK on your computer. This will be used to initiate the backup and restore process on your Android devices. It’s also recommended that you set your device’s display sleep timer to a time that will disable it from turning off during the process.
How to fully backup and restore your Android device without root
One of Android’s little-known tricks is its built-in backup and restore process that allows users to save their private data...
9to5google.com
Thank you guys, I will look in to those and post back.
Piter101, I guess I did not specify where I wanted the backup stored. But yes, I want it to be taken by PC preferably and stored on the PC. A complete backup image cannot typically be taken by a running system, especially if it is stored on the same volume being imaged.
Both to an external drive and to encrypted cloud storage would a good bet to keep your data safe.

Recovering WhatsApp messages from Android without root [writeup]

Recovering WhatsApp messages from Android phone without root
I did this on 19-20 November 2021
My phone is a stock Huawei P20 Pro CLT-L09 up to date with all Android/EMUI/app updates, connected to Windows 10 PC by USB.
This worked and I have good verifiable and complete data even though I am opted in to the multi-device beta, with the caveat that most viewing tools are not (yet) updated to understand the new database structure that it uses.
If you already have a crypt14 encrypted WhatsApp message database, this will recover the keyfile to allow decryption too - key from phone tested against my crypt14 database I downloaded from the Google Drive backup.
I used this method rather than exporting chats due to the 10,000/40,000 message limits on chat exports with/without media. Also that I didn't really want to export each chat individually.
Tools used on Windows 10:
GitHub - p4r4d0x86/WhatsApp-Key-DB-Extractor: Allows WhatsApp users to extract their cipher key and databases on non-rooted Android devices.
Allows WhatsApp users to extract their cipher key and databases on non-rooted Android devices. - GitHub - p4r4d0x86/WhatsApp-Key-DB-Extractor: Allows WhatsApp users to extract their cipher key and ...
github.com
Get the Google USB Driver | Android Studio | Android Developers
The Google USB Driver is required to perform adb debugging on Windows with Google devices.
developer.android.com
https://aapks.com/apk/whatsapp/version/7518022/ if this link dies, you need an APK of WhatsApp of an old enough version. This is v2.11.431 and worked for me.
https://github.com/B16f00t/whapa/ (I actually put this in a Linux VM, with an additional sudo apt install python3-tk required to get that running)
The WhaGoDri tab in Whapa works brilliantly for recovering a Google Drive backup of your database (if you use 2FA, set an app-specific password for this tool) - as of October 2021, this now downloads a msgstore.db.crypt14 encrypted format. All the media associated with it is still unencrypted and downloads just fine. Personally I ran this first to have a clean data set to work from, and it's by far the easiest way to get the media. If you don't do this, then copy the media off the phone manually.
Starting out:
I would suggest opting out of the WhatsApp multi-device beta if you're currently in. I didn't - but if you do, then your final output should be better supported by existing tools for reading WhatsApp chats such as https://andreas-mausch.de/whatsapp-viewer/.
I backed everything up to Google Drive manually and downloaded all files from that backup with Whapa. After that you will need to set WhatsApp on the phone to "Never" back up to Google Drive and press backup again to create the local backups needed - otherwise the tools will fail.
Put your phone into developer mode, enable Android debugging over USB, personally I set it to permit during charging too so if it's connected, it's debugging. Fewer points of failure. Install the Windows Android drivers.
Unzip the WhatsApp Key DB Extractor into a folder (I created one on the desktop)
Add the old version of WhatsApp to the tmp folder and call it LegacyWhatsApp.apk
Now I needed to EDIT the WhatsAppKeyDBExtract.ps1 script (I used this rather than the batch script, if you want to use the bat file you're on your own!)
Following line 91 (should be after "Install complete" of LegacyWhatsApp.apk and before "If ($sdkver -ge 23)") I added the following line:
Read-Host 'Please open WhatsApp now'
As to why I added this point to pause in the program - it seemed to work better than not opening WhatsApp - it allows Android to set permissions for the old app to work better in the next steps.
Now you're ready to start!
Right-click the WhatsAppKeyDBExtract.ps1 script and select Run.
It will unload and save out your newest version of WhatsApp, and load in the legacy version. Once you are prompted to open WhatsApp from the line we added above, open the newly-installed old version and allow it all permissions requested. Don't worry that it then crashes out.
Then press Enter in the Powershell window and let it complete.
Note this may all take quite a lot of time - my crypt14 database from Google Drive was about 250MB, the unencrypted database upwards of 500MB, and the transfer time was probably about 5 minutes. So don't worry if it doesn't look like it is doing a lot!
At this point you are done! Check the findings: in the extracted folder, you should have the three critical files
1. msgstore.db which is your unencrypted message database (if you want to sanity check this, use a tool like DB Broswer (SQLite) or just a text editor and look for readable text to show it is not encrypted)
2. wa.db which is needed to assign contact names to the messages
3. whatsapp.cryptkey - this last one will let you decrypt the crypt14 file we saved from Google Drive earlier using Whapa. This is usually the hard one to get without rooting the phone!
If the process goes wrong at any point you might have the phone in a weird state. Personally I found uninstalling the old version of WhatsApp (ensuring that the checkbox was set to KEEP the data on the phone), reinstalling the newest version from the Google Play Store, opening that and letting it reload the WhatsApp chat backup from the phone was sufficient to get me ready to start again with no data loss.
As I mentioned at the start. Current tools (WhatsApp Viewer and Whapa) don't cope with the changed database structure that the multi-device beta uses in the same files. It doesn't look too complex to work out which old fields correspond to new ones to modify the readers, but that is an exercise for another day...
Things that DIDN'T work:
https://github.com/EliteAndroidApps/WhatsApp-Key-DB-Extractor - too old and the java code throws an error on the version on Android, ultimately failing to recover anything useful
https://github.com/SimonGhoul/Manual-WhatsApp-Key-DB-Extractor - not that it doesn't work per se, just the more automated version above has fewer steps for a novice user to screw up with!
https://www.imyfone.com/transfer-backup-restore-whatsapp/ - failed to decrypt the Google Drive recovered version (and I wasn't wild about giving my Google account creds to a random Chinese company either), also failed on some sort of timeout when recovering data through USB.
KingoRoot (both PC-based or APK directly) - doesn't support a P20 Pro CLT-L09 on latest version of Android, so no root for me that way
TWRP rooting - this will wipe the phone entirely and I was not convinced I'd get my data back from Google Drive! So I didn't try this
https://mobiletrans.wondershare.com/ - actually, technically speaking this works perfectly (as long as you follow the instructions *exactly* and are very patient). But I didn't like the proprietary interface and clunky chat export mechanism, nor the having-to-pay-for-it part
Things I haven't tried:
Importing anything to iOS. I'm making a clean start on my new phone!
Questions / comments / support:
Honestly I just documented this as it worked for me on this date with the current versions of stuff, I couldn't find any other instructions that worked without modification. I don't hack around with WhatsApp and phones for fun or for a living, I just wanted a readable backup to go back to as I'm switching to iOS. So... I probably won't check this again, but I hope it helps provide a data point and links/instructions for something that works.
Thank you @lightbrigade for this helpful article. I got the message store decrypted and could see message through Whatsapp viewer and SQLite browser. But I'm not able to locate deleted message in either of those tools. Do you know which table contains deleted messages by any chance?
Thanks, this was the closest I got after hours of trying to export my chats.
I successfully got my database backup using Whapa (crypt14 encrypted)
as well as the key using db extractor.
I also did a manual backup of my database (also crypt14 encrypted)
Unfortunately, msgstore.db in the "extracted" folder is still encrypted after using db extractor.
I tried decoding crypt14 databases using Whatsapp Viewer, but I got the error message:
"Decryption failed. Error during unzipping (inflate). In 99% this means you tried to use an invalid key."
Why is this key invalid? My P30 pro can't be rooted with EMUI 10...
TheReini said:
Thanks, this was the closest I got after hours of trying to export my chats.
I successfully got my database backup using Whapa (crypt14 encrypted)
as well as the key using db extractor.
I also did a manual backup of my database (also crypt14 encrypted)
Unfortunately, msgstore.db in the "extracted" folder is still encrypted after using db extractor.
I tried decoding crypt14 databases using Whatsapp Viewer, but I got the error message:
"Decryption failed. Error during unzipping (inflate). In 99% this means you tried to use an invalid key."
Why is this key invalid? My P30 pro can't be rooted with EMUI 10...
Click to expand...
Click to collapse
I have the excact same issue. Decrypting with "WhatsApp-Key-DB-Extractor" works, but i only decrypts my current messages. I need to decrypt an old G-Dirve backup. The "whatsapp.cryptkey" created by the Tool does not work with with "WhatsApp Viewer" or "whapa".
I have a rooted device, but i cannot find the key file on my device, so i cannot test it this way.
Oh my god, I finally managed to decrypt my chats...
I'm not sure if my approach works in your case, but maybe it's worth a try...
#No root needed
#No risk of losing current Chats
Instructions:
1) Make a cloud backup of your chats.
2) Download Bluestacks and allow root access
3) Install Whatsapp on Bluestacks and load your backup
4) Create a local backup in Whatsapp on Bluestacks
5) Download a root file explorer (I used "Root Browser") and copy the key file from
/data/data/com.whatsapp/files
to some path on bluestacks sdcard
6) Open the preinstalled file explorer (Media-Manager) and export both the keyfile from 5) and your database from /sdcard/Whatsapp/Databases to your local Windows machine.
(Key file can also be extracted on the phone itself (without Bluestacks Emulator) using
WhatsApp-Key-DB-Extractor-master)
7) Clone the following repository to your local machine and decrypt your database
GitHub - ElDavoo/wa-crypt-tools: Decrypts WhatsApp .crypt12, .crypt14 and .crypt15 files.
Decrypts WhatsApp .crypt12, .crypt14 and .crypt15 files. - GitHub - ElDavoo/wa-crypt-tools: Decrypts WhatsApp .crypt12, .crypt14 and .crypt15 files.
github.com
Failed tries:
- Whapa always exported a 0 byte database
- WhatSoup Web Scraper kept crashing after some minutes on Windows, as well as Linux VMware
- WhatsApp Viewer threw an Error: unzipping (inflate), invalid key
!!! Important !!!
Windows Text Editor doesn't display the decrypted database in a readable way.
You have to open it in some kind of SQL software or test it online here:
SQL Online Compiler - Next gen SQL Editor
SQL OnLine - Next gen SQL Editor: SQLite, MariaDB / MySQL, PostgreSQL, MS SQL Server. User-friendly interface for data science. No registration for start, No DownLoad, No Install. Online test SQL script. Online Open/Save SQLite file. Online view all table DB. Fiddle link SQL text and DB file...
sqliteonline.com
Hey everyone, I ended up using this app:
GitHub - p4r4d0x86/WhatsApp-Key-DB-Extractor: Allows WhatsApp users to extract their cipher key and databases on non-rooted Android devices.
Allows WhatsApp users to extract their cipher key and databases on non-rooted Android devices. - GitHub - p4r4d0x86/WhatsApp-Key-DB-Extractor: Allows WhatsApp users to extract their cipher key and ...
github.com
But it didnt work and ended up deleting my local backups... is there anyway to recover it?
Google drive back up is a week old.
Samsung s22 non-rooted phone
Any help would be appreciated.
Doesn't work for accounts that transferred accounts to another phone.
Key file gets deleted from old phone if you use whatsapp on another device.
Hello folks,
I am getting a
Performing Streamed Install
adb: failed to install tmp\LegacyWhatsApp.apk: Failure [-26: Package com.whatsapp new target SDK 19 doesn't support runtime permissions but the old target SDK 31 does.]
Click to expand...
Click to collapse
on WhatsApp-Key-DB-Extractor-master with Android 12 (Realme RMX3393).
Using the APK mentioned in the inital post as legacy APK.
Any ideas how to cirumvent that or what else to try?
By the way Whapa to downlowd the Drive data worked like a charm but I am unable to get my hands on the key.
The people that achieved the extraction could they state on what OS the ewxtraction was successful?
I could get relatively easily down to an Android version 10 ... ;-)
hi, sorry but couldnt understand if this process would solve my problem, so im asking; i made a backup for my Whatsapp to Drive then made a factory reset to my phone, installed Whatsapp, before i restored my real back, i did a new backup and i realized that, my real backup gone, only one i could restore is the new one which is nothing inside, is there a way to get older backup in Drive, or do you guys think can i get those files on my internal storage via any data recovery software? Thanks in advance!

Categories

Resources