Ultimate Guide for Flashing GENRIC SYSTEM IMAGE.
Contents:
Intro
how to flash gsi.
how to get rooted.
gapps issues
how to get back to non treble rom from gsi or treble enabled builds.
Introduction and basic information:
GSI means Generic System Image, which can be flashed over any Treble Device.
So, in simple words : same System.img can be flashed over multiple devices having Treble Support.
This happens as we now have a separate /vendor partition where all the vendor hals are stored.
Now, this will help to do easy bring ups, Treble builds are smooth af y'all know that and you'll get to flash aosp treble rom
Also, if you own 2-3 treble devices, now you'll just have to download one system.img xD it'll work for all of em ( if treble supported )
How to get Treble Support?
Flashing Treble TWRP won't give you treble support. Keep that in Mind. It'll just mount the partition in the recovery, so that vendor img can be flashed.
To get Treble Support, you'll need to flash a latest ROM which has vendor image compiled with the latest changes by mikeNG, once you flash such a ROM, you'll get the vendor stored in the vendor partition, and after that you can flash any GSI ( as it's just System.img, and all our device specifics are in /vendor so it won't mess with that)
Instructions:
Download Official LineageOS-15.1 treble enabled build from here
Download treble enabled twrp from here
Move both the downloaded files to external sd card (recommended)(optional)
boot in twrp
move to wipe option from twrp.
advanced wipe.
select data and then check if its in ext4 if not format it to ext4 ( do this from official twrp by @celoxocis )
then go to install and install the recovery provided above.
reboot to recovery.
wipe system, data, dalvik, cache & internal storage recommended.
install the lineage os zip and reboot.
download GSI of any rom of your choice. if it is in zipped format extract it and make sure you have a *.img
boot into twrp
wipe anything other than boot, micro sd & vendor
go to install option and then select install image button on bottom right corner
select the gsi of your choice which you have downloaded and install it on system partition.
reboot to recovery (important)
flash mind the gapps if you are going to use gapps in your rom. ( important open gapps have a few issues on treble like many of times gapps dont get flashed or shows some error)
reboot
Kudos you have now flashed a Genric System Image on your Lenovo P2.
for how to get rooted with magisk refer to next post.
and List Of GSI is available here
if you have any doubts even after reading this ultimate guide feel free to post it i will try to answer it and help you with that.
after following instruction as mentioned above
* download the magisk from here
* flash it normally.
A list of GSI and download links can be found here.
https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-(GSI)-list
Only A arm64 gsi are supported well on our device and based on arch of our device
how to get back to non treble rom?
* Download the non treble rom your choice
* boot into twrp do wipes as suggested on rom's thread and then flash the rom package no need to mess with vendor partition.
I have managed to flash Dirty Unicorns Rom and its working pretty much well.
Here are some screen shots.
Volte working on GSI?
Volte working on any gsi?
advaithbhat said:
Volte working on any gsi?
Click to expand...
Click to collapse
My network provider don't use volte you can try and tell me
Sent from my Phh-Treble vanilla using Tapatalk
I'm on codeexilir's twrp, can't I use that twrp to flash official los 15.1 to get vendor image and then flash any GSI. Or it is mandatory to use los twrp?
abdal2006 said:
I'm on codeexilir's twrp, can't I use that twrp to flash official los 15.1 to get vendor image and then flash any GSI. Or it is mandatory to use los twrp?
Click to expand...
Click to collapse
I believe You can but I haven't tested that.
Sent from my Phh-Treble vanilla using Tapatalk
If i want to change the gsi img then should i clean flash the los 15.1 again?
imPro01 said:
If i want to change the gsi img then should i clean flash the los 15.1 again?
Click to expand...
Click to collapse
No. Just don't wipe vendor & boot just change GSI
Sent from my Phh-Treble vanilla using Tapatalk
abhayruparel said:
No. Just don't wipe vendor & boot just change GSI
Click to expand...
Click to collapse
Thank you for reply
1) If i go to recovery and flash the new GSI img without anything wipe then it'll work?
2) If i want to go back to Los then how to do it?
Thx abhayruparel.
There is not an aosp p beta yet, no?
After flashing GSI NFC is not working
I can't make any gsi work.Always returns password and reset phone screens on reboot.Entering password says password accepted but decryption unsuccessful.Reset phone takes to TWRP but does nothing and reboots to the same password screen.What to do?
rexit1979 said:
I can't make any gsi work.Always returns password and reset phone screens on reboot.Entering password says password accepted but decryption unsuccessful.Reset phone takes to TWRP but does nothing and reboots to the same password screen.What to do?
Click to expand...
Click to collapse
Changing system and data to ext4 will do the trick probably
Miltonbaidya88 said:
Changing system and data to ext4 will do the trick probably
Click to expand...
Click to collapse
Both are already on ext4.
After flashing gsi got decryption unsuccessful error. How to solve that?
something is very wrong......
First if I flash lineage then any other gsi like pixel experience, it gives me decryption unsuccessful error.... I'm not even able to format the storage to remove encryption. I did format the encryption using an older version of twrp as the twrp provided for treble gives an error like ''
Unable to format data. Unble to remove encryption
-Now When I formatted data using earlier twrp and hen flashed the treble one and then flashed lineage. Booted and it still encrypted my phone. So the loop goes on again.
I dont know whats wrong. Treble flashing should be easy... been awake since last night trying to make it ork by using different combinations but no luck.
can anyone help?
Is there any way to enable volte in GSI?
Related
guys, i have a little confusion:
What's the correct procedure for reinstall the stock OOS from a custom rom and the procedure for change custom rom to another one?
i ask this because every time i try i brick the phone. (so msmntool and lose internal storage)
my latest experiment:
i was on Havoc, rooted and blue_twrp
full wiped (cache's, data and system)
installed Full 9.0 OTA+ twrp on slot A
rebooted to twrp
installed again Full 9.0 OTA+ twrp on slot B
installed magisk
rebooted to system...
keep boot on recovery and also i canno't decrypt sdcard because twrp doesn't ask me the pin....
someone suggested to me to format data, but i don't want to lose my internal storage anytime...
help?
The best thing to do to avoid all of thi bs is to follow this guide:
https://forum.xda-developers.com/oneplus-6/how-to/tutorial-decrypt-flash-rom-pie-oreo-roms-t3838643
vivmar said:
guys, i have a little confusion:
What's the correct procedure for reinstall the stock OOS from a custom rom and the procedure for change custom rom to another one?
i ask this because every time i try i brick the phone. (so msmntool and lose internal storage)
my latest experiment:
i was on Havoc, rooted and blue_twrp
full wiped (cache's, data and system)
installed Full 9.0 OTA+ twrp on slot A
rebooted to twrp
installed again Full 9.0 OTA+ twrp on slot B
installed magisk
rebooted to system...
keep boot on recovery and also i canno't decrypt sdcard because twrp doesn't ask me the pin....
someone suggested to me to format data, but i don't want to lose my internal storage anytime...
help?
Click to expand...
Click to collapse
You dont have to flash the rom to both the slots. Just make a clean flash without format data.
First of all, Stay Encrypted :laugh:
Now from custom rom to Oxygen OS make a clean flash so follow the below:
Must Use Bluspark TWRP
1. Wipe Dalvik, System, Data & Cache
2. Flash the Full OxygenOS Rom Full Zip (Links available on my threads Beta or Stable Pie)
3. Flash the TWRP installer Zip
4. Reboot to RECOVERY to make sure TWRP stays and continue to root.
5. Flash Magisk Stable to maintain root (Avoid Beta)
6. Reboot System and Enjoy the latest firmware without any data loss
Make sure you follow above and also make sure:
1. Use Bluspark TWRP
2. Move from Pie To Pie / Pie to Oreo or Oreo to Pie might require a format.
Similarly follow the same if you want to move from Oxygen OS to Custom Rom, check the rom thread if the developer needs you to flash anything extra or firmware files.
Hope the above helps :good:
Funk Wizard said:
You dont have to flash the rom to both the slots. Just make a clean flash without format data.
First of all, Stay Encrypted :laugh:
Now from custom rom to Oxygen OS make a clean flash so follow the below:
Must Use Bluspark TWRP
1. Wipe Dalvik, System, Data & Cache
2. Flash the Full OxygenOS Rom Full Zip (Links available on my threads Beta or Stable Pie)
3. Flash the TWRP installer Zip
4. Reboot to RECOVERY to make sure TWRP stays and continue to root.
5. Flash Magisk Stable to maintain root (Avoid Beta)
6. Reboot System and Enjoy the latest firmware without any data loss
Make sure you follow above and also make sure:
1. Use Bluspark TWRP
2. Move from Pie To Pie / Pie to Oreo or Oreo to Pie might require a format.
Similarly follow the same if you want to move from Oxygen OS to Custom Rom, check the rom thread if the developer needs you to flash anything extra or firmware files.
Hope the above helps :good:
Click to expand...
Click to collapse
Thanks so much!
I've come from miui 10.0.2.0 (oreo) to Pixel Experience gsi
Unlocked bl, installed twrp, wiped all and flashed PE
It wasn't an easy process, but I finally got rid of miui.
Now I can't install any other gsi/non-gsi rom! That's ridiculous! I'm stuck on that gsi
The thing does not boot. When I flash something else
My installation algorithm -> advanced wipe, install gsi to system -> gapps (if needed) -> get a bootloop.
The thing that is not getting changed, I thought, is my vendor. So I guessed, that I need to install vendor 10.0.4, wich is Pie.
Maybe that Is the case.
All evening I've been looking for that vendor image, and there ain't singe one!
Does anyone have a Magik link to the thread, where are all the images?
If no,
What should I do next?
I guess install miui again?
Via what? Fastboot? Is there a twrp method?
Am I really the only one, that is facing this problem on this device?
A wonderful day for the reader!
I just unzipped the fastboot rom, and there is vendor.img inside.
It wouldn't be a stupid idea to consider this as the image I am looking for? I mean I can flash that image, and it should be fine?
You should download the latest fastboot global dev rom http://bigota.d.miui.com/8.11.15/po...15_20181115.0000.00_9.0_global_3dc5c2bb71.tgz and flash it with miflash.Then flash latest twrp wipe systemmdata and then flash rom,gapps and have fun
Hi to everyone. I have a european version of the op7 pro. The device produces an issue when using android auto, which I use daily (the bottom bar is rarely responsive to my touches whereas the rest of android auto works fine). So I wanted to try a custom ROM and see if the problem persists.
I tried multiple roms like havoc, aosip and lineage following the respective guides of installation, but regardless of the ROM, I always get stuck at the startup animation when I first try to reboot to system after installing twrp, magisk, gapps etc.
The only rom that seems to work is any version of OOS.
Any help would be greatly appreciated!
Exact what steps you do when installing a custom ROM?
U need to explain how you flash those OS; from my experience on OP6 -> flashing a third party rom need to update it' firmware to match the rom u try to flash, or else it cannot go into system definitely!
Steps :
Unlock bootloader
Boot twrp
Flash twrp
Flash rom
Flash twrp
Reboot to recovery
Once again flash rom
Once again flash twrp
Flash magisk
Flash gapps
Use international version instead of European. This mostly solves the issue.
Also steps should be.
Flash oos
Flash twrp
Reboot recovery
Flash oos
Flash twrp
Reboot recovery
Format data
Flash rom
Flash twrp
Flash gapps (if required)
Flash magisk(if needed)
Flash dm verity (if needed)
Reboot system
pranacrockz said:
Use international version instead of European. This mostly solves the issue.
Also steps should be.
Flash oos
Flash twrp
Reboot recovery
Flash oos
Flash twrp
Reboot recovery
Format data
Flash rom
Flash twrp
Flash gapps (if required)
Flash magisk(if needed)
Flash dm verity (if needed)
Reboot system
Click to expand...
Click to collapse
What oos do I flash? Would you mind linking me to it?:good:
Kama45 said:
What oos do I flash? Would you mind linking me to it?:good:
Click to expand...
Click to collapse
Latest android 10 stable rom available for your phone.
pranacrockz said:
Use international version instead of European. This mostly solves the issue.
Also steps should be.
Flash oos
Flash twrp
Reboot recovery
Flash oos
Flash twrp
Reboot recovery
Format data
Flash rom
Flash twrp
Flash gapps (if required)
Flash magisk(if needed)
Flash dm verity (if needed)
Reboot system
Click to expand...
Click to collapse
I think this post is useful. But what is dm verity, where to find?
I flash the roms and manage to open them but sensors not working on any custom rom. I create a topic to help but nobody cared.
c3drik 67 said:
Latest android 10 stable rom available for your phone.
Click to expand...
Click to collapse
Is that the same as going back to stock with the MSM tool?
Like this one: https://androidfilehost.com/?fid=4349826312261732239
poulidis said:
Steps :
Unlock bootloader
Boot twrp
Flash twrp
Flash rom
Flash twrp
Reboot to recovery
Once again flash rom
Once again flash twrp
Flash magisk
Flash gapps
Click to expand...
Click to collapse
You must Format internal storage before booting into Custom ROM.
Also, when you flash a Custom Rom, when it's done flashing, reboot once more to recovery and then flash the rest like Gapps, Magisk, etc... (Keep in mind that some custom ROMs require once time boot before flashing Magisk).
Kama45 said:
What oos do I flash? Would you mind linking me to it?:good:
Click to expand...
Click to collapse
https://otafsg1.h2os.com/patch/amaz...P.26_OTA_026_all_2003222032_6893aca031668.zip
---------- Post added at 09:09 AM ---------- Previous post was at 09:08 AM ----------
GöğüstekiDövme said:
I think this post is useful. But what is dm verity, where to find?
I flash the roms and manage to open them but sensors not working on any custom rom. I create a topic to help but nobody cared.
Click to expand...
Click to collapse
Dm Verity is to keep the phone unencrypted. I don't use dm Verity but I never faced such problems.
Which rom u using?
pranacrockz said:
https://otafsg1.h2os.com/patch/amaz...P.26_OTA_026_all_2003222032_6893aca031668.zip
---------- Post added at 09:09 AM ---------- Previous post was at 09:08 AM ----------
Dm Verity is to keep the phone unencrypted. I don't use dm Verity but I never faced such problems.
Which rom u using?
Click to expand...
Click to collapse
Oos O2 Beta 11 now. Back when I try, it was oos beta 10. None of custom roms sensors were not working. Like Pixel exp, havoc, lineage
Sent from my OnePlus7Pro using XDA Labs
Never use beta. Always use stable
pranacrockz said:
Never use beta. Always use stable
Click to expand...
Click to collapse
I'll try one more time later. Thanks.
My device isn't supported by twrp (Huawei fla-lx1 or fla-l21) and I want to install this gsi image file because my phone is treble compatible, is it a must to have a working twrp image? Doesn't LOS has its own recovery thing? Can I still root it and install modules? Can I do ANYTHING?
Relected said:
My device isn't supported by twrp (Huawei fla-lx1 or fla-l21) and I want to install this gsi image file because my phone is treble compatible, is it a must to have a working twrp image? Doesn't LOS has its own recovery thing? Can I still root it and install modules? Can I do ANYTHING?
Click to expand...
Click to collapse
Once you can unlock bootloader then you could do a step further, GSIs can be installed through fastboot, and in regards LOS recovery it must there one specific for your device, they're not generic recovery images for every android device.
My phone Sprint/XT1922-7_JETER_SPRINT_8.0.0 (16gb model)
I just root it and flash Disable_Dm-Verity_ForceEncrypt + Magisk
Until I saw this:
[AOSP 9.0] [2019-08-25] Phh-Treble
WARNING: You'll most probably loose ALL your data, and might break your phone. Please use with extreme caution! The goal of this ROM is to provide maximum hardware compatibility inside a Generic System Image. No feature will be added. This will...
forum.xda-developers.com
The instructions say: Flash GSI first.
Then flash Magisk.
I also don't know if Disable_Dm-Verity_ForceEncrypt would mess up?
either your device is Treble or not. check with this app
http://play.google.com/store/apps/details?id=com.kevintresuelo.treble
if yes you can flash any GSI
https://forum.xda-developers.com/t/gsi-10-lineageos-17-x-gsi-all-archs.4004673
you don't need encryption disabler, but sure you must factory reset device every time you switch ROM.
aIecxs said:
either your device is Treble or not. check with this app
http://play.google.com/store/apps/details?id=com.kevintresuelo.treble
if yes you can flash any GSI
https://forum.xda-developers.com/t/gsi-10-lineageos-17-x-gsi-all-archs.4004673
you don't need encryption disabler, but sure you must factory reset device every time you switch ROM.
Click to expand...
Click to collapse
I already flashed Disable_Dm-Verity_ForceEncrypt + Magisk on the phone.
Do I Need to remove those before I flash GSI?
No, how would you? It's too late. To undo modifications of Disable_Dm-Verity_ForceEncrypt you need to restore backup of vendor (sometimes nvram)
Is it possible/safe to flash GSI on phone that was already flashed Disable_Dm-Verity_ForceEncrypt + Magisk?
aIecxs said:
either your device is Treble or not. check with this app
http://play.google.com/store/apps/details?id=com.kevintresuelo.treble
if yes you can flash any GSI
https://forum.xda-developers.com/t/gsi-10-lineageos-17-x-gsi-all-archs.4004673
...
Click to expand...
Click to collapse
May be I'm mistaken but you can't flash ANY GSI even if device is Project Treble enabled: Read here:
Generic System Images (GSIs) | Platform | Android Developers
developer.android.com
of course I referred to builds that are built for the proper SoC (aarch64). In theory one can use "any" of these GSIs here:
https://forum.xda-developers.com/f/treble-enabled-device-development-a-ab-roms.7260
(as always: read OP for restrictions)
Is it possible/safe to flash GSI on phone that was already flashed Disable_Dm-Verity_ForceEncrypt + Magisk?
what do you mean with safe? no, you will lose all data each time you format data (which is required step for every ROM installation).
as I said if your device is treble enabled it is possible to flash GSI. doesn't matter if encryption already has been disabled or phone was rooted with Magisk previously. Magisk lives in boot partition. if you install custom ROM it will overwrite boot + system anyway (sometimes even vendor, where encryption was patched)
GSI only overwrites system partition, it won't touch boot or vendor therefore all modifications preserved.
aIecxs said:
what do you mean with safe? no, you will lose all data each time you format data (which is required step for every ROM installation).
as I said if your device is treble enabled it is possible to flash GSI. doesn't matter if encryption already has been disabled or phone was rooted with Magisk previously. Magisk lives in boot partition. if you install custom ROM it will overwrite boot + system anyway (sometimes even vendor, where encryption was patched)
GSI only overwrites system partition, it won't touch boot or vendor therefore all modifications preserved.
Click to expand...
Click to collapse
I don't care about data. I understand that each time flash a new rom --> all data in the phone would be erased.
I am asking because the guide show flash GSI first.
Then install Magisk later.
It also doesn't mention anything about Disable_Dm-Verity_ForceEncrypt. That why I worry if Disable_Dm-Verity_ForceEncrypt would mess everything up.
phone Sprint/XT1922-7_JETER_SPRINT_8.0.0 (16gb model)
Handsome Jack said:
I understand that each time flash a new rom --> all data in the phone would be erased.
Click to expand...
Click to collapse
not exactly. you should care about that last step yourself, it is highly recommended.
Handsome Jack said:
It also doesn't mention anything about Disable_Dm-Verity_ForceEncrypt. That why I worry if Disable_Dm-Verity_ForceEncrypt would mess everything up.
Click to expand...
Click to collapse
In this guide there are quick fastboot commands to revert back to stock. probably vendor is enough to repair encryption.
[guide] [root] [oreo&pie] [jeter/aljeter] [twrp, decrypt, magisk] [stock firmware]
* Your warranty is now void. * * I am not responsible for bricked devices, dead SD cards, fires, rigged elections, ligma, * thermonuclear war, or your mom getting upset with you for being on the computer all day Please * Ensure you have an...
forum.xda-developers.com
yeah, I used that guide to flashed Disable_Dm-Verity_ForceEncrypt + Magisk.
After that I found out it doesn't need those two... to flash GSI.