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

,

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

I flashed AndyYan’s LOS 16 GSI image and it seems to already come with signature spoofing. I tried to install Nanodroid-patcher first, but it said that it’s already patched.
Installed microG with the installer module in Magisk. In microG Self-Check I needed to press the unchecked “System grants Signature Spoofing permission” (or something like that) to getting asked if it should be granted. After that it seemed to work fine.
So only missing thing for me is the regular updates of the GSI image.

What do you mean by “test the slot” ? Do you mean to just to let the phone boot from it and to see if it can get to the home screen ?

Yes, reboot in bootloader and see if you access the bootloader on the flashed slot. Then you’ll still have, at least, access to a bootloader :slight_smile:

2 Likes

Yep sorry, Xposed is not needed for signature spoofing, but I think it is to enable GCM (which needs Xposed module FakeGApps).
Also, we won’t get LOS 16 updates from AndyYan, he will deliver updates only for his LOS 17 GSI (see here).
I haven’t tried it yet, but I surely will when I’ll have some time.

Shouldn’t we install Magisk after flashing the GSI image ? I did it a few times and it went well. And also it makes more sense to me (but I’m no expert).