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

Do you believe GSIs overcome custom ROMs in future ?

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

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

    Votes: 12 20.0%
  • I have fair skepticism on it. Both will have balanced usershare.

    Votes: 27 45.0%
  • Absolutely. Device tree maintenance is outdated already.

    Votes: 12 20.0%

  • Total voters
    60
Search This thread

RasitAyaz

Member
Feb 14, 2022
8
3
Redmi Note 10
thanks for the guide, how can i easily switch between one gsi rom to another? just flashing img to system via fastbootd would be enough? do i need to wipe anything?
 

MPK99

Senior Member
  • Like
Reactions: RasitAyaz

ChristianWS

Senior Member
Sep 6, 2016
120
19
Moto G
Redmi Note 10
As per securize script...

Unfortunately, Andy is the only one who ships prerooted lineage gsi ¯\_(ツ)_/¯
Strangely, he quoted to keep both & ignore Abnormal state warning though.
I reflashed the entirety of Stock ROM using Fastboot AGAIN and redid the entire process (including erasing userdata), I don't know what the hell happened but Magisk doesn't complain anymore. I'm really not sure what the hell happened because it should produce the same results.

A few things I noticed:

- No double tap to wake, weird
- My linux partition(Tumbleweed) can't see my device when I connect and try to transfer files, windows can see it no problem
- I think there's something wrong with the notch and status bar. The status bar has the right height, but here they are in the center of the height, which makes the clock really close to the edge. As I remember, on stock it is a little bellow the center so that the bottom of the items align with the bottom edge of the notch.
 

MPK99

Senior Member
No double tap to wake, weird
I think los doesn't include that. Try phh settings > Misc > Double tap to wake
My linux partition(Tumbleweed) can't see my device when I connect and try to transfer files, windows can see it no problem
Depends on what DE you're on. On gnome & other environments, try gvfs tools (gvfs-mtp). KDE, try kio. I'm on arch & have no issues with mtp.
which makes the clock really close to the edge.
Would you mind screenshot it & annotate the positions
 

ChristianWS

Senior Member
Sep 6, 2016
120
19
Moto G
Redmi Note 10
I think los doesn't include that. Try phh settings > Misc > Double tap to wake
I think LOS itself does, you can see mention of it in the requirements list, but not the GSI, or maybe it's an issue with Neternels, idk
Depends on what DE you're on. On gnome & other environments, try gvfs tools (gvfs-mtp). KDE, try kio. I'm on arch & have no issues with mtp.
I tried, but it didn't work. What's weird is that it always worked before moving to GSI, so again, idk

Would you mind screenshot it & annotate the positions
As far as I can guess it's because Xiaomi put the notch touching the bottom of the navbar, where on most devices it sits in the middle.

Edited everything to be more clear:

I've found some old screenshots so we have a way of comparing how different ROMs worked.

Here's how MIUI 12 worked:
MIUI.jpg


Here's how Alonso's LOS build worked:

Alonso LOS.png


And here's how it shows up with Andy's LOS GSI build:

GSI LOS.png


For some reason, Andy's LOS has a slightly different icon placement on the lockscreen, being closer to the bottom edge of the Status Bar, which feels more natural, IMO

GSI LOS Lockscreen.png


There's a difference on Icon size, but the issue is more clear once you consider the Vertical Alignment of those:

Comparison.png
 
Last edited:
  • Like
Reactions: RasitAyaz

Samir2298

Senior Member
Apr 3, 2015
269
27
Lemme know if overlay stuff is okay so that I need to push relevant changes.
Still testing but just a little update.

Had only one random freeze since new overlay. Happened while watching a video on FB. Got back to normal after like 30 seconds so didn't need to restart device. Not sure if it's related to overlay tho. Other than that so far no crashes/freezes.

Also here's memory usage. Android System and OS alone consuming 2.8 GB. Idk if it's normal or not.
 

Attachments

  • Screenshot_20221003-195253.png
    Screenshot_20221003-195253.png
    147.4 KB · Views: 11
  • Screenshot_20221003-200317.png
    Screenshot_20221003-200317.png
    113.1 KB · Views: 11

Samir2298

Senior Member
Apr 3, 2015
269
27
Ok apps are being force closed if I switch to one another. Overall UI is sluggish as well right now. I'm sure it's due to the android system and os consuming almost all ram. Restarting phone would bring everthing back to normal.
 

MPK99

Senior Member
Android System and OS alone consuming 2.8 GB. Idk if it's normal or not.
No it's not normal. Did this issue exist on roms ?
I also don't think this is overlay specific. Phhusson said it's nothing to do with power profiles.
Need more details such as on what GSIs it occured, did you test both custom kernels? Also just try using stock kernel from stock boot & lemme know.
 

Samir2298

Senior Member
Apr 3, 2015
269
27
Just increased 100 MB more in usage
 

Attachments

  • Screenshot_20221003-201558_1.png
    Screenshot_20221003-201558_1.png
    29.7 KB · Views: 11

MPK99

Senior Member
Can you share stock kernel and boot?
Just flash boot image from your stock mojito firmware. Both kernel & recoveries get replaced btw.
Only tested with Neternels on Phhusson's rom.
I'm on neternels/phh aosp too, but it's 6 gig variant (with avg memory of 3.1gB). So I'm not sure it's a specific issue with 4 gig variants. Try without overlay too once (you might face some issues like brightness & usage stats).

Also screenshot this page once.
 
  • Like
Reactions: Samir2298

Samir2298

Senior Member
Apr 3, 2015
269
27
Update:

I think phone just restarted "System UI", coz it went into full brightness for a second and took me to lockscreen. And everything seems normal now(I didn't restart myself)

Memory stats still show 2+ gb but I believe it will gradually go down in next 3 hrs.

Sorry for spamming too much. If you want, I can keep you updated in PM and keep this thread clean.
 

Attachments

  • Screenshot_20221003-204455.png
    Screenshot_20221003-204455.png
    145.2 KB · Views: 11
Last edited:

MPK99

Senior Member
The screenshot I actually wanted to see was Android System (as Android OS is the lesser one in your case)
Memory stats still show 2+ gb but I believe it will get updated gradually in next 3 hrs.
Issue might be something completely different. Did you have developer options enabled? Lemme know if you have the same issue after disabling it.
Caz sometimes dev options mess up graphics allocator, hardware acceleration, etc.
Sorry for spamming too much. If you want, I can keep you updated in PM and keep this thread clean.
No prob. Spam in this thread as much as you want. I just want all discussions to be public.
 

ChristianWS

Senior Member
Sep 6, 2016
120
19
Moto G
Redmi Note 10
Apologies for the Portuguese in the screenshot, but I do have a 4 gig device so it might be useful to compare it, I'm on LOS, btw
 

Attachments

  • Screenshot_20221003-134559_Configurações.png
    Screenshot_20221003-134559_Configurações.png
    147.3 KB · Views: 15
  • Like
Reactions: Samir2298

Samir2298

Senior Member
Apr 3, 2015
269
27
@MPK99

Btw found this on TG from 27 Sept.
 

Attachments

  • Screenshot_20221003-220738_1.png
    Screenshot_20221003-220738_1.png
    338.9 KB · Views: 14
  • Screenshot_20221003-220810_1.png
    Screenshot_20221003-220810_1.png
    52.1 KB · Views: 14
  • 20221003_220907.jpg
    20221003_220907.jpg
    153.8 KB · Views: 12
  • 20221003_220911.jpg
    20221003_220911.jpg
    150.1 KB · Views: 13

ChristianWS

Senior Member
Sep 6, 2016
120
19
Moto G
Redmi Note 10
When did you restart phone last time?
35 hours ago
Are you facing any crashes/freeze or anything?
Nope.

Bear in mind, I flashed the latest Stock Rom through fastboot (mojito_global_images_V13.0.10.0.SKGMIXM_20220829.0000.00_12.0_global), so I might have a different firmware than you.

An easy way to tell was that before flashing the stock rom, my Fastboot screen had the Xiaomi mascot (a white Rabbit), after flashing it was simply the word "FASTBOOT"
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Andy warned about the QPR2 changes and how he needed more time to update his LineageOS GSI. Might take a while until GSI ROMs stabilizes
  • 15

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

    Yes. But this thread exists due to the following reasons:
    • You don't wanna fear about devs stop shipping updates.​
    • You don't wanna re-flash your custom recovery / kernel after each update.​
    • Unlike some ROMs, no clean flashes necessary after you update.​
    • You don't wanna be a flashoholic / beta tester of a ROM maintainer.​
    • GSIs are like Linux Distros. Flexible, hasslefree & minimal.​
    • All GSIs support signature spoofing out of the box.​
    Differences between GSIs & ROMs:
    • ROM updates modify all the partitions (boot, recovery, kernel, system, vendor, etc). A GSI update is just a system partition that updates "only" the system, that runs upon stock firmware.​
    • You can't flash gapps on vanilla GSIs, as you do on vanilla ROMs. You must use bgS/bgN GSI variants.​
    • For now, GSIs have to be installed via fastbootd, as recoveries still yet to support logical partitions. So you need computer available when you update or change them.​
    AOSP GSI project is being alive for almost many years now. I've been daily driving his project on this device since I made the overlay. Everyone claim GSIs are buggy & not daily drivable, which is a complete false claim. There are no compromises with GSIs when compared to ROMs.

    PREREQUISITES

    Recommended GSIs :

    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. 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.​

    UPDATE / DIRTY FLASH HOW ?​

    • fastboot reboot fastboot
    • fastboot flash system <new-gsi.img> & reboot twice
    All phh based GSIs are dirty flashable (unless you switch between vanilla & gapps).

    POST CONFIGURATION​

    • Enable the following Settings > Phh Treble Settings:
    • Misc features / Disable audio effects
    • IMS features / Install IMS Apk for Qualcomm vendor from notification panel.​

    MAGISK NOT WORKING ?​

    In this case, the GSI you selected isn't securized (comes with su bydefault). Through TWRP, do
    • mount -o rw /dev/block/mapper/system_a /system_root from terminal
    • Code:
      rm /system_root/system/xbin/su
      rm /system_root/system/bin/phh-su
      rm /system_root/system/etc/init/su.rc
    • Or instead, you can use recovery's file manager to delete the above files. Then reboot.

    EXTRAS​

    My Recommendations for great experience:
    • SPKM to set GPU > GPU Governor > Performance (fixes UI lags)​
    • 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.​
    • Aurora Store / Droid for microg users.​
    • 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
    Here's the report for the current GSI development state. This is to keep this thread alive.
    • Phhusson now moved from his personal builds to CI/CD builds (testing, automated) which is now called TrebleDroid (AOSP-TD).
    • But he still hasn't decided to ship secure builds yet (which help pass CTS & magisk compatibility)
    • Lot of AOSP-TD based builds have been released by many developers/builders, which some also happened to have secure builds. Links are in the OP.
    • A13 forks are still in development stage. So you might experience couple of bugs here & there.
    • As of now, the last stable A12 builds held to November sec patch. Beware if you still on Nov patch, since it has a serious security vulnerability (CVE-2022-20465) that allows anyone to unlock your encrypted device through sim PUK reset, which has been patched on December sec patch.
    • Andy's maintaining his own phh treble patchset builds which he calls LineageOS Light. It might or might not be dirty flashable over other TD based builds.
    • The current overlay state is the same as of last year. If anyone have any requests regarding overlay modification, plz do.
    If you have any doubts & issues, discussion is always open. This isn't my personal device anyways, so I'm free to experiment anything on it. Currently it's running phh's android_13.0.0_r14 ci-20221219 (system-td-arm64-ab-vndklite-vanilla), securized, magisk rooted, microg moduled & passing safety net via kdrag0n fix & redfin props.

    MERRY JINGLE CHRISTMAS 🎅🎄

    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.