Cannot format /data using TWRP 3.0.2[Solved]

VladHD

Senior Member
Nov 5, 2012
227
34
0
26
Deva
I have a problem ... i'm trying to install Android MM using TWRP 3.0.2 but i can't because i can't format.
When i'm trying to format it shows this error: E:Unable to wipe '/data' -- unknown file system 'auto'
Unable to format to remove encrytion
Do i need to use another recovery?
Can someone tell me how to solve this?
 
Last edited:

penn.gwyn

Member
Jun 12, 2014
25
16
0
I had the same problem, for some reason TWRP is unable to format encrypted partitions.

It can be solved using adb shell or using the terminal in TWRP (it's under the advanced tab).
To format the partition you have to know which device it is, to find out type this inside the terminal:
Code:
 cat /etc/fstab
In my case the output is:
~ # cat /etc/fstab
/dev/block/mmcblk0p13 /system ext4 rw 0 0
/dev/block/mmcblk0p14 /cache f2fs rw 0 0
/dev/block/mmcblk0p15 /data f2fs rw 0 0

Which means that my /data is on device /dev/block/mmcblk0p15 and uses the f2fs filesystem. If you're on f2fs then you can format the partition using
Code:
  mkfs.f2fs /dev/block/mmcblkXXXX
if you're on ext4 then use
Code:
  make_ext4fs /dev/block/mmcblkXXXX
Where XXXX is whatever is in your fstab. After this TWRP should be able to mount /data.
 

VladHD

Senior Member
Nov 5, 2012
227
34
0
26
Deva
Ok, now i have another problem ... every time i'm trying to install(flash) a zip with TWRP it's rebooting again in TWRP and can't install anything ... I had this problem in the past and i solved it but i forgot how i did that .. anyone knows?
Solved: i had to format my sd card.
 
Last edited:

Lima Toshi

Member
Aug 8, 2018
8
0
0
DMP
I had the same problem, for some reason TWRP is unable to format encrypted partitions.

It can be solved using adb shell or using the terminal in TWRP (it's under the advanced tab).
To format the partition you have to know which device it is, to find out type this inside the terminal:
Code:
 cat /etc/fstab
In my case the output is:
~ # cat /etc/fstab
/dev/block/mmcblk0p13 /system ext4 rw 0 0
/dev/block/mmcblk0p14 /cache f2fs rw 0 0
/dev/block/mmcblk0p15 /data f2fs rw 0 0

Which means that my /data is on device /dev/block/mmcblk0p15 and uses the f2fs filesystem. If you're on f2fs then you can format the partition using
Code:
  mkfs.f2fs /dev/block/mmcblkXXXX
if you're on ext4 then use
Code:
  make_ext4fs /dev/block/mmcblkXXXX
Where XXXX is whatever is in your fstab. After this TWRP should be able to mount /data.
I did that but I am getting only this

/3rdmodem ext4 rw 0 0
/cache ext4 rw 0 0
/data f2fs rw 0 0
and so on

/dev/block/mmcblkXXXX is missing My TWRP version is 3.1.1-1-frd any help would be greatly appreciated.
 

Brooksey24

Member
Dec 25, 2018
11
1
0
I had the same problem, for some reason TWRP is unable to format encrypted partitions.

It can be solved using adb shell or using the terminal in TWRP (it's under the advanced tab).
To format the partition you have to know which device it is, to find out type this inside the terminal:
Code:
 cat /etc/fstab
In my case the output is:
~ # cat /etc/fstab
/dev/block/mmcblk0p13 /system ext4 rw 0 0
/dev/block/mmcblk0p14 /cache f2fs rw 0 0
/dev/block/mmcblk0p15 /data f2fs rw 0 0

Which means that my /data is on device /dev/block/mmcblk0p15 and uses the f2fs filesystem. If you're on f2fs then you can format the partition using
Code:
  mkfs.f2fs /dev/block/mmcblkXXXX
if you're on ext4 then use
Code:
  make_ext4fs /dev/block/mmcblkXXXX
Where XXXX is whatever is in your fstab. After this TWRP should be able to mount /data.
I tried this but now i cant fully install roms correctly. However i did this to more than just data
 

Zer0n3

New member
Mar 1, 2019
1
0
0
Hi, I tried this, but it's telling me : "need size of filesystem"
Do you have an idea of what's going wrong ? thanks
BTW : i have : /dev/block/dm-0 /data ext rw 0 0