[HOW TO] Flash a custom ROM on FP3 with GSI

,

I’m running ArrowOS official GSI
Working: SMS, NFC, bluetooth pairing, W-LAN, GSM, flash, both cameras, external keyboard via usb-c, finger print sensor
Not tested: Calling, GPS

Regarding the boot loop:
It is not able to boot automatically.
First boot fails and I have manually press Start when it tells me that my phone is corrupt and it will poweroff in 30 seconds. But then it works.

1 Like

Nice! Is it still maintained?
That’s because the boot is unlocked :wink:

If that was because of unlocked boot, that should also pop up when just installing Magisk or TWRP.

The image is from the 27th, but it appears they have no OTA updates.
The first message is normal, yes. It just starts the rom after 5 seconds.
Starting the rom appears to fail and it reboots.
The second one is not normal and shuts down the phone after the 30 seconds.

Finally, I finally could boot to the GSI ROM. The data partition was corrupted, but I could format it thanks to the stock recovery. Before this corruption problem, I wiped the data partition through the TWRP wipe menu. Did TWRP mess with the data partition ? I don’t know.

Anyway, I have now this message at boot that tells me that the device is corrupted and if I don’t press the start button the device will shut down… as @basxto

Edit : probably TWRP is not to blame. It was my mistake, as I reported here.

I can’t boot Havoc. I managed to boot Resurrection Remix, but it throws errors in logcat like it’s the end of the world.

I’m now trying Bliss.
Also note: Bliss and Arrow allow to enable the navbar via the quickmenu, but you have to edit the quickmenu first.

Working: SMS, NFC, bluetooth, W-LAN, GSM, flash, external keyboard via usb-c, calling, LED, both cameras (camera app crashes, but OpenCamera works)
Not tested: Finger print sensor, GPS

I also have this message since the first time I did fastboot oem unlock. But that’s when I started to try project treble for FP3.

When you just root stock you only get that message once and it automatically boots after 5 seconds.
I hope we will see something helpful through UART later :wink:

2 Likes

Yes ! And for the vbmeta too! (I’d really like you to send me what you’ll be able to get via pm. Just to understand what’s going on :slight_smile: )

Hey guys,
Thanks for all your awesome work!
For everyone that is having issues installing stuff with fastboot (permission denied etc), especially also not beeing able to boot twrp (fastboot boot twrp.img):
Just download the full dump linked above, unzip it and flash everything back to stock. This will take a few minutes (prox. 10-15).

fastboot --set-active=a
fastboot flash product product.img 
fastboot flash keymaster keymaster.img -S 522239K || exit 1
fastboot flash cmnlib64 cmnlib64.img -S 522239K || exit 1
fastboot flash cmnlib cmnlib.img -S 522239K || exit 1
fastboot flash lksecapp lksecapp.img -S 522239K || exit 1
fastboot flash mdtp mdtp.img -S 522239K || exit 1
fastboot flash vendor vendor.img -S 522239K || exit 1
fastboot flash system system.img -S 522239K || exit 1
fastboot flash boot boot.img -S 522239K || exit 1
fastboot flash vbmeta vbmeta.img -S 522239K || exit 1
fastboot flash dtbo dtbo.img -S 522239K || exit 1
fastboot flash dsp dsp.img -S 522239K || exit 1
fastboot flash devcfg devcfg.img -S 522239K || exit 1
fastboot flash tz tz.img -S 522239K || exit 1
fastboot flash rpm rpm.img -S 522239K || exit 1
fastboot flash sbl1 sbl1.img -S 522239K || exit 1
fastboot flash modem modem.img -S 522239K || exit 1
fastboot flash aboot aboot.img -S 522239K || exit 1
fastboot reboot bootloader
 
fastboot --set-active=b
fastboot flash product product.img 
fastboot flash keymaster keymaster.img -S 522239K || exit 1
fastboot flash cmnlib64 cmnlib64.img -S 522239K || exit 1
fastboot flash cmnlib cmnlib.img -S 522239K || exit 1
fastboot flash lksecapp lksecapp.img -S 522239K || exit 1
fastboot flash mdtp mdtp.img -S 522239K || exit 1
fastboot flash vendor vendor.img -S 522239K || exit 1
fastboot flash system system.img -S 522239K || exit 1
fastboot flash boot boot.img -S 522239K || exit 1
fastboot flash vbmeta vbmeta.img -S 522239K || exit 1
fastboot flash dtbo dtbo.img -S 522239K || exit 1
fastboot flash dsp dsp.img -S 522239K || exit 1
fastboot flash devcfg devcfg.img -S 522239K || exit 1
fastboot flash tz tz.img -S 522239K || exit 1
fastboot flash rpm rpm.img -S 522239K || exit 1
fastboot flash sbl1 sbl1.img -S 522239K || exit 1
fastboot flash modem modem.img -S 522239K || exit 1
fastboot flash aboot aboot.img -S 522239K || exit 1
fastboot reboot bootloader

Before you can boot into TWRP you need to check the value slot-success for both partitions:
fastboot getvar | grep slot-success
If the value is not yes make sure to activate the slot, and fully boot into the OS before returing to fastboot.
fastboot --set-active=b
fastboot reboot
adb reboot-bootloader
Otherwise just boot into TWRP with fastboot boot <twrp.img>

I hope this did maybe help anyone, thanks again to the devs. I was pretty stocked to follow all the progress in the development and happy to see it working now :slight_smile:

Cheers

Please add, as I wrote, to do one slote, test it then the other. If something go wrong, then not all the slots are down :wink:

3 Likes

Now successfully running ArrowOS on my FP3, works perfectly, however fingerprint sensor doesnt seem to want to work and the display is a bit buggy (as if the refresh rate is slow.) Good overall though and will wait for a maintained LineageOS.

4 Likes

I found this post on XDA, mentioning :

I found a really strong solution for the ones who suffer from UI/app stutters like me. It really brings the performance to stock-like level, which is great on a GSI. Kudos to Anton Paulic and Dinolek for this.
You have to paste the following code in your vendor build.prop (to prevent the lost of it during system flashes)

debug.sf.latch_unsignaled=1

The post is about LineageOS 16, but maybe this bug is GSI-related ?
You can try to set the property as mentioned in the post using Magisk module MagiskHidePropsConf.

3 Likes

You can get rid of the 30 second message using:
adb reboot "dm-verity enforcing"

4 Likes

Fingerprint sensor on arrowOS definitely worked for me.
I think k4y0s can tell you more later.I wasn’t there all the time, I also played with another project or just talked with people :wink:
But there is a command to get rid of the shutdown in 30 seconds, it’s “dm-verity enforcing” or something in adb, even works from twrp.
I think twrp caused some issues because it modified some partitions by mounting them read write.
Playing with vbmeta made my phone just showing a black screen for hours because we crashed aboot, or just showed the fairphone logo and froze. Pressing volume down while turning it on always gets you into fastboot mode.
I brought my UART adapter home this time.
GSI AOSP 9 without gapps (vanilla-nosu) does boot. The GSI option to show the navbar seems to be buggy (on fp3). GSI should also allow to tell on which side the volume and on/off buttons are placed -.-
Maybe we should hack some patches together for that.

EDIT: I typed too long :smiley:

1 Like

Ah yeah, about the vbmeta --disable-verification.
It seems there is a bug in aboot, we can only hope it gets fixed in an update.
aboot just crashes, when verification is disabled:

[1580] battery_voltage: 4241918
[1820] MultiSlot true, partition name boot_b
[1830] AVB version 2
[1830] avb_slot_verify.c[1830] :[1830] 417[1830] : DEBUG: [1830] Loading vbmeta struct from partition '[1840] vbmeta_b[1840] '.
[1840] avb_vbmeta_image.c[1840] :[1840] 226[1840] : ERROR: [1850] Hash does not match!
[1850] avb_slot_verify.c[1850] :[1850] 539[1850] : ERROR: [1850] vbmeta_b[1850] : Error verifying vbmeta image: [1860] HASH_MISMATCH[1860]
[1860] ReadRollbackIndex Location 0, RollbackIndex 0
[1860] avb_slot_verify.c[1870] :[1870] 699[1870] : DEBUG: [1870] vbmeta_b[1870] : VERIFICATION_DISABLED bit is set.
[1870] avb_slot_verify.c[1880] :[1880] 308[1880] : DEBUG: [1880] boot_b[1880] : Loading entire partition.
[1880] read from boot_b, 0x4000000 bytes at Offset 0x0, partition size 560070656
[1890] data abort, halting
[1890] r0  0x91400000 r1  0x04000000 r2  0x9385339c r3  0x04000000
[1890] r4  0x04000000 r5  0x8f85339c r6  0x8f62b378 r7  0x00000200
[1890] r8  0x21620000 r9  0x00000000 r10 0x8f854e64 r11 0x8f8533a8
[1890] r12 0x8f8369ac usp 0x00000000 ulr 0x00000000 pc  0x8f632b18
[1890] spsr 0x80000153
[1890]  fiq r13 0x8f81d000 r14 0x00000000
[1890]  irq r13 0x8f82228c r14 0x8f611ef8
[1890] *svc r13 0x8f853220 r14 0x8f60f780
[1890]  und r13 0x8f81d000 r14 0x00000000
[1890]  sys r13 0x00000000 r14 0x00000000
[1890] bottom of stack at 0x8f853220:
0x8f853220: 00000000 00000200 04000000 8f8369ac |.............i..|
0x8f853230: 8f8533a8 145d1c00 04000000 21620000 |..............b.|
0x8f853240: 00000000 00000200 00000000 8f8369ac |.............i..|
0x8f853250: 04000000 8f85339c 8f8533a8 8f62b378 |............x.b.|
0x8f853260: 00000000 00000000 21620000 00000000 |..........b.....|
0x8f853270: 00000000 04000000 8f876dc0 00000200 |.........m......|
0x8f853280: 00000000 00000000 00000200 00000000 |................|
0x8f853290: 00000000 00000000 21620000 00000000 |..........b.....|
[1890] HALT: reboot into dload mode...

Thanks ! That’s why we have to set the AVB version to 1.0 in the boot :slight_smile:

Haha! That was the longer state of my phone (I flashed vbmeta without the stock one :slight_smile: )
When you say “The GSI option to show the navbar”, is it the trick with the magisk module?

Also, volume on/off can be set on the left (at least on LOS).

Finally, I think it’ll be easier to continue to build LOS 16 (with Andy Yan’s tricks) than doing some patches. LOS 16 works very well :slight_smile:

How to re-Enable the battery saver mode in LOS 16 with Magisk

After installing LOS 16, I couldn’t enable the battery saver mode (I had a notification saying that the power saving profile was missing).

So, I installed the FDE.AI module with Magisk which performs various tweaks to the OS and the kernel in order to optimize power consumption… and surprisingly re-enabled the battery saver mode !

About FDE.AI module : https://github.com/Magisk-Modules-Repo/FDE

Edit : added link to FDE.AI module description.

1 Like

No, phhusson has a submenu in settings and there is that setting, but it does not do anything