How To Guide [12.1][13] GSI Guide & Support [PHH][Mojito][Sunny]

Do you believe GSIs overcome custom ROMs in future ?

  • Meh. Both suck. Android devices are increasingly turning restrictive every year.

    Votes: 10 35.7%
  • I don't think so. They'll never overcome custom ROMs.

    Votes: 4 14.3%
  • I have fair skepticism on it. Both will have balanced usershare.

    Votes: 12 42.9%
  • Absolutely. Device tree maintenance is outdated already.

    Votes: 8 28.6%

  • Total voters
    28
Search This thread

ChristianWS

Senior Member
Sep 6, 2016
99
16
Moto G
Redmi Note 10
Okay:

  1. The difference would be minimal, only 3 pixels of difference, the reason it stood out before was because it was a really big difference.
  2. The user spends more time looking at the device unlocked. Apps that don't have a seamlessly StatusBar and TopBar make it very clear the distance from notch top to screen top is different from notch bottom to StatusBar bottom.
  3. ... How's the lock screen getting different results anyway? Can't you just change whatever the lock screen is using to make it match the unlocked status bar
 

TzOne9

Member
Nov 23, 2018
16
0
i dont know if this correct thread to ask this,
so i'm not gonna talk about these phh gsi (?),

I'm curious and wanted to do some experiment with ported gsi (?) like nippongsi. But some of the system.img are 3gb above. And i cant flash above that, only 3gb below.

So I'm asking if it's possible to flash 3gb+ system.img on mojito? I just thought that newer phone might have bigger system space
 

Hami_Do

Senior Member
Aug 24, 2013
414
429
i dont know if this correct thread to ask this,
so i'm not gonna talk about these phh gsi (?),

I'm curious and wanted to do some experiment with ported gsi (?) like nippongsi. But some of the system.img are 3gb above. And i cant flash above that, only 3gb below.

So I'm asking if it's possible to flash 3gb+ system.img on mojito? I just thought that newer phone might have bigger system space
Dynamic partitioning is not as bad as we think, we can extend system partition size easily without repartitioning the whole device.

For example take miui global recovery version ROM zip and ..

1- Open the ROM zip and extract dynamic_partitions_op_list and open it.
2- Edit "resize system_a" value for example put "resize system_a 4282639872" instead of 3282642432 in the attached screenshot.
3- Save and add the new dynamic_partitions_op_list to miui ROM zip.

After flashing the ROM system image size will be increased to 4.28 gb which is enough to flash any gsi/semi-gsi you want.

Ps: "resize system_a" value + "resize system_ext_a" value + "resize product_a" value + "resize vendor_a" value shouldn't overstep 8.5 gb ( 8.500.000.000 ) the limit of Super partition.
 

Attachments

  • Screenshot_20221005-234740_MT Manager.png
    Screenshot_20221005-234740_MT Manager.png
    327.4 KB · Views: 20
Last edited:
I'm curious and wanted to do some experiment with ported gsi (?) like nippongsi
Nippon's GSIs are based on ErfanGSI Tools. They don't have required patches for all the devices. Every & then, you would face many issues with it. If you need to run a stable one, it's recommended to run phh patched GSIs.
So I'm asking if it's possible to flash 3gb+ system.img on mojito?
You can, if you remove product partition which is logical. Although you have to replace with a dummy placeholder product.img & it'll work just fine.
I just thought that newer phone might have bigger system space
Mojito actually does (4.5gigs per slot) which'll be 9gigs for complete super partition.
 

TzOne9

Member
Nov 23, 2018
16
0
Nippon's GSIs are based on ErfanGSI Tools. They don't have required patches for all the devices. Every & then, you would face many issues with it. If you need to run a stable one, it's recommended to run phh patched GSIs.

You can, if you remove product partition which is logical. Although you have to replace with a dummy placeholder product.img & it'll work just fine.

Mojito actually does (4.5gigs per slot) which'll be 9gigs for complete super partition.
Dynamic partitioning is not as bad as we think, we can extend system partition size easily without repartitioning the whole device.

For example take miui global recovery version ROM zip and ..

1- Open the ROM zip and extract dynamic_partitions_op_list and open it.
2- Edit "resize system_a" value for example put "resize system_a 4282639872" instead of 3282642432 in the attached screenshot.
3- Save and add the new dynamic_partitions_op_list to miui ROM zip.

After flashing the ROM system image size will be increased to 4.28 gb which is enough to flash any gsi/semi-gsi you want.

Ps: "resize system_a" value + "resize system_ext_a" value + "resize product_a" value + "resize vendor_a" value shouldn't overstep 8.5 gb ( 8.500.000.000 ) the limit of Super partition.


Well thanks for the information, I'm still new with this dynamic partiton. Also I'm not gonna use this gsi as a daily either, i just want to try these type of gsi. i also would rather using custom rom for daily or maybe someday trying phh gsi
 

ChristianWS

Senior Member
Sep 6, 2016
99
16
Moto G
Redmi Note 10
I've figured it out. Will rebuild overlay with 116px as you said by the weekend. I'm kinda busy now.
Oh, thanks, appreciate it.

Also, I've found some... bugs regarding the battery:

  1. Not sure if I'm getting some Mandela effect going on, but Battery usage stats is only showing up Mobile Network, Screen and Idle
  2. Battery Saver Mode couldn't get turned on automatically, I think it also rebooted when it got to that point, and I couldn't toggle it after it rebooted. It seems the bug went away?
  3. Charging while the phone is turned off makes it get stuck at the booting screen. If I remember correctly, after the phone has a minimal of charge the charging screen comes from the ROM itself, no? I think something went wrong, and I don't know if all GSIs are this way, or an issue with LOS GSI, or just some random error I encountered.
 
Last edited:

TzOne9

Member
Nov 23, 2018
16
0
For example take miui global recovery version ROM zip and ..

1- Open the ROM zip and extract dynamic_partitions_op_list and open it.
2- Edit "resize system_a" value for example put "resize system_a 4282639872" instead of 3282642432 in the attached screenshot.
3- Save and add the new dynamic_partitions_op_list to miui ROM zip.

btw, is this dynamic partition op list only available on miui? because i'm also thinking use oss vendor as a base for an alternative. But on custom rom i dont see any of it
 
btw, is this dynamic partition op list only available on miui?
Don't worry about size constraints. Just follow my advice in #244.
because i'm also thinking use oss vendor as a base for an alternative
Doesn't work for GSIs. Only stock vendor will work.
custom rom i dont see any of it
ROM builds compress images as payload.bin, not as dynpart op list.
 

ChristianWS

Senior Member
Sep 6, 2016
99
16
Moto G
Redmi Note 10
Erm, I need a bit of clarification:

Andy released a new LineageOS update, AFAIK it is recommended to flash it using fastbootd.

However, "Fastboot reboot Fastboot" opens Fastbootd from TWRP. And I was under the impression that TWRP doesn't support flashing GSI ROMs due to something involving "logical partitions". Is that limitation only for TWRP main screen and TWRP's Fastbootd is fine?
 
However, "Fastboot reboot Fastboot" opens Fastbootd from TWRP.
Fastbootd is a recovery thing. Not a bootloader component. TWRP has it, OFOX has it too.
I was under the impression that TWRP doesn't support flashing GSI ROMs due to something involving "logical partitions".
It does support (of course, through fastbootd via PC), but not directly from recovery manager itself.
Is that limitation only for TWRP main screen and TWRP's Fastbootd is fine?
fastbootd is specifically designed for dynamic partitions, to be managed through ADB tools. So right now, only through a pc. Whether you consider it a limitation, or a design flaw, is upto you.
 

spider1163

Senior Member
Erm, I need a bit of clarification:

Andy released a new LineageOS update, AFAIK it is recommended to flash it using fastbootd.

However, "Fastboot reboot Fastboot" opens Fastbootd from TWRP. And I was under the impression that TWRP doesn't support flashing GSI ROMs due to something involving "logical partitions". Is that limitation only for TWRP main screen and TWRP's Fastbootd is fine?
I recently fastboot flash system the new version without problem
 

ChristianWS

Senior Member
Sep 6, 2016
99
16
Moto G
Redmi Note 10
Fastbootd is a recovery thing. Not a bootloader component. TWRP has it, OFOX has it too.

It does support (of course, through fastbootd via PC), but not directly from recovery manager itself.

fastbootd is specifically designed for dynamic partitions, to be managed through ADB tools. So right now, only through a pc. Whether you consider it a limitation, or a design flaw, is upto you.
Alright, I flashed it with no problems. I was just confused because I was under the impression TWRP couldn't flash dynamic partitions at all.

Anyway, the ROM now comes with the old overlay merged. One thing I noticed, but forgot to mention before is that the expanded quick settings screen is bigger than the screen when there's media playback. This doesn't appear to be normal:

Screenshot_20221016-143907_Firefox.png

You need to scroll this screen before being able to return to the notification screen
 
I was just confused because I was under the impression TWRP couldn't flash dynamic partitions at all.
No prob. I'm a learner too. Didn't knew it until I bought a device with dynamic partitions.
Anyway, the ROM now comes with the old overlay merged.
That's caz I haven't made any pull requests on newer modifications. Will make one when enough changes been made. Until then, I'm free to share them manually on this thread.
expanded quick settings screen is bigger than the screen when there's media playback. This doesn't appear to be normal:
Seems like a ROM issue. It's a system ui thing. Which GSI is it btw?
 

ChristianWS

Senior Member
Sep 6, 2016
99
16
Moto G
Redmi Note 10
409 in this ROM is uncomfortably small

....I really shouldn't have messed up with DPI. Now I can't get it back to what it was cause I forgot to you know... remember it. That's my fault and I messed it up

EDIT: 390 seems to be the right amount
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    is it possible for mojito to flash gsi through custom recovery like twrp soon?
    I think this needs to be asked on twrp forum. There are some workarounds like Dynapatch, that seems to expose logical partitions under twrp mount list, which I honestly haven't tested & to be aware of. Better ask Hami_Do
    1
    Update on my situation, I decided to use pixel experience custom rom for now since I can't get GSI to reliably work for me. Unfortunate as it is, I need a stable device for my needs at the moment.
    1
    View attachment 5767333
    I got this error and also tried AOSP, but same error
    Reboot to fastboot "fastboot reboot fastboot" and try again

    Use any kernel manager (spkm from "extras")
    Note that SmartPack-Kernel Manager is no more in extras section
    1

    UPDATE​

    On Android 13 (AOSP-td) some phhusson fixes need to be modified
    As @bobtear1 faced bluetooth audio output issues, make sure to disable the following:
    1. Qualcomm/alternate audio policy
    2. Misc/Force disable A2DP Offload

    Enable the following to fix camcorder:
    Misc/Force Enable Cam2API HAL3

    Updated OP post configuration too.
  • 12

    Why should I use a GSI ? Mojito already have custom ROMs ¯\_(ツ)_/¯

    Yes. But this thread exists due to the following reasons:
    • You have issues daily driving custom roms​
    • You don't wanna re-flash your custom recovery & kernel after each update​
    • You don't wanna fear about devs dropping support & stop giving monthly OTA updates​
    • You don't want to depend on / trust buildbot roms lurking on xda & telegram​
    • All GSIs support signature spoofing out of the box​
    AOSP GSI project is being alive for almost many years now. I've been daily driving his project on this device for almost an year. Everyone claim GSIs are buggy & not daily drivable, which is a complete false claim.

    PREREQUISITES

    Recommended GSIs :
    All phh based GSIs are dirty flashable, unless you try switching from vanilla to gapps or viceversa (or from A12->13 migration).

    INSTALLATION​

    NOTE: I'm assuming you've already unlocked bootloader, backed up your data & know all the technical consequences of flashing & modding.
    • Download / extract all prerequisites in one place.​
    • From stock firmware, edit flash_all_except_data_storage.bat/sh & modify last line to fastboot reboot fastboot
    • Enter fastboot mode {vol_down+power}, connect to PC & flash firmware using above edited script (make sure there are no spaces in folder names). When device enters fastbootd, from terminal/cmd execute :​
    • fastboot erase userdata
    • fastboot flash vbmeta vbmeta.img
    • fastboot flash system <gsi-file.img> (ignore INVALID SPARSE warning)​
    • fastboot reboot & make sure your GSI boots up. Power off & return to fastboot again.​
    • fastboot boot <twrp-file.img>, head to Advanced & run flash current TWRP to make recovery persistent across reboots.​
    • Flash Magisk (for safetynet fixes) and NetErnels / WCSF-PLC (for performance), either by twrp (copying them into an SD card), or through TWRP > Advanced > adb sideload <zip-file>.
    BUG_1: Don't touch the screen while booting, else it'll make the display unresponsive, leading you to force reboot. A minor bug, but can be ignored.
    BUG_2: Don't set up password on startup wizard. Instead, set it up later & then disable Android Setup app if it exists. Else it'll crash fingerprint settings.

    POST CONFIGURATION​

    • Setup Magisk from app-drawer. Follow in-app prompts & reboots.​
    • From magisk settings, hide the Magisk app, enable Zygisk & Enforce Denylist.​
    • Use SafetyNet Fix magisk module to pass CTS. Still won't pass? Try Pixel-Props that ensures fingerprinting.​
    • microG module if you chose vanilla variant (Safety net works. Most of the banking apps work except gpay).​
    • Enable the following Settings > Phh Treble Settings:
    • Misc features / Disable audio effects & Force Enable Cam2API HAL3.​
    • IMS features / Request IMS network & Force the presense of 4G calling. Also Install IMS Apk for Qualcomm vendor from notification panel.​
    NOTE: Reflash kernels only through your custom recovery. Updating through apps like FKM or SPKM is not suggested.

    OVERLAY​

    Skip this part, unless you have the following issues :
    • Brightness stack​
    • Status bar cut offs​
    • Missing battery usage stats​
    • Missing night light toggle​
    • Ambient light & doze​
    Extract this overlay into /product/overlay/ through any root explorer.
    NOTE: If there's no space available issue, remove these two folders /system_ext/apex/com.android.vndk.{v28/v29}, reboot & try again.

    EXTRAS​

    My Recommendations for great experience:
    • Lawnchair / Quickswitch for launcher customization with gesture navigation support.​
    • Lineage Dialer for built-in call recording (push into /product/priv-app/Dialer/Dialer.apk).​
    • ANXCam for MIUI camera's post processing.​
    • GCam for google camera's post processing.​
    • SPKM to set GPU on performance mode (GPU > GPU Governor > Performance)​
    • Aurora Store / Droid for microg users.​
    • Bromite (arm64_SystemWebView.apk) for uptodate android webview (& disable built-in android webview).​
    • Kiwi Browser for chrome extensions support.​
    • Migrate to backup & restore user apps & data, incase you lose your setup.​
    Thanks for reading all the way through here.
    4
    UPDATE: Overlay has been merged. No need of manual overlay injection for the upcoming phh based A13 GSIs.
    3
    it is okay for us to give review about the GSI that we have been tested ? or better on the other thread ? asking for an opinion here 😅
    I don't really care. Discuss anything mate. This thread is all about gsi support for community.
    The more you guys talk, the more better.
    (just dont private msg. I want all discussions to be public✌️)
    3
    Followed exactly as in OP.

    I did remove some apps tho from product app/priavpp and system app/privapp, so maybe that caused an issue? Is there anything related to fingerprint in those folders?
    If you want to gain more space (≈ 200mb) in system you can delete 2 folders safely without problems :
    /system/system_ext/apex/com.android.vndk.v28/
    and
    /system/system_ext/apex/com.android.vndk.v29/
    Already did it in DSSI builds without issues.
    2
    I have been using GSIs on my old Huawei P10 lite for almost 3 years, and it was a very good experience.
    Now with mojito I find myself lazy always using Roms -_- '
    Thanks for the guide!
    The only official dev for this device, who's actually from core development of a reputed project (PE), is Zid. There aren't any, as I do not find others to be helping from core (except couple of kernel devs).

    ROMs have no complete guarantees for future updates. Although you can use other project GSIs such as crD by Nazim, LOS by Andy, phhusson's the one who's consistently providing regular monthly updates with built-in OTA.