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

[GSI][ROM][mata][12][Jan 24] Android GSI Support for Essential Phone

Search This thread
Have you updated stock to Android 10?
In case you use Windows Os, please use adb and fastboot coming with driver. You can download driver here: https://storage.googleapis.com/essential-static/Essential-PH1-WindowsDrivers.exe
I've been 'costing' on my old dev-kit setup for too long a time. ;-)

After your pointers, things went well. After trying DotOS first (not quite ready to play nice with Gapps, which I need), and then CorvusOS (nice, but I was intrigued by the dynamic root implementation of CaOS), I loaded CaOS next. What a nice surprise all around, from the easy "on-boarding", to the refreshing modesty of the overall approach to mods. And, what really counts, for the way I use my phone everything worked out of the box!

Thanks for opening up the GSI lifeline to our PH-1s.
 

nguyenquangduc2000

Senior Member
Jun 21, 2015
227
175
Long Xuyen
I've been 'costing' on my old dev-kit setup for too long a time. ;-)

After your pointers, things went well. After trying DotOS first (not quite ready to play nice with Gapps, which I need), and then CorvusOS (nice, but I was intrigued by the dynamic root implementation of CaOS), I loaded CaOS next. What a nice surprise all around, from the easy "on-boarding", to the refreshing modesty of the overall approach to mods. And, what really counts, for the way I use my phone everything worked out of the box!

Thanks for opening up the GSI lifeline to our PH-1s.
You are welcome :D
 

hedgecore44

Senior Member
Mar 9, 2016
150
34
I've been 'costing' on my old dev-kit setup for too long a time. ;-)

After your pointers, things went well. After trying DotOS first (not quite ready to play nice with Gapps, which I need), and then CorvusOS (nice, but I was intrigued by the dynamic root implementation of CaOS), I loaded CaOS next. What a nice surprise all around, from the easy "on-boarding", to the refreshing modesty of the overall approach to mods. And, what really counts, for the way I use my phone everything worked out of the box!

Thanks for opening up the GSI lifeline to our PH-1s.
Awesome! Maybe I will try CaOS as well. Does VoLTE work for you on that rom?
 
Awesome! Maybe I will try CaOS as well. Does VoLTE work for you on that rom?
It seems so, although I do not see this information being explicitly surfaced, but I'm on LTE most of the time and have no trouble with calling. One thing that must be mentioned is SELinux is in permissive mode. I'm waiting the dev reply
 
  • Like
Reactions: hedgecore44

nguyenquangduc2000

Senior Member
Jun 21, 2015
227
175
Long Xuyen
It seems so, although I do not see this information being explicitly surfaced, but I'm on LTE most of the time and have no trouble with calling. One thing that must be mentioned is SELinux is in permissive mode. I'm waiting the dev reply
If you want to change SELinux, you can root your Android by Magisk and then install a package in that application.

To root your phone using Magisk, copy the boot.img (in step 1) to your phone, open Magisk, choose that image to patch. Then use the patched image to flash boot_a.
 

hedgecore44

Senior Member
Mar 9, 2016
150
34
It seems so, although I do not see this information being explicitly surfaced, but I'm on LTE most of the time and have no trouble with calling. One thing that must be mentioned is SELinux is in permissive mode. I'm waiting the dev reply
To see if VoLTE is working go to settings-->about phone-->sim status and see what it says for mobile voice network type. See if it changes too while making a phone call. I am not on LTE for voice on Corvus
 
If you want to change SELinux, you can root your Android by Magisk and then install a package in that application.

To root your phone using Magisk, copy the boot.img (in step 1) to your phone, open Magisk, choose that image to patch. Then use the patched image to flash boot_a.
Thanks. After installing Magisk, SELinux went from "Permissive" to "Disabled", and I do not see any Magisk module that would allow me to modify it. I suspect there's more to it, but I'll leave that for a separate note.
 
To see if VoLTE is working go to settings-->about phone-->sim status and see what it says for mobile voice network type. See if it changes too while making a phone call. I am not on LTE for voice on Corvus
You are right, that display is dynamic, and it shows the phone switching from LTE to GSM for the duration of a call. Drat (but I'm OK with that ;-)
 
Nguyen,

I could use your help with something related to your mod for A11. Is it possible to go back to stock? It's not an abstract question for me.

Long story, but embarking on this switch, I relied on 'Swift Backup' to move my apps+data. It worked rather well, but for a handful of apps it did not. One of those apps, 'Last Pass Authenticator" is crucial for me, as you can immagine, and the company provided method has failed as well (I'm still dealing with their CS).

So, I tried to temporarily switch back to stock using an old BTS image, which failed. I've re-flashed CaOS and now, every time I reboot, I get a message about my device not being trusted, maybe even corrupted, and I'm asked to press power button to continue, which it does, and after that, all seems OK. Maybe nothing to be concerned about, but I worry about wearing out my power button ;-)

BTW, I do have the log of that adb/fastboot session, and the files/script that I used.
 

nguyenquangduc2000

Senior Member
Jun 21, 2015
227
175
Long Xuyen
Nguyen,

I could use your help with something related to your mod for A11. Is it possible to go back to stock? It's not an abstract question for me.

Long story, but embarking on this switch, I relied on 'Swift Backup' to move my apps+data. It worked rather well, but for a handful of apps it did not. One of those apps, 'Last Pass Authenticator" is crucial for me, as you can immagine, and the company provided method has failed as well (I'm still dealing with their CS).

So, I tried to temporarily switch back to stock using an old BTS image, which failed. I've re-flashed CaOS and now, every time I reboot, I get a message about my device not being trusted, maybe even corrupted, and I'm asked to press power button to continue, which it does, and after that, all seems OK. Maybe nothing to be concerned about, but I worry about wearing out my power button ;-)

BTW, I do have the log of that adb/fastboot session, and the files/script that I used.
As you know, Essential Phone has A/B dynamic partition, so that if you are on stock and follow my guidance, the original rom is still last on the B partition. To switch back to original, just change the active partition by typing:
Bash:
fastboot set_active b

Remember to do backup first, because switching between roms requires format userdata.

In case you cannot find the stock rom, you can use this: https://drive.google.com/file/d/1Kjq9bm-Z6jvfH1T5lA3unbnRX9MBizqu/view?usp=sharing. After download the file, extract it and execute flashall.bat (or flashall.sh if you are using linux).
 
As you know, Essential Phone has A/B dynamic partition, so that if you are on stock and follow my guidance, the original rom is still last on the B partition. To switch back to original, just change the active partition by typing:
Bash:
fastboot set_active b

Remember to do backup first, because switching between roms requires format userdata.

In case you cannot find the stock rom, you can use this: https://drive.google.com/file/d/1Kjq9bm-Z6jvfH1T5lA3unbnRX9MBizqu/view?usp=sharing. After download the file, extract it and execute flashall.bat (or flashall.sh if you are using linux).
Thanks a bunch.
 

hedgecore44

Senior Member
Mar 9, 2016
150
34
I was able to get VoLTE working on Corvus. There is an option in the roms settings: "install the IMS APK for qualcom vendor"... there is also a setting there that creates a new IMS APN. Selecting that new apn gave me working VoLTE. I am sticking with this rom!

-update: VoLTE stopped working not sure why and I cannot get it back
 
Last edited:
I was able to get VoLTE working on Corvus. There is an option in the roms settings: "install the IMS APK for qualcom vendor"... there is also a setting there that creates a new IMS APN. Selecting that new apn gave me working VoLTE. I am sticking with this rom!
Thanks for pointing this out. A similar set of settings is in CAOS as well, although I did not have to explicitly select a different APN for it to work.

Does Corvus ROM passes Safety Net?
 
  • Like
Reactions: hedgecore44
This note is to mainly serve as a way to give feedback, though should anyone recognize anything as familiar and would have anything to suggest that could help me clean up the mess I made, that would be great.

So, as I mentioned, after following OPs instructions, I got myself in trouble by flashing a back-to-stock ROM [QP1A.190711.148-BACK-TO-STOCK]. The procedure flashed all the following files:
Code:
abl
bluetooth
boot
cmnlib.mbn
cmnlib64.mbn
devcfg
dsp
hyp.mbn
keymaster
mdtp
mdtpsecapp
modem
nvdef
pmic
rpm.mbn
system
tz.mbn
vendor
xbl
to both(!) slots. They all flashed successfully except 'boot' which failed with:
Code:
fastboot: verbose: target reported max download size of 536870912 bytes
fastboot: error: Couldn't parse partition size '0x'
Flashing of the BTS ROM also triggered the red "your phone may be corrupt..." DM_VERITY check, which has been persisting since.

Trying to sideload OEM ROM (I tried two latest OTAs) now fails with:
Code:
E: failed to verify whole-file signature
E: Error 21
and the log refers to RSA key mismatch.

Trying to flash OEM ROM with 'fastboot' also fails with "Couldn't parse partition size '0x'" error.

So, that's that, and since most of what's involved is way over my head, I'd be so screwed were it not for still being able to flash A11 ROMs, and CAOS ROM is stable enough to serve as my daily-driver, but it does not pass Safety Net, and it has a quirk that when I hide Magisk, the SELinux is then set to 'Disabled' from the initial 'Permissive'.
 
  • Like
Reactions: hedgecore44

hedgecore44

Senior Member
Mar 9, 2016
150
34
I couldn't tell yaThanks for pointing this out. A similar set of settings is in CAOS as well, although I did not have to explicitly select a different APN for it to work.

Does Corvus ROM passes Safety Net?

Thanks for pointing this out. A similar set of settings is in CAOS as well, although I did not have to explicitly select a different APN for it to work.

Does Corvus ROM passes Safety Net?
I couldn't tell ya about Safety Net because I run vanilla
 

nguyenquangduc2000

Senior Member
Jun 21, 2015
227
175
Long Xuyen
This note is to mainly serve as a way to give feedback, though should anyone recognize anything as familiar and would have anything to suggest that could help me clean up the mess I made, that would be great.

So, as I mentioned, after following OPs instructions, I got myself in trouble by flashing a back-to-stock ROM [QP1A.190711.148-BACK-TO-STOCK]. The procedure flashed all the following files:
Code:
abl
bluetooth
boot
cmnlib.mbn
cmnlib64.mbn
devcfg
dsp
hyp.mbn
keymaster
mdtp
mdtpsecapp
modem
nvdef
pmic
rpm.mbn
system
tz.mbn
vendor
xbl
to both(!) slots. They all flashed successfully except 'boot' which failed with:
Code:
fastboot: verbose: target reported max download size of 536870912 bytes
fastboot: error: Couldn't parse partition size '0x'
Flashing of the BTS ROM also triggered the red "your phone may be corrupt..." DM_VERITY check, which has been persisting since.

Trying to sideload OEM ROM (I tried two latest OTAs) now fails with:
Code:
E: failed to verify whole-file signature
E: Error 21
and the log refers to RSA key mismatch.

Trying to flash OEM ROM with 'fastboot' also fails with "Couldn't parse partition size '0x'" error.

So, that's that, and since most of what's involved is way over my head, I'd be so screwed were it not for still being able to flash A11 ROMs, and CAOS ROM is stable enough to serve as my daily-driver, but it does not pass Safety Net, and it has a quirk that when I hide Magisk, the SELinux is then set to 'Disabled' from the initial 'Permissive'.
Sorry for late response cuz I am busy last week
I found this solution on Reddit, please try it
When you finish flashing all partitions (except boot), then use this command to flash boot:
Bash:
fastboot flash:raw boot_<a|b> boot.img
Good luck to you, bro!
 
  • Like
Reactions: hedgecore44

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    When you say you "recovered," does that mean you were able to boot the AOSP 12 image after enabling dm-verity?

    How did you get to the point of being able to use adb? Did you have to reflash AOSP 11?
    After "recovery", I did not attempt a reboot. I deleted the build. I'll wait until after nguyenquangduc tests/validtes it.

    So, to get to adb:
    - connect a USB cable
    - when the phone starts to reboot after getting the "red warning", launch the bootloader (power/vol down)
    then,
    - fastboot flash boot_a or _b (the current lineage recovery image)
    - - get the Lineage Rcovery image at: https://download.lineageos.org/mata
    - reboot to Recovery
    - select Advanced
    - select Enable ADB (you'll see "Enabled ADB" at the bottom of the PH-1's screen
    now from your PC
    - type and enter: adb shell
    - you'll see the prompt: mata:/ #
    - type and enter: reboot "dm-verity enforcing"
    - when the phone starts to reboot, launch the bootloader (power/vol down). this avoids trying to reboot AOSPA12.
    - from the bootloader you can overwrite AOSPA12 with a known/tested rom (or change the active slot, etc.)

    Lineage Recovery is straightforward to use, and is actively maintained for the PH-1 (updates are made as often as weekly).
    It also keeps the kernel fully up to date, It is now 4.4.295. And it is in fact a PH-1 boot image, which works with some A11 roms (I haven't kept a list)..
    1
    For the confirmation, the wifi works normally on AOSP 11 but is broken in Android 12 GSI? Is it your situation?
    With the A12 ROMs that I tried, this seems to be the case. Using OEM boot.img results in SELinux enforcing, but WiFi that will not turn on. When that boot.img is patched w/ Magisk, SELinux becomes permissive, but WiFi is then working OK.

    Also, every A12 GSI I tried requires the .088 vendor.img in order to boot. This is all in addition to the fact that A12 AOSP and GSI ROMs based on it are a work in progress and far from ready to be "daily drivers"
    1
    Here is a dump of dmesg with the latest version ... No apparent changes from the previous one. Hope it helps
  • 7
    Android 12 works now that the official AOSP sources are out, I used this specific build
    1635700271660.png
    4

    GSI baseline image for Essential Phone

    Android 12 updated in #3

    As you know, from Android 9, there is a project called Project Treble with the aim to bring newer Android versions faster to the user. Together with the time movement, Google also introduces HIDL. It is a concept separating Android hardware and software.

    Now, you also know, the Essential Phone PH-1 is on the list of supported devices in Project Treble. Unfortunately, this device requires specific storage mapping in the kernel so that it might not be able to use LineageOS as the baseline image.

    In order to overcome this inconvenience, you must build a stock AOSP image and disable verity. It is somehow complicated for newbies. Therefore, I am here to make it easier for you.

    [Window only] Driver for Essential: https://drive.google.com/file/d/1ofTm8cprzuc0i4SWxMrdlrATB3JpSRR9/view?usp=sharing

    Following step-by-step guidance here will make GSI work for you.

    Step 1:
    Download prebuild Stock AOSP build here.
    Link: https://drive.google.com/file/d/1hX_cUJqCp41flJjKASDLbhxzr6X7irw_/view?usp=sharing

    Step 2:
    Extract the download file into a folder. It contains three different files: boot.img, system.img and vendor.img.

    Step 3:
    Boot your device into bootloader (fastboot mode) by holding Power and Volume Down at the same time.

    Step 4:
    Unlock bootloader (If you have done, skip this step)
    Bash:
    fastboot flashing unlock
    fastboot flashing unlock_critical

    Step 5:
    Flash the above images
    Bash:
    fastboot flash boot_a boot.img
    fastboot set_active a
    fastboot flash vendor_a vendor.img
    fastboot flash system_a system.img
    fastboot format userdata
    fastboot reboot

    Step 6:
    After reboot, connect your phone into computer and run the followings.
    Bash:
    adb root
    adb disable-verity
    adb reboot bootloader

    Step 7:
    Download any GSI image you want. You can refer in this page.
    I have tested with Google GSI Android 11 and DotOS.
    If you want to try Google GSI, please use this link:
    https://developer.android.com/topic/generic-system-image/releases

    Step 8:
    Extract the downloaded file in step 7 into a folder. Make sure that you have the system image, whose size is more than 1GB.

    Step 9:
    Go to the above folder and run the following commands.
    Bash:
    fastboot flash system_a system.img
    fastboot format userdata
    fastboot reboot

    Step 10:
    Now your device will boot new os. Congratulation!

    Know issues:
    Almost every thing works fine.
    Android 12 GSI is not supported.

    If you love my work, buy me a coffee at:
    Paypal:
    paypal.me/nguyenquangduc2000

    Thank you so much!
    2
    Have you updated stock to Android 10?
    In case you use Windows Os, please use adb and fastboot coming with driver. You can download driver here: https://storage.googleapis.com/essential-static/Essential-PH1-WindowsDrivers.exe
    I've been 'costing' on my old dev-kit setup for too long a time. ;-)

    After your pointers, things went well. After trying DotOS first (not quite ready to play nice with Gapps, which I need), and then CorvusOS (nice, but I was intrigued by the dynamic root implementation of CaOS), I loaded CaOS next. What a nice surprise all around, from the easy "on-boarding", to the refreshing modesty of the overall approach to mods. And, what really counts, for the way I use my phone everything worked out of the box!

    Thanks for opening up the GSI lifeline to our PH-1s.
    1
    Many thanks for supporters:
    1. Botany Lane Pottery
    2. Mariusz Stanczak
    1
    Here is a dump of dmesg with the latest version ... No apparent changes from the previous one. Hope it helps