English

Stuck with new Fairphone 3

You can try. This looks like a TWRP backup. TWRP is a custom recovery program.

I have tried to restore a complete TWRP backup two times on my Fairphone 3, unsuccessfully, both times ending in a bootloop. Just to manage expectations, I myself obviously don’t know how to do that so that it works afterwards :slight_smile: .

TWRP will look for backups to restore in the following directory structure either in Internal Storage (which isn’t an option in this case here) or on an SD card in the phone (includes the serial number of the phone you got with fastboot devices):

  • TWRP
    • BACKUPS
      • A209HLH80202
        • (some directory name TWRP puts together automatically, shouldn’t be too important if you have to make one up)
          • here are all these files

If you have this structure already, just copy it to the SD card as it is.

Download the TWRP image to your computer from TWRP for Fairphone 3.

With the phone in Fastboot Mode
fastboot boot twrp-whatever-else-is-in-the-filename.img

TWRP starting the first time (or not being able to access the data partition) will ask whether to keep the system partition read-only or to allow modifications … keeping it read-only is the safe choice, this doesn’t hamper restoring.

From the TWRP main menu:
Restore - Select Storage (select Micro SD Card) - select the backup to restore - select the partitions to restore - Swipe to restore

(Can’t have a look right now, I hope that’s about right from memory.)

When the restore is done, reboot.

In case the restored state of the phone doesn’t boot, here’s another shot at it …

1 Like

Hello AnotherElk,
thank you.

Can you tell me how to build a partition table?

See:

C:\Users\uwe\Documents\fairphone\platform-tools_r30.0.1-windows\platform-tools>fastboot boot twrp-3.3.1-0_k4y0z-20200202-02-fp3.img
Sending ‘boot.img’ (28690 KB) OKAY [ 0.825s]
Booting FAILED (remote: ‘unknown reason’)
fastboot: error: Command failed

C:\Users\uwe\Documents\fairphone\platform-tools_r30.0.1-windows\platform-tools>fastboot devices
A209HLH80202 fastboot

C:\Users\uwe\Documents\fairphone\platform-tools_r30.0.1-windows\platform-tools>fastboot flash recovery twrp-3.3.1-0_k4y0z-20200202-02-fp3.img
Sending ‘recovery’ (28690 KB) OKAY [ 0.903s]
Writing ‘recovery’ FAILED (remote: ‘partition table doesn’t exist’)
fastboot: error: Command failed

C:\Users\uwe\Documents\fairphone\platform-tools_r30.0.1-windows\platform-tools>

I don’t know how to do that, and luckily you don’t need to do that, because …

… there simply is no recovery partition on the Fairphone 3. You can’t flash TWRP to the Fairphone 3 this way.
Installing TWRP would work differently, but this doesn’t help now.

This should work with an unlocked bootloader.
What happens on the phone when it should be booting TWRP?
Apart from the warning screen displayed due to the unlocked bootloader, there could be a second screen coming up, where you would have to press the power button to proceed, else the phone would reboot after 30 seconds or something like this.

Ok, if TWRP doesn’t work you can still flash the stock OS with fastboot manually …

Stock OS partition images are here … https://github.com/gougeon-s/fp3_flash_stock (as well as a convenient script for Linux).

Once you downloaded e.g. the A.0111 (an earlier version of the stock OS, you can update it once it’s running again) ZIP file and unzipped the partition images in it to where your fastboot command is, you can flash the partition images to the phone.

Determine the active slot first with
fastboot getvar current-slot
That will give either a or b.

Let’s say you still have slot b active.
You could then …

fastboot flash product_b product.img -S 522239K
fastboot flash keymaster_b keymaster.img
fastboot flash cmnlib64_b cmnlib64.img
fastboot flash cmnlib_b cmnlib.img
fastboot flash lksecapp_b lksecapp.img
fastboot flash mdtp_b mdtp.img
fastboot flash vendor_b vendor.img -S 522239K
fastboot flash system_b system.img -S 522239K
fastboot flash boot_b boot.img
fastboot flash vbmeta_b vbmeta.img
fastboot flash dtbo_b dtbo.img
fastboot flash dsp_b dsp.img
fastboot flash devcfg_b devcfg.img
fastboot flash tz_b tz.img
fastboot flash rpm_b rpm.img
fastboot flash modem_b modem.img
fastboot flash aboot_b aboot.img
fastboot flash sbl1_b sbl1.img

This would have flashed slot b with the stock OS partition images.
Try to fastboot reboot

(If you have slot a active just substitute all “_b” with “_a”.)

thank you so much, i will try it tomorrow

I doesn’t work. I get the same screen after reboot.

PS D:\fairphone\platform-tools> .\fastboot flash product_b product.img -S 522239K
Sending ‘product_b’ (131072 KB) OKAY [ 5.163s]
Writing ‘product_b’ OKAY [ 0.597s]
Finished. Total time: 5.797s
PS D:\fairphone\platform-tools> .\fastboot flash keymaster_b keymaster.img
Sending ‘keymaster_b’ (316 KB) OKAY [ 0.039s]
Writing ‘keymaster_b’ OKAY [ 0.019s]
Finished. Total time: 0.114s
PS D:\fairphone\platform-tools> .\fastboot flash cmnlib64_b cmnlib64.img
Sending ‘cmnlib64_b’ (260 KB) OKAY [ 0.039s]
Writing ‘cmnlib64_b’ OKAY [ 0.019s]
Finished. Total time: 0.112s
PS D:\fairphone\platform-tools> .\fastboot flash cmnlib_b cmnlib.img
Sending ‘cmnlib_b’ (208 KB) OKAY [ 0.038s]
Writing ‘cmnlib_b’ OKAY [ 0.018s]
Finished. Total time: 0.110s
PS D:\fairphone\platform-tools> .\fastboot flash lksecapp_b lksecapp.img
Sending ‘lksecapp_b’ (60 KB) OKAY [ 0.039s]
Writing ‘lksecapp_b’ OKAY [ 0.019s]
Finished. Total time: 0.121s
PS D:\fairphone\platform-tools> .\fastboot flash mdtp_b mdtp.img
Sending ‘mdtp_b’ (17392 KB) OKAY [ 0.710s]
Writing ‘mdtp_b’ OKAY [ 0.097s]
Finished. Total time: 0.880s
PS D:\fairphone\platform-tools> .\fastboot flash vendor_b vendor.img -S 522239K
Invalid sparse file format at header magic
Sending sparse ‘vendor_b’ 1/2 (521493 KB) OKAY [ 15.036s]
Writing ‘vendor_b’ OKAY [ 33.951s]
Sending sparse ‘vendor_b’ 2/2 (16364 KB) OKAY [ 0.484s]
Writing ‘vendor_b’ OKAY [ 0.108s]
Finished. Total time: 57.618s
PS D:\fairphone\platform-tools> .\fastboot flash system_b system.img -S 522239K
Invalid sparse file format at header magic
Sending sparse ‘system_b’ 1/5 (522236 KB) OKAY [ 18.644s]
Writing ‘system_b’ OKAY [ 4.439s]
Sending sparse ‘system_b’ 2/5 (522179 KB) OKAY [ 18.567s]
Writing ‘system_b’ OKAY [ 2.545s]
Sending sparse ‘system_b’ 3/5 (522236 KB) OKAY [ 18.701s]
Writing ‘system_b’ OKAY [ 2.974s]
Sending sparse ‘system_b’ 4/5 (520509 KB) OKAY [ 18.723s]
Writing ‘system_b’ OKAY [ 3.385s]
Sending sparse ‘system_b’ 5/5 (394415 KB) OKAY [ 14.447s]
Writing ‘system_b’ OKAY [ 40.380s]
Finished. Total time: 220.416s
PS D:\fairphone\platform-tools> .\fastboot flash boot_b boot.img
Sending ‘boot_b’ (65536 KB) OKAY [ 2.266s]
Writing ‘boot_b’ OKAY [ 0.320s]
Finished. Total time: 2.636s
PS D:\fairphone\platform-tools> .\fastboot flash vbmeta_b vbmeta.img
Sending ‘vbmeta_b’ (4 KB) OKAY [ 0.039s]
Writing ‘vbmeta_b’ OKAY [ 0.017s]
Finished. Total time: 0.109s
PS D:\fairphone\platform-tools> .\fastboot flash dtbo_b dtbo.img
Sending ‘dtbo_b’ (8192 KB) OKAY [ 0.340s]
Writing ‘dtbo_b’ OKAY [ 0.050s]
Finished. Total time: 0.458s
PS D:\fairphone\platform-tools> .\fastboot flash dsp_b dsp.img
Sending ‘dsp_b’ (16384 KB) OKAY [ 0.661s]
Writing ‘dsp_b’ OKAY [ 0.095s]
Finished. Total time: 0.813s
PS D:\fairphone\platform-tools> .\fastboot flash devcfg_b devcfg.img
Sending ‘devcfg_b’ (40 KB) OKAY [ 0.038s]
Writing ‘devcfg_b’ OKAY [ 0.017s]
Finished. Total time: 0.119s
PS D:\fairphone\platform-tools> .\fastboot flash tz_b tz.img
Sending ‘tz_b’ (1500 KB) OKAY [ 0.079s]
Writing ‘tz_b’ OKAY [ 0.023s]
Finished. Total time: 0.161s
PS D:\fairphone\platform-tools> .\fastboot flash rpm_b rpm.img
Sending ‘rpm_b’ (172 KB) OKAY [ 0.039s]
Writing ‘rpm_b’ OKAY [ 0.017s]
Finished. Total time: 0.116s
PS D:\fairphone\platform-tools> .\fastboot flash modem_b modem.img
Sending ‘modem_b’ (90112 KB) OKAY [ 3.489s]
Writing ‘modem_b’ OKAY [ 0.409s]
Finished. Total time: 3.953s
PS D:\fairphone\platform-tools> .\fastboot flash aboot_b aboot.img
Sending ‘aboot_b’ (1612 KB) OKAY [ 0.077s]
Writing ‘aboot_b’ OKAY [ 0.024s]
Finished. Total time: 0.178s
PS D:\fairphone\platform-tools> .\fastboot flash sbl1_b sbl1.img
Sending ‘sbl1_b’ (444 KB) OKAY [ 0.049s]
Writing ‘sbl1_b’ OKAY [ 0.019s]
Finished. Total time: 0.128s
PS D:\fairphone\platform-tools> .\fastboot reboot
Rebooting OKAY [ 0.002s]
Finished. Total time: 0.005s
PS D:\fairphone\platform-tools>

What does fastboot getvar current-slot say now?

These Invalid sparse file format at header magic messages are ok, according to the forum, flashing should have worked nonetheless.

Else … I searched the internet for a picture of the screen I mentioned … you are certain you don’t get this one here at some point, which would then reboot the phone after 30 seconds if you don’t press the power button to proceed with booting?
This can easily be missed.

grafik

(This message can be kind of a nuisance and it can be deactivated once Android or TWRP can be booted successfully … perhaps just with pressing the power button there to proceed with booting.)

1 Like

Hello AnotherELK,

it works. I owe you a lot. If your are in Dortmund sometimes, I pay fort he beer.

I thank you very much.

Regards Uwe

2 Likes

For users perhaps with the same issue finding this topic later … what worked in the end?

By the way … To deactivate the “30 seconds” screen, if you have ADB working:

… works once Android or TWRP are booted.

I do:

PS D:\fairphone\platform-tools> .\fastboot getvar current-slot

< waiting for any device >

current-slot: INVALID

Finished. Total time: 0.015s

PS D:\fairphone\platform-tools> .\fastboot getvar current-slot

current-slot: INVALID

Finished. Total time: 0.009s

PS D:\fairphone\platform-tools> .\fastboot --set-active=b

Setting current slot to ‘b’ OKAY [ 0.021s]

Finished. Total time: 0.028s

PS D:\fairphone\platform-tools> .\fastboot getvar current-slot

current-slot: b

Finished. Total time: 0.006s

PS D:\fairphone\platform-tools> .\fastboot reboot

Rebooting OKAY [ 0.010s]

Finished. Total time: 0.012s

PS D:\fairphone\platform-tools> .\fastboot reboot

Rebooting OKAY [ 0.001s]

Finished. Total time: 0.004s

PS D:\fairphone\platform-tools>

Then I get another screen on the FP. Sorry, I have no copy.

I selected, recovery, I think an the phone startet.

Now I do an update on FP3 A.0118

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.