"TWRP in a Nutshell" Chapter 4 : TWRP Tricks Part 2: Blind Emergency Backup

2: Doing a "Blind" EmergencyPlease login to see this link.




Life is a strange thing... so are coincidences... 2 days ago i killed my wife's Samsung S7 .. it fell accidently face down flat on the flat wooden floor... first i looked.. whew.. no spider app... but.. also no display activity .. some glitches here and then.. key inputs were working.. status LED too.. but the display was definately dead... it had a minor spider on the back-cover (also glass on S7) and a bit loose in front on the top glass layer... nothing too bad.. (well it didnt have any protection at all.. xD)


how the hell do i get her data off from the phone... she had a screenlock applied so i couldnt just swipe to unlock the display (even if it wasnt working anymore the digitizer did work) .. problem is USB debuging was activated for sure (means ADB works ...) but only on unlocked screen.. therefore ADB statet "unauthorized" ...


The solution is... go to Please login to see this link. ..in my instance... S7 you have to push Power/Vol-Down for at least 10 seconds to force reboot the phone .. afterwards push instantly Vol-Up/Power/Home to go to the Please login to see this link... speaking Please login to see this link. ... it took me a few tries since the vibration wasnt also working anymore... but i knew it worked when the ADB statet "Please login to see this link." when i promptet it...



in this state you can pull most of the data either via ADB (if you need stuff outside the public internal storage) or simply by drag&drop in windows .. Please login to see this link. works in windows like an OS and give you access to SD Card and internal memory via USB


This was a short intro .. i'll work it out further and more detailed below :D


Requirements for a blind Please login to see this link.



- Have Please login to see this link. .. i dont know if CWM also opens ADB automatically on startup to the Please login to see this link... i last used CWM about 7 years ago or so..

- Have a proper USB cable at hand wich is connected to your PC

- Have installed the latest driver for your Mobile (if you dont allready have)

- Have ADB installed on your System in case you need a deep Please login to see this link.Please login to see this link.Please login to see this link.  Please login to see this attachment.

(pretty straight forward install.. start exe.. press 3 times "Yes" and install the driver.. done.. 15 seconds and you have an ADB installation wich you can execute from every path in a command line window)


Now its pretty simple .. manage to get somehow in the Please login to see this link... for samsung its either "Vol-Up/Home/Power" buttons.. or on S8/+, S9/+, Note 8 you have to press Power/Vol-Up/Bixby buttons.. for a force reset of the mobile the "at least 10-seconds Power/Vol-Down should do the trick on all Samsung Phones ... needless to say if you have a mobile where you can remove battery.. do that :Dand start it again the force reset applies mostly only to those with integrated not removeable batteries (at least not so easy removeable :osmile:)


and thats pretty it... if you are in Please login to see this link. you have about 99% what you wanted .. just drag the files from the internal storage via windows explorer to where you want them..


In the case you need deep file Please login to see this link... lets say for instance application data or whatever wich dont resides in the internal storage.. you need to go to a command line window .. fastest way to get into a command line (if you dont know it already)..


Hit Windows-R .. type CMD and hit enter..


With installed ADB you connect the phone to your PC and type adb devices.. with this command you look for devices connected to your PC


Please login to see this attachment.


The first adb devices command returned me the device as "unauthorized" means the device is up and running but having either ADB disabled or a display lock is in place and has to be first unlocked before usage..


After reboot in Please login to see this link. you see that the device has the state Please login to see this link... means your device is ready for work (or it could read authorized after you allow usb debug or have unlocked the device)


then with the command adb shell ls you are using the internal "Please login to see this link." from the device... as long as you type "adb shell" in front you can use several shell-commands wich the device knows.. you could also make directories or remove them.. delete stuff.. chmod files or directories whatever the device knows... with busybox installed you can even tar files/folders together in an archive if you know how to achieve that...


with ls you create a shortlist of files/directories of the Please login to see this link. folder of your device.. and with Please login to see this link. folder i mean the VERY Please login to see this link.... you also see several directories/volumes you normaly wont ever see... like EFS or DEV... or OEM...or PROC ...dont mess around with that please.. only if you know what you are doing or the device is for the trash anyway and you dont mind killing it for good..


The 2 directories you mostly need when recovering lost application data are:



/data/app

/data/data


the /data/app dir is the folder where the application is installed.. and houses in 99% of the case only the base.apk and some local installed files necessary for the device running... the stuff that installs with the app... sometimes there are some important data in the respective directory.. back it up just in case...


Please login to see this attachment.


the /data/data dir is the folder where the apps put their generated data to.. in most cases cache files.. (instagram for instance stores there thumbnails or caches videos etc)


Please login to see this attachment.





here you need to look closely.. the folders of data/data and data/app are differing.. they are not the same...

Please login to see this attachment.Please login to see this attachment.


Left the /data/app folder... right the /data/data folder...


if you want to backup for instance firefox.. you would have to use the "org.mozilla.firefox" dir for the /data/app folder and the "org.mozilla.firefox-1" for the /data/data folder..


with adb pull you can "pull" stuff over from the mobile to your pc... atention.. if you dont state a "target" directory at the end of the command line it will write to your momentary local position in the folder ou reside at the moment you hit enter..


Most of the time the /data/app part is pretty fast and small.. the /data/data part can be very long depending on what size of cache the app produces.


Please login to see this attachment.


see... 5 files


Please login to see this attachment.



you see de difference :D


what you do with the recovered data is up to you...


you could theorethically pack those 2 directories with the busybox tar command together and then extract them back on another device and have even the permissions kept... but you would need to update selinux state to the restored files and mostly it wont even work cause the app data is mostly bound to your device... you can try it.. but it will mostly fail...


remember this is how you emergency recover data from a otherwise piece of junk mobile... you can actually handle those files and inject them if you want but that is way to deep and depends from app to app... you would have to do your own researches on this :D:D


Hey but now you can do backups and emergency Please login to see this link. from junk phones.... my wife would have ripped my head off if she would have lost her whatsapp cache :osmilet::osmilet:thats what i gave to her and she was happy xDxD


                                                                                                                         


Don't take life to serious... nobody will get out alive anyway :cflol:

                                                                                                                         

Samsung Lover...<3

PC Modding/Watercooling Enthusiast...:-P

Can write with 300 Chars/sec B-)

I love Anime :heyes:

Roleplayer for like ever :hollow: