Decrypt data partition backup - Samsung Galaxy S7 Questions and Answers

Hi there!
I have installed twrp with stock rom on my Galaxy S7, but now that I did, twrp can't decrypt my data (I used a pattern code).
It doesn't even ask for a password.
Recovery log says:
Code:
... size: 0 MB ...
I: Can't probe device /dev/block/sda18
I: Unable to mount '/data'
I: Actual block device: '/dev/block/sda18', current file system: 'ext4'
So now I'm not able to fix the stock rom and therefore it can't boot.
Is there any information on what's causing these problems in twrp?
According to a lot of people having the same problem formatting is the solution to this, but that would erase all the data.
I know, not making a backup before doing something like this was a bit silly.
But I managed to copy all the partitions to external storage.
Is there a way to decrypt the data partition?
Like could it be possible to extract the key from the crypto footer and run the decryption algorithm on a pc?
I also tried to run dm-crypt on the data partition but cryptsetup can't detect it as a valid LUKS device.
Thanks and regards!

Related

Stuck in TRWP recovery, a problem which is bigger than my knowledge is.

Hello everyone, i have a problem with my s7500 after trying to install the SpeedMod 4.4.4 rom.
I was coming from an unsuccesful first installation, where the setup wizard application was crashing when touched at every restart, leaving the phone unusable on the home screen, so i tried again.
After rebooting in recovery mode, i started by doing a wipe as usual, waited for it to be completed and then, when looking for the zip on the sdcard, it wasnt there, the external sd (i've tried three different cards) was not recognized by the system.
There are a lot of errors in the recovery log, which i'm gonna sort on this spoiler below.
E:invalid block device on '/dev/block/mmcblk0p8 (also mmcblk0p12) /boot emmc defaults 'emmc' 40
E: invalid block device on 'dev/block/mmcblk0p16/system ext4 ro,barrier=1 wait
E: invalid block device on 'dev/block/mmcblk0p18/data ext4 nosuid,nodev,noauto_da_alloc,barrier=1 wait,check,encryptable=footer,lenght=16384 'ext4',40
E: invalid block device on 'dev/block/mmcblk0p17/cache ext4 nosuid,nodev,barrier=1 wait,check 'ext4' 40
E: invalid block device on 'devices/platform/msm_sdcc.1/mmc_host auto auto defaults voldmanager=sdcard1:auto,noemulatedsd ' , 'auto', 49
E: invalid block device on 'devices/platform/msm_hsusb_host.0 auto auto defaults voldmanager=usbdisk:auto ' ,auto' , 45
E: invalid block device on 'dev/block/zram0 none swap defaults zramsite=67108864 ' , swap' , 22
E: unable to locate storage partition for storing settings file.
Updating partition details......done
E:unmount: Unable to find partition for path '/system'
E:unmount: Unable to find partition for path '/data'
E:unmount: Unable to find partition for path '/cache'
Kernel does not have support for reading SELinux contexts
E:unmount: Unable to find partition for path '/cache'
Running boot script......
Finished running boot script.
E:mount: Unable to find partition for path '/cache'
E: no vaild storage partitions found for MTP.
Trying to install the rom via ABD Sideload worked, but after successfulling installing it a warning propted saying that no OS were installed, and rebooting left me once again on the recovery screen.
I am sorry for my english in advance and i hope this post would be understandable, i can only imagine that there are problems with the internal storage not being partitioned or something like that, googling a solution for 4 hours didnt solved the problem.
Thank you in advance for the help, im here if someone needs further explanations.
Just redownload the rom, perform full wipe and dlash it again.

Bad magic error for real block device

Hello,
I always get the below error when trying to boot with encrypted partition.
D/VoldCmdListener( 2397): cryptfs cryptocomplete
E/Cryptfs ( 2397): Bad magic for real block device /dev/mapper/data
E/Cryptfs ( 2397): Error getting crypt footer and key
But the partition is getting decrypted and mounted as I am able to view and edit the contents through adb shell. What really blocks is the UI, which always displays "Encryption Unsuccessful" message. I am doing it on a custom board, booting from sdcard. I have partitioned the sdcard and performing the encryption of data partition in host PC using cryptsetup. Decrypting and mounting manually works fine both in host PC and on custom board. When I try to decrypt and mount during boot by editing init.rc file, decryption and mounting is happening as I am able to access the contents of encrypted partition but only the UI error where cryptfs checks encrypted partition. Am I missing anything to edit in init.rc.
Regards

How to decrypt /sdcard from ADB?

Long story short, I screwed up, and now I have an encrypted storage (with my files that I want back) but TWRP and the OS thinks it is not.
It goes like this:
The Magisk v22.0 update screwed up my phone, which stuck in a bootloop.
After countless tries with Magisk (updating, uninstalling. installing, removing mods, adding mods) in TWRP, I read somewhere to dirty flash the ROM.
Due to an HDD failure in my PC, I did not have any storage to back up my internal storage from the phone.
Because I wanted to update the ROM anyways (from MIUI 11 to 12) I decided to flash the newer one. That was the first mistake.
This made the bootloop worse, and now it stuck in fastboot mode, no recovery. After many sleepless nights I found out that not every USB-C cable is equal, and I couldn't reach my phone via fastboot because of the cable itself. Tried it with the original cable, it sure showed up as a fastboot device.
So now I was able to flash an original fastboot ROM which still gave me bootloop, so I went wiping (not formatting, so the /sdcard fs doesn't gets erased) Data and Cache in TWRP.
Then reflashed the fastboot ROM, and somehow it worked. When It booted up, I had to type in my screen lock pin again, and after setup all my files were available.
Now that the phone worked again, I wanted to finish what I started, to update to latest EU (recovery) ROM. This was the second mistake. It did not work (because it required formatting data, which I did not wanted to, and just wiped it), and came bootloop again.
So I went back to the fastboot ROM again, which fixed the phone again.
But this time, it thought the internal storage was not encrypted, so it encrypted it again.
Now I can't access the internal storage. Even the camera app says that first I need an SD Card to take photos.
Its clearly still encrypted because when I browse it in TWRP, the structure and files are there, but the names are like "74t7Z1,dnvgIIexr1QAfhD".
The problem being neither the OS, nor TWRP knows the storage is encrypted double, so it doesn't even tries to decrypt it, and there are no options to do it.
Tried to set encryption in the running OS, but it gave me the same results: even tho TWRP asks for decryption key, and says it successfully decrypted, the storage is still a mess like its in encrypted state.
Is there any way to manually force some flag, so I can access my files again? I have the encryption key, I just need some way to decrypt the storage. I think of something like an ADB command to flag the partition as encrypted, so TWRP and OS would try to decrypt it.
Thanks in advance!
insetta said:
Long story short, I screwed up, and now I have an encrypted storage (with my files that I want back) but TWRP and the OS thinks it is not.
It goes like this:
The Magisk v22.0 update screwed up my phone, which stuck in a bootloop.
After countless tries with Magisk (updating, uninstalling. installing, removing mods, adding mods) in TWRP, I read somewhere to dirty flash the ROM.
Due to an HDD failure in my PC, I did not have any storage to back up my internal storage from the phone.
Because I wanted to update the ROM anyways (from MIUI 11 to 12) I decided to flash the newer one. That was the first mistake. This made the bootloop worse, and now it stuck in fastboot mode, no recovery. After many sleepless nights I found out that not every USB-C cable is equal, and I couldn't reach my phone via fastboot because of the cable itself.
Due to an HDD failure in my PC, I did not have any storage to back up my internal storage from the phone.
So now I was able to flash an original fastboot ROM which still gave me bootloop, but after wiping (not formatting, so the /sdcard fs doesn't gets erased) Data and Cache in TWRP.
Then reflashed the fastboot ROM, and somehow it worked. When It booted up, I had to type in my screenlock pin again, and after setup all my files were available.
Now that the phone worked again, I wanted to finish what I started, to update to latest EU (recovery) ROM. This was the second mistake. It did not work (because it required formatting data, which I did not wanted to, and just wiped it), and came bootloop again.
So I went back to the fastboot ROM again, which fixed the phone again.
But this time, it thinks the internal storage is not encrypted.
Now I can't access the internal storage. Even the camera app says that first I need an SD Card to take photos.
Its clearly still encrypted because when I browse it in TWRP, the structure and files are there, but the names are like "74t7Z1,dnvgIIexr1QAfhD".
The problem being neither the OS, nor TWRP knows the storage is encrypted, so it doesn't even tries to decrypt it, and there are no options to do it.
Tried to set encryption in the running OS, but it gave me the same results: even tho TWRP asks for decryption key, and says it successfully decrypted, the storage is still a mess like its in encrypted state.
Is there any way to manually force some flag, so I can access my files again? I have the encryption key, I just need some way to decrypt the storage. I think of something like an ADB command to flag the partition as encrypted, so TWRP and OS would try to decrypt it.
Thanks in advance!
Click to expand...
Click to collapse
Is twrp permanently installed
Austinredstoner said:
Is twrp permanently installed
Click to expand...
Click to collapse
No, its not.
Also, seems like the option to decrypt is not there because its being encrypted double. One with my original pin, and now with "default_password" since the encryption is forced in this ROM.
Trying to create any backup in TWRP now gives the "required key not available" error.
insetta said:
No, its not.
Also, seems like the option to decrypt is not there because its being encrypted double. One with my original pin, and now with "default_password" since the encryption is forced in this ROM.
Trying to create any backup in TWRP now gives the "required key not available" error.
Click to expand...
Click to collapse
Decryption only works when twrp permanently installed
Austinredstoner said:
Decryption only works when twrp permanently installed
Click to expand...
Click to collapse
Okay, I flashed TWRP.
Now I found that from shell, TWRP has a "decrypt" function, which I called, but no success
tucana:/ # twrp
TWRP openrecoveryscript command line tool, TWRP version 3.5.2_9-0
Allows command line usage of TWRP via openrecoveryscript commands.
Some common commands include:
install /path/to/update.zip
backup <SDCRBAEM> [backupname]
restore <SDCRBAEM> [backupname]
wipe <partition name>
format data
sideload
set <variable> [value]
decrypt <password> [USER ID]
remountrw
fixperms
mount <path>
unmount <path>
print <value>
mkdir <directory>
reboot [recovery|poweroff|bootloader|download|edl]
tucana:/ # twrp decrypt **********
Attempting to decrypt data partition or user data via command line.
Failed to decrypt data.
insetta said:
Okay, I flashed TWRP.
Now I found that from shell, TWRP has a "decrypt" function, which I called, but no success
tucana:/ # twrp
TWRP openrecoveryscript command line tool, TWRP version 3.5.2_9-0
Allows command line usage of TWRP via openrecoveryscript commands.
Some common commands include:
install /path/to/update.zip
backup <SDCRBAEM> [backupname]
restore <SDCRBAEM> [backupname]
wipe <partition name>
format data
sideload
set <variable> [value]
decrypt <password> [USER ID]
remountrw
fixperms
mount <path>
unmount <path>
print <value>
mkdir <directory>
reboot [recovery|poweroff|bootloader|download|edl]
tucana:/ # twrp decrypt **********
Attempting to decrypt data partition or user data via command line.
Failed to decrypt data.
Click to expand...
Click to collapse
Can u partition sd card if not can u install recovery ramdisk
Austinredstoner said:
Can u partition sd card if not can u install recovery ramdisk
Click to expand...
Click to collapse
What would be the purpose of partitioning the fs? Not to mention it would like cause data loss
insetta said:
What would be the purpose of partitioning the fs? Not to mention it would like cause data loss
Click to expand...
Click to collapse
That maybe true I can't think of anything else the only thing I can still think of is dm verify or vbmeta
Austinredstoner said:
That maybe true I can't think of anything else the only thing I can still think of is dm verify or vbmeta
Click to expand...
Click to collapse
"dm verify or vbmeta"
Sound familiar, please elaborate
insetta said:
"dm verify or vbmeta"
Sound familiar, please elaborate
Click to expand...
Click to collapse
How to enable and disable dm verity on android user build
How to enable and disable dm verity on android user build. adb root, adb disable-verity, adb enable-verity. remount failed: permission denied
5gnotes.com
Austinredstoner said:
How to enable and disable dm verity on android user build
How to enable and disable dm verity on android user build. adb root, adb disable-verity, adb enable-verity. remount failed: permission denied
5gnotes.com
Click to expand...
Click to collapse
Encryption / decryption of /sdcard partition relies on PIN/password set and stored in file /data/system/locksetting.db.
Neither AVB 1.0 ( AKA DM-Verity ) nor AVB 2.0 (read: Android Verified Boot - available only on project Treble devices) have anything to do with encryption / decryption of Android partitions: their purpose is the verification of the Android OS through the bootloader when phone gets started.
insetta said:
tucana:/ # twrp decrypt **********
Attempting to decrypt data partition or user data via command line.
Failed to decrypt data.
Click to expand...
Click to collapse
Look into Android's file /cache/recovery/log to get the reason why TWRP's decrypt fails.
Why not pull content of /sdcard to PC ( e.g. TAR-archived ) and then do a factory reset to get rid of the encryption?
jwoegerbauer said:
Look into Android's file /cache/recovery/log to get the reason why TWRP's decrypt fails.
Why not pull content of /sdcard to PC ( e.g. TAR-archived ) and then do a factory reset to get rid of the encryption?
Click to expand...
Click to collapse
Because pulling encrypted /storage is pointless. First I need to be able to decrypt them.
Because pulling encrypted /storage is pointless. First I need to be able to decrypt them.
Looked into the TWRP log, and seems like it uses the native android Keymaster HAL 4 to decrypt the storage, but it ran into some issues:
This is on TWRP boot:
Bash:
I:Setting up '/data' as data/media emulated storage.
I:mount -o bind '/data/media' '/sdcard' process ended with RC=0
I:mount -o bind '/data/media/0' '/sdcard' process ended with RC=0
I:File Based Encryption is present
e4crypt_initialize_global_de
Determining wrapped-key support for /data
fbe.data.wrappedkey = true
Wrapped key supported on /data
calling retrieveAndInstallKey
Key exists, using: /data/unencrypted/key
Using Keymaster HAL: 4 from QTI for encryption. Security level: TRUSTED_ENVIRONMENT, HAL: [email protected]::IKeymasterDevice/default
begin failed, code -62
Upgrading key in memory only: /data/unencrypted/key
upgrade_key failed, code -38
e4crypt_initialize_global_de returned fail
e4crypt_initialize_global_de
Determining wrapped-key support for /data
fbe.data.wrappedkey = true
Wrapped key supported on /data
calling retrieveAndInstallKey
Key exists, using: /data/unencrypted/key
Using Keymaster HAL: 4 from QTI for encryption. Security level: TRUSTED_ENVIRONMENT, HAL: [email protected]::IKeymasterDevice/default
begin failed, code -62
Upgrading key in memory only: /data/unencrypted/key
upgrade_key failed, code -38
e4crypt_initialize_global_de returned fail
And this is after I wanted to decrypt it:
Bash:
I:Command 'decrypt *************' received
I:Set page: 'singleaction_page'
I:operation_start: 'TWRP CLI Command'
Attempting to decrypt data partition or user data via command line.
E:Unexpected value for crypto key location
E:Error getting crypt footer and key
E:Could not get footer
Failed to decrypt data.
I:Done reading ORS command from command line
I:operation_end - status=0
I also would like to decrypt my phone. I have access to adb shell, fastboot and twrp. Is there any news on how to do it?

Hi. I need help with my phone regardarding installing a custom rom

Hi. So my device is POCO X3 NFC with device model SURYA and I am on android 11. So my problem is i can't flash a custom rom. I think i accidentally wiped my internal storage. Can someone help me? Can I still use my device? Should i still flash a disable dm verity?
also showing errors that follows
1. unable to decrypt FBE device
2. unable to update logical partition: /system_root
3. unable to update logical partition: /product
4. unable to update logical partition: /vendor
also tried flashing a few custom roms, still not working
hi. seems that i need to update my recovery (which i already did) but now its showing error installing zip file. what should i do? i think its about the partitions. how do you mount system partition to install zip file if this is the case, if not, help me IM GOING TO DIE HAHAHAHA
davepayra said:
also showing errors that follows
1. unable to decrypt FBE device
2. unable to update logical partition: /system_root
3. unable to update logical partition: /product
4. unable to update logical partition: /vendor
Click to expand...
Click to collapse
Did you ever resolve this? I"m having similar issues.....

[CLOSED] Decrypting Xiaomi Mi10T Pro Internal Storage

Hello guys,
I run into a problem recently were my device won't boot. I tried a plethora of different solutions but nothing worked, I will have to factory reset to fix the issue.
My problem right now is that I can't access my files to make a backup. On my computer the device is connected and recognized but I can't access it's files. I also have TWRP and in TWRP Recovery it's unable to mount the Internal Storage and it shows up as 0MB. After a lot of research what seems to be the problem is that my files are encrypted, I don't know why this is (I guess for protection) but I didn't have any problems before. To my understanding if the phone is booted up you can access the files but if it can't boot then they stay encrypted. The encryption key should still be in my phone since I haven't formated it.
So how can I decrypt my data so that I can backup my files ? there must be a way for cases like this when something happens and the device can't boot, since the key is in the device it's self and I have the phone I should be able to, I also have access to every single account (google, xiaomi etc.) that is associated with this smartphone. If for security reasons that is not possible, would an authorized repair center be able to do it with proof of purchase and ownership ?
I am not 100% sure of my os version but it was 12.5.x.x, I have the unofficial twrp 3.5.0_10-beta. USB Debugging is enabled. Any other information you might need I can provide!
Thanks a lot everyone !
Your phone basically uses FBE ( File-Based Encryption ) to encrypt /data partition. When you boot phone into Recovery mode then the recovery.fstab file gets read by system
If you take a look into this file then you can notice that /data partition isn't encrypted ( it's only flagged encryptable and NOT fileencryption ).
TWRP will ask for lock screen credentials used for decrypting userdata partition. on FBE encryption the partition is mounted and even with no credentials provided one should at least see encrypted files.
In your case it's bit more complicated as that device uses FBE + metadata encryption. while in TWRP provide recovery.log to see what is going on. (share link to pastebin.com with expiration date 1 month)
Code:
adb pull /tmp/recovery.log
Note: there exist no relation between (FDE) encryptable= and (FBE) fileencryption= flags, these flags aren't interchangeable.
https://github.com/mhmdeve/twrp_dev...-twrp/recovery/root/system/etc/twrp.fstab#L18
aIecxs said:
TWRP will ask for lock screen credentials used for decrypting userdata partition. on FBE encryption the partition is mounted and even with no credentials provided one should at least see encrypted files.
In your case it's bit more complicated as that device uses FBE + metadata encryption. while in TWRP provide recovery.log to see what is going on. (share link to pastebin.com with expiration date 1 month)
Code:
adb pull /tmp/recovery.log
Note: there exist no correlation between (FDE) encryptable= and (FBE) fileencryption= flags, these flags aren't interchangeable.
https://github.com/mhmdeve/twrp_dev...-twrp/recovery/root/system/etc/twrp.fstab#L18
Click to expand...
Click to collapse
Here is the pastebin: Recovery.log
I read somewhere that changing the flags would solve the problem, after looking into it I pretty much found out what you said.
I also have an updated thread, if you can take a look it has some extra information provided !
Updated Thread
Hello guys,So my devices is stuck in a bootloop, I want to reflash the ROM but I need a backup first.Things I've tried to fix bootloop that didn't work:
Re-flashed the boot.img
Re-flashed the vbmeta.img
Wiping cache through TWRP Recovery
Things I've tried to back up my data:
Going into TWRP to make a backup it reads: "Internal Storage (0MB)", when I try to mount system or data I get "Unable to mount."
When I use the Mount->Decrypt Data option it asks me for a password, I tried every password I ever had on the phone and any "default" ones I found online and nothing worked.
I tried the adb pull command from my computer I get: "0 files pulled, 0 skipped." and nothing gets copied over.
So I don't know where to go from here, I have some things I have yet to try like:
Re-flashing ROM (dirty flash)
Re-flashing ROM update
Flash TWRP Update (if any)
But I don't know if they're going to to anything or just waste my time. Also I am not sure any of the 3 options will 100% keep my data.I am not too worried about apps and settings but more about Photos, Videos, PDFs, TXTs and Downloads.
Any ideas on what I should do ? Thanks a lot !
My device: Xiaomi Mi 10T Pro
If Stock Recovery would be the default recovery - and not TWRP - then if ADB got successfully established there would be a chance to pull the data interested in.
Code:
I:Unable to decrypt metadata encryption
E:Unexpected value for crypto key location
E:Error getting crypt footer and key
Code:
I:operation_start: 'Repair Partition'
Repairing Data using fsck.f2fs...
I:Repair command: /system/bin/fsck.f2fs /dev/block/sda34
Info: No support kernel version!
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 4096
Info: total sectors = 28051451 (109575 MB)
Invalid SB CRC offset: 1205917355
Can't find a valid F2FS superblock at 0x0
Invalid SB CRC offset: 876348585
Can't find a valid F2FS superblock at 0x1
/system/bin/fsck.f2fs /dev/block/sda34 process ended with ERROR: 255
Unable to repair Data.
you have formatted userdata partition. your data is gone now...
Code:
I:operation_start: 'Change File System'
Formatting Data using mke2fs...
I:mke2fs command: mke2fs -t ext4 -b 4096 /dev/block/sda34 28051451
mke2fs 1.44.4 (18-Aug-2018)
Discarding device blocks: 4096/28051451 done
Creating filesystem with 28051451 4k blocks and 7020544 inodes
Filesystem UUID: c9db44bf-b076-41c6-b191-1013f3c1184e
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
Allocating group tables: 0/857 done
Writing inode tables: 0/857 done
Creating journal (131072 blocks): done
Writing superblocks and filesystem accounting information: 0/857 done
I:mke2fs -t ext4 -b 4096 /dev/block/sda34 28051451 process ended with RC=0
I:Cannot lookup security context for '/data'
Done.
to fix boot-loop, factory reset device and format userdata back to f2fs from fastboot.
Code:
fastboot format:f2fs userdata
fastboot format:ext4 metadata
jwoegerbauer said:
If Stock Recovery would be the default recovery - and not TWRP - then if ADB got successfully established there would be a chance to pull the data interested in.
Click to expand...
Click to collapse
of course not. stock recovery neither provides adb nor is able to decrypt data.
aIecxs said:
Code:
I:Unable to decrypt metadata encryption
E:Unexpected value for crypto key location
E:Error getting crypt footer and key
Code:
I:operation_start: 'Repair Partition'
Repairing Data using fsck.f2fs...
I:Repair command: /system/bin/fsck.f2fs /dev/block/sda34
Info: No support kernel version!
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 4096
Info: total sectors = 28051451 (109575 MB)
Invalid SB CRC offset: 1205917355
Can't find a valid F2FS superblock at 0x0
Invalid SB CRC offset: 876348585
Can't find a valid F2FS superblock at 0x1
/system/bin/fsck.f2fs /dev/block/sda34 process ended with ERROR: 255
Unable to repair Data.
you have formatted userdata partition. your data is gone now... factory reset device and format back to f2fs from fastboot.
Code:
I:operation_start: 'Change File System'
Formatting Data using mke2fs...
I:mke2fs command: mke2fs -t ext4 -b 4096 /dev/block/sda34 28051451
mke2fs 1.44.4 (18-Aug-2018)
Discarding device blocks: 4096/28051451 done
Creating filesystem with 28051451 4k blocks and 7020544 inodes
Filesystem UUID: c9db44bf-b076-41c6-b191-1013f3c1184e
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
Allocating group tables: 0/857 done
Writing inode tables: 0/857 done
Creating journal (131072 blocks): done
Writing superblocks and filesystem accounting information: 0/857 done
I:mke2fs -t ext4 -b 4096 /dev/block/sda34 28051451 process ended with RC=0
I:Cannot lookup security context for '/data'
Done.
Click to expand...
Click to collapse
But how ? I never formatted my data ?
you have formatted -> to ext2 -> to ext4 -> with the 'Change File System' option in TWRP
aIecxs said:
of course not. stock recovery neither provides adb nor is able to decrypt data.
Click to expand...
Click to collapse
It's NONSENSE what you tell here. It's not the 1st time you do so. Wondering why?
aIecxs said:
you have formatted -> to ext2 -> to ext4 -> with the 'Change File System' option in TWRP
Click to expand...
Click to collapse
That deletes your data ? I read it on a guide and it was not mentioned. I has 110+ GBs worth of files and the process was done in seconds, are you sure the data is gone ? Or that this was the cause ?
jwoegerbauer said:
It's NONSENSE what you tell here. It's not the 1st time you do so. Wondering why?
Click to expand...
Click to collapse
actually it's you repeating nonsense without reading explanations because usually you already "no longer participate in this thread"
https://forum.xda-developers.com/t/...e-is-stuck-on-boot-loop.4536965/post-87941947
btw should I remind you to forum rules
MikeChannon said:
14. Create only ONE User Account
You are allowed ONE User Account at XDA-Developers. If you create additional accounts, Moderators will disable them and your original account may also be disabled or infracted.
Click to expand...
Click to collapse
https://forum.xda-developers.com/t/xda-developers-forum-rules.4200559
Leonniar said:
That deletes your data ? I read it on a guide and it was not mentioned. I has 110+ GBs worth of files and the process was done in seconds, are you sure the data is gone ? Or that this was the cause ?
Click to expand...
Click to collapse
No, that wasn't the cause of boot-loop. but next time you must not follow random guides without understanding what you're actually doing. yes, formatting userdata partition deletes all data. it's too late now...
aIecxs said:
No, that wasn't the cause of boot-loop. but next time you must not follow random guides without understanding what you're actually doing. yes, formatting userdata partition deletes all data. it's too late now...
Click to expand...
Click to collapse
I was under the impression that changing the system file could be done without deleting the data, that's what the guide said and there was no warning or message regarding loss of data inside TWRP (for example there are a lot of messages in the WIPE section) so I figured it could work... I was out of options... damn...
So I am screwed pretty much ?
wording matters.
changing the system file could be done without deleting the data.
changing the file system of the partition not. this is common sense, no warning required.
my explanation: you don't know what a file system actually is (but then you're not in the position of dealing with file systems anyway)
https://forum.xda-developers.com/t/...ed-to-unlock-bootloader.4531349/post-87917999
that said, if it's any consolation to you, encryption of userdata partition was already corrupted beforehand. on (plain) FBE encryption some users could repair ext4 file system with e2fsck. your device is formatted f2fs which isn't as easy to repair as ext4.
'Repair Partition' fsck.f2fs could have worked in case the f2fs file system have had (minor) issues.
But in your case most likely (if I got the recovery.log right) the early metadata encryption was broken (maybe metadata partition faulty) so there were no chance to decrypt block device anyway, which is prerequisite for mounting/decrypting or even just repairing (FBE encrypted) userdata partition.
So the chances to recover any files were very low to zero from the beginning.
aIecxs said:
wording matters.
changing the system file could be done without deleting the data.
changing the file system of the partition not. this is common sense, no warning required.
Click to expand...
Click to collapse
Yeah I know, for real I don't know why I didn't realize. I've been changing file systems of USB Drives to use for softmoded consoles and I format them every time. Yet I didn't even realize I did the same here...
But yeah, since I didn't have much luck from the beginning I guess it just made it easier for me to delete my files...
Thanks for all the help and the explanations !
aIecxs said:
wording matters.
changing the system file could be done without deleting the data.
changing the file system of the partition not. this is common sense, no warning required.
my explanation: you don't know what a file system actually is (but then you're not in the position of dealing with file systems anyway)
https://forum.xda-developers.com/t/...ed-to-unlock-bootloader.4531349/post-87917999
that said, if it's any consolation to you, encryption of userdata partition was already corrupted beforehand. on (plain) FBE encryption some users could repair ext4 file system with e2fsck. your device is formatted f2fs which isn't as easy to repair as ext4.
'Repair Partition' fsck.f2fs could have worked in case the f2fs file system have had (minor) issues.
But in your case most likely (if I got the recovery.log right) the early metadata encryption was broken (maybe metadata partition faulty) so there were no chance to decrypt block device anyway, which is prerequisite for mounting/decrypting or even just repairing (FBE encrypted) userdata partition.
So the chances to recover any files were very low to zero from the beginning.
Click to expand...
Click to collapse
Hello and sorry for bothering you again.
I am currently trying to fix the bootloop, I formatted userdata back to f2fs but I noticed Cache is also on ext4 format, should I change that as well ?
Also on your original comment on how to fix bootloop you told me
aIecxs said:
factory reset device and format userdata back to f2fs from fastboot
Click to expand...
Click to collapse
But factory reset fails so I am changing the file system first before trying again.
I will also root my device again as soon as I have it up and running, will a factory reset be sufficient ? NO leftovers or anything ? Or should I go with "Format Data" or just wipe everything ?
And absolute last question, I am trying all this through TWRP Recovery. Will any of the above mentioned options (Factory Reset, Wipe Data, Format Data) delete TWRP as well ? As I said since I will root the phone again I would like to remove TWRP as well and do a clean install.
Thanks again !
Format Data is what I meant with factory reset. you can do it from TWRP. you haven't changed file system of cache therefore no need to change file system to f2fs.
aIecxs said:
factory reset device and format userdata back to f2fs from fastboot.
Code:
fastboot format:f2fs userdata
fastboot format:ext4 metadata
Click to expand...
Click to collapse
You won't lose root or TWRP, unless you restore backup of stock boot.img
aIecxs said:
Format Data is what I meant with factory reset. you can do it from TWRP. you haven't changed file system of cache therefore no need to change file system to f2fs.
You won't lose root or TWRP, unless you restore backup of stock boot.img
Click to expand...
Click to collapse
Oh so Formatting Data keeps magisk ?
So there is no need for clean install of TWRP or Root ? I just update anything if needed and I am good to go ?
Edit:
After rebooting the device and trying to re-activate it with my Mi Account I can't connect to the internet. SIM Card is inserted, I was not asked for a pin and it shows no signal (there is definitely signal). Turning on wifi shows 0 available networks even tho there are plenty. Any idea why ?
you lose Magisk superuser but you won't lose root. just install apk from github again.
the other issue sounds like you lost baseband, probably due booting into wrong slot.

Categories

Resources