Need help to recover deleted data - Sony Xperia XZ1 Compact Questions & Answers

Hi all,
My goal: Recover some deleted data.
Firmware: 47.2.A.11.228
Challenge: I don't want to wipe/overwrite userdata because it might damage/overwrite deleted files
What I learned so far:
- I need root to be able to potentially recover the deleted data
- Temp root is only possible on Oreo firmware version, see This thread
- Downgrade to Oreo is only possible with wipe of userdata
Now my question, could I do the following?
- Downgrade to Oreo using newflasher without wiping userdata (I don't need the phone to boot completely, I only need to enter the terminal/shell)
- Acquire temp root
- create an image of userdata using dd
- go back to Pie again
If this does not work - is there any other way I can recover the deleted data?
Thanks much!

Related

[Utility] CleanFlasher / & Get your phone ready for 4.3

Some words about my little Script:
I would describe myself as a flashoholic and kinda perfectionist.
I try a lot of different Roms and to get the best results I always want to start from scratch and have a clean base for the new Rom.
So I decided to write a little script that automates the process for me. :lazy:​
Based upon: Android 4.3 AOSP (JWR66Y)
There will be different versions:
For all versions: THIS WILL WIPE YOUR USERDATA! Make sure you have a backup!
1. Coming from a 4.2 rom:
- flashing latest 4.3 bootloader
- flashing latest 4.3 radio
- formatting system partition
- formatting userdata partition
- formatting cache partition
- flash stock boot.img
- flash stock recovery.img
- write original factory system partition to the device
- write original factory userdata partition to the device
- write original factory cache partition to the device
- again formatting system partition
- again formatting userdata partition
- again formatting cache partition
Now you have a complete "empty" device ready for every new 4.3 Rom.
Your device WON'T boot up until you flash a Rom in Recovery or via fastboot!
Download
2. Just clean install (already 4.3):
- formatting system partition
- formatting userdata partition
- formatting cache partition
- flash stock boot.img
- flash stock recovery.img
Your device WON'T boot up until you flash a Rom in Recovery or via fastboot!
Download
3. Clean install for paranoids (already 4.3):
- formatting system partition
- formatting userdata partition
- formatting cache partition
- flash stock boot.img
- flash stock recovery.img
- write original factory system partition to the device
- write original factory userdata partition to the device
- write original factory cache partition to the device
- again formatting system partition
- again formatting userdata partition
- again formatting cache partition
Your device WON'T boot up until you flash a Rom in Recovery or via fastboot!
Download
Instructions:
- Download file
- Unpack it (using e.g. 7zip or WinRar)
- open the folder
- put your device into fastboot mode by either chosing it in your reboot menu or by powering off the phone and then
push and hold Vol+, Vol- and the power button until you are in fastboot mode
- connect the device to your PC
- execute the "make_it_happen.bat" in the folder
- hold on tight! Your device will reboot a few times during the process (don't worry)
- enjoy fresh and empty Nexus 4.
Note:
This is ONLY for the Nexus 4! Don't try it with other devices! It won't work.
You can easily replace the included files with e.g. your prefered kernel (boot.img) or your prefered recovery (recovery.img).
Just extract the *.zip and replace the files! (Be careful with the spelling.) This might save you some time if you always want to start from the same fresh base.
Going to release a version that lets you decide which version you want to use or what you want to flash/erase/format. -> Kinda AiO Version of this little script.
If people are interestes in it, I might release a version of this script that lets you revert to either AOSP stock or Google Factory Image stock (both bootable) without wiping partitions after the flash. (Of course CLEAN.)
At the moment these versions are in order you are directly going to flash a custom rom to your device. Just tell me.
Thanks to:
Google for their factory Image.
franciscofranco for his precompiled AOSP source
Your device WON'T boot up until you do not flash a Rom in Recovery or via fastboot!
Click to expand...
Click to collapse
What in the world does that mean?
Sent from my iPad using Tapatalk HD
Bill Gamble said:
What in the world does that mean?
Click to expand...
Click to collapse
Im Guessing he means "Your Device will not boot until you flash a stock or custom ROM onto it" But i may be wrong lol.
TreatnHerRight said:
Im Guessing he means "Your Device will not boot until you flash a stock or custom ROM onto it" But i may be wrong lol.
Click to expand...
Click to collapse
Yes you are right. I should add that.
Wrote a short statement in the "Notes" section about that.
I recently got a Nexus 4, probably on 4.1.
Anyway, flashing to a 4.3 custom rom and the internal storage is a bit weird - lots of sdcard simlinks with folders named 0, legacy, emulated in the storage directory. I saw a thread that said that this happens after updating from an earlier revision of android and is supposed to be a backup of the old sdcard partition as it was, but it's quite confusing and doesn't seem to work well. I can't seem to get rid of the simlinks within a rooted file browser, not that I am completely sure of how to do that, anyway.
Now, the actual question - will using this get rid of the confusing way my internal storage's sdcard directory is structured, returning it to something simple like "/storage/sdcard/mystuff"?
RGM79 said:
I recently got a Nexus 4, probably on 4.1.
Anyway, flashing to a 4.3 custom rom and the internal storage is a bit weird - lots of sdcard simlinks with folders named 0, legacy, emulated in the storage directory. I saw a thread that said that this happens after updating from an earlier revision of android and is supposed to be a backup of the old sdcard partition as it was, but it's quite confusing and doesn't seem to work well. I can't seem to get rid of the simlinks within a rooted file browser, not that I am completely sure of how to do that, anyway.
Now, the actual question - will using this get rid of the confusing way my internal storage's sdcard directory is structured, returning it to something simple like "/storage/sdcard/mystuff"?
Click to expand...
Click to collapse
Yes. Method 1.) should exactly do what you want.
Be sure you update your recovery to the latest version. E.g Clockworkmod or Twrp.
After you have succesfully used method 1.) stay in bootloader.
- Download the *.img file of your prefered recovery.
- open terminal and flash the recovery by using the following command:
- fastboot flash recovery "nameofyourrecovery".img (of coures without the " ")
- fastboot reboot-bootloader
Thats it.
Now you have a custom recovery. Boot into recovery and flash your prefered rom!

Upgrade to 5.1.1, but keep root AND user data

Hey guys,
quick question. I have a 5.0.2 z3c rooted with dual recovery and would like to upgrade to 5.1.1.
However, I don't want to lose neither root access nor my personal data. How to correctly dirty-flash a prerooted flashable.zip from recovery?
Also when creating the prerooted flashable.zip with PFRCreator, do I need to use the same Recovery package as I have installed or can I upgrade the Recovery on the go?
Edit: Sorry, wrong Sub. Please delete
To keep root you have to create a prerooted flashable zip (which you did) or maybe you can reroot from the recovery not sure.
To keep your data: your phone has several partitions, most notable are SYSTEM, CACHE and DATA. You want to update system, wipe cache and keep data (which contains your apps and data).
Just flash your resulting zip file through the recovery (it will only operate on the system partition here), then when you do the Flashtool flashing just uncheck DATA in WIPE section and it will keep your data.

[GUIDE] Fully Restore Stock and Unroot L90

Hello, everyone.
Even after flashing stock ROM with kdz your L90 may still display ROOTED in download mode or in the RCT test (open Telephone app and type 3845#*XXX# where XXX is your phone model, 410 for instance if you have a D410hn). The fix is relatively simple:
1. While still rooted, use a file manager with root access and navigate to /persist folder, then backup to a safe place (just in case you need them later) and delete these two files:
rct
rct.cfg
2. Reboot to recovery and do a full wipe: caches, data and system. It's important because maybe some files that trigger the rooted flag may be in /data/local/tmp, for instance;
3. Reboot to Download Mode (bootloader) and follow this tutorial to flash stock kdz:
http://forum.xda-developers.com/lg-l90/general/guide-flash-stock-kdz-offline-lg-l90-t2803479
Before flashing kdz you shouldn't already see any ROOTED on screen, and after booting to stock the RCT tool should not display that your device is rooted anymore.
PS: I am not sure if deleting these two files will break anything, I have just did these steps and my device doesn't show ROOTED anymore. Ideally, you should backup /persist before rooting (I don't think it's possible anyway, at least not on Lollipop), or at least backup them just after rooting, so you can replace the files as explained is the treads bellow.
Credits
@Drachenminister - http://forum.xda-developers.com/showthread.php?t=2700992
@AriHell - http://forum.xda-developers.com/lg-g3/general/tot-reset-rct-root-check-tool-t2853627
@k0nane - http://forum.xda-developers.com/showthread.php?p=41136026#post41136026

Request for firmware / EFS backup

Hello All,
The tar bug in TWRP messed up my backup of my A2.
I need to recover firmware partition (possible EFS), but can't find these file in original recovery ROM.
(yes I did a full recovery included these partitons so they don't work)
I don't have wifi, SIM, working anymore.
Who can upload these files for me?
Thanks

[HELP] user data on internal storage lost

I violated the first rule of updating. I did not make a proper backup.
Before the loss phone was unlocked, rooted and on Android 9 stock rom.
I thought I could flash a TWRP recovery on my phone to make an entire backup of everything.
Code:
C:\Users\deinemutter\Downloads\xiaomi mi a2\platform-tools_r31.0.2-windows\platform-tools>fastboot flash boot "C:\Users\deinemutter\Downloads\xiaomi mi a2\lineage-17.1-20210410-recovery-jasmine_sprout.img"
Sending 'boot_b' (24509 KB) OKAY [ 0.550s]
Writing 'boot_b' OKAY [ 0.234s]
Finished. Total time: 0.950s
and from here it went downhill. The reboot got me a bootloop.
In fastboot I flashed patched_boot_10.0.9.0_mi_a2.img and stock_boot_10.0.9.0_mi_a2.img on both boot slots hoping that it would get me out of the bootloop. Well, it didn't. It was probably the wrong boot image.
Downloaded Xiaomis official Flash Software MiFlash2018.5.28.0 and an official stock rom jasmine_global_images_V11.0.22.0.QDIMIXM_20210309.0000.00_10.0 and was very relieved to find the option "save user data" when flashing.
I did chose this option to find out later that this wasn't the case. My data on the internal storage was gone and my phone wasn't rooted anymore.
I downloaded all kinds of restore software on my laptop for my android device. Only to find out that the only data they software could find was the newly copied data on the new rom. Rooting my phone in the process to allow deep scans just came out empty.
Now I am thinking of copying the entire image of my phone to my laptop hoping that the data will somewhere in the image. Is this even worth it?
I am at the end of my knowledge and hope that you can help me a little.
1. If You have read more guides before flashing anything, You'd learn that this phone has A/B slots ROM structure and thus does not have dedicated partition for recovery, and thus TWRP cannot be flashed directly into boot partition without erasing boot image and spoiling OS. Any recovery must be embedded into boot image, as stock recovery is embedded into stock boot image. And thus, after recovering working OS, if You still insist in having TWRP instead of stock recovery, You'll need to boot into TWRP from PC and then install appropriate TWRP.zip thus patching currently used boot image, and this procedure will be needed after each OTA.
2. To have working OS, as You are sure that phone is unlocked, just flash one of available fastboot ROM images (search in Guides forum https://forum.xda-developers.com/t/fastboot-jasmine-xiaomi-mi-a2-fastboot-images.3824849/) via fastboot. Note that:
2.1. forget about MiFlash, use fastboot.exe from Android platform-tools (ADB/fastboot);
2.2. MiFlash in special patched version is only needed for TestPoint/Edl unbricking of locked phones;
2.3. best Android 9 version is 10.0.17.0;
2.4. when flashing 10.0.17.0 use "flash_all_except_data.bat" to keep user data;
2.4. updating to Android 10 (any version) will need factory reset, thus user data will be lost;
2.5. user data most probably still can be saved in TWRP backup for future restore, or you can 1st recover Android 9 and save your data;
2.6. do not use so called "official TWRP", I regard working https://forum.xda-developers.com/t/...mi-a2-jasmine_sprout-by-d4e8ede8f1f2.3941096/ and https://forum.xda-developers.com/t/recovery-unofficial-teamwin-recovery-project.4209151/ ; do not forget to enter proper code when TWRP starts to decrypt /data partition.
Aerobatic said:
1. If You have read more guides before flashing anything, You'd learn that this phone has A/B slots ROM structure and thus does not have dedicated partition for recovery, and thus TWRP cannot be flashed directly into boot partition without erasing boot image and spoiling OS. Any recovery must be embedded into boot image, as stock recovery is embedded into stock boot image. And thus, after recovering working OS, if You still insist in having TWRP instead of stock recovery, You'll need to boot into TWRP from PC and then install appropriate TWRP.zip thus patching currently used boot image, and this procedure will be needed after each OTA.
2. To have working OS, as You are sure that phone is unlocked, just flash one of available fastboot ROM images (search in Guides forum https://forum.xda-developers.com/t/fastboot-jasmine-xiaomi-mi-a2-fastboot-images.3824849/) via fastboot. Note that:
2.1. forget about MiFlash, use fastboot.exe from Android platform-tools (ADB/fastboot);
2.2. MiFlash in special patched version is only needed for TestPoint/Edl unbricking of locked phones;
2.3. best Android 9 version is 10.0.17.0;
2.4. when flashing 10.0.17.0 use "flash_all_except_data.bat" to keep user data;
2.4. updating to Android 10 (any version) will need factory reset, thus user data will be lost;
2.5. user data most probably still can be saved in TWRP backup for future restore, or you can 1st recover Android 9 and save your data;
2.6. do not use so called "official TWRP", I regard working https://forum.xda-developers.com/t/...mi-a2-jasmine_sprout-by-d4e8ede8f1f2.3941096/ and https://forum.xda-developers.com/t/recovery-unofficial-teamwin-recovery-project.4209151/ ; do not forget to enter proper code when TWRP starts to decrypt /data partition.
Click to expand...
Click to collapse
I read through some guides here but it wasn't all that clear to me as you put it here.
Regarding your points:
2. My phone was unlocked
2.1 I used both MiFlash and fastboot
2.4 it is exactly what I did with MiFlash to keep user data but that didn't happen
2.5 is the real question. How can I save my user data after I flashed a new OS it with MiFlash that did'nt save userdata how can I recover if not all but at least a portion of it. Would a copy of the entire image help? or what other options do I have?
OK, again ....
If you have already erased /data partition with MiFlash, user data is lost, no chances.
If you have already made factory reset (erased /data partition) trying to upgrade to Android 10, user data is lost, no chances.
If you have not erased /data partition, and you are sure that you had Android 9, just flash 10.0.17.0 (latest working Android 9) fastboot ROM image using fastboot .exe and "flash_all_except_data.bat", you should be able to boot into OS.
As for backup and restoring /data partition - it is a trivial operation in TWRP, noting that:
- working TWRP is used (see above);
- TWRP is booted into via fastboot (not flashed! - for Nth time!);
- you do not skip the step of entering code when TWRP is booted into (otherwise TWRP won't decrypt /data);
- phone has enough free space in /data to backup /data (and then without working OS you'll need to pull sdcard/TWRP/backups/ via ADB) or (simpler) external SD/SDD/HDD is attached via OTG.
Apart from the condescending tone and the partial useless repetition of information I did not ask for or need, thanks, I guess

Categories

Resources