• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[How-To] GSI Definitive Guide (ROM+GApps+Bluetooth+GCam+90HZ+V4A)

Search This thread

EdgardoSchiffer

Senior Member
Oct 15, 2013
121
122
OnePlus 9
Before i ask my question, i didn't have any luck with your method either. The question is, in the reference links you provided, they talk about vbmeta and pushing fstab.qcom, but you didn't mention anything about them in the steps. Am i missing something?

Those steps aren't mentioned since they are part of the process of installing TWRP and can be found in their respective guides. BTW, never done anything about fstab.qc, only the vbmeta step.


how can i check the version from the name of the image?

example: losq-v214-a64ab-200315-vanilla


I appreciate anyone's input into solving my issue

Well, it's quite easy, the name should always contain "arm64", and "ab" or "a/b", if they are separated by a character or join it's a thing for every developer.

In the example you provided the string you gotta check is a64ab, which is for a64 processors which ab partitions. It won't boot on X2 pro, a64 it's not arm64.
 

IIABODEII

Senior Member
Oct 11, 2010
67
9
Those steps aren't mentioned since they are part of the process of installing TWRP and can be found in their respective guides. BTW, never done anything about fstab.qc, only the vbmeta step.




Well, it's quite easy, the name should always contain "arm64", and "ab" or "a/b", if they are separated by a character or join it's a thing for every developer.

In the example you provided the string you gotta check is a64ab, which is for a64 processors which ab partitions. It won't boot on X2 pro, a64 it's not arm64.

Ok I followed the steps as you mentioned (stopped after vbmeta). After flashing a GSI then rebooting to system, the device boots back into recovery.. What could i have done wrong?
 

natedogg20050

Senior Member
Aug 19, 2009
301
72
Hello everybody:

GSI ROMS finally have Fingerprint on display (fod) support, so I decided to try it today.
It was quite difficult to make everything work, since there are a lot of guides in X2 Pro forum and XDA, so I decided to create this thread to make things easier to other users that want to use GSI ROMS.
My device is a Realme X2 Pro Chinese, but this should work on any X2 Pro.

The guides I used as references are these ones:
https://forum.xda-developers.com/realme-x2-pro/how-to/how-to-flash-aosp-android-10-gsi-realme-t4036825
https://forum.xda-developers.com/realme-x2-pro/how-to/how-to-flash-havoc-evolution-gsi-t4040607
https://forum.xda-developers.com/realme-x2-pro/how-to/how-to-flash-aosp-android-10-gsi-realme-t4036825
https://forum.xda-developers.com/project-treble/trebleenabled-device-discussion/guide-fix-bluetooth-audio-a2dp-aptx-gsi-t3950938
And probably other ones I found at internet that I can't remember at this point :confused:

1. Pre-requisites
- Unlocked bootloader
- TWRP Installed (I use Orange Fox)
- Color OS Firmware A08+ or A13+ (chinese)
Don't do it being on Realme UI, there are some features that won't work with the new firmware/vendor, FP included (Ironically, bluetooth gets fixed).
- Any software that can uncompress .xz files (most of GSI comes in this format)

2. Choosing your ROM
The first step is to find any rom that you like, it must has these features:
- It has to be based on phh's AOSP v214 or newer.
- It must be A/B ARM64.

You can look for one here:
https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-%28GSI%29-list
Screenshot_6.png


I would suggest to pick phh's AOSP ROM or LOSQ Project which is really close to phh's source.
https://github.com/phhusson/treble_experimentations/releases
https://github.com/eremitein/treble-patches/wiki/LOSQ-Project

Bugs as of March 03, 2020
At this time, every phh's based rom has the following bugs:
- In-call bluetooth
- Bluetooth media playback (can be solved)
- Auto brightness
- Securize (I tried to use it but never done anything)

And there may be more bugs included on the rom you're using (lineage, havoc, evo, losq, posp, etc)

3. GApps (Optional)
Note: many roms has 2 variants, one with GApps included and one vanilla, depending on the one you choose, you'll have to do this step.

If you need Google Services and the ROM you downloaded does not include them, you need to pick a Gapps package.
Personally, I like BitGapps, but you can choose any you like as long as they are made for ARM64 Android 10.

BitGApps
FlameGApps
OpenGApps

4. Bluetooth fix
Before flashing the ROM, you have to delete the file BluetoothResCommon.apk from your vendor. You may want make a copy of it.
For this, you can do this action in the following ways:
- using a file explorer
Search in the root (/) the path /vendor/overlay
Search the file BluetoothResCommon.apk
Make a backup of the file
Delete the file

- adb and root
Connect your phone to your PC and run these commands from terminal or cmd:
adb pull /vendor/overlay/BluetoothResCommon.apk
adb shell
su
rm /vendor/overlay/BluetoothResCommon.apk

- adb and twrp
Enter in recovery mode
Mount vendor partition
Connect your phone to your PC and run these commands from terminal or cmd:
adb pull /vendor/overlay/BluetoothResCommon.apk
adb shell
rm /vendor/overlay/BluetoothResCommon.apk

This section is based from this guide. Only the first step is needed, X2 Pro build.prop has already some working configurations.

5. Flashing ROM and Gapps
- Download the ROM file (if you haven't)
- If ROM it's compressed (xz), then uncompress the file and copy the rom_name.img file to your phone
- Copy GApps to your phone (optional)
- Enter in TWRP
- Choose the file rom_name.img
- Flash it as "System image"
- If you're flashing GApps, follow this steps:
- Go to Partitions
- Select system
- Resize partition
- Flash GApps package
If this steps shows you errors, you can reboot to recovery and try again​
- Format data
- Reboot system


Note: according to many guides and people, certain roms like havoc won't boot if you don't set your selinux to permissive.
I tried havoc some weeks ago and I didn't needed to do that, but in case the rom you picked doesn't boot, flash Permissiver_v5 from this thread:
https://forum.xda-developers.com/realme-x2-pro/how-to/how-to-flash-havoc-evolution-gsi-t4040607

6. Magisk
As of March 15, 2020, phh's Magisk works, yes, but it has the following issues:
- App installation becomes slower
- Internal storage becomes read and append only, you can't modify files or delete them.

For those reasons I do not recommend to install it at this moment. Whenever it gets fixed, I'll update the guide with the proper links.


7. First steps in your new ROM (including 90hz)
Now that your rom has booted (I think), there are some basic configs that you may want to do:
- Get LTE working:
In my case, by default the ROM were locked on WCDMA, which is 3G+ in my operator, follow this steps to change it

- Go to Settings
- Open Network & internet
- Select Mobile network
- Look for Preferred network type
- Choose the one that works better for you. I selected global.

- Enable device features:
By default, some of our device features come disabled, lets change it

- Go to Settings
- Open Phh Treble Settings
- Open Oppo features

- Select Enable DT2W
- Select Enable Game Mode
- Select Enable USB OTG
- Open Misc features

- Select Expose Aux cameras
- Select Force Enable Camera2API HAL

- Enable 90HZ!
And finally, for enabling 90HZ:
- Go to Settings
- Open Phh Treble Settings
- Open Misc features
- Select Force FPS
- Choose 90.0 (or 60.0 if you don't want it)
- Nice

8. Google Camera (GCam)
Get a funcional GCam was really hard, I tried several versions like Urnyx, Tiger, BSG and Arnova. They didn't work, whenever I made a picture or video the app closed, even loading the config.xml
After a lot of effort, I found one that is working pretty well, including features like night mode! It's a very specific version, GCam_5beta6.200105.0445build-7.2.018.apk others didn't work
Just download and install it:
https://www.celsoazevedo.com/files/android/google-camera/f/changelog955/

Note: You probably will need to download Google Photos app, I already use it, so it worked from the first run.

9. Viper4Android (V4A)
And last but not least, for people that uses V4A, these are the steps to making it work without Magisk.
1. You will have to set your selinux to permissive, if you haven't, flash Permissiver_v5
2. Go to this site https://zackptg5.com/android.php#viper and download Rootless Driver Installer
Screenshot_7.png

3. Flash the file
4. Reboot and install Viper4Android 2.7.0.1 or newer
5. Profit!

There are some screenshots at the attachments :)

Many thanks to all the devs, contributors and XDA Users that made possible to have AOSP GSI in X2 Pro, some of them:
@phhusson @natedogg20050 @ospeto @SrCDA @Jerry08 @mauronofrio

You Welcome! thanks for keeping the flow going on the RealmeX2PRO

i just sold my device and bought the Xiaomi Mi 10
 

xyikarusxy

Member
Jan 26, 2019
30
7
Hello friends, I have a very big problem. I have a Lenovo Z5 pro gt 8/256 with locked bootloader. I've tried the ZUI unlock tool about 20 times to get the unlock code, but I never get an email back?!?! There is a blue tick "they receive an email", but nothing comes. What can I do to unlock the boot loader, or is there a Rome with an unlocked boot loader? I need help urgently.
 

EdgardoSchiffer

Senior Member
Oct 15, 2013
121
122
OnePlus 9
Hello friends, I have a very big problem. I have a Lenovo Z5 pro gt 8/256 with locked bootloader. I've tried the ZUI unlock tool about 20 times to get the unlock code, but I never get an email back?!?! There is a blue tick "they receive an email", but nothing comes. What can I do to unlock the boot loader, or is there a Rome with an unlocked boot loader? I need help urgently.

If you do not receive a confirmation code you can contact technical support of Lenovo and ask for help, perhaps they can provide you the code you need. Also you could create some other email account and try with that one.

Anyway, you may get better help on Lenovo forums instead on realme forum.
 
  • Like
Reactions: gamr13

perisman

Senior Member
Jul 2, 2017
56
25
I found phh treble gsi rom. Bliss 12.7 with phh-treble v216 patches.
Works very well (FP works only at max brightnes, and autobrightnes dont work. Max brightness works well).
Working smooth, gapps installed and working well. and reachs 474136 in antutu 8.x
Installed over A10 fimware, using the guide in the first post of this thread.

Sourceforge link:

https://sourceforge.net/projects/tr...s-v216-arm64ab-200509-vanilla.img.7z/download

The filename says bless v216, but the file is bliss rom 12.7
 

Attachments

  • Screenshot_20200513-104652.jpg
    Screenshot_20200513-104652.jpg
    137.4 KB · Views: 297
Last edited:

weisdergeier

Senior Member
Mar 15, 2011
60
12
The fingerprint option is missing completely for me.
I flashed A15 firmware followed by phhusson AOSP v219. Everything else seems to work.
Could it be that A15 too new and I need A13, if so where can I get it?

Screenshot_20200615-220056.png
 
Last edited:

weisdergeier

Senior Member
Mar 15, 2011
60
12
The fingerprint option is missing completely for me.
I flashed A15 firmware followed by phhusson AOSP v219. Everything else seems to work.
Could it be that A15 too new and I need A13, if so where can I get it?

Screenshot_20200615-220056.png

I solved it, this is what I had to do:

I clean flashed colorOS, booted it up and had exactly the same issue with the fingerprint still not working.
I then made sure that colorOS had replaced twrp with stock recovery so I could safely lock the bootloader without bricking the phone. For anybody trying this I cannot stretch enough how important this is! If you lock the bootloader with twrp installed you will brick your phone and with the limited developer support out there you will struggle to find instructions for edl flash which is what you will need in that case!
After locking the bootloader the fingerprint started working in colorOS.
After unlocking it again the fingerprint reader continued to work in colorOS.
Then I simply followed the instructions in this thread and now fingerprint works in LOS as well.

To clean flash colorOS (or realmeUI) boot into twrp, wipe data, adb push the ozip (see next step) to your sdcard, install it like you would a regular zip file, reboot into recovery (this is important), format data (where you have to type yes; this did not work for me if I didn't reboot into recovery after installing the ozip), reboot into system.
You can download the ozip for realmeUI or colorOS from here: https://realmeupdater.com/
As far as I understand it:
RMX1931 for chinese phones
RMX1931EX for global phones
in the next step the A.XX versions are for colorOS, C.XX are for realmeUI

If you install realmeUI you need a different deeptesting apk to unlock again. It is a bit hard to find with many people telling you it is not possible to unlock realmiUI. Use this apk: https://drive.google.com/file/d/1bdA...IOJGrXpy2/view
You can follow these instructions: https://www.youtube.com/watch?v=WLUffY1_dR4

Many thanks for your help everybody!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 17
    Hello everybody:

    GSI ROMS finally have Fingerprint on display (fod) support, so I decided to try it today.
    It was quite difficult to make everything work, since there are a lot of guides in X2 Pro forum and XDA, so I decided to create this thread to make things easier to other users that want to use GSI ROMS.
    My device is a Realme X2 Pro Chinese, but this should work on any X2 Pro.

    The guides I used as references are these ones:
    https://forum.xda-developers.com/realme-x2-pro/how-to/how-to-flash-aosp-android-10-gsi-realme-t4036825
    https://forum.xda-developers.com/realme-x2-pro/how-to/how-to-flash-havoc-evolution-gsi-t4040607
    https://forum.xda-developers.com/realme-x2-pro/how-to/how-to-flash-aosp-android-10-gsi-realme-t4036825
    https://forum.xda-developers.com/project-treble/trebleenabled-device-discussion/guide-fix-bluetooth-audio-a2dp-aptx-gsi-t3950938
    And probably other ones I found at internet that I can't remember at this point :confused:

    1. Pre-requisites
    - Unlocked bootloader
    - TWRP Installed (I use Orange Fox)
    - Color OS Firmware A08+ or A13+ (chinese)
    Don't do it being on Realme UI, there are some features that won't work with the new firmware/vendor, FP included (Ironically, bluetooth gets fixed).
    - Any software that can uncompress .xz files (most of GSI comes in this format)

    2. Choosing your ROM
    The first step is to find any rom that you like, it must has these features:
    - It has to be based on phh's AOSP v214 or newer.
    - It must be A/B ARM64.

    You can look for one here:
    https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-%28GSI%29-list
    Screenshot_6.png


    I would suggest to pick phh's AOSP ROM or LOSQ Project which is really close to phh's source.
    https://github.com/phhusson/treble_experimentations/releases
    https://github.com/eremitein/treble-patches/wiki/LOSQ-Project

    Bugs as of March 03, 2020
    At this time, every phh's based rom has the following bugs:
    - In-call bluetooth
    - Bluetooth media playback (can be solved)
    - Auto brightness
    - Securize (I tried to use it but never done anything)

    And there may be more bugs included on the rom you're using (lineage, havoc, evo, losq, posp, etc)

    3. GApps (Optional)
    Note: many roms has 2 variants, one with GApps included and one vanilla, depending on the one you choose, you'll have to do this step.

    If you need Google Services and the ROM you downloaded does not include them, you need to pick a Gapps package.
    Personally, I like BitGapps, but you can choose any you like as long as they are made for ARM64 Android 10.

    BitGApps
    FlameGApps
    OpenGApps

    4. Bluetooth fix
    Before flashing the ROM, you have to delete the file BluetoothResCommon.apk from your vendor. You may want make a copy of it.
    For this, you can do this action in the following ways:
    - using a file explorer
    Search in the root (/) the path /vendor/overlay
    Search the file BluetoothResCommon.apk
    Make a backup of the file
    Delete the file

    - adb and root
    Connect your phone to your PC and run these commands from terminal or cmd:
    adb pull /vendor/overlay/BluetoothResCommon.apk
    adb shell
    su
    rm /vendor/overlay/BluetoothResCommon.apk

    - adb and twrp
    Enter in recovery mode
    Mount vendor partition
    Connect your phone to your PC and run these commands from terminal or cmd:
    adb pull /vendor/overlay/BluetoothResCommon.apk
    adb shell
    rm /vendor/overlay/BluetoothResCommon.apk

    This section is based from this guide. Only the first step is needed, X2 Pro build.prop has already some working configurations.

    5. Flashing ROM and Gapps
    - Download the ROM file (if you haven't)
    - If ROM it's compressed (xz), then uncompress the file and copy the rom_name.img file to your phone
    - Copy GApps to your phone (optional)
    - Enter in TWRP
    - Choose the file rom_name.img
    - Flash it as "System image"
    - If you're flashing GApps, follow this steps:
    - Go to Partitions
    - Select system
    - Resize partition
    - Flash GApps package
    If this steps shows you errors, you can reboot to recovery and try again​
    - Format data
    - Reboot system


    Note: according to many guides and people, certain roms like havoc won't boot if you don't set your selinux to permissive.
    I tried havoc some weeks ago and I didn't needed to do that, but in case the rom you picked doesn't boot, flash Permissiver_v5 from this thread:
    https://forum.xda-developers.com/realme-x2-pro/how-to/how-to-flash-havoc-evolution-gsi-t4040607

    6. Magisk
    As of March 15, 2020, phh's Magisk works, yes, but it has the following issues:
    - App installation becomes slower
    - Internal storage becomes read and append only, you can't modify files or delete them.

    For those reasons I do not recommend to install it at this moment. Whenever it gets fixed, I'll update the guide with the proper links.


    7. First steps in your new ROM (including 90hz)
    Now that your rom has booted (I think), there are some basic configs that you may want to do:
    - Get LTE working:
    In my case, by default the ROM were locked on WCDMA, which is 3G+ in my operator, follow this steps to change it

    - Go to Settings
    - Open Network & internet
    - Select Mobile network
    - Look for Preferred network type
    - Choose the one that works better for you. I selected global.

    - Enable device features:
    By default, some of our device features come disabled, lets change it

    - Go to Settings
    - Open Phh Treble Settings
    - Open Oppo features

    - Select Enable DT2W
    - Select Enable Game Mode
    - Select Enable USB OTG
    - Open Misc features

    - Select Expose Aux cameras
    - Select Force Enable Camera2API HAL

    - Enable 90HZ!
    And finally, for enabling 90HZ:
    - Go to Settings
    - Open Phh Treble Settings
    - Open Misc features
    - Select Force FPS
    - Choose 90.0 (or 60.0 if you don't want it)
    - Nice

    8. Google Camera (GCam)
    Get a funcional GCam was really hard, I tried several versions like Urnyx, Tiger, BSG and Arnova. They didn't work, whenever I made a picture or video the app closed, even loading the config.xml
    After a lot of effort, I found one that is working pretty well, including features like night mode! It's a very specific version, GCam_5beta6.200105.0445build-7.2.018.apk others didn't work
    Just download and install it:
    https://www.celsoazevedo.com/files/android/google-camera/f/changelog955/

    Note: You probably will need to download Google Photos app, I already use it, so it worked from the first run.

    9. Viper4Android (V4A)
    And last but not least, for people that uses V4A, these are the steps to making it work without Magisk.
    1. You will have to set your selinux to permissive, if you haven't, flash Permissiver_v5
    2. Go to this site https://zackptg5.com/android.php#viper and download Rootless Driver Installer
    Screenshot_7.png

    3. Flash the file
    4. Reboot and install Viper4Android 2.7.0.1 or newer
    5. Profit!

    There are some screenshots at the attachments :)

    Many thanks to all the devs, contributors and XDA Users that made possible to have AOSP GSI in X2 Pro, some of them:
    @phhusson @natedogg20050 @ospeto @SrCDA @Jerry08 @mauronofrio
    2
    Before i ask my question, i didn't have any luck with your method either. The question is, in the reference links you provided, they talk about vbmeta and pushing fstab.qcom, but you didn't mention anything about them in the steps. Am i missing something?

    Those steps aren't mentioned since they are part of the process of installing TWRP and can be found in their respective guides. BTW, never done anything about fstab.qc, only the vbmeta step.


    how can i check the version from the name of the image?

    example: losq-v214-a64ab-200315-vanilla


    I appreciate anyone's input into solving my issue

    Well, it's quite easy, the name should always contain "arm64", and "ab" or "a/b", if they are separated by a character or join it's a thing for every developer.

    In the example you provided the string you gotta check is a64ab, which is for a64 processors which ab partitions. It won't boot on X2 pro, a64 it's not arm64.
    1
    Auto brightness and aptx hd also not working out of the box . But aptx hd can be enable with a magisk module. Thanks for this guide.
    1
    Don't forget that all those ROMs that we can use on our phones are because of one guy and he just added fingerprint reading on Realme phones a few days ago, so go and Sponsor him on Github!

    https://github.com/sponsors/phhusson

    I just did and for a year Github matches the donation:
    To supercharge community funding, GitHub created the GitHub Sponsors Matching Fund, which matches up to $5000 USD total per sponsored developer in their first year, or 12 months, of sponsorship.
    1
    Hello friends, I have a very big problem. I have a Lenovo Z5 pro gt 8/256 with locked bootloader. I've tried the ZUI unlock tool about 20 times to get the unlock code, but I never get an email back?!?! There is a blue tick "they receive an email", but nothing comes. What can I do to unlock the boot loader, or is there a Rome with an unlocked boot loader? I need help urgently.

    If you do not receive a confirmation code you can contact technical support of Lenovo and ask for help, perhaps they can provide you the code you need. Also you could create some other email account and try with that one.

    Anyway, you may get better help on Lenovo forums instead on realme forum.