Softbrick after repartition


I have a Fairphone 4 and i used Iode os, wanted to install GApps but the system partition size was too small.
I have tried to repartition, but couldnt format the partition because of error:could not access system bash.
Now it is in a bootloop, but i can access TWRP. And bootloader is unlocked. My phone is not rooted.

Any help is appreciated.

what??? :flushed:

That is not possible. You cannot run iodé AND gapps!!!

I would suggest, you go and flash FPOS offline first.

Then you can go back flashing iodé again.

Or if you need gapps, you have to use another system, but not iodéOS, /e/OS, calyxOS, DivestOS, GrapheneOS, LeOS.

iodé is born to de-google your smartphone. If you install gapps, … think about it :wink:

I wanted it only because of my smartwatch.
I cannot flash the FPOS, it gives the error that it does not found the partition for super.

I think you hav a big problem, then

Last Resort: RMA Ticket and repair center

What steps did you follow in your attempt to repartition your phone? :thinking:

Just for the record, never repartition any Android device unless you have a very good reason and know exactly what you are doing.
Problems installing Gapps isn’t one of those reasons if your phone isn’t at least a few years old.

1 Like

This guide here : [GUIDE] [DANGEROUS] Resize system partition | XDA Forums
The problem was that when I in TWRP wanted to remount the partition (or format, with mkfs.xxxx) then i got an error (inaccessible or not found)

That tutorial is for a completely different device…

How far did you get in the process and did you follow this step?

  1. Save the output of the command above (this is very important to restore original partition table if you will run into issues in the next parts)

Do you have logs of the exact commands you used?

1 Like

Number Start End Size File system Name Flags
12.3kB 24.6kB 12.3kB Free Space
1 24.6kB 123kB 98.3kB ALIGN_TO_128K_3
2 123kB 131kB 8192B ssd
3 131kB 33.7MB 33.6MB ext4 persist
4 33.7MB 34.7MB 1049kB misc
5 34.7MB 35.3MB 524kB keystore
6 35.3MB 35.8MB 524kB frp
7 35.8MB 67.1MB 31.3MB ext4 metadata
8 67.1MB 277MB 210MB ext4 oempersist
9 277MB 9082MB 8805MB rawdump
10 9082MB 15.5GB 6442MB super
11 15.5GB 254GB 238GB userdata
254GB 254GB 12.3kB Free Space

This is the original partitioning. I have tried until 5. (5 too). Then I have too late realized that this is not for my device and tried to repartition,

1 Like

And whats the state of your partition table at the moment, could you check that for reference :pray:

1 Like

Sorry how can i check that?
With df i think that it isnt shown

1 Like

Run the first 3 steps of that tutorial again and copy the output of parted so we have similar data to compare.

1 Like

Yes i did that.

Number  Start   End     Size    File system  Name             Flags
        12.3kB  24.6kB  12.3kB  Free Space
 1      24.6kB  123kB   98.3kB               ALIGN_TO_128K_3
 2      123kB   131kB   8192B                ssd
 3      131kB   33.7MB  33.6MB  ext4         persist
 4      33.7MB  34.7MB  1049kB               misc
 5      34.7MB  35.3MB  569kB                                 msftdata
 6      35.3MB  35.8MB  500kB                                 msftdata
 7      35.8MB  67.1MB  31.3MB                                msftdata
        67.1MB  67.1MB  8192B   Free Space
 8      67.1MB  277MB   210MB   ext4                          msftdata
 9      277MB   9082MB  8805MB                                msftdata
10      9082MB  15.5GB  6418MB                                msftdata
11      15.5GB  254GB   238GB                                 msftdata
        254GB   254GB   1040kB  Free Space
1 Like

Should I repartition again? But when I should mount with mkfs. than it will be inaccessible again.

1 Like

I’m still trying to figure out what steps you actually took, since your linked turtorial called for deleting all partitions up to system_b but there wasn’t one in the first place… did you save the commands you used or could you check your .bash_history (if you are using bash)?

The installer for stock FPOS obviously looks for the super partition which you apparently deleted, so we should at least change the name to the right one and those msftdata flags will have to go as well. So let’s try to recreate the state you were in before without deleting any more partitions or reformating, the stock FPOS images hopefully shouldn’t care about the file system present :thinking:
There’s also this strange misalignment 67.1MB 67.1MB 8192B Free Space that wasn’t there before, not sure what’s that about.

But: Big disclaimer before you go any further, this might just as well straight up brick your phone completely. Let me be clear, I’m not an expert in Android partitioning, I’m just a regular user who’s been running Linux (and Android) for quite some time, so I can’t guarantee that this will work or that it won’t damage your phone.
You might just want to wait for people who are more knowledgeable than me to chime in!

1 Like

I cant find it :frowning: I have done the steps just with the latter 6 partition. And then i booted into twrp but could not to do this example :
mkfs.ext4 /dev/block/sda39
Because i have got an error ( , not found or inaccessible
And then i booted to system, that was my biggest mistake…

1 Like

You meant partition # here, not step in the tutorial, right? Since you set the msftdata flags. Sorry didn’t understand you there at first. :see_no_evil:

Your biggest mistake was starting repartitioning in the first place, but let’s not get hung up on that and try to fix this.

First we need to get the size of those partitions right, those 8192B additional space are a multiple of those 128 mentioned there ALIGN_TO_128K_3, that’s probably not a coincidence.
Time to make some white tea and read up on proper flash alignment :nerd_face:

1 Like

Yeas i meant partition five. :slight_smile:
You are right, my bad.
Should i now search for repartition guide?

1 Like

We got a guide and you got parted, let’s just try to fix this with the tools we have.

Let’s start with partitions 5 - 7 since those apparently have changed in size. So get back into parted and issue unit kB print free to get us a more detailed starting point first.


The guide says i have to start rm from the 11 partition. Or should i just skip the 11-8 ?

1 Like

We’ll work on 5 - 7 first, number 8 (oempersist partition) won’t move anyway. Let’s get those three right first and then move on to 9 - 11.

1 Like