[Q] Soft Brick. Looking for ideas - General Questions and Answers

My ZTE Awe (Virgin Mobile) soft bricked over the weekend. It spontaneously rebooted and got stuck at the green android logo. If I wait an hour, it finally coughs a generic error, then reboots. I have CWM recovery installed and am able to get into that, though it still takes an hour. It is also rooted.
I initially tried wiping cache, followed by dalvik cache, then wiping the factory data partition and factory reset. None were successful.
If I boot into CWM recovery I can get into it using ADB and have been able to determine that there are several bad blocks on the data partition (userdata) causing it not to mount. I have also tried to install TWRP and the AWEsome ROM (modified, rooted ROM for the ZTE Awe). TWRP seems to install, but it isn’t (tried rebooting to it – no dice). The install of the Awesome ROM bombs out with an error about set_perms on the data partition. I tried pushing them via SD card and sideload – same errors.
My next attempt was going to be to completely wipe the data partition using dd then use mke4fs to recreate the data filesystem (I figured the data there is lost anyway).
Unless someone has a better idea.

Depending on the flash organization, having bad blocks may be a completely fail for you.
If those bad blocks are located as a single cluster and you can re-partition your flash around it, then it may work. Otherwise, you are probably looking into replacing the phone to something else.

Yes I think the only way is try to repartition the data but if there are corrupted sectors you have to eliminate them. Be carefully because a non correct repartition can brick your device irreversibly!

vime81 said:
Yes I think the only way is try to repartition the data but if there are corrupted sectors you have to eliminate them. Be carefully because a non correct repartition can brick your device irreversibly!
Click to expand...
Click to collapse
Any ideas on how best to accomplish that effort? I've tried the factory reset from CWM recovery and it seems to pass, but doesn't. I also attempted to run 'recovery --wipe_data' from inside the adb shell. Nothing seems to work. Next, I was planning to try 'dd if=/dev/zero of=[partition]', then run 'mke4fs'.
What do you think?

briansrapier said:
Any ideas on how best to accomplish that effort? I've tried the factory reset from CWM recovery and it seems to pass, but doesn't. I also attempted to run 'recovery --wipe_data' from inside the adb shell. Nothing seems to work. Next, I was planning to try 'dd if=/dev/zero of=[partition]', then run 'mke4fs'.
What do you think?
Click to expand...
Click to collapse
Probably you don't have another chance, the system needs to repartition the data eliminating corrupted sectors...
Try this:
cat /proc/partitions
and this:
"Even more useful information can be obtained from parted. An example when the block device is /dev/block/mmcblk0:
~ # parted /dev/block/mmcblk0 print
Model: MMC SEM04G (sd/mmc)
Disk /dev/block/mmcblk0: 3959MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
10 524kB 1573kB 1049kB PIT
6 1573kB 3146kB 1573kB CSPSA FS
7 4194kB 14.7MB 10.5MB ext4 EFS
2 14.7MB 31.5MB 16.8MB ext4 Modem FS
14 32.5MB 34.6MB 2097kB SBL
16 34.6MB 36.7MB 2097kB SBL_2
1 36.7MB 53.5MB 16.8MB PARAM
12 53.5MB 55.6MB 2097kB IPL Modem
13 55.6MB 72.4MB 16.8MB Modem
15 72.4MB 89.1MB 16.8MB Kernel
17 89.1MB 106MB 16.8MB Kernel2
3 106MB 748MB 642MB ext4 SYSTEM
5 748MB 2056MB 1309MB ext4 DATAFS
4 2056MB 2377MB 321MB ext4 CACHEFS
9 2377MB 2713MB 336MB ext4 HIDDEN
11 2713MB 2765MB 52.4MB Fota
8 2765MB 3949MB 1184MB UMS
~ #"

Related

[REF] Fix internal SD partitions

DISCLOSURE: Not responsible for you being retarded and breaking what doesn't need fixed.
DISCLOSURE 2: Do not use this on the O2x as it has a slightly different partition table.
Here is my step by step for repairing the internalsd Partitions... I don't think I've forgotten anything in this. If anyone knows how to write this into a .zip for flash via CWR it would be great. Credit goes to TeamWhiskey for helping me out when I screwed my partition table up...
WARNING: This can destory your internalSD card partitions. If it's not broke don't fix it!
ALL ENTRIES ARE IN RED
I am not responsible for any damage you do to your phone.
I did this same thing to my phone... I was still able to get into recovery though. You can repair the internal partitions through ADB if you can still get into recovery.
Steps to recreate partitions.
Boot into recovery
from your PC open cmd prompt
change to your ADB directory
run adb shell
mkfs /dev/block/mmcblk0
fdisk -H 1 /dev/block/mmcblk0
if the above fails try fdisk -l /dev/block/mmcblk0
then fdisk -H 1 /dev/block/mmcblk0
once in the fdisk of ../mmcblk0 you might as well delete all the partitions if you believe that they are corrupted
d
1
repeat for partition 2-8
one all of your partitions are gone you now have a blank internal SD and will need to execute the following to restore all the proper partition sizes
Partition 1
n
p
1
First Cylinder start 129
First Cylinder stop 55168
We will repeat this for partitions 2 and 3
Partition 2
n
p
2
Start 55169
Stop 63360
Partition 3
n
p
3
Start 63361
Stop 63616
On to partition 4 which will be extended (this is the last partion you will choose primary or extended)
Partition 4
n
e
4
Start 63617
Stop 975424
Now onto partition 4-8 which are automatically selected as logicall partions (no option is given)
Partition 5
n
Start 63681
Stop 64704
Partition 6
n
Start 64769
Stop 65088
Partition 7
n
Start 65153
Stop 261760
Partition 8
n
Start 261825
Stop 975424
Once you have done this the partitions are ready to be written to the internalSD
I would recommend choosing the command p to verify that all of your start and stop blocks are correct.
From this point you have the option to either quit without saving changes "q" or to write the partition table itself "w". Once you are sure that you have entered all of your partitions correctly you can choose the command w
At this point you have recreated all the partitions on your InternalSD card. If you have a nandroid backup at this point you should be able to restore it without a problem once you copy it over to the internal or external (depending on which CWR you are running).
I didn't have to go through the format portion of the fdisk as I had a nandroid backup which formats all the partitions itself.
If I've forgotten any steps please feel free to comment and include them.
Thanks to TeamWhiskey for helping me resolve this issue when I had it...
Don't forget to click the Thanks button if this helped...
When i get to
Code:
fdisk -h 1 /dev/block/mmcblk0
I get
Code:
unknown option -- hBusyBox v1.16.2androidminimal (2010-03-28 22:34:51 EDT) multi
-call binary.
Did i do anything wrong ?
exPos3D said:
When i get to
Code:
fdisk -h 1 /dev/block/mmcblk0
I get
Code:
unknown option -- hBusyBox v1.16.2androidminimal (2010-03-28 22:34:51 EDT) multi
-call binary.
Did i do anything wrong ?
Click to expand...
Click to collapse
My apologies it is the correct code but should be
Code:
fdisk -H 1 /dev/block/mmcblk0
"I sometimes forget linux commands are case sensitive"
After doing all the steps
When its time to write the tables by executing the "w" command i get this error
Code:
Command (m for help): w
w
The partition table has been altered!
Calling ioctl() to re-read partition table
fdisk: WARNING: rereading partition table failed, kernel still uses old table: D
evice or resource busy
exPos3D said:
After doing all the steps
When its time to write the tables by executing the "w" command i get this error
Code:
Command (m for help): w
w
The partition table has been altered!
Calling ioctl() to re-read partition table
fdisk: WARNING: rereading partition table failed, kernel still uses old table: D
evice or resource busy
Click to expand...
Click to collapse
seems as if I may have forgotten a step but I don't think that I did....
before doing the fdisk command try
Code:
mkfs /dev/block/mmcblk0
if that doesn't work goin into your adb shell and do an
Code:
fdisk -l /dev/block/mmcblk0
and
Code:
fdisk -H 1 /dev/block/mmcblk0
p
and paste the output
It worked thanks but now my sdcard still wont mount for any of my apps, or camera. I can add items to my sd card and install to it, but it still wont mount
I'm not in this area so i do not know where to find files ADB on my computer. If you have time, can you be more detailed instructions to help me ? thank you very much . I waiting for your answer,.
chulun9999 said:
I'm not in this area so i do not know where to find files ADB on my computer. If you have time, can you be more detailed instructions to help me ? thank you very much . I waiting for your answer,.
Click to expand...
Click to collapse
Please use the search function....
http://www.xda-developers.com/android/adb-easy-tutorial/
So I can boot into CWM, but when I try to use ADB it says "Device not found" ...
The phone will boot into the o2x OS, but I get no cell signal. When it boots into the OS, ADB finds it no problem.
Any suggestions?? Does ADB work with all versions of CWM??
Thanks so much for the partition table info!
Try this ... Stock nandroid
Command in windows
Can you post the command you mentioned for linux , to do it in windows . Am using windows 7 . LG update tool screwed my mobile and i have to proceed only with restoring the partition tables .
casper200519 said:
DISCLOSURE: Not responsible for you being retarded and breaking what doesn't need fixed.
DISCLOSURE 2: Do not use this on the O2x as it has a slightly different partition table.
Here is my step by step for repairing the internalsd Partitions... I don't think I've forgotten anything in this. If anyone knows how to write this into a .zip for flash via CWR it would be great. Credit goes to TeamWhiskey for helping me out when I screwed my partition table up...
WARNING: This can destory your internalSD card partitions. If it's not broke don't fix it!
ALL ENTRIES ARE IN RED
I am not responsible for any damage you do to your phone.
I did this same thing to my phone... I was still able to get into recovery though. You can repair the internal partitions through ADB if you can still get into recovery.
Steps to recreate partitions.
Boot into recovery
from your PC open cmd prompt
change to your ADB directory
run adb shell
fdisk -h 1 /dev/block/mmcblk0
once in the fdisk of ../mmcblk0 you might as well delete all the partitions if you believe that they are corrupted
d
1
repeat for partition 2-8
one all of your partitions are gone you now have a blank internal SD and will need to execute the following to restore all the proper partition sizes
Partition 1
n
p
1
First Cylinder start 129
First Cylinder stop 55168
We will repeat this for partitions 2 and 3
Partition 2
n
p
2
Start 55169
Stop 63360
Partition 3
n
p
3
Start 63361
Stop 63616
On to partition 4 which will be extended (this is the last partion you will choose primary or extended)
Partition 4
n
e
4
Start 63617
Stop 975424
Now onto partition 4-8 which are automatically selected as logicall partions (no option is given)
Partition 5
n
Start 63681
Stop 64704
Partition 6
n
Start 64769
Stop 65088
Partition 7
n
Start 65153
Stop 261760
Partition 8
n
Start 261825
Stop 975424
Once you have done this the partitions are ready to be written to the internalSD
I would recommend choosing the command p to verify that all of your start and stop blocks are correct.
From this point you have the option to either quit without saving changes "q" or to write the partition table itself "w". Once you are sure that you have entered all of your partitions correctly you can choose the command w
At this point you have recreated all the partitions on your InternalSD card. If you have a nandroid backup at this point you should be able to restore it without a problem once you copy it over to the internal or external (depending on which CWR you are running).
I didn't have to go through the format portion of the fdisk as I had a nandroid backup which formats all the partitions itself.
If I've forgotten any steps please feel free to comment and include them.
Thanks to TeamWhiskey for helping me resolve this issue when I had it...
Click to expand...
Click to collapse
Can you post the commands to do it from windows ?
bibinkalarikkal said:
Can you post the commands to do it from windows ?
Click to expand...
Click to collapse
Read and go step by step, these are for windows
Sent from my LG-P999 using XDA Premium App
Is there a way to use this app to create one partition just for user app storage? I don't want or need an internal sdcard partition!
Sent from my LG-P999 using xda premium
DUDE!!
Thanks to your instructions and one hour of simple restoration work and my G2X was back in the game. This is for those not faint of heart, but if you've made it far enuff to delete your Internal partitions...Then you could handle these instructions...
PROPZ!!!!
I couldn't do it.When I wrote fdisk -h 1 /dev/block/mmcblk0 to adb shell there was 4 different options.
Usage:fdisk [-ull] [-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b DISK
Change partition table
-u Starts and End are in sectors <instead of cylinders>
-l Show partition table for each DISK, then EXIT
-b 2048 <for certain MO disks>use 2048-byte sectors
-C CYLINDERS Set number of cylinders/heads/sectors
-H HEADS
-S SECTORS
~ #
I don't know what to do.Can you please help me with this?
I tried this because my device was failing while OneClickRecoveryFlash. NVError 0x120000
I'm about to get a g2x, however I have a question..
What causes bad partitioning table? Or messed up partition table?
nitrogen618 said:
I'm about to get a g2x, however I have a question..
What causes bad partitioning table? Or messed up partition table?
Click to expand...
Click to collapse
Flashing a G2X or WIND Optimus 2X which are the same LG-P999 handset with anything for the Optimus 2X (O2X) which is the LG-P990. They use the same internal hardware except for the cell radio modem and use different partition tables so their firmware and ROMs are incompatible. When the LG-P999 is flashed with LG-P990 stuff the LG-P999 will boot as an LG-P990 but there won't be any cell services.
Another reason is an incomplete flashing with LG-P999 firmware.
Core Memory said:
Flashing a G2X or WIND Optimus 2X which are the same LG-P999 handset with anything for the Optimus 2X (O2X) which is the LG-P990. They use the same internal hardware except for the cell radio modem and use different partition tables so their firmware and ROMs are incompatible. When the LG-P999 is flashed with LG-P990 stuff the LG-P999 will boot as an LG-P990 but there won't be any cell services.
Another reason is an incomplete flashing with LG-P999 firmware.
Click to expand...
Click to collapse
Ah, so basically they flashed a p990 rom on a p999.
Another question, when flashing a new rom on cwm you do
-clear data/factory reset
-clear cache partition
-clear dalvik cache
-install rom from sd
Right?

[Q] [Solved] Potentially bricked my tf700? Missing partitions

Hey all,
Long term creeper, infrequent poster. Would appreciate some guidance on whether my tf700 is recoverable or not.
After installing TWRP 2.8.1.0 to get a f2fs recovery for a fresh Cromi-KK flash, I went through a full wipe of all partitions. I was going to do this before converting the partitions to f2fs. I'd done it 20 minutes before but botched a step and had to start over. Everything was working before I began the wipe. About 15 minutes in I was growing concerned about the length of time and did a quick "adb devices".
Screen turns black for about 5 seconds and then vibrates. Tablet has rebooted. Damn. I'm pretty sure that's a bad sign. Bootup hangs after the four penguins (Cromi) and I see messages about items not available. I give it 10 minutes but it's not going anywhere. I'm able to power+volDown and boot into TWRP no issues. But that's where the problems begin. Most operations fail because:
Code:
E:Unable to mount '/system'
E:Unable to mount '/cache'
E:Unable to mount '/data'
E:Unable to mount storage
A quick cat /proc/partitions show:
Code:
179 0 31039488 mmcblk0
179 32 2048 mmcblk0boot1
179 16 2048 mmcblk0boot0
And no, I don't have NVflash access or backups
Any suggestions?
D
Can you still boot into the bootloader or is TWRP the only thing you can boot into?
BTW: You don't convert partitionS to f2fs. Only data gets converted to f2fs if you want to run that.
A full wipe in TWRP 2.8+ can take 90 minutes. It does a secure erase and that takes time.... You interrupted it which ain't good.
If you still can access the bootloader, reflash TWRP and try to format data. Let us know where that gets you.
Can you still boot into the bootloader or is TWRP the only thing you can boot into?
Click to expand...
Click to collapse
I can. No issues there.
If you still can access the bootloader, reflash TWRP and try to format data. Let us know where that gets you.
Click to expand...
Click to collapse
I was able to access the bootloader, reflash TWRP 2.8.1.0 again, and tried to format /data. It failed. So I rebooted to recovery once more and tried to format /data. That time it succeeded. I went through the whole process again and the above steps are 100% reproducible every time.
Output after data format:
Code:
Updating partition details...
Full SELinux support is present.
MTP Enabled.
Formatting Data using make_ext4fs function.
You may need to reboot recovery to be able to use /data again.
Updating partition details...
and the prompt for "Back"
dnaod said:
I can. No issues there.
I was able to access the bootloader, reflash TWRP 2.8.1.0 again, and tried to format /data. It failed. So I rebooted to recovery once more and tried to format /data. That time it succeeded. I went through the whole process again and the above steps are 100% reproducible every time.
Output after data format:
Code:
Updating partition details...
Full SELinux support is present.
MTP Enabled.
Formatting Data using make_ext4fs function.
You may need to reboot recovery to be able to use /data again.
Updating partition details...
and the prompt for "Back"
Click to expand...
Click to collapse
Hmmm - no idea what that could be, but in recovery you should have adb access.
In an adb shell try this to format the data partition:
Code:
[FONT=Arial]make_ext4fs /dev/block/mmcblk0p8
[/FONT]
berndblb said:
Hmmm - no idea what that could be, but in recovery you should have adb access.
In an adb shell try this to format the data partition:
Code:
[FONT=Arial]make_ext4fs /dev/block/mmcblk0p8
[/FONT]
Click to expand...
Click to collapse
I'm gobsmacked, confused, and grateful. After that command, this is now my partitions... Someone will one day have to explain to me how manually formatting the one partition recreated all of the other ones. My only guess is that the adb shell format is different from the TWRP format and somehow repaired the partition table?
Code:
179 0 31039488 mmcblk0
179 1 786432 mmcblk0p1
179 2 438272 mmcblk0p2
179 3 2048 mmcblk0p3
179 4 835584 mmcblk0p4
179 5 5120 mmcblk0p5
179 6 512 mmcblk0p6
179 7 5120 mmcblk0p7
179 8 28924416 mmcblk0p8
179 9 8192 mmcblk0p9
179 10 8192 mmcblk0p10
179 32 2048 mmcblk0boot1
179 16 2048 mmcblk0boot0
I'm going to put on Cromi-KK to verify that everything works as planned and then do some overdue reading on backing up using the NvFlash tool. If it all works out, I'll update this thread.
Thanks,
D
dnaod said:
I'm gobsmacked, confused, and grateful. After that command, this is now my partitions... Someone will one day have to explain to me how manually formatting the one partition recreated all of the other ones. My only guess is that the adb shell format is different from the TWRP format and somehow repaired the partition table?
Click to expand...
Click to collapse
LOL - my best guess is: They were there the whole time! TWRP just couldn't mount them :cyclops:
Glad to see you up and running.
BTW, it doesn't hurt to hit the Thanks button on posts that do....
[Solved] Potentially bricked my tf700? Missing partitions
Looks like everything is up and running great with f2fs on /data as well. Once again thanks and the Thanks buttons have been properly pressed
BTW...
berndblb said:
BTW: You don't convert partitionS to f2fs. Only data gets converted to f2fs if you want to run that.
Click to expand...
Click to collapse
This one little line was very helpful. I've been flashing ROMs from the HTC Universal days (yeah... I didn't actually create an XDA account until a few years ago though). I've read and reread the f2fs documents and posts and never quite felt comfortable that there's a good step-by-step overview on exactly how to do it.
D
dnaod said:
Looks like everything is up and running great with f2fs on /data as well. Once again thanks and the Thanks buttons have been properly pressed
BTW...
This one little line was very helpful. I've been flashing ROMs from the HTC Universal days (yeah... I didn't actually create an XDA account until a few years ago though). I've read and reread the f2fs documents and posts and never quite felt comfortable that there's a good step-by-step overview on exactly how to do it.
D
Click to expand...
Click to collapse
Thanks for the buttons
If you think about it, it makes sense: f2fs improves the way data is written to flash memory and also the "garbage collection" process or how blocks on the emmc are reclaimed when no longer in use. Or that is my very rudimentary understanding of it.....
So it's all about improving write speeds to flash memory. /data is the only partition (in normal use) that gets constantly written to.
/system is normally read-only, so f2fs on /system would not improve performance at all. It's pointless.
The easiest way to change data to f2fs is in TWRP 2.8.x. That option can be found under the Wipe > Format menu.
The latest version(s) of Gparted also support it if you want to format the external /data on your microSD for a data2sd/rom2sd installation.
There's not much to write for a step-by-step:
Backup all your data on /data (= /sdcard)
Format /data to f2fs in TWRP (internal SD) or Gparted (external SD)
Reflash your rom
Restore your data
Edit: Yes, there's a way to use TWRP to format an external microSD /data partition - but that is another story :cyclops:
Format /data to f2fs in TWRP (internal SD) or Gparted (external SD)
Click to expand...
Click to collapse
This is the golden line. Once I found that option in TWRP 2.8.x, it all came together.

[Q] [BRICK'd?] Can't mount /data /cache /system

One day, about 2-3 weeks ago, on my way to home, I decided to install an other ROM (5.1.1 ivanchi -> CM9). Went straight into recovery (TWRP 2.8.5 or 6) and formatted everything except microsd, everything seemed to go as planned. Then proceeded to install the ROM; it gets stuck, can't get pass the booting screen even after 20-30 minutes. Force-Reboot into recovery and receive "unable to mount /data | /system | /cache error". Tried changing fs-type of /data /cache /system to any other type, no success.
Got back home, tried installing RUU. Got stuck at 39%. every. single. time. !! Tried an older RUU, same response.
Then tried even oem lock + flash recovery_signed.img + boot boot.img with fastboot and then RUU install. Then again with unlocked bootloader. Still no! But, I didn't tried lock + recovery signed + boot + S-On, because I am afraid not to be able to regain S-Off at this state.
Even tried a parted format, implying that one guy managed to make it work in the end. See topic here : link.
Tried doing guy's steps but after parted /dev/block/mmcblk0 I receive Error: Can't have overlapping partitions. Tried then parted /dev/block/mmcblk0p23 (userdata), it works, and if I try mkfs/rm on partition 1, it says it's in use (p23p1 ...).
Output:
~ # parted /dev/block/mmcblk0p23
parted /dev/block/mmcblk0p23
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0p23
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
print
Model: Unknown (unknown)
Disk /dev/block/mmcblk0p23: 1253MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 1253MB 1253MB ext4
(parted) rm
rm
rm
Partition number? 1
1
1
Error: Partition /dev/block/mmcblk0p23p1 is being used. You must unmount it
before you modify it with Parted.
(parted) mkfs
mkfs
mkfs
Warning: The existing file system will be destroyed and all data on the
partition will be lost. Do you want to continue?
Yes/No? yes
yes
yes
Partition number? 1
1
1
Error: Partition /dev/block/mmcblk0p23p1 is being used. You must unmount it
before you modify it with Parted.
I can format my /data /system /cache one at the time, after doing reboot recovery and that's only in CWM 6.0.1.2. But this CWM isn't able to install ROMs somehow, wether it gets stuck of just plain fails. So, if I want to install a ROM, after the format, I have to install 4Ext (latest) recovery and do it there. Install everything from recovery, boot, sign in for GApps etc etc and while trying to install apps from Google Play, after about 4 to 6 apps, it gives a black screen, leaving no option but remove battery and reboot. Do that and get stuck on bootsplash / bootscreen. Everytime!
If then I try formatting paritions using 4Ext most of the time it fails, making them unmountable again after all.
Tried everything mentioned running PG58IMG with firmware 3.33, Hboot 1.27.1100, worldwide english (.104.). Tried fashing rom.zip as the PG58IMG.zip from fastboot in rebootRUU (gets stuck at [RUU]WP,dzdata,0) and now even from sdCard (gets stuck at [6] USERDATA).
I dug furthermore into bricked Sensation, seeing a QHSUSB brickbug (thread). It is refeered to be a bootloader brickbug; problem which I am not facing right now. Eventho, followed OP's instruction my freshly installed Ubuntu 14.04 can't detect my HTC. Also did some of the YouTube instructions, connecting sdcard's plate with lower pin from the back (trolled?!) (video), yet nothing.
Out of disperation, asked hinxnz and rzr86, and both of you adviced me to try thread 1 or 2 (relying on sdCard as primary/sec partitions). Good advices but I don't consider this be the best solution for this problem; STILL HAVE HOPE MAKING INTERNAL SD TO WORK! :d
ASK ME ANYTHING REGARDING MY PROBLEM! Will post every bit of information you consider relevant.
PLEASE HELP!
u tried ruu, didnt work, tried firmware, didnt work. @rzr86 and @hinxnz gave u those guides coz its the only known way to fix/bypass that problem on xda. maybe there is another way but no one has found it yet. u could take ur phone to a repair shop, pay bout a hundred bucks, connect it to jtag and hope for the best, but that might not even flash partitions back.
personally i dont see how twrp is still allowed to be downloaded on xda in the sensation thread coz it keeps killing peoples phones. that jus my opinion tho.
Atm my phone is literally bricked, QHSUSB brick because of my stupidity... Maybe I will make it to work again; anyways...
For the partition problem, don't the HTC has some kind of .pit files like Samsung does? They should! Also, what if someone with a 'healthy' Pyramid does a dd of the /dev/block/mmcblk* for those with fk'd partitions to use ?
Hi, one more here with wrecked partitions by TWRP factory reset....
Trying to Ruu the Sensation, but RUU has been getting stuck in the process ... I'll edit if I success.
Thanks for all the info out htere!
Edit: no success, even tried at last to fix partitions (parted and fdisk) via ADB, device is now dead. So sad HTC or any ever gave the details for the partition table, a simple script might have solved this.
I'm just catching up on this one.
If I read this right,the information on the partitions was trashed by TWRP recovery?
There was a member that stated the HTC Desire used to be able to have it's partitions reconfigured,IIRC.
Perhaps this is the first step to achieving that with the Sensation?
Sent from my SM-N915W8 using XDA-Developers mobile app
I'm too woried nowadays....i got the error can't mount system,data,cache inmy xolo a600...i can't flash custom rom or can't do factory data reset...but when i try to factory reset using my stock firmware recovery it's done...but in twrp & cwm recoverys say can't mount system,data,cache...i also can't connect my device to pc using usb mode,mtp...my pc said unknown device detected...what to do?...i just really tired & tensed please please please guys give me the solution...please...!!

[GUIDE] Repartition your gpt partitioned device after custom rom install(Huawei Y6)

This guide was written for the Huawei y6 with a gpt partition table, mounts that use partition names not numbers and the userdata partition is the last one on disk however with a little adaption this should work for most gpt devices.
If you are unsure if your system uses partition names for the mount system look in /fstab."hardware" to see if your devices are labelled in the following manner. "/dev/block/bootdevice/by-name/system".
If the fstab file does not exist all is not lost look in your root directory at the .rc files for the command mounting system.
If you are unsure ask in the thread before doing anything. Better to ask than be stuck with a brick.
This guide covers modification to only system and userdata partitions but if you use great care the basics covered here will allow for modification to other partitions as long as you understand the risk and know that backups are your friend.
If you are unable to follow instructions and end up with a bricked device that is your own fault and attempts to blame me will be laughed at.
I obtained the attached parted binary from here
So you have flashed a custom ROM and without all the OEM bloatware you now have some unused free space in your system partition just sitting there gathering dust.
You are stuck with this space... Wrong.
You can repartition your device with a little paitence, time and work.
Read along if you are curious about how to get the space you deserve.
Prerequisites:
Free space (Duh).
The ability to follow instructions and to read ALL steps before you start so you know what your plan is.
An unlocked bootloader which you already have if you flashed a custom ROM.
A custom recovery (twrp preferred).
Parted binary (see attachment at the bottom of this post).
A computer with adb installed and working (there are many guides out there if you don't have it, Google is your friend).
A calculator (well I'm sure your computer has one but just so you know).
Some knowledge using terminal commands.
Risk of Bricking your device:
Low if you backup and can double check typing and calulations.
High if you can't do one of the above.
Because parted does not allow resizing of ext4 partitions you must delete partitions you want to change then recreate them.
All steps must be performed while in recovery because you are going to have to unmount any partition before you can change it.
Step 1:
Boot into recovery and make a backup. You MUST do this otherwise you will have nothing to restore.
Step 2:
Plug your device into your computer.
Copy the parted binary into your working directory on your PC.
Open your Command Prompt (Windows) or Terminal (Linux) and navigate to where adb is installed and you also put parted, or if you have adb in your PATH just go to where parted is.
Run
Code:
~ # adb devices
to ensure your device is present.
Run
Code:
~ # adb root
to get root priviliges.
Run
Code:
~ # adb push parted /sbin/parted
/sbin is in your devices PATH so you don't have to worry about typing /parted.
Run
Code:
~ # adb shell
Run
Code:
~ # chmod 755 /sbin/parted
If you get an error about a read only file system run
Code:
mount -o remount,rw /
then try again.
Step 3: Now you need to do some homework to find your sector size, sector count and how much free space you have available.
DO NOT shrink your filesystem to smaller than you need to operate. I always add at LEAST 50 mb to the used space however I recommend you think for the future, are you planning on restoring to stock?, are you planning on flashing OpenGAPPS?, are you planning on moving third party apps into the system?, are you planning on adding media or custom boot animations to the system?
So in the case below I would not make the partition any smaller than 800 MB.
Code:
~ # df
Filesystem Size Used Free Blksize
/system 1.2G 748.5M 441.8M 4096
/data 5.2G 3.5G 1.6G 4096
/cache 147.2M 4.7M 142.5M 4096
Now issue the following command to get your disks sector size in bytes remember to note this down.
Code:
~ # blockdev --getss /dev/block/mmcblk0
512
Time to use parted.
Issue the following commands to get some info on your current partitions.
"unit s" tells parted to show sectors instead of blocks, bytes etc.
Code:
~ # parted /dev/block/mmcblk0
(parted) unit s
(parted) print
Number Start End Size File system Name Flags
22 876562s 1191132s 314571s ext4 cache
23 1191133s 3990839s 2799707s ext4 system
24 3990840s 15269854s 11279015s ext4 userdata
Remember to not the partition number as you will need it later.
Remember to note your partition name with exact case, if you changed "system" to "System" you will have problems.
Also note the start sector of your system partition for the later steps.
Also note the end sector number for your userdata partition for the later steps.
Now get your calulator ready.
Some things to keep in mind here are that the number of sectors times sector size is the size of your partition in bytes and your starting sector must be 1 after the end of the previous partition.
So the following equation will give you the numbers you need.
Desired size in MB * 1024 * 1024 / Sector Size = Number of sectors
Starting sector + Number of sectors - 1 = Last Sector
If you want a 1.1 Gb partition, you have 512 byte sectors and the starting sector is 1191133 you would then use the following equation.
1100 * 1024 * 1024 / 512 = 2252800
1191133 + 2252800 - 1 = 3443932
Step 4:
Now using the info you have gathered you can change your partitions.
So I would issue the following commands to delete, create and name the system partition with the size I want.
Code:
(parted) rm 23
(parted) mkpart 23 ext4 1191133 3443932
(parted) name 23 system
Now to resize the data partition.
You need to start with the first available sector after the end of system and end with the last available sector noted earlier.
Code:
(parted) rm 24
(parted) mkpart 24 ext4 3443933 15269854
(parted) name 24 userdata
Now that your partitions are all done you can exit parted with the following.
Code:
(parted) quit
Step 5:
Now restore the backup you made earlier.
If you get an error restoring which usually only happens if you have altered partition numbers just reboot back into recovery and restore then so the kernel gets to update its own info.
Reboot.
Congratulations you now have repartitioned your device.
Don't forget to thank this post if you are grateful.
Is there anything diferent to do about moderm mmcblkop14(/firmware)? I want to reduce it to 100 mb but i noticed its blocksize it's different from the others (others =4096, firmware=16384). I saw in your pictures you reduce it, so i will try it to do that. I have a nandroid so i hope this try works.
OK, i should probably been the first idiot to bricked his phone by reading a tutorial.
I need some help. I was trying to make this extra space and i have a few problems during the process.
First of all, in my case i have a partition 23 called cust, exactly the same in size with the cache. So i started with the cache calculating and then the other 3( 23 cust, 24 system, 25 userdata). For that moment i already made my nandroid, buy for some stupid reason I saved to my pc.
My problems came when i began with step 4. When i tried to put the cache it told me that it can't do it because it was in use. So i twrp y put on mount and desmounted that partition and then i could keep going. Same thing happened with Data partition, i did the same.
Finally, i did it all the tutorial, just needed to restore as it said in step 5 because i didn't have it in my phone. So i tried with adb push but nothing and i couldn't mount again those partition with twrp. Then, in a desperate move, i tried to reflash my cm rom, so i did that. And later, it bootloop with te huawei logo and i can´t flash a rom o restore my nandroid. It doesn't read a sdcard.
And now, when i see the script in twrp (sorry i don't know how is the name, i talking about the center botton in twrp) it appears in red "unable to mont '/data', '/system', '/cache'.
I don't know what to do, really, i need a hand.
beatLeo said:
OK, i should probably been the first idiot to bricked his phone by reading a tutorial.
I need some help. I was trying to make this extra space and i have a few problems during the process.
First of all, in my case i have a partition 23 called cust, exactly the same in size with the cache. So i started with the cache calculating and then the other 3( 23 cust, 24 system, 25 userdata). For that moment i already made my nandroid, buy for some stupid reason I saved to my pc.
My problems came when i began with step 4. When i tried to put the cache it told me that it can't do it because it was in use. So i twrp y put on mount and desmounted that partition and then i could keep going. Same thing happened with Data partition, i did the same.
Finally, i did it all the tutorial, just needed to restore as it said in step 5 because i didn't have it in my phone. So i tried with adb push but nothing and i couldn't mount again those partition with twrp. Then, in a desperate move, i tried to reflash my cm rom, so i did that. And later, it bootloop with te huawei logo and i can�´t flash a rom o restore my nandroid. It doesn't read a sdcard.
And now, when i see the script in twrp (sorry i don't know how is the name, i talking about the center botton in twrp) it appears in red "unable to mont '/data', '/system', '/cache'.
I don't know what to do, really, i need a hand.
Click to expand...
Click to collapse
Ok this is difficult because of your wording but it sounds like data, system and cache no longer exist.
Is your device the y6?
Do you have adb access?
Did you finish recreating the partitions?
Did you manage to name them if so?
Are you able to use recovery?
If you have adb can use please issue the following code, if you don't have adb can you please use twrp, advanced, terminal command to issue it.
Code:
ls /dev/block/bootdevice/by-name/
and let me know if it shows your cache, userdata and system.
DestructoSphere said:
Ok this is difficult because of your wording but it sounds like data, system and cache no longer exist.
Is your device the y6?
Do you have adb access?
Did you finish recreating the partitions?
Did you manage to name them if so?
Are you able to use recovery?
If you have adb can use please issue the following code, if you don't have adb can you please use twrp, advanced, terminal command to issue it.
Code:
ls /dev/block/bootdevice/by-name/
and let me know if it shows your cache, userdata and system.
Click to expand...
Click to collapse
- Yes, my device is Y6 (SCL-L03).
- Seems that i don't have access to adb, because in cmd show me "offline" device.
-Yes, i fineshed with that, but couldn't do the restore of backup.
- I did all step 4.
- Yes, i'm using twrp.
I put the code with twrp... and here it says not found.
Any ideas? I hope you could help me.
beatLeo said:
Ok this is difficult because of your wording but it sounds like data, system and cache no longer exist.
Is your device the y6?
Do you have adb access?
Did you finish recreating the partitions?
Did you manage to name them if so?
Are you able to use recovery?
If you have adb can use please issue the following code, if you don't have adb can you please use twrp, advanced, terminal command to issue it.
- Yes, my device is Y6 (SCL-L03).
- Seems that i don't have access to adb, because in cmd show me "offline" device.
-Yes, i fineshed with that, but couldn't do the restore of backup.
- I did all step 4.
- Yes, i'm using twrp.
I put the code with twrp... and here it says not found.
Any ideas? I hope you could help me.
Click to expand...
Click to collapse
You need to put a space between ls and the /
DestructoSphere said:
You need to put a space between ls and the /
Click to expand...
Click to collapse
ups, ok, i did that and i see all the partitions including cache, cust, system and userdata. Please, what is next?
beatLeo said:
ups, ok, i did that and i see all the partitions including cache, cust, system and userdata. Please, what is next?
Click to expand...
Click to collapse
Ok I suspect maybe the filesystems never got created.
Can you run
Code:
df
this will show you the currently mounted partitions free space.
Output will look something like this
Code:
Filesystem Size Used Free Blksize
/dev 442.6M 60.0K 442.5M 4096
/system 1.2G 948.5M 241.8M 4096
/data 5.2G 2.8G 2.4G 4096
/cache 147.2M 176.0K 147.0M 4096
/persist 3.9M 776.0K 3.1M 4096
/firmware 99.8M 46.8M 52.9M 2048
If you dont see data or cache they never got mounted at twrp start, system is not mounted by default.
Then if data is not listed try
Code:
mount -t ext4 /dev/block/bootdevice/by-name/userdata /data
Remember to have spaces between arguments.
Or try system by replacing "userdata" with "system" and "/data" with "/system"
If you get an error trying to mount please do the following referring to the attached screenshots.
In twrp, go to "wipe", "advanced wipe". Then select one of the partitions and select "repair or change filesystem".
This should give you info about the partition.
If you wish to reformat it select "change filesystem" then select "ext4" and swipe to confirm.
Now retry the mount command and hopefully it will succeed.
Do this for each partition then retry your backup/flash.
Hopefully this works, good luck.
Thanks for your help. At first i couldn't see cache or data partition. I did what you told me, and i made cache to appears with df command. System too. But i couldn't made the same with the userdata partition. I tried to repair but it didn't work.
Is there another way to remount that partition?
A question apart: what was that "cust" partiton i've got and you didn't in your images posted in cm12.1 post? Because i recalculated it too.
beatLeo said:
Thanks for your help. At first i couldn't see cache or data partition. I did what you told me, and i made cache to appears with df command. System too. But i couldn't made the same with the userdata partition. I tried to repair but it didn't work.
Is there another way to remount that partition?
A question apart: what was that "cust" partiton i've got and you didn't in your images posted in cm12.1 post? Because i recalculated it too.
Click to expand...
Click to collapse
Hi,
Does twrp show the userdatas partition filesystem type? Like in my previous screenshot cache is shown as ext4.
If not can you try change filesystem instead of the repair option and choose ext4.
I removed my cust partition altogether as I had no use for it.
DestructoSphere said:
Hi,
Does twrp show the userdatas partition filesystem type? Like in my previous screenshot cache is shown as ext4.
If not can you try change filesystem instead of the repair option and choose ext4.
I removed my cust partition altogether as I had no use for it.
Click to expand...
Click to collapse
Yes, it shows current file system: ext4. I tried repair and change file system but nothing. When i'm trying to use "mount -t ext4 /dev/..." it says "failed: invalid argument"
What else could i do?
I really appeciate your help man.
P.S: Sorry, i don't know why the screenshot looks not vertical.
beatLeo said:
Yes, it shows current file system: ext4. I tried repair and change file system but nothing. When i'm trying to use "mount -t ext4 /dev/..." it says "failed: invalid argument"
What else could i do?
I really appeciate your help man.
P.S: Sorry, i don't know why the screenshot looks not vertical.
Click to expand...
Click to collapse
Ok for some reason filesystem seems to have issues.
Can you please try
Code:
mkfs.ext2 -j /dev/block/bootdevice/by-name/userdata
to manually format it?
Remember spaces before and after -j option.
DestructoSphere said:
Ok for some reason filesystem seems to have issues.
Can you please try
Code:
mkfs.ext2 -j /dev/block/bootdevice/by-name/userdata
to manually format it?
Remember spaces before and after -j option.
Click to expand...
Click to collapse
It says mkfs.ext2: lseek: Value too large for define data type
beatLeo said:
Ok for some reason filesystem seems to have issues.
Can you please try
It says mkfs.ext2: lseek: Value too large for define data type
Click to expand...
Click to collapse
As far as I know that happens when you break some size limit.
How big did you make your userdata partition? Maybe you had a typo so I'm thinking you may want to run through the guide again to check but first can you let me know what you get if you write
Code:
blockdev --getsize64 /dev/block/bootdevice/by-name/userdata
DestructoSphere said:
As far as I know that happens when you break some size limit.
How big did you make your userdata partition? Maybe you had a typo so I'm thinking you may want to run through the guide again to check but first can you let me know what you get if you write
Code:
blockdev --getsize64 /dev/block/bootdevice/by-name/userdata
Click to expand...
Click to collapse
it says 5465161216
beatLeo said:
As far as I know that happens when you break some size limit.
How big did you make your userdata partition? Maybe you had a typo so I'm thinking you may want to run through the guide again to check but first can you let me know what you get if you write
it says 5465161216
Click to expand...
Click to collapse
Ok the number seems ok.
Can you please try using parted again with the guide to delete then recreate the partition making sure to specify the filesystem.
Hopefully that works but if not I think you need to rewrite the partition table a start again.
If it doesn't work can you please post the output from
Code:
parted
unit s
print free
DestructoSphere said:
Ok the number seems ok.
Can you please try using parted again with the guide to delete then recreate the partition making sure to specify the filesystem.
Hopefully that works but if not I think you need to rewrite the partition table a start again.
If it doesn't work can you please post the output from
Code:
parted
unit s
print free
Click to expand...
Click to collapse
Hi DestructoSphere,
tried to do that, but remember i can't get to adb so i can't find a way to paste the parted file into de sbin. Any ideas about that?
beatLeo said:
Ok the number seems ok.
Can you please try using parted again with the guide to delete then recreate the partition making sure to specify the filesystem.
Hopefully that works but if not I think you need to rewrite the partition table a start again.
If it doesn't work can you please post the output from
Hi DestructoSphere,
tried to do that, but remember i can't get to adb so i can't find a way to paste the parted file into de sbin. Any ideas about that?
Click to expand...
Click to collapse
In twrp can you mount mtp or usb storage and copy it to sdcard then twrp filemanager to copy to sbin?
Ok, i tried with a sdcard, but i couldn't either. It didn't recognize my sdcard. And i don't have an otg's usb.
But in twrp's cmd showed "mtp enabled". Could this means that i have to mounted the sd partition? If that is a yes, could you please write me the code ?
beatLeo said:
Ok, i tried with a sdcard, but i couldn't either. It didn't recognize my sdcard. And i don't have an otg's usb.
But in twrp's cmd showed "mtp enabled". Could this means that i have to mounted the sd partition? If that is a yes, could you please write me the code ?
Click to expand...
Click to collapse
Hi DestructoSphere, i finally resolve this. It was a lot simplier than you ever thought. I tried changing to ext2 my data partion, and then change it again to ext4 and that's how it works again.
Take a look into my partitions. But i still want to reduce to 100mb the modem partition.

[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