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

General GSIs on N200

Search This thread

AndyYan

Recognized Contributor
Jan 30, 2012
4,370
3,700
Beijing
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.
 

Attachments

  • Screenshot_20211007-115347_Settings.png
    Screenshot_20211007-115347_Settings.png
    147 KB · Views: 128
Last edited:

AndyYan

Recognized Contributor
Jan 30, 2012
4,370
3,700
Beijing
Note that Magisk seems incompatible and prevents booting, at least when paired with my GSI - need to restore to stock boot image. Mine comes with PHH-SU so I'm not keen on getting Magisk working anyway.
 

AndyYan

Recognized Contributor
Jan 30, 2012
4,370
3,700
Beijing
Android 12 boots unsurprisingly as well, not as usable as 11 ofc.
 

Attachments

  • Screenshot_20211012-123407.png
    Screenshot_20211012-123407.png
    538.4 KB · Views: 82
  • Screenshot_20211012-123416.png
    Screenshot_20211012-123416.png
    142.9 KB · Views: 81
Last edited:
  • Like
Reactions: TheLoonyRebel

oCAPTCHA

Member
Sep 22, 2021
17
5
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.
 
Last edited:
  • Like
Reactions: darkghost568

AndyYan

Recognized Contributor
Jan 30, 2012
4,370
3,700
Beijing
Unofficial lineageOS 18.x by AndyYan is a Phhusson GSI derivative that claimed partial Magisk compatibility, but it also would not boot when Magisk patched. microG signature spoofing was not supported.
That Magisk compatibility does work on most other devices, even including an OPPO device which N200 is a rebadge of. Not sure why it is. Install PHH's Superuser and you get root for apps at least.
MicroG support is limited to priv-app for safety, as shown here.
BTW, long writeup, might wanna cut it down and/or add some emphasis?
Are (A11 based) GSI's daily-drivable on the N200?
VoLTE is one major hardware feature I can't verify; basic functionalities should be good. Heck, I daily-drive GSI on a device that has way more bugs than this.
Also, do they allow for safetynet for banking apps, etc?
PHH's "securize" option might allow you to do so for now (and unroot). I don't use GAPPS at all.
 

mthous01

Senior Member
May 24, 2012
174
46
Florence
OnePlus Nord N200 5G
Rooting GSI Android 11

@AndyYan
That Magisk compatibility does work on most other devices, even including an OPPO device which N200 is a rebadge of. Not sure why it is. Install PHH's Superuser and you get root for apps at least.
MicroG support is limited to priv-app for safety, as shown here.
BTW, long writeup, might wanna cut it down and/or add some emphasis?

VoLTE is one major hardware feature I can't verify; basic functionalities should be good. Heck, I daily-drive GSI on a device that has way more bugs than this.

PHH's "securize" option might allow you to do so for now (and unroot). I don't use GAPPS at all.
Rooting GSI Android 11

Have you tried this yet, to get Magisk to work? I'm still on the bubble on wiping my phone and trying this, as it's my only daily driver right now.
 

Whoareyou

Senior Member

Attachments

  • product_gsi.img
    328 KB · Views: 28
Last edited:
  • Like
Reactions: AndyYan

oCAPTCHA

Member
Sep 22, 2021
17
5
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.
 
Last edited:

mthous01

Senior Member
May 24, 2012
174
46
Florence
OnePlus Nord N200 5G
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.

Could you flash a stock kernel on top of a GSI, then reroot with Magisk?
 

Whoareyou

Senior Member
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.

^
 

Top Liked Posts

  • There are no posts matching your filters.
  • 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.
    2
    I'd still love to learn, if you'd be willing to share some know how and sources on git. I'd even be willing to buy you a beer or six, if you have a donate link and are willing.
    I sent you a PM. And for anyone else interested in developing for the N200, feel free to message me. I'm open to collaborations, the more developers on the project, the better the project can be for all 😁
    2
    I'm interested to learn. I've been looking, but the source seems to be missing. Kernel source seems incomplete as well. I have the space and the desire if I can help.
    I just got my bootloader unlock code last night. I do believe I should be able to compile better twrp (with fastbootd and proper decryption of data) and whatever Android 12 ROM my heart desires.
    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?