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
Well didn't really work as well as I wanted, did it?

I rather not go with CrDroid.

Can I just use TWRP to flash BgS on top of my system? I just need to disable the MicroG Module before, right?

Do I need to reflash Magisk and Kernel?
 
Can I just use TWRP to flash BgS on top of my system?
Neither TWRP, nor OrangeFox have ability to flash logical partitions bydefault. It's not possible on dynamic partition table. As of now, you have to do it on fastbootd.
Maybe in future we might get updates from twrp/ofox to manage logical partitions.
Do I need to reflash Magisk and Kernel? I just need to disable the MicroG Module before, right?
Magisk would be enough. No need to disable any module.
 

ChristianWS

Senior Member
Sep 6, 2016
99
16
Moto G
Redmi Note 10
Argh, fine.

I just need to fastboot and flash the LineageOS bgS on top of my bvS, right? I don't need to do anything after that? I don't need to add the overlay again, or to wipe data, or do anything else besides fastboot flash?
 
I just need to fastboot and flash the LineageOS bgS on top of my bvS, right?
Read OP prerequisites section again. I mentioned that vanilla to gapps migration (or vice versa) is not dirty flashable. Only one to one is.
If you wanna move to gapps variant from vanilla, you gotta wipe data & start fresh.
I don't need to add the overlay again
Overlay is inside /system/product/overlay. So basically a re-flash will remove it so you gotta do it again.
From newer october build, overlay will be pre-included, since merge happened in september (& you're running sept build).
 

ChristianWS

Senior Member
Sep 6, 2016
99
16
Moto G
Redmi Note 10
Inside phh settings > Misc section, execute "Securize system". Then re-flash magisk from recovery.
This is the reason many GSI builders avoid shipping "su" (a.k.a bvS/bgS) & just build N variants (bvN/bgN). Because it causes overlap with Magisk, since both ship same root binaries. I donno why Andy still builds su variant. He doesn't even include non-su along with it...¯\_(ツ)_/¯
I did that (after redoing everything from the beginning to flash BgS), after clicking "Securize" I re-flashed magisk from TWRP but now Magisk doesn't work, it doesn't think it is installed, I have no option inside Magisk
 
I did that (after redoing everything from the beginning to flash BgS), after clicking "Securize" I re-flashed magisk from TWRP but now Magisk doesn't work, it doesn't think it is installed, I have no option inside Magisk
Try flashing magisk again, since su might got nuked after reboot.
You can check out /system/bin/phh-securize.sh script what securize doing behind.
 
I have flashed Magisk again, and it doesn't work
As per securize script...
Code:
rm $SYSTEM/xbin/su
rm $SYSTEM/bin/phh-su
rm $SYSTEM/etc/init/su.rc
rm -Rf $SYSTEM/{app,priv-app}/me.phh.superuser/
rm -Rf /data/su || true
mkdir /metadata/phh
touch /metadata/phh/secure
is the main stuff to be removed. You can manually remove them, re-flash stock boot & twrp + magisk again. Should work.

Unfortunately, Andy is the only one who ships prerooted lineage gsi ¯\_(ツ)_/¯
Strangely, he quoted to keep both & ignore Abnormal state warning though.
 
Last edited:

Samir2298

Senior Member
Apr 3, 2015
260
25

Attachments

  • Screenshot_20221002-134224_1.png
    Screenshot_20221002-134224_1.png
    1.3 MB · Views: 9

Samir2298

Senior Member
Apr 3, 2015
260
25
My bad, had to extract file.

Also on an unrelated note, I have noticed note 10 has low sensitivity on borders/edges, in other words extreme left and right. Which is annoying when you're playing a game and the buttons are near border(for example in Minecraft) and you have to touch with extra force. Do you know of any way to increase it?
 

Samir2298

Senior Member
Apr 3, 2015
260
25
I provided apk btw, not zip

That's funny. Touch sensitivity is always monotonous, there's no such thing as custom pressure. I think it's your display that's messed up. Was that same across roms too?
No, it's not my display coz on MIUI there was this option in game mode(see attached ss), setting it to "None" would fix issue as I described in MC.

I believe by default Xiaomi has it decreased for whatever reasons, and it can be altered through software.
 

Attachments

  • MIUI-Game-Turbo-2.0-FoneArena-Overview-09-1024x473.jpg
    MIUI-Game-Turbo-2.0-FoneArena-Overview-09-1024x473.jpg
    35.1 KB · Views: 7

Top Liked Posts

  • There are no posts matching your filters.
  • 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 Misc/Force disable A2DP Offload

    To fix camcorder, 3nable Misc/Force Enable Cam2API HAL3

    Updated OP post configuration too.
    1
    Only two steps, fastboot reboot fastboot & fastboot flash system <gsi.img>
    *A12->13 not dirty flashable (wiping required).
    If you're trying different A13 GSIs, I recommend sticking with Andy's LOS light for now, as it's the only A13 GSI that's patched everything to daily drive.
    I used PE13 Plus GSI, and it is also stable too
    1
    I used PE13 Plus GSI, and it is also stable too
    Sure. But there are some other GSIs that currently don't load overlays, as they still haven't got overlay matching patches. So you might get brightness dimming & status bar offsets without it.
  • 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 :
    Right now, PE Plus & LOS 20 are the only recommended A13 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:
    • Qualcomm features / Use alternate audio policy
    • 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.