How To Guide guide PHH GSI FLASH (AOSP 12)

Search This thread
Is it not passing CTS if you use the Universal SafetyNet Fix module for Magisk?
Yes, exactly that.
Universal SafetyNet Fix v2.2.1 is installed.

On didgeridoohan.com its said:

CTS profile fails but Basic integrity passes

MagiskHide needs to be enabled (yes, basic integrity can pass even if MagiskHide is disabled). Start there. If MagiskHide is enabled and working (see Test "MagiskHide" above), and you still can't pass the CTS profile check, but Basic integrity shows as true, that basically means Google doesn't trust your device for some reason (also see "Unlocked bootloader" above and "SafetyNet incompatible devices and ROMs" below). You should be able to fix this by matching prop values with a ROM that passes SafetyNet

MagiskHide is enabled and working.
So changing to the right prop values should fix the problem. But I wasn't able to find the right settings.
 
The guide on Didgeridoohan is outdated. There's no MagiskHide anymore, you need to use the deny list now. There is a hide option in the manager settings but it hides the manager, not Magisk. Try to follow my guide, see if you can pass with just the deny list, hidden manager, and USNF module.

Only if that doesn't work then try the Props module, but activate only what you need; if you're already passing Basic then deactivate it in the Props module; try the fingerprint first; try applying the fingerprint in different boot stages; and only leave impersonating a device as the last resort. Using too many or too powerful methods can do more harm than good.
 
  • Like
Reactions: psychofaktory
Sorry, did not mean MagiskHide, but of course the deny list.

I followed your advice and tried the following:
  • neither USNF nor MHPC active, Google Services .gms and .gms.unstable in the deny list -> CTS fail
  • only USNF active; the Google Services are automatically removed from the deny list -> CTS fail
  • USNF and MHPC active. MHPC in basic configuration -> CTS fail
  • MHPC: Set Device Fingerprint to Google Pixel 5a A11 - CTS passed!
    Play Protect is also certified!

All other settings has been left at default.

I had also tried to change the device fingerprint before. But I probably had too many other options active.

Thanks for your help!


Summary of all steps thad led to success:
  1. Unlock Bootloader according to wirespots instruction:
    How to root and pass SafetyNet on Sony Xperia 10 III (XQ-BT52)
  2. Flash LOG18.1 GSI (vndklite-version!) according to ada12s instruction:
    guide PHH GSI FLASH (AOSP 12)
  3. Enabling Magisk according to wirespots instruction from step 1
  4. Convert the desired OpenGapps package to a magisk module and Install OpenGapps as magisk module:
    OpenGapps for Magisk Converter
  5. Download and Install Franco Kernel Manager
  6. Flash UnSu.zip by osm0sis via Franco Kernel Manager
  7. Re-enable Magisk
  8. Hide Magisk App
  9. Enable Zygisk in magisk-settings
  10. Re-install OpenGapps magisk module
  11. Install Universal SafetNet Fix (Zygisk)
  12. Install MagikHide Props Config
  13. With MagisHide Props Config edit device fingerprint to Google Pixel 4a
  14. Clear storage of GoogleServiceFramework and Google PlayStore
Between most of the steps reboots are required.

Now I have a rooted GSI LineageOS 18.1 with working Google Apps, working SafetyNet and certified PlayStore on latest Sony Firmware. 🤩
 
Last edited:
Sep 18, 2021
7
0
Code:
/*
* Your warranty is no longer valid, unless you lie.
*
* I am not responsible for bricked devices, strained relationships,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this kernel
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*
*/
GUIDE PHH GSI FLASH
images



"The goal of Phh-Treble for Android 12 is Bring latest AOSP to the maximum number of devices running Google-certified Treble, with full hardware support
prerequies

-bootloader unlocked
-computer for flash


1. Get vbmeta.img from https://dl.google.com/developers/android/qt/images/gsi/vbmeta.img

2. Get A/B GSI (I'm guessing you need ARM64), don't forget to uncompress it you can see list gsi
here or xda thread.

3. From running Android, do adb reboot bootloader

4. fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

5. fastboot reboot fastboot

6. fastboot flash system system-xxxx.img

7. enter in recovery and erase all data.

8. boot to gsi , fix oem issue treble :

go to phh settings :

qualcomm features > use alternate audio policy

misc features :
1) use alternate way to detect headsets

2) automatically restart ril

reboot

NETWORK SETTING
:

*ADD 5G in preferred network settings
*add props for unlock witch phh ims phh vowifi,volte settings

*install magisk modules NSLENA or copy paste from zip all props system.prop to /system/build.prop


issue : in test stability is good even play store is certificed in some GSI.

*lena devices phh overlay is merged since v400.d base [ december 2021 ]

thanks to :

@phhusson for phh-treble project
@pepijndevos for overlay contribution
all maintener of custom phh-gsi
Will this remove Google from the UI? Do I need Linux to download this?
 

edufpaz

Member
Aug 15, 2017
14
12
57
Rio Grande
Hello "GREAT" @ada12 and hello to the "ULTRA" @phhusson

Thanks for your script. My device was a little harder to flash, but I managed. I just didn't have a custom recovery, the most current version is for Android 10.

I flashed 4 different versions: Vanilla, GoGapps, Gapps and Gapps Secure, which is the current one.

Every Custom Rom or GSI has things that don't work correctly or as it should, such as small crashes, apps that don't respond and even routines that haven't been adapted yet. I noticed in this Gapps-Secure version that the device got very hot when I was doing the settings and downloading the backup from Google.

I will monitor to see if it will heat up again as I use it. The mobile network is unstable and is disabled, I restarted but it is not active again. I also noticed that overall the system is slower on startup and on reboot. Fingerprint reader is not working. It has the option in the Security menu but it doesn't open when I tap this option.

There are several settings in PHH Treble Settings, can you tell me if you have a manual for this menu? It is quite possible that you have tweaks that correct these unstable routines.
 

Attachments

  • bugreport-A7_Pro-SP2A.220305.012-2022-03-29-11-19-45.zip
    6.8 MB · Views: 10
Last edited:
Trying this on an xperia 10 iv (XQ-CC54 - A12 stock rom 65.0.A.0.1094) and things go off the rails on steps 5 and 6.
5) "fastboot reboot fastboot" says "fastboot: usage: unknown reboot target fastboot"
(so I "fastboot reboot-bootloader" instead)
6) "fastboot flash system LeOS-S-VNDK-arm64-bvN.img" throws these errors
target reported max download size of 805306368 bytes
Invalid sparse file format at header magic
sending sparse 'system' 1/3 (786352 KB)...
OKAY [ 43.547s]
writing 'system' 1/3...
FAILED (remote: No such partition.)
finished. total time: 43.585s

and then the phone is "soft bricked?" and the only option is provided automatically to factory reset itself.
I tried a couple other GSI ROMs as well with the same result.

Can anybody kick me in the right direction please?
 
@go0 that sounds like vbmeta.img is not flashed correctly according the instructions.
Thanks for the reply.
I tried again, but step 4 seems to go as needed:
target reported max download size of 805306368 bytes
sending 'vbmeta' (4 KB)...
OKAY [ 0.009s]
writing 'vbmeta'...
OKAY [ 0.004s]
finished. total time: 0.013s


When it says no such partition, is it possible that the partition layout on the 10iv is different than the 10iii?
"fastboot getvar current-slot" says "current-slot: a"
Or do I need a different vbmeta for 10iv?
 
@go0 that sounds like vbmeta.img is not flashed correctly according the instructions.
I found this in the 5iii forum. It talks about flashing a and b seperately:
fastboot flash boot_a magisk_patched.img
fastboot flash boot_b magisk_patched.img
fastboot flash system_a system.img
fastboot flash system_b system.img

Is this perhaps what is missing here?
 
Last edited:

metooidk

Member
Apr 14, 2022
21
3
Ping Pong
Sony Xperia 10 III
Code:
/*
* Your warranty is no longer valid, unless you lie.
*
* I am not responsible for bricked devices, strained relationships,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this kernel
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*
*/
GUIDE PHH GSI FLASH
images



"The goal of Phh-Treble for Android 12 is Bring latest AOSP to the maximum number of devices running Google-certified Treble, with full hardware support
prerequies

-bootloader unlocked
-computer for flash


1. Get vbmeta.img from https://dl.google.com/developers/android/qt/images/gsi/vbmeta.img

2. Get A/B GSI (I'm guessing you need ARM64), don't forget to uncompress it you can see list gsi
here or xda thread.

3. From running Android, do adb reboot bootloader

4. fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

5. fastboot reboot fastboot

6. fastboot flash system system-xxxx.img

7. enter in recovery and erase all data.

8. boot to gsi , fix oem issue treble :

go to phh settings :

qualcomm features > use alternate audio policy

misc features :
1) use alternate way to detect headsets

2) automatically restart ril

reboot

NETWORK SETTING
:

*ADD 5G in preferred network settings
*add props for unlock witch phh ims phh vowifi,volte settings

*install magisk modules NSLENA or copy paste from zip all props system.prop to /system/build.prop


issue : in test stability is good even play store is certificed in some GSI.

*lena devices phh overlay is merged since v400.d base [ december 2021 ]

thanks to :

@phhusson for phh-treble project
@pepijndevos for overlay contribution
all maintener of custom phh-gsi
how do i install Magisk? where is boot.img
 

metooidk

Member
Apr 14, 2022
21
3
Ping Pong
Sony Xperia 10 III
Code:
/*
* Your warranty is no longer valid, unless you lie.
*
* I am not responsible for bricked devices, strained relationships,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this kernel
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*
*/
GUIDE PHH GSI FLASH
images



"The goal of Phh-Treble for Android 12 is Bring latest AOSP to the maximum number of devices running Google-certified Treble, with full hardware support
prerequies

-bootloader unlocked
-computer for flash


1. Get vbmeta.img from https://dl.google.com/developers/android/qt/images/gsi/vbmeta.img

2. Get A/B GSI (I'm guessing you need ARM64), don't forget to uncompress it you can see list gsi
here or xda thread.

3. From running Android, do adb reboot bootloader

4. fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

5. fastboot reboot fastboot

6. fastboot flash system system-xxxx.img

7. enter in recovery and erase all data.

8. boot to gsi , fix oem issue treble :

go to phh settings :

qualcomm features > use alternate audio policy

misc features :
1) use alternate way to detect headsets

2) automatically restart ril

reboot

NETWORK SETTING
:

*ADD 5G in preferred network settings
*add props for unlock witch phh ims phh vowifi,volte settings

*install magisk modules NSLENA or copy paste from zip all props system.prop to /system/build.prop


issue : in test stability is good even play store is certificed in some GSI.

*lena devices phh overlay is merged since v400.d base [ december 2021 ]

thanks to :

@phhusson for phh-treble project
@pepijndevos for overlay contribution
all maintener of custom phh-gsi
works perfect.it let me get rid of Sony ****ty rom
 

kidronvalley

Senior Member
Apr 20, 2012
51
2
Hi,

AOSP12 on O+ Nord(avicii) works fine, but, only issue is that i canno succeed installing magisk. I install it, after formatting data, from twrp using the zip, installation completes, but there is no magisk icon after reboot.
If i then install it by apk, after opening, it remains green screen.


It opens with supersu denied, but Installed is N/A

No magisk = no sign. spoofing, and seems an issue with certaing banking apps.

Whatever help is appreciated.
 
3. From running Android, do adb reboot bootloader

4. fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

5. fastboot reboot fastboot

6. fastboot flash system system-xxxx.img

Currently I have successfully installed LineageOS 20 as GSI (lineage-20.0-20221111-UNOFFICIAL-arm64_bgN-vndklite-secure.img).
Now I want to update to the new release (lineage-20.0-20230115-UNOFFICIAL-arm64_bgN-vndklite.img).

In doing so, I would have performed the above steps without deleting the data afterwards.
Is this procedure correct?
Do I have to flash vbmeta.img again?

Is there anything else to consider regarding GApps or Magisk?
 

miszko77

Senior Member
May 8, 2010
64
14
Gdynia
Trying this on an xperia 10 iv (XQ-CC54 - A12 stock rom 65.0.A.0.1094) and things go off the rails on steps 5 and 6.
5) "fastboot reboot fastboot" says "fastboot: usage: unknown reboot target fastboot"
(so I "fastboot reboot-bootloader" instead)
6) "fastboot flash system LeOS-S-VNDK-arm64-bvN.img" throws these errors
target reported max download size of 805306368 bytes
Invalid sparse file format at header magic
sending sparse 'system' 1/3 (786352 KB)...
OKAY [ 43.547s]
writing 'system' 1/3...
FAILED (remote: No such partition.)
finished. total time: 43.585s

and then the phone is "soft bricked?" and the only option is provided automatically to factory reset itself.
I tried a couple other GSI ROMs as well with the same result.

Can anybody kick me in the right direction please?
Did you found solution? I am stuck with same error.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Code:
    /*
    * Your warranty is no longer valid, unless you lie.
    *
    * I am not responsible for bricked devices, strained relationships,
    * thermonuclear war, or you getting fired because the alarm app failed. Please
    * do some research if you have any concerns about features included in this kernel
    * before flashing it! YOU are choosing to make these modifications, and if
    * you point the finger at me for messing up your device, I will laugh at you.
    *
    */
    GUIDE PHH GSI FLASH
    images



    "The goal of Phh-Treble for Android 12 is Bring latest AOSP to the maximum number of devices running Google-certified Treble, with full hardware support
    prerequies

    -bootloader unlocked
    -computer for flash


    1. Get vbmeta.img from https://dl.google.com/developers/android/qt/images/gsi/vbmeta.img

    2. Get A/B GSI (I'm guessing you need ARM64), don't forget to uncompress it you can see list gsi
    here or xda thread.

    3. From running Android, do adb reboot bootloader

    4. fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

    5. fastboot reboot fastboot

    6. fastboot flash system system-xxxx.img

    7. enter in recovery and erase all data.

    8. boot to gsi , fix oem issue treble :

    go to phh settings :

    qualcomm features > use alternate audio policy

    misc features :
    1) use alternate way to detect headsets

    2) automatically restart ril

    reboot

    NETWORK SETTING
    :

    *ADD 5G in preferred network settings
    *add props for unlock witch phh ims phh vowifi,volte settings

    *install magisk modules NSLENA or copy paste from zip all props system.prop to /system/build.prop


    issue : in test stability is good even play store is certificed in some GSI.

    *lena devices phh overlay is merged since v400.d base [ december 2021 ]

    thanks to :

    @phhusson for phh-treble project
    @pepijndevos for overlay contribution
    all maintener of custom phh-gsi
    2
    Sorry, did not mean MagiskHide, but of course the deny list.

    I followed your advice and tried the following:
    • neither USNF nor MHPC active, Google Services .gms and .gms.unstable in the deny list -> CTS fail
    • only USNF active; the Google Services are automatically removed from the deny list -> CTS fail
    • USNF and MHPC active. MHPC in basic configuration -> CTS fail
    • MHPC: Set Device Fingerprint to Google Pixel 5a A11 - CTS passed!
      Play Protect is also certified!

    All other settings has been left at default.

    I had also tried to change the device fingerprint before. But I probably had too many other options active.

    Thanks for your help!


    Summary of all steps thad led to success:
    1. Unlock Bootloader according to wirespots instruction:
      How to root and pass SafetyNet on Sony Xperia 10 III (XQ-BT52)
    2. Flash LOG18.1 GSI (vndklite-version!) according to ada12s instruction:
      guide PHH GSI FLASH (AOSP 12)
    3. Enabling Magisk according to wirespots instruction from step 1
    4. Convert the desired OpenGapps package to a magisk module and Install OpenGapps as magisk module:
      OpenGapps for Magisk Converter
    5. Download and Install Franco Kernel Manager
    6. Flash UnSu.zip by osm0sis via Franco Kernel Manager
    7. Re-enable Magisk
    8. Hide Magisk App
    9. Enable Zygisk in magisk-settings
    10. Re-install OpenGapps magisk module
    11. Install Universal SafetNet Fix (Zygisk)
    12. Install MagikHide Props Config
    13. With MagisHide Props Config edit device fingerprint to Google Pixel 4a
    14. Clear storage of GoogleServiceFramework and Google PlayStore
    Between most of the steps reboots are required.

    Now I have a rooted GSI LineageOS 18.1 with working Google Apps, working SafetyNet and certified PlayStore on latest Sony Firmware. 🤩
    1
    So is this usable on a day to day basis? Does everything work?
    everything work exept google pay due to attestation safetynet enforced recently by google. I use in daily and all is ok
    1
    You're welcome enjoy )

    *Ps : good news android 12 beta boot we will have stable gsi quickly...

    Only bug in beta is :

    * SafteyNet doesn't pass
    * Battery manager in battery settings crashes
    * Phh settings crashes the first time you open it
    Screenshot_20211016-203749.png
    1
    Do you have any solution for upgrading firmware/vendor without wiping GSI rom? @ada12
    Yes I have already solution

    I use newflasher v52 its keep data https://forum.xda-developers.com/t/tool-newflasher-xperia-command-line-flasher.3619426/

    *need reflash gsi again before reboot and everything is fine I have all my data