How To Guide [GSI][PHH][13] 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: 12 35.3%
  • I don't think so. They'll never overcome custom ROMs.

    Votes: 5 14.7%
  • I have fair skepticism on it. Both will have balanced usershare.

    Votes: 14 41.2%
  • Absolutely. Device tree maintenance is outdated already.

    Votes: 9 26.5%

  • Total voters
    34
Search This thread

MPK99

Senior Member
Btw found this on TG from 27 Sept.
I don't have tg though. As per @ChristianWS screenshot, it seems to be fine. Overlay was never an issue. Kernels shouldn't be, caz everyone could've face this issue. Try different suggestions I gave you before & test for couple more days. You'll figure out soon. If not, try different GSIs I suggested in OP (dirty flash is fine).
 

ChristianWS

Senior Member
Sep 6, 2016
99
16
Moto G
Redmi Note 10
Sorry to be annoying @MPK99, but did you read my post with the pics explaining the Status Bar differences?

Also, forgot to mention, but you need to add a warning: The Xiaomi Firmware Updater script will fail if there's a space on a directory name.

And another question: How can I verify if the Overlay is actually working?
 

MPK99

Senior Member
did you read my post with the pics explaining the Status Bar differences?
I remember asking you for annotated screenshot
Would you mind screenshot it & annotate the positions?
but you need to add a warning: The Xiaomi Firmware Updater script will fail if there's a space on a directory name.
I don't think it does. cd "%~dp0" after shebang line refers to change directory to pwd nonethless of special characters like space.
How can I verify if the Overlay is actually working?
For instance, Auto brightness would be missing in display settings without it.
 

ChristianWS

Senior Member
Sep 6, 2016
99
16
Moto G
Redmi Note 10
I remember asking you for annotated screenshot
Well, the icons of the StatusBar needs to go 12 pixels downwards.
I don't think it does. cd "%~dp0" after shebang line refers to change directory to pwd nonethless of special characters like space.
The very first time I tried to flash the script tried to execute, but it threw the same error 3 times, saying there was no folder called "GSI ", at the time that folder was called "GSI Treble", renaming the folder it went with no problem, so there is definitely an issue.
 
Last edited:

MPK99

Senior Member

ChristianWS

Senior Member
Sep 6, 2016
99
16
Moto G
Redmi Note 10
It would match the position of the icons on the Lockscreen, and also on MIUI. Here's a very crude explanation of the difference between MIUI, Alonso's LOS, Andy's GSI LOS unlocked, and Andy's GSI LOS on the Lockscreen:
Comparison.png
 

MPK99

Senior Member

Attachments

  • treble-overlay-xiaomi-redminote10.apk
    20.4 KB · Views: 44

ChristianWS

Senior Member
Sep 6, 2016
99
16
Moto G
Redmi Note 10
...That makes things more complicated.

I was expecting that because Alonso (and MIUI) have offsetted icons without increasing bar height it would be possible to replicate it on GSI
 

ChristianWS

Senior Member
Sep 6, 2016
99
16
Moto G
Redmi Note 10
It might look off, but it is how Xiaomi designed the device.

Regardless, increasing the height itself is more complicated because we need to find the exact position of the notch in pixels, otherwise the top an bottom will not have the same height.

Your new overlay has this issue, it has more space below the notch than on top of it, and nailing the right values is going to be a pain
 

ChristianWS

Senior Member
Sep 6, 2016
99
16
Moto G
Redmi Note 10
I'm having a hard time understanding the problem with messing with paddings.

As another question: can't you just pick the values from MIUI or other ROMs that figured it out?
 

MPK99

Senior Member

ChristianWS

Senior Member
Sep 6, 2016
99
16
Moto G
Redmi Note 10
I could. But unfortunately, these are the only status bar strings that gsi overlays accept. I've just utilized the height aspect of it (which is the only metric).
Would it be possible for PHH to add a new string on overlays, or is that out of his responsibility?
Height is the easiest metric & only option in this case.
I'm assuming the height is measured in pixels, right?

EDIT: I used Tasker to create a Scene Overlay on the Status bar, I measured the distance between the top of the screen and the top of the notch in pixels, as well as the size of the notch itself(58px).
Overlay.png


Now I can just duplicate the space on the top and add to the bottom of the notch:
Overlay+.png
 
Last edited:

MPK99

Senior Member
Would it be possible for PHH to add a new string on overlays
He could. I'm not sure.
or is that out of his responsibility?
Note that no one is responsible is for nothing. Android is an open source project. You're free to review code, contribute with your own expertise & time. Blaming over a dev for something to be responsible won't bring any good.
height is measured in pixels, right?
Both px & dp are acceptable. I've used 40dp.
 

ChristianWS

Senior Member
Sep 6, 2016
99
16
Moto G
Redmi Note 10
Note that no one is responsible is for nothing. Android is an open source project. You're free to review code, contribute with your own expertise & time. Blaming over a dev for something to be responsible won't bring any good.
I meant more if the code that deals with Overlay strings is something he did, or if it was Google that created a sorta of standard.

Both px & dp are acceptable. I've used 40dp.
In pixels that is 120px.

I used Tasker to create a Scene Overlay on the Status bar, I measured the distance between the top of the screen and the top of the notch in pixels(29px), as well as the size of the notch itself(58px):

Overlay.png


Using the top distance and adding to the bottom of the notch get us this:Overlay+.png

Basically the height should be 116px.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Seems like SF back to norm.
  • 12

    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.​
    • ROMs might pass safetynet out of the box. But for GSIs, you must root & use magisk modules to achieve that.​
    • 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 for almost two years. 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.​
    • Finally Magisk (for root, safetynet fix, additional modding, etc).​
    BUG_1: Don't touch the screen while booting to avoid touch issues after you boot (this bug occurs only on custom kernels).
    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.

    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). If any GSI doesn't boot up, you can always reflash the older GSI & restore the previous state without any data wipes.

    POST CONFIGURATION​

    • Enable the following Settings > Phh Treble Settings:
    • Qualcomm features / Use alternate camera profile & audio policy
    • Misc features / Disable audio effects
    • IMS features / Force the presense of 4G calling & Install IMS Apk for Qualcomm vendor from notification panel.​
    • Setup magisk, hide the app, enable Zygisk & Enforce Denylist.​
    • Use SafetyNet-Fix module to pass safetynet. Still won't pass? Try Pixel-Props (redfin) that ensures fingerprinting.​
    • microG module if you chose vanilla variant (Safetynet works. Most of the banking apps work except gpay).​
    NOTE: Flash custom kernels only through your custom recovery. Flashing through kernel managers (FKM, SPKM, etc) is not suggested.

    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)​
    • 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.​
    • Aurora Store / Droid for microg users.​
    • 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
    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
    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.