• XDA Forums have been migrated to XenForo. We are aware of several issues including missing threads, logins not working, and more. To discuss, use this thread.

[GUIDE] How to install android P GSI Roms

mac12m99

New member
Dec 17, 2014
192
165
0
Here a more complete guide.


Hi guys, i finally managed to get Havoc OS Pie fully working, this method should theoretically work on any pie gsi, if not tell me :)
Its not obligatory to follow this guide by letter, but you should have this things done:
  • Boot partition with TWRP and Magisk installed(some roms don't boot without root, they stay on splash image)
  • Formatted data
  • Selinux set on permissive on boot time(if it's enforcing camera, flashlight and headphones won't work)
  • Force encryption disabled in fstab.qcom(to fix wrong internal storage space)

Here's the step:
  • Install TWRP
  • Reboot recovery and flash magisk zip and this module if you want to install a selinux enforcing rom(you have to select permissive when installing). If you don't know flash to be sure, it doesn't harm.
  • reboot to bootloader and flash system
    Code:
    fastboot flash system "system image"
  • flash userdata.img from stock rom
    Code:
    fastboot flash userdata images/userdata.img
  • reboot and rom should boot normally(you should have a wrong storage space due to encryption)
  • with a rooted file manager edit /vendor/etc/fstab.qcom and change "forceencryption=footer" to "encryptable=footer" to disable encryption, then reboot to recovery
  • do a format data from TWRP and reboot

Not all these steps are needed on every roms because some don't need rooted kernel, some are permissive and maybe some handles encryption correctly, but by doing all these steps should make any pie rom bugless.

What i have tested(on havoc): camera, wifi, mobile data, hotspot(work but its always without password), headphones, audio, bluetooth, notch(yes, its recognised correctly), flashlight and sms.

Notice: first time you have to set preferred sim for mobile data and sms to get them working.

Huge thanks to
@Voodoojonny for encryption disabling
@d1ngh, @Dees_Troy and Team Win for official TWRP
@Jordan~Kurniawan for the hint of setting selinux to permissive
 
Last edited:

rosiepie

New member
Oct 15, 2018
14
3
0
On the note of the final point, "do a format and reboot" how should I go about that?
Using the ROM's factory reset, flashing the stock userdata.img again, or using TWRP?
 

mac12m99

New member
Dec 17, 2014
192
165
0
On the note of the final point, "do a format and reboot" how should I go about that?
Using the ROM's factory reset, flashing the stock userdata.img again, or using TWRP?
It's the same because now encryption is disabled(formatting data in the classic way with encryption enabled cause a bootloop, this is why i suggest to use userdata from stock).
I will update mainpost.
 

mac12m99

New member
Dec 17, 2014
192
165
0
When you flash userdata.img, why is from stock rom and not from your actual rom?.
Because the one from your actual rom is encrypted and can't be read by other roms(if not you can skip this step, but i assume not).
I don't know why formatting with twrp cause a bootloop if device is encrypted, the only way i've found to clean data without issue is flashing userdata from stock... if anyone find another please tell me :) .
 

mac12m99

New member
Dec 17, 2014
192
165
0
Thx for guide. Working.
Welcome, did you followed the entire procedure or only the hints at the top?
I want to be sure that the procedure is correct because i've made a some tests and in fact the procedure i've used it's not exactly the same.

Also, i've found offline charging not working, this seems caused by magisk, could you please check if you have also this issue?
 

Voodoojonny

New member
Dec 17, 2015
786
322
0
Dortmund
Thank you for this guide! Sadly, we still have the situation to choose between encryption and working twrp. At the first boot, havoc encrypts storage, sothat twrp will not be longer able to encrypt data. "Encryptable=footer" disables encryption, but after that, you will not be able to encrypt phone anymore - I tried under a few scenarios, but encryption just stopped without anything.

And important with Havoc - every securitypatch level of stock leads to other problems - such as no wifi or other bugs. Best results - no bugs @All I got with the combination of @yshalsager´s twrp (18.08.) as kernel combined with stock 9.6.4.0 (july sec patch). You can patch the old twrp with the official afterwards.
Twrp inofficial yshalsager: - mtp not working, vendor not able to being backuped vs official twrp: sdcard not working... And no twrp that can work with pie encryption... Hopefully some dev will find a solution!
 
  • Like
Reactions: Sprut_name

mac12m99

New member
Dec 17, 2014
192
165
0
Thank you for this guide!
Welcome!
Sadly, we still have the situation to choose between encryption and working twrp. At the first boot, havoc encrypts storage, sothat twrp will not be longer able to encrypt data.
I've seen that re-installing twrp fixes, could you try?
"Encryptable=footer" disables encryption, but after that, you will not be able to encrypt phone anymore - I tried under a few scenarios, but encryption just stopped without anything.
You could just revert the change, flash stock userdata and reboot, this should tehoretically make encryption working again(while deleting all data).

And important with Havoc - every securitypatch level of stock leads to other problems - such as no wifi or other bugs.
Give me a logcat, maybe i will find why.
Don't work even with selinux permissive?
 
  • Like
Reactions: Voodoojonny

Voodoojonny

New member
Dec 17, 2015
786
322
0
Dortmund
Welcome!

I've seen that re-installing twrp fixes, could you try?

You could just revert the change, flash stock userdata and reboot, this should tehoretically make encryption working again(while deleting all data).


Give me a logcat, maybe i will find why.
Don't work even with selinux permissive?
I tried to reinstall twrp with
a) patched stock 9.6.4.0 with and without dm-verity
b) patched stock 9.6.9.0 same as above
Both leads to bootloop flashing userdata.bin doesn't fix
c) a and b with magisk and permissiver - > bootloop

Only Yshalsager's twrp as boot with 9.6.4.0 vendor works... All other vendors: broken wifi; all other kernels: bootloop (no dm verity, permissiver, root - nothing helps)
And if you flash userdata.bin you can read data with twrp, but booting havoc will change data, sothat twrp can't read it anymore. Flashing official twrp installer doesn't change anything...
It'slike a circle... Simply: stock twrp is only compatible with encryption of stock userdata... Only solution: decrypt...
I will send you logs tomorrow! Thank you!
 
Last edited:

blue4

Member
Jan 10, 2016
69
9
8
Welcome, did you followed the entire procedure or only the hints at the top?
I want to be sure that the procedure is correct because i've made a some tests and in fact the procedure i've used it's not exactly the same.

Also, i've found offline charging not working, this seems caused by magisk, could you please check if you have also this issue?
Yes and no. I flashed directly patched_boot.img for magisk and only booted twrp with fastboot for flashing Gapps and format data. But this procedure is good. The rom is very fast but sometimes micro-lagging more than stock.
Offline charging not work. (Rooted boot.img issue)

---------- Post added at 09:53 PM ---------- Previous post was at 09:07 PM ----------

Pixel Experience working too and smoother than Havoc for me. (Cam)
 
  • Like
Reactions: mac12m99

Sprut_name

New member
Sep 10, 2018
40
4
0
Hi guys, i finally managed to get Havoc OS Pie fully working, this method should theoretically work on any pie gsi, if not tell me :)
Its not obligatory to follow this guide by letter, but you should have this things done:
  • Boot partition with TWRP and Magisk installed(some roms don't boot without root, they stay on splash image)
  • Formatted data
  • Selinux set on permissive on boot time(if it's enforcing camera, flashlight and headphones won't work)
  • Force encryption disabled in fstab.qcom(to fix wrong internal storage space)

Here's the step:
  • Install TWRP
  • Reboot recovery and flash magisk zip and this module if you want to install a selinux enforcing rom(you have to select permissive when installing). If you don't know flash to be sure, it doesn't harm.
  • reboot to bootloader and flash system
    Code:
    fastboot flash system "system image"
  • flash userdata.img from stock rom
    Code:
    fastboot flash userdata images/userdata.img
  • reboot and rom should boot normally(you should have a wrong storage space due to encryption)
  • with a rooted file manager edit /vendor/etc/fstab.qcom and change "forceencryption=footer" to "encryptable=footer" to disable encryption, then reboot to recovery
  • do a format data from TWRP and reboot

Not all these steps are needed on every roms because some don't need rooted kernel, some are permissive and maybe some handles encryption correctly, but by doing all these steps should make any pie rom bugless.

What i have tested(on havoc): camera, wifi, mobile data, hotspot(work but its always without password), headphones, audio, bluetooth, notch(yes, its recognised correctly), flashlight and sms.

Notice: first time you have to set preferred sim for mobile data and sms to get them working.

Huge thanks to
@Voodoojonny for encryption disabling
@d1ngh, @Dees_Troy and Team Win for official TWRP
@Jordan~Kurniawan for the hint of setting selinux to permissive
Installed aex, the camera does not work. Havoc does not work either.But there is a good news. I made a backup in twrp and then restored it. Restoration of backups works fine.
Then I tried to flash the gsi project treble. In twrp, I did wipe data, system, dalvick and internal storage. then it rebooted into twrp.connected to the computer and downloaded gsi havoc.a, then clicked the installation setting img. and chose the system image. after installation, I rebooted the phone in twrp, and then booted into the system. and the system worked well. the camera and hotspot did not work.
 
Last edited:
G

GuestK0065

Guest
I think many problems people are having here are due to the fact the tutorial, while useful, is incomplete. I had to stuggle a bit but I got everything working as it should (well, besides SELinux Enforcing). I can make a clear English-language thorough tutorial if anyone wants. I don't want to steal anyone's thunder.

Enjoying some Havoc Pie myself atm :D