• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

General GSIs on N200

Search This thread

darkghost568

Senior Member
Jun 29, 2012
769
170
Bethesda
I tried out WhoAreYou's product image using
fastboot create-logical-partition product 512
(His syntax gave an error.)

While It did allow me to boot with a Magisk 23 patched boot.img along with Phhusson's vanilla GSI, Magisk did not work. The Magisk 23 app gave a strange error "Unsupported Magisk Version, This version of the app does not support Magisk version lower than v20.4". I downgraded to Magisk Manager 7.3.2 and the system hung whenever Magisk ran instead. Perhaps it is a conflict with the SU system in the GSI. I tried the "securize" option in the Phh treble menu, which caused a reboot, but did not remove root / su . I do not know how to remove the SU modifications present in the GSI, if that is required.

I attempted to use his product image along with his linked pixel 5 beta Android 12 GSI, but the system would not boot with a Magisk 23 patched boot.img.

I attempted to use his product image along with AndyYan's Unofficial Lineage 18.1, but the system would not boot with a Magisk 23 patched boot.img.
Tried all 3 GSIs with the magisk canary patched stock boot img, and I'm able to reproduce all these results. Exact same experience. I uploaded my patched_boot.img to mega - can someone who's got a working one hash and compare? Let's make sure we're all on the same page.
 
Last edited:
  • Like
Reactions: oCAPTCHA

oCAPTCHA

Member
Sep 22, 2021
10
5
I investigated WhoAreYou's product.img and it is just a blank image (with an empty folder). I'm not sure how it is supposed to make Magisk work other than having a blank partition available.

To save downloads, I hashed dark ghost 568's boot.img and provided my hashes as well (which work on the stock software, but not these GSI's)

boot.img hash comparison

dark ghost 568's magisk canary patched boot.img sha256
fab78298c9cbcb74090f58a3ef8e2f87c6ae94c932d788affbbf64b1a68502a7

stock boot.img sha256 (OnePlus Nord N200 unlocked version 11.0.2.0.DE17AA)
c23446b27efa6ec95fcd55b115db92ddcd402330de92caf5ed06c6ddb858bc27

my masgisk 23 patched boot.img sha256 (OnePlus Nord N200 unlocked version 11.0.2.0.DE17AA)
fc82683a99d5a7b251bbbdab5b6ce5c75c5c0a2320b05af0af49b657a376b833


I don't agree with the supposed security reasons for imposing system app limitations on Xposed modules and signature spoofing, so I'm sticking with XPosed and Magisk 23. Magisk Canary is beta software as well.
 
  • Like
Reactions: darkghost568

AndyYan

Recognized Contributor
Jan 30, 2012
4,347
3,656
Beijing
To root y'all need to do:
fastboot create-partition-primary 512 product
Then flash the attached product.

Then flash your rooted img, it'll boot successfully.
Figured out Magisk together with @darkghost568 - the steps described are kinda off. No need to delete product_a anymore, and creating product (without the suffix) won't be recognized. In the end, it's actually as simple as flashing your image to product (which will redirect to product_a automatically) prior to flashing GSIs.
Code:
fastboot flash product product_gsi.img
Updating OP accordingly.
 
  • Like
Reactions: darkghost568

PopCaps1996

Senior Member
The process of flashing alone is conventional, shouldn't even need a thread to detail, but still leaving a thread here for search indexing.
With an unlocked BL, flash an ARM64 AB GSI within fastbootd, reboot to recovery, format userdata, reboot, profit. vbmeta isn't even needed in my case.

EDIT: One thing that's unconventional and I forgot to mention is, for many GSIs, you gotta delete product_a to make room prior to flashing:
Code:
fastboot delete-logical-partition product_a

EDIT2: Magisk doesn't like to see product_a go. Instead, just flash a blank one (from #15) to it:
Code:
fastboot flash product product_gsi.img
Thanks to @Whoareyou for the original finding and @darkghost568 for additional ideas.
what am I doing wrong?
I cant get any GSI to boot on n200 metro
i tried flashing gsi product img but there is not a product partition on my phone
i tried (fastboot create-partition-primary 512 product) that does not seem to work either
my bootloader is unlocked


any idea's?
 

PopCaps1996

Senior Member
Doesn't sound like you're in fastbootd (≠ bootloader) to begin with?
yes! im in fastbootd. it looks like stock recovery with fastbootd in white on top
i flashed the gsi product img to product_b successfully
i have flashed darkghost568 patched boot img
an i have flashed both these with no luck
http://https://jmirror.ml/0:/Jarvis-Mirror/Pixel5-Beta5-CB-GSI-Tutorials.7z
https://sourceforge.net/projects/gs...ixel5-SP1A-A12-SGSI-GSI-Tutorials.7z/download


my phone keeping going to bootloader mode when trying to boot gsi system
 

AndyYan

Recognized Contributor
Jan 30, 2012
4,347
3,656
Beijing
yes! im in fastbootd. it looks like stock recovery with fastbootd in white on top
i flashed the gsi product img to product_b successfully
i have flashed darkghost568 patched boot img
an i have flashed both these with no luck
http://https://jmirror.ml/0:/Jarvis-Mirror/Pixel5-Beta5-CB-GSI-Tutorials.7z
https://sourceforge.net/projects/gs...ixel5-SP1A-A12-SGSI-GSI-Tutorials.7z/download
Don't appoint a slot, just product (automatically redirects).
I recommend using one of the PHH-based GSIs out there and staying away from sGSIs - they tend to not boot on top of OEM vendors.
 

PopCaps1996

Senior Member
Don't appoint a slot, just product (automatically redirects).
I recommend using one of the PHH-based GSIs out there and staying away from sGSIs - they tend to not boot on top of OEM vendors.
yeah i give up if i gotta go through this much trouble for a gsi then ill pass. an stay with stock.
prob same amount of trouble to keep the gsi maintained on n200 f*ck that.
ive been at this for 8hrs so far today an no luck what so ever
im no n00b either i been rooting phones 10 yrs plus

i unbricked my device 10+ times with msmtool trying to get gsi on this phone.

ill just wait for a true custom rom for our device if we get one.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    To root y'all need to do:
    fastboot create-partition-primary 512 product
    Then flash the attached product.

    Then flash your rooted img, it'll boot successfully.
    Figured out Magisk together with @darkghost568 - the steps described are kinda off. No need to delete product_a anymore, and creating product (without the suffix) won't be recognized. In the end, it's actually as simple as flashing your image to product (which will redirect to product_a automatically) prior to flashing GSIs.
    Code:
    fastboot flash product product_gsi.img
    Updating OP accordingly.
    1
    @oCAPTCHA PHH's AOSP doesn't have /sbin fix integrated, so some work is needed to set up Magisk on it (creating /sbin and such).
    @bircky311 Register here.
    1
    Does Voice Over LTE (VoLTE) work on GSI for the N200?
    Can't test, it's not my main. Flipping on everything in PHH Settings - IMS Settings should do.
  • 2
    The process of flashing alone is conventional, shouldn't even need a thread to detail, but still leaving a thread here for search indexing.
    With an unlocked BL, flash an ARM64 AB GSI within fastbootd, reboot to recovery, format userdata, reboot, profit. vbmeta isn't even needed in my case.

    EDIT: One thing that's unconventional and I forgot to mention is, for many GSIs, you gotta delete product_a to make room prior to flashing:
    Code:
    fastboot delete-logical-partition product_a

    EDIT2: Magisk doesn't like to see product_a go. Instead, just flash a blank one (from #15) to it:
    Code:
    fastboot flash product product_gsi.img
    Thanks to @Whoareyou for the original finding and @darkghost568 for additional ideas.
    1
    Are we getting closer?
    To proper custom ROMs? Dunno, I don't do bringups. I'll at least make/refine/submit the device overlay so GSIs would look proper.
    1
    OK I'll ask since I have no clue. What's a GSI?
    1
    Android 12 boots unsurprisingly as well, not as usable as 11 ofc.
    1
    A Generic System Image, is a universal version of android, which is available since project Treble separated the O/S into a "HAL" (Hardware Abstraction Layer) driver layer interface and the core operating system.

    boot contains the kernel.
    vendor, vendor_dlkm, odm, odm_dlkm are the drivers.
    system, system_ext are the O/S core.
    product is device specific O/S customizations.


    1634034326648.png



    Project Treble is a good thing, making strides for Android to become a standardized operating system.


    GSI install Guide:

    Using information from:

    We find that we are supposed to flash vbmeta.img with "--disable-verification" because GSIs don't "include a verify boot solution". However, this step is not required on our particular device, due to OnePlus specific changes of verification being automatically disabled upon bootloader unlock.

    Prerequisites: unlocked bootloader, up to date fastboot installed on a computer

    1. Boot the phone into fastbootd mode by:
    booting into recovery mode, by holding power and volume down during boot, then
    rebooting into fastboot (only) mode, using touch menus: advanced, reboot into fastboot, then
    connecting usb-c to a computer and using the poorly named command:
    fastboot reboot fastboot.

    Now we can use fastbootd commands.

    2. We must erase the system partition:

    fastboot erase system

    3. next we need to obtain a GSI. I used phhusson's GSI build.
    Choose arm64-ab for our phone's architechture
    floss for open source apps but no GAPPS or vanilla for no GAPPS,
    don't choose vndklite (Vendor Native Development Kit Lite) as it is a compatibility version for older versions of android's "HAL" layers.
    "system-roar-arm64-ab-floss.img.xz"
    decompress it to .img (and rename to GSI.img for brevity)

    4. If we attempt to flash our GSI into the system partition:

    fastboot flash system GSI.img

    It will inevitably fail due to "not enough space to resize partiion"
    The tool isn't smart enough to handle this task of resizing a "full" dynamic partition.
    So we have to delete virtual partitions out of super to make room.

    5. We must remove any present -COW partitions, which are Copy On Write partitions, which seem to be made by an A-Only virtual dyamic upgrade system. Their purpose is to host temporary changes to a partition, so the original partition is preserved for an emergency rollback, using associated interfaces to the original partition and the COW partition for access.

    check your "fastboot getvar all" for any COW partitions, and delete them.

    fastboot delete-logical-partition system_b-cow

    6. In the official documentation, they admit that we have to delete the product partition(s) manually to make room.

    fastboot delete-logical-partition product_a
    fastboot delete-logical-partition product_b

    7. With that done, we can reattempt to flash the GSI.

    fastboot flash system GSI.img

    8. The official instructions then require a fastboot -w in order to clear user data and "system partitions" data, but this is optional.