[UPDATE/KEEP ROOT GUIDE] SEP 2020 (RP1A.200720.009) "CORAL" Magisk/Stock Boot Images - Google Pixel 4 XL Guides, News, & Discussion

[UPDATE/KEEP ROOT GUIDE] SEP 2020 (RP1A.200720.009) "CORAL" Magisk/Stock Boot Images
**Huge thanks to @murphyjasonc for sharing the pre-patched boot image, and @sidhaarthm for testing this method and his detailed notes!**​
PLEASE READ ALL ADDITIONAL NOTES IN THE FIRST 3 POSTS. THIS IS A MAJOR UPDATE TO A NEW VERSION OF ANDROID AND CONSEQUENTLY COMES WITH A MUCH HIGHER RISK OF BOOTLOOPING IF YOU'RE NOT CAREFUL. I PERSONALLY AM WAITING TO UPDATE TO ANDROID R (WAITING ON GRAVITYBOX GOODNESS) SO I WON'T BE ABLE TO HELP AS MUCH - PLEASE BE KIND TO ONE ANOTHER AND HELP EACH OTHER OUT! =)
IMPORTANT!! THESE FILES / THIS THREAD IS FOR PIXEL 4 XL "CORAL" ONLY, NOT PIXEL 4 "FLAME"!!
**IT IS HIGHLY RECOMMENDED TO PATCH THE STOCK BOOT IMAGE YOURSELF, FROM YOUR OWN DEVICE, USING MAGISK MANAGER. WHILE THERE'S A GOOD CHANCE THE FILE I PROVIDED BELOW WILL BE IDENTICAL (USE A FILE HASH CHECKSUM TOOL IF YOU'RE CURIOUS), THERE IS ALSO A CHANCE THEY MAY HAVE SMALL, BUT SIGNIFICANT, VARIANCES**
Thanks for the info and link, @wrongway213
Link to @topjohnwu's post: https://twitter.com/topjohnwu/status/1272136975022084097?s=19
ALL FILES BELOW ARE FOR "RP1A.200720.009, Sep 2020, All carriers except IN"!
Magisk Canary v20424 (11f254e5) Patched Boot Image: https://www.androidfilehost.com/?fid=8889791610682933259
Factory Untouched Boot Image: https://www.androidfilehost.com/?fid=8889791610682933258
Factory Untouched DTBO Image: https://www.androidfilehost.com/?fid=8889791610682933260
[SAFETYNET INFO]: Again, I'm not updating myself yet, so I'm not sure about this. I will update this info as others report back. On Android 10, using the MagiskHide Props Config module (or an alternate module created by Displax, though I prefer Didgeridoohan's module) and choosing option 2 - Force BASIC key attestation would force BASIC HW attestation and allow SafetyNet to pass again. This works perfectly for me, and I even run additional mods including EdXposed. I'm not sure if this works on Android 11, and I won't be able to confirm myself for a while. If anybody tries it, please let me know and I'll update this section. The module and info on using it can be found here: https://forum.xda-developers.com/ap...just search for it in the Magisk Manager app.

READ THIS ENTIRE POST BEFORE PROCEEDING!
ADDITIONAL PRELIMINARY STEPS COMPARED TO PREVIOUS MONTHS - DO NOT SKIP!!!!:
A. Make sure all of your Magisk / EdXposed modules are updated for compatibility with R. For example:
* Magisk Module: Riru (Riru - Core) v21.3
* Magisk Module / EdXposed version: EdXposed v.0.5.0.6-android_r (4561) [this is a Canary build]
B. Recommend disabling any Magisk and/or Xposed modules that have not been tested with Android R.
C. Install latest Magisk Manager Canary build: https://raw.githubusercontent.com/topjohnwu/magisk_files/canary/app-debug.apk
D. Regular reboot the phone to make sure updates are applied before proceeding with the rest of the update process.
---------------------------​
EASY UPDATE / SEAMLESS KEEP-ROOT UPDATE PROCESS (using a PC - a very intuitive, effective, and relatively safe method).
** You can only follow this guide verbatim if coming EXACTLY from build "10.0.0 (QQ3A.200805.001, Aug 2020)". But the general idea is the same for other builds, you just need the correct files for your device.
coral-qq3a.200805.001-factory-dtbo.img: https://androidfilehost.com/?fid=8889791610682906527
coral-qq3a.200805.001-factory-boot.img: https://androidfilehost.com/?fid=8889791610682906525
September 2020 sideload OTA zip: https://dl.google.com/dl/android/aosp/coral-ota-rp1a.200720.009-b447daff.zip
DO NOT BOOT BACK INTO O/S UNTIL ALL STEPS ARE COMPLETED - THIS ENSURES EVERYTHING BOOTS BACK UP WITH MAGISK / EDXPOSED ALL RUNNING PROPERLY RIGHT AWAY
1. boot into bootloader
----------------
** I was on custom kernel, so I needed to flash BOTH the stock boot and dtbo images
2. fastboot flash boot coral-qq3a.200805.001-factory-boot.img
3. fastboot flash dtbo coral-qq3a.200805.001-factory-dtbo.img
......* these steps to restore stock recovery; dtbo.img also necessary for some kernel installations.
......* won't hurt to flash both anyway, so if you're unsure, go ahead and do both.
-----------------
4. use volume keys to change selection to boot to Recovery Mode
......- when you reach the android symbol with No Command, hold power button, tap volume up, in case you've forgotten
5. choose option "Apply update from ADB"
6. adb sideload coral-ota-rp1a.200720.009-b447daff.zip
7. Once the OTA sideload is done, Reboot to bootloader (you'll also notice it's now on the other slot after OTA flashed)
8. fastboot flash boot coral-rp1a.200720.009-magisk_patched-c20424.img
9. done, start the phone
(Optional - Flash custom kernel. If you had a custom kernel, you need to re-flash it)
This is a 100% seamless update that requires no additional / re-setup of any of my Magisk or EdXposed setups. All of the factory files can be found here https://developers.google.com/android/images. boot.img and dtbo.img are in their corresponding full Factory Image zips, and the ota zip is under Full OTA Images.
---------------------------​
ADDITIONAL NOTES FROM @sidhaarthm, WHO TESTED FOR ME - THERE'S SOME GOOD INFO HERE TO HELP PREP YOU BEFORE UPDATING YOUR PHONE:
Okay, so I just successfully completed the steps and I'm booted into Android 11 without issues.
Here are my observations, notes and findings:
Pre-requisites:
- I installed the Canary Build of Magisk apk - it basically overwrote the existing installation of Magisk and worked straight away. I remained on the 'stable' update channel.
- I uninstalled all the Accent and Colour Mods from Tulsadiver as he is yet to update the mods for R11 (although he's confirmed its' possible and will publish it soon).
- I also deleted the AK3 Helper module from Magisk that gets flashed with Kirisakura Kernel since I was about to to flash the stock kernel anyway.
- I left the GPay SQlite Fix, Systemless Hosts, Busybox, V4A and AML Modules in Magisk enabled and as is.
Upgrade Notes:
- Followed your instructions to the T and the upgrade process was a breeze.
- I did extract the boot file from the factory ROM and patched it in Canary Magisk myself on my P4XL, but I chickened out at the last minute and flashed the boot file you had provided anyway. Reason being the flashed boot IMG I generated was 33,292 KB vs the one you had provided (and the ones I saw posted in other threads) were all 33,332 KB. So there was definitely some differences there and I just didn't want to risk it at that point.
- The phone got a bit hot during the upgrade process - around 40C+ but I suppose that's alright. Its' cooled down now and running okay.
- I did not flash any Kernel yet since I am waiting for the next official Kirisakura Kernel release for R11.
Findings:
- My P4XL booted first time, no bootloops etc - finalised the upgrade in a couple of minutes and everything thereafter seems smooth as butter.
- GPay works perfect without any tinkering (that's a big plus!)
- Device is rooted and all Root apps (AdAway, TiB etc), all work as normal. Camera, WiFi, Bluetooth, everything works, no issues whatsoever.
- Face Unlock works as normal and so do all the apps that use the biometric API to unlock (banking apps etc).
- SafetyNet fails on ctsProfile (evalType Hardware) but it was the same before upgrading to R11, so not surprised.
- Viper FX doesn't work post upgrading to R11 - that's expected and people have already reported the same 'failed at patching system' error on the main thread. Hopefully we get an upgrade at some point. Really gutted about this one as I love V4A!
Click to expand...
Click to collapse
Big thanks to @sidhaarthm for being an awesome and detailed tester!

Issues after updating?
If you end up unable to boot or bootlooping afterwards, you most likely have an old Magisk module that isn't playing nice with the new build. There are 2 main things you can do:
1. Flash the new factory untouched boot image. You will of course lose root, and all modules will be disabled. However, it should at least get you able to boot back up quickly and have a working phone if you're in a bind.
2. I would recommend checking Tulsadiver's thread: https://forum.xda-developers.com/pixel-4-xl/how-to/magisk-modules-disabler-booting-magisk-t3990557
Instead of reverting to stock boot image, fastboot boot (NOT FLASH) Tulsadiver's boot image. This will boot your phone in Magisk Core-Only Mode, with all modules disabled but root retained. From here you can open Magisk Manager and disable suspect modules. Before rebooting, go to Magisk Manager's settings and disable Magisk Core-Only Mode. Once you disable the incompatible module, the phone should boot back up.
- See this post (or thread) for more tips / context / an example: https://forum.xda-developers.com/showpost.php?p=82509691&postcount=16
* Looks like Tulsadiver uploaded a boot image for A11, although it hasn't been tested yet: https://forum.xda-developers.com/showpost.php?p=83462451&postcount=150
Coming from an earlier build than August 2020?
Download the September 2020 Full Factory Image .zip file and extract it. BEFORE RUNNING THE FLASH-ALL BATCH / SHELL FILE, EDIT THE FILE AND REMOVE THE "-w" FLAG FROM THE LAST FASTBOOT LINE. If you fail to remove -w, your phone will be wiped when it reaches this step. After flashing the full factory image, your phone will automatically reboot into O/S. From here, reboot back into bootloader, and flash the new Magisk patched boot image.
Since this is a major jump to a new version of Android, I don't want to recommend this yet until someone tests it. If anybody tries this way successfully, please let me know so we can update this part. Thanks!

I just updated from Android 10 August (I use your method since, what, April now?) and everything worked without a problem. For security purposes I deactivated Edxposed beforehand, though. The first booting takes a while after the updating, maybe 3-4 minutes, don't be afraid to wait. I was. Lol.
Edit: Jea, Android4Viper is broken. Needs fix asap

Also a big thanks from me, all went well! A little reminder for people running lawnchair & quickswitch: disable both and set stock recent provider to pixel launcher! Both are not compatible yet... Almost had to factory reset because of this ?

An other big thanks from me, I used your guide again and everything is working.
I used Magisk from the Canary channel and installed MagiskHide Props Config.
Safetynet : Basicintegrity V, ctsProfile V and evalType BASIC., this is good.
When the Kirisakura Kernel is available I will install this kernel for Android 11.

when you install latest Magisk Manager Canary build, is this supposed to overwrite the current stable build or ad an additional separate magisk app?

has anyone installed riru and edxposed (if so what version you using) after root from a fresh update (Full wipe update, root, then install modules) any issues?
***EDIT (for dummies like me)*** can confirm works via fresh install too
-Just download / install riru core 21.3 via magisk.
-Download latest edXposed manager v4.5.7.
-Download v0.5.0.6 4561 from canary tab in edXposed manager.
-Flash that zip in magisk.
-Just make sure you don't flash and exposed directly from the download module list in magisk those are not the canary builds. You have to flash the zip from internal storage you just downloaded.

So I went with the fresh install and now the patches boot img returns a "partition not found" error.
I've tried powershell, cmd and same error. Does anyone have another command that could get me up and running? I re-root several times a year and never have this kind of problem.
Just to check that I'm using the correct command. - Fastboot flash boot patched boot img-
Would the patches image name make a difference?

bigmatt503 said:
So I went with the fresh install and now the patches boot img returns a "partition not found" error.
I've tried powershell, cmd and same error. Does anyone have another command that could get me up and running? I re-root several times a year and never have this kind of problem.
Just to check that I'm using the correct command. - Fastboot flash boot patched boot img-
Would the patches image name make a difference?
Click to expand...
Click to collapse
fastboot flash boot magisk_patched.img --slot all

Homeboy76 said:
fastboot flash boot magisk_patched.img --slot all
Click to expand...
Click to collapse
Thanks for the help. I got working by flashing "_a" after img

bigmatt503 said:
Thanks for the help. I got working by flashing "_a" after img
Click to expand...
Click to collapse
No problem, glad you found a solution to the problem. :good:

Ok, the first time I did this, it didn't change anything(after I finished I was still on Android 10, with the August update), so I may have did something wrong, I'm not sure. Anyway, I did it a second time, and voila, it works. Your guides are always the best bro!

Any chance someone could say if Google Pay is working (and banking apps) with this method? Want to jump to 11 but everything works great on Aug 10 right now.
Thanks

Not able to boot after flashing the patched img says no valid slot to boot

bluedog220 said:
Any chance someone could say if Google Pay is working (and banking apps) with this method? Want to jump to 11 but everything works great on Aug 10 right now.
Thanks
Click to expand...
Click to collapse
Google Pay works - I utilised the GPay SQlite fix method (look it up, plenty of threads on it) but I actually had that before I upgraded to R11. Once I successfully upgraded using the steps provided in this thread, I didn't have to do a thing and GPay still works
As for banking apps, depends where you are. I'm in the UK and with Magisk Hide and some trickery, I've manged to get Monzo, Starling, Amex, HSBC and Tesco Banking apps to work on my Pixel 4 XL. The only ones I seem to struggle with (that have strong root detection) are Barclaycard and Lloyds Banking Group apps such as Halifax, MBNA etc.
Hope that helps :good:

bluedog220 said:
Any chance someone could say if Google Pay is working (and banking apps) with this method? Want to jump to 11 but everything works great on Aug 10 right now.
Thanks
Click to expand...
Click to collapse
I'm in the USA and G-pay works without doing anything. All of my banking /credit card apps work too

Has anyone had SafetyNet randomly stop passing for both basicIntegrity and ctsProfile together? When I first upgraded to 11 and set everything up, I was able to pass even with EdXposed installed, then it stopped passing with EdXposed a few days later, but would pass both with it disabled. Now it won't pass at all even with EdXposed disabled.
Anyone have any ideas before I resort to wiping and starting over?

has anybody with android 11 and magisk able to use smali patcher or app systemizer? i cannot get either to work yet

This guide worked perfectly for me, cheers.
Just need to wait for YouTube vanced

Related

[HOW-TO] Flash A/B Treble GSI ROMs without TWRP

Android devices can have different designs, so there is no generic command or set of instructions for flashing a GSI to apply to all devices. Specially for Xperias am i writing this Guides for You. So please read carefully...
1. Ensure that You have the following before You start:
Latest Fastboot Version (Or the used fastboot commands may not work)
A Method for disabling Android Verified Boot (Part of the Guide)
An unlocked Bootloader State (Official Instructions HERE)
To Start:
Download the Basic Package from Google: https://developer.android.com/topic/generic-system-image/releases
Download the AOSP Vendor Package from Sony: https://developer.sony.com/develop/open-devices/downloads/software-binaries
Open up the Zip Files and place the 3 included Images on Your fastboot destination
Boot Your Device into Fastboot:
Code:
Turn off Your Device and hold VolumeUP while connecting via USB to a PC or use ADB to reboot to fastboot
Disable the verified booting (AVB) by flashing vbmeta.img:
Code:
fastboot --disable-verification flash vbmeta vbmeta.img
Flash the Vendor to the Primary A Slot OEM:
Code:
fastboot flash oem_a nameofthesonyoemimage.img
Repeat to flash to the B Slot OEM
Code:
fastboot flash oem_b nameofthesonyoemimage.img
Flash the GSI to the Primary A Slot System:
Code:
fastboot flash system_a system.img
Repeat to flash to the B Slot System
Code:
fastboot flash system_b system.img
Wipe the user data and clear the data from other necessary partitions (for example, user data and system partitions):
Code:
fastboot -w
Reboot:
Code:
fastboot reboot
Additional:
You can use any Android 9+ GSI out of the XDA Forum here: https://forum.xda-developers.com/project-treble/trebleenabled-device-development
To get Magisk/Root; just patch Your actual Kernel with the Magisk Manager App and flash the Boot Image together with the GSI (Example below)
Patched Boot Image for Xperia 5 Users: https://forum.xda-developers.com/xp...isk-v20-3-patched-boot-image-android-t4033547
You could mention Treble support means "since XZ1" (unless hacks)
Hoping to carry this on here, since I own the 1 not the 5 In order to de-google my life, I've decided that I am ready for GSI!
A few notes from my flashing weekend;
Following these instructions, from an unlocked Xperia 1 running stock rom, worked for the following;
ExpressLuke's Havoc 3.0
LineageOS 17.x
Interesting thing. These both install to system in 3 parts (when watching the flash to system.
Any other that I tried (installing in 2 parts) did not seem to work.. but then I am new at this. It's entirely possible that some of these failed because I didn't re-flash stock first.
I was also using a patched boot / kernel with a specific magisk version, which might have played a part. Failed are also (obviously) Pie.
Failed flashes were;
PPH Treble AOSP 9
Havoc 2.9 Official
So far, I've been blown away with Havoc. Of the tons of things I've run in the last 24, I've seen the following issues;
1) Call volume on handset doesn't seem to do anything. (Bluetooth works fine)
2) I had one reboot last evening. Since then solid as a rock.
3) Selection of notification sound for fastmail app didn't take right away
I haven't worked up the courage to try setting up twrp yet, so no recovery. I may give magisk a shot later tonight. I need to back this stuff up somehow!
Thanks to @Miustone for replying and making things easier, and @thatguy222 for the info he provided in the Xperia 5 thread!
charlatan01 said:
Hoping to carry this on here, since I own the 1 not the 5 In order to de-google my life, I've decided that I am ready for GSI!
A few notes from my flashing weekend;
Following these instructions, from an unlocked Xperia 1 running stock rom, worked for the following;
ExpressLuke's Havoc 3.0
LineageOS 17.x
Interesting thing. These both install to system in 3 parts (when watching the flash to system.
Any other that I tried (installing in 2 parts) did not seem to work.. but then I am new at this. It's entirely possible that some of these failed because I didn't re-flash stock first.
I was also using a patched boot / kernel with a specific magisk version, which might have played a part. Failed are also (obviously) Pie.
Failed flashes were;
PPH Treble AOSP 9
Havoc 2.9 Official
So far, I've been blown away with Havoc. Of the tons of things I've run in the last 24, I've seen the following issues;
1) Call volume on handset doesn't seem to do anything. (Bluetooth works fine)
2) I had one reboot last evening. Since then solid as a rock.
3) Selection of notification sound for fastmail app didn't take right away
I haven't worked up the courage to try setting up twrp yet, so no recovery. I may give magisk a shot later tonight. I need to back this stuff up somehow!
Thanks to @Miustone for replying and making things easier, and @thatguy222 for the info he provided in the Xperia 5 thread!
Click to expand...
Click to collapse
Thanks for Your great Feedback! Glad i was able to help out Think i will add some stuff to the Guides soon. Wonder if i get Contributer Status now :silly:
Miustone said:
Android devices can have different designs, so there is no generic command or set of instructions for flashing a GSI to apply to all devices. Check with the manufacturer of the Android device for explicit flashing instructions. Use the following steps as a general guideline:
1. Ensure that the Device has the following:
Treblized
A method for unlocking devices (so they can be flashed using fastboot)
A method for disabling verify boot (for example, vboot 1.0 or AVB)
An unlocked state to make it flashable via fastboot (To ensure that you have the latest version of fastboot, build it from the Android source tree.)
2. Disable verify boot.
3. Erase the current system partition, then flash the GSI to the system partition.
4. Wipe the user data and clear the data from other necessary partitions (for example, user data and system partitions).
5. Reboot the device.
To Start:
Download the Basic Package from Google: https://developer.android.com/topic/generic-system-image/releases
Open up the Zip File and place the 2 Images on Your fastboot destination
Boot Your Device into Fastboot:
Code:
Turn off Your Device and hold VolumeUP while connecting via USB to a PC
Disable verify boot (AVB) by flashing vbmeta.img:
Code:
fastboot --disable-verification flash vbmeta vbmeta.img
Erase and flash the GSI to the system partition:
Code:
fastboot erase system
fastboot flash system system.img
Wipe the user data and clear the data from other necessary partitions (for example, user data and system partitions):
Code:
fastboot -w
Reboot:
Code:
fastboot reboot
Additional:
You can use any Android 9+ GSI out of the XDA Forum here: https://forum.xda-developers.com/project-treble/trebleenabled-device-development
To get Magisk/Root; just patch Your actual Kernel with the Magisk Manager App and flash the Boot Image together with the GSI (Example below)
Patched Boot Image for Xperia 5 Users: https://forum.xda-developers.com/xp...isk-v20-3-patched-boot-image-android-t4033547
Click to expand...
Click to collapse
Please, try to install gcam in lineageos 17!
What happen with drm keys when you flash other roms? I love sound settings of sony ui and settings of display.
I haven't been confident in the gcam build for the 1, but I'm quite pleased with open camera thus far.
The only DRM issue I'm aware of is widevine level dropping. I'm perfectly happy with my unlocked 1.
charlatan01 said:
I haven't been confident in the gcam build for the 1, but I'm quite pleased with open camera thus far.
The only DRM issue I'm aware of is widevine level dropping. I'm perfectly happy with my unlocked 1.
Click to expand...
Click to collapse
Did you notice any degradation in photo / video quality on stock ROM with the bootloader unlocked?
I'm considering unlocking my X1, but I want to know if the consequences are as bad as they used to be a few years ago with the Z2 and Z3.
MeltdownSpectre said:
Did you notice any degradation in photo / video quality on stock ROM with the bootloader unlocked?
I'm considering unlocking my X1, but I want to know if the consequences are as bad as they used to be a few years ago with the Z2 and Z3.
Click to expand...
Click to collapse
As soon as I unlocked I went to a custom ROM, so I didn't test on stock. Sorry. I think there are some people in the ROM section that said pics looked good. They definitely confirmed there was no green or blue tint like there was with those other devices
Just finished flashing, thank you so much with the tutorial. At the -w step, it didn't seem to find the /userdata, and I tried to skip the part and just reboot. After what seems like a bootloop, it automatically rebooted to "Android Recovery" which I assume is a part of the gsi? It prompted me to wipe data and I did, and it booted!
So, a Generic System Image is just a generic version of Android? Essentially then, I could flash other ROMS - some of whom are listed in this thread (Havoc etc) and get a brand new experience? It doesn't say so here in the thread, but I'm guessing I need to unlock my bootloader - correct?
Chima2 said:
So, a Generic System Image is just a generic version of Android? Essentially then, I could flash other ROMS - some of whom are listed in this thread (Havoc etc) and get a brand new experience? It doesn't say so here in the thread, but I'm guessing I need to unlock my bootloader - correct?
Click to expand...
Click to collapse
Yes
does sd card still work?
Just curious, does auto brightness work out of the box for Xperia 1? Using havoc 3.5 on xz2, and autobrightness is the main thing not working for me.
Updated the Thread. No need for the vbmeta Image with Havoc 3.5 (Official GSI with GApps)! Means a more secure Device somehow...
I'm building Overlays for the Xperia 1 & 5 if anyone is willed to grab me the FrameworksResCommon.apk overlay from your device in /vendor/overlay
I need to decompile it, so You can do it anyways if You are willed to. I also need the build fingerprint from the build prop. It should say anything like:
ro.vendor.build.fingerprint=Sony......
The next step for GSIs on our Xperias! I will also look into a GCam Mod for our Devices! Installing Ubuntu 20.04 now...
Beetle84 said:
Just curious, does auto brightness work out of the box for Xperia 1? Using havoc 3.5 on xz2, and autobrightness is the main thing not working for me.
Click to expand...
Click to collapse
Yes bro never had an issue with that.
Thread updated with new Instructions. Added the flashing to A/B without changing the Slot. Added also the flashing of SONYs AOSP Vendors to A/B. Enjoy
PS: Did that as preparation for the MARS_SOM BETA2. Got stunning results with that SOM and PHH AOSP 10... Check it out <3
Can we use also Havoc OS 3.6 then bro and does it have bugs ?
Pandemic said:
Can we use also Havoc OS 3.6 then bro and does it have bugs ?
Click to expand...
Click to collapse
Works just fine like the latest PHH AOSP Versions with passing SafetyNet. I recommend using My latest Guide here to use it. Things that don't Work yet are:
-VoLTE
-Always on Display
-Camera Button
-HDR 4K native Video Playback in Apps
I recommend using Open Camera with CameraAPI2 enabled in the settings since we don't have GCam. Otherwise it's fine to use...
Miustone said:
Works just fine like the latest PHH AOSP Versions with passing SafetyNet. I recommend using My latest Guide here to use it. Things that don't Work yet are:
-VoLTE
-Always on Display
-Camera Button
-HDR 4K native Video Playback in Apps
I recommend using Open Camera with CameraAPI2 enabled in the settings since we don't have GCam. Otherwise it's fine to use...
Click to expand...
Click to collapse
@Miustone do you have telegram btw ? Sorry for OT

[UPDATE/KEEP ROOT GUIDE] NOV 2020 (RP1A.201005.004) "CORAL" Magisk/Stock Boot Images

[UPDATE/KEEP ROOT GUIDE] NOV 2020 (RP1A.201005.004) "CORAL" Magisk/Stock Boot Images
IMPORTANT!! THESE FILES / THIS THREAD IS FOR PIXEL 4 XL "CORAL" ONLY, NOT PIXEL 4 "FLAME"!!
**IT IS HIGHLY RECOMMENDED TO PATCH THE STOCK BOOT IMAGE YOURSELF, FROM YOUR OWN DEVICE, USING MAGISK MANAGER. WHILE THERE'S A GOOD CHANCE THE FILE I PROVIDED BELOW WILL BE IDENTICAL (USE A FILE HASH CHECKSUM TOOL IF YOU'RE CURIOUS), THERE IS ALSO A CHANCE THEY MAY HAVE SMALL, BUT SIGNIFICANT, VARIANCES**
Thanks for the info and link, @wrongway213
Link to @topjohnwu's post: https://twitter.com/topjohnwu/status/1272136975022084097?s=19
ALL FILES BELOW ARE FOR "RP1A.201105.002, Nov 2020"!
[Mid-Month Update] Magisk v21.1 Patched Boot Image: https://www.androidfilehost.com/?fid=10763459528675583368
Magisk v21.0 Patched Boot Image: https://www.androidfilehost.com/?fid=10763459528675576858
Factory Untouched Boot Image: https://www.androidfilehost.com/?fid=10763459528675576853
Factory Untouched DTBO Image: https://www.androidfilehost.com/?fid=10763459528675576854
----------------------------------------------
-------------UPDATE PROCESS BELOW-------------
----------------------------------------------​
EASY UPDATE / SEAMLESS KEEP-ROOT UPDATE PROCESS (using a PC - a very intuitive, effective, and relatively safe method).
** You can only follow this guide verbatim if coming EXACTLY from build "11.0.0 (RP1A.201005.004, Oct 2020)". But the general idea is the same for other builds, you just need the correct files for your device.
coral-rp1a.201005.004-factory-dtbo.img: https://www.androidfilehost.com/?fid=10763459528675557938
coral-rp1a.201005.004-factory-boot.img: https://www.androidfilehost.com/?fid=10763459528675557937
November 2020 sideload OTA zip: https://dl.google.com/dl/android/aosp/coral-ota-rp1a.201105.002-e4f4e179.zip
DO NOT BOOT BACK INTO O/S UNTIL ALL STEPS ARE COMPLETED - THIS ENSURES EVERYTHING BOOTS BACK UP WITH MAGISK / EDXPOSED ALL RUNNING PROPERLY RIGHT AWAY
1. boot into bootloader
----------------
** I was on custom kernel, so I needed to flash BOTH the stock boot and dtbo images
2. fastboot flash boot coral-rp1a.201005.004-factory-boot.img
3. fastboot flash dtbo coral-rp1a.201005.004-factory-dtbo.img
......* these steps to restore stock recovery; dtbo.img also necessary for some kernel installations.
......* won't hurt to flash both anyway, so if you're unsure, go ahead and do both.
-----------------
4. use volume keys to change selection to boot to Recovery Mode
......- when you reach the android symbol with No Command, hold power button, tap volume up, in case you've forgotten
5. choose option "Apply update from ADB"
6. adb sideload coral-ota-rp1a.201105.002-e4f4e179.zip
7. Once the OTA sideload is done, Reboot to bootloader (you'll also notice it's now on the other slot after OTA flashed)
8. fastboot flash boot coral-rp1a.201105.002-magisk_patched-20.4.img
9. done, start the phone
(Optional - Flash custom kernel. If you had a custom kernel, you need to re-flash it)
This is a 100% seamless update that requires no additional / re-setup of any of my Magisk or EdXposed setups. All of the factory files can be found here https://developers.google.com/android/images. boot.img and dtbo.img are in their corresponding full Factory Image zips, and the ota zip is under Full OTA Images.
Please Note: I still haven't upgraded to Android 11, so the usual warnings apply. Please see previous month's update guides for additional info and troubleshooting.
PASSING SAFETYNET: Use the MagiskHide Props Config module (or an alternate module created by Displax, though I prefer Didgeridoohan's module) and choose option 2 - Force BASIC key attestation. This forces BASIC HW attestation and allows SafetyNet to pass again. This also works (along with proper setup) with EdXposed (big thanks to eg1122's guide here). The MagiskHide Props Config module and info on using it can be found here: https://forum.xda-developers.com/ap...just search for it in the Magisk Manager app.
Specific EdXposed build required to pass SafetyNet: Also big thanks to cracky.ice who found that, as of this posting, we need to use EdXposed build 4563 (v0.4.6.4). See cracky.ice's original post here. Apparently Google changed something again that makes SafetyNet fail with EdXposed on build 4564 (v0.5.0.6), regardless of using the MagiskHide Props Config module. EdXposed build 4563 (v0.4.6.4) can be downloaded directly from here: https://ci.appveyor.com/project/ElderDrivers/edxposed/builds/35441002/artifacts
------------------------------
-----------------------------------------
------------------------------​
Issues after updating?
If you end up unable to boot or bootlooping afterwards, you most likely have an old Magisk module that isn't playing nice with the new build. There are 2 main things you can do:
1. Flash the new factory untouched boot image. You will of course lose root, and all modules will be disabled. However, it should at least get you able to boot back up quickly and have a working phone if you're in a bind.
2. I would recommend checking Tulsadiver's thread: https://forum.xda-developers.com/pixel-4-xl/how-to/magisk-modules-disabler-booting-magisk-t3990557
Instead of reverting to stock boot image, fastboot boot (NOT FLASH) Tulsadiver's boot image. This will boot your phone in Magisk Core-Only Mode, with all modules disabled but root retained. From here you can open Magisk Manager and disable suspect modules. Before rebooting, go to Magisk Manager's settings and disable Magisk Core-Only Mode. Once you disable the incompatible module, the phone should boot back up.
- See this post (or thread) for more tips / context / an example: https://forum.xda-developers.com/showpost.php?p=82509691&postcount=16
Upgraded with your method and everything worked out fine. Thank you very much.
Everything works well. Thanks a lot for your sharing.
Thanks as always. Helps a lot
Yes, thanks for sharing. I was able to flash your rooted kernel. Just quick question on how to flash custom kernel without those kernel tools..
OP updated with patched boot image with Magisk v21.1
If it doesn't work for some reason, simply flash back Magisk v21.0. Don't see why it wouldn't, but just because I haven't tested yet.
Edit: I should also mention, if you have a custom kernel flashed already on November build, I would recommend restoring (flashing) stock November dtbo img, along with flashing the new Magisk 21.1 patched boot image, then re-flashing the kernel after booting back up. Otherwise, you'll potentially have a modified dtbo from previous kernel install, along with a stock, magisk-patched, non-kernel modified boot image and I'm not sure if it'll make things wonky and cause issues leading up to or during re-flashing your kernel. Normally I'd say just direct install the update via Magisk Manager but for some reason since moving to the Pixel 4, it hasn't worked for me. Weird because it worked on HTC U12+, which is also an A/B partitioned device.
The december update is out. Anyone here already tried it out? Can someone share the magisk file?
Morgrain said:
The december update is out. Anyone here already tried it out? Can someone share the magisk file?
Click to expand...
Click to collapse
Just put the baby down for the afternoon nap, gonna start working on this now. =)
I still haven't updated to Android 11 yet (no GravityBox) - but could someone answer this one question for me? It's the one thing that really makes me hesitant / anxious about going to Android 11. Did they completely remove 3 button navigation, or is it still available? I friggin' hate gesture navigation, and really hope 3 button is still available.
Anyways, thanks. Hold tight and I should have the files up soon.
edit: it's up. https://forum.xda-developers.com/t/...5-008-coral-magisk-stock-boot-images.4200261/
new XDA is getting on my nerves... lol
i5lee8bit said:
Just put the baby down for the afternoon nap, gonna start working on this now. =)
I still haven't updated to Android 11 yet (no GravityBox) - but could someone answer this one question for me? It's the one thing that really makes me hesitant / anxious about going to Android 11. Did they completely remove 3 button navigation, or is it still available? I friggin' hate gesture navigation, and really hope 3 button is still available.
Anyways, thanks. Hold tight and I should have the files up soon.
Click to expand...
Click to collapse
On my P4 XL , stock Android 11 November Patch , I can still change to 3-button navigation under "Gestures". They did remove the 2 button nagivation.
No, thank you. Without your good guide/seamless update idea, updating rooted Pixels would be much more hassle

[UPDATE / KEEP ROOT GUIDE] SEPTEMBER 2021 (RQ3A.210905.001) - "CORAL" Magisk-Patched & Stock Boot / DTBO Images

IMPORTANT!! THESE FILES / THIS THREAD IS FOR PIXEL 4 XL "CORAL" ONLY, NOT PIXEL 4 "FLAME"!!
==========> USEFUL LINKS ==========>
==> DOWNLOAD LATEST SDK PLATFORM TOOLS HERE: https://developer.android.com/studio/releases/platform-tools
==> Official Factory Image / OTA - Downloads / Flashing Guide Here (recommend reading): https://developers.google.com/android/images
==> topjohnwu's Official Magisk GitHub Repo - "Useful Links" Section includes installation instructions, FAQ's, documentations, and more: https://github.com/topjohnwu/Magisk#useful-links
==> @Didgeridoohan's excellent Magisk Troubleshooting / FAQ / Installation Guide (also linked from topjohnwu's GitHub!): https://www.didgeridoohan.com/magisk/HomePage
==> Universal SafetyNet Fix Magisk Module by kdrag0n - Use this module by kdrag0n (make sure to donate / give thanks to him for his amazing work!): https://github.com/kdrag0n/safetynet-fix/releases
==> SafetyNet w/ Xposed - I recommend LSposed over EdXposed (better hooking mechanism, less likely to trigger SafetyNet violation, overall more efficient with handling resources anyway).
<========== USEFUL LINKS <==========
**IT IS HIGHLY RECOMMENDED TO PATCH THE STOCK BOOT IMAGE YOURSELF, FROM YOUR OWN DEVICE, USING MAGISK MANAGER. WHILE THERE'S A GOOD CHANCE THE FILE I PROVIDED BELOW WILL BE IDENTICAL (USE A FILE HASH CHECKSUM TOOL IF YOU'RE CURIOUS), THERE IS ALSO A CHANCE THEY MAY HAVE SMALL, BUT SIGNIFICANT, VARIANCES**
Thanks for the info and link, @wrongway213
Link to @topjohnwu's post: twitter dot com /topjohnwu/status/1272136975022084097?s=19 (until I figure out how to stop new XDA from forcing the URL to embed a giant twitter posting in the middle of the post...)
ALL FILES BELOW ARE FOR "RQ3A.210905.001, Sep 2021"!
Magisk v23.0 Patched Boot Image: https://www.androidfilehost.com/?fid=7161016148664802803
Factory Untouched Boot Image: https://www.androidfilehost.com/?fid=7161016148664802804
Factory Untouched DTBO Image: https://www.androidfilehost.com/?fid=7161016148664802805
----------------------------------------------
-------------UPDATE PROCESS BELOW-------------
----------------------------------------------​
EASY UPDATE / SEAMLESS KEEP-ROOT UPDATE PROCESS (using a PC - a very intuitive, effective, and relatively safe method).
** You can only follow this guide verbatim if coming EXACTLY from build "11.0.0 (RQ3A.210805.001.A1, Aug 2021)". But the general idea is the same for other builds, you just need the correct files for your device.
coral-rq3a.210805.001.a1-factory-dtbo.img: https://www.androidfilehost.com/?fid=14943124697586378273
coral-rq3a.210805.001.a1-factory-boot.img: https://www.androidfilehost.com/?fid=14943124697586378275
September 2021 sideload OTA zip: https://dl.google.com/dl/android/aosp/coral-ota-rq3a.210905.001-807a4197.zip
DO NOT BOOT BACK INTO O/S UNTIL ALL STEPS ARE COMPLETED - THIS ENSURES EVERYTHING BOOTS BACK UP WITH MAGISK / EDXPOSED ALL RUNNING PROPERLY RIGHT AWAY
*. make sure installed Magisk (Manager) app version is equal to or greater than the Magisk pre-patched version boot image provided
1. boot into bootloader
----------------
** I was on custom kernel, so I needed to flash BOTH the stock boot and dtbo images
2. fastboot flash boot coral-rq3a.210805.001.a1-factory-boot.img
3. fastboot flash dtbo coral-rq3a.210805.001.a1-factory-dtbo.img
......* these steps to restore stock recovery; dtbo.img also necessary for some kernel installations.
......* won't hurt to flash both anyway, so if you're unsure, go ahead and do both.
-----------------
4. use volume keys to change selection to boot to Recovery Mode
......- when you reach the android symbol with No Command, hold power button, tap volume up, in case you've forgotten
5. choose option "Apply update from ADB"
6. adb sideload coral-ota-rq3a.210905.001-807a4197.zip
7. Once the OTA sideload is done, Reboot to bootloader (you'll also notice it's now on the other slot after OTA flashed)
8. fastboot flash boot coral-rq3a.210905.001-magisk_patched-23000.img
9. done, start the phone
(Optional - Flash custom kernel. If you had a custom kernel, you need to re-flash it)
This is a 100% seamless update that requires no additional / re-setup of any of my Magisk or EdX/LSposed setups. All of the factory files can be found here https://developers.google.com/android/images. boot.img and dtbo.img are in their corresponding full Factory Image zips, and the ota zip is under Full OTA Images.
-------------------------------------------------
-------------------TROUBLESHOOTING-------------------
-------------------------------------------------​
Issues after updating?
If you end up unable to boot or bootlooping afterwards, you most likely have an old Magisk module that isn't playing nice with the new build. There are 2 main things you can do:
1. Flash the new factory untouched boot image. You will of course lose root, and all modules will be disabled. However, it should at least get you able to boot back up quickly and have a working phone if you're in a bind.
2. I would recommend checking Tulsadiver's thread: https://forum.xda-developers.com/pixel-4-xl/how-to/magisk-modules-disabler-booting-magisk-t3990557
Instead of reverting to stock boot image, fastboot boot (NOT FLASH) Tulsadiver's boot image. This will boot your phone in Magisk Core-Only Mode, with all modules disabled but root retained. From here you can open Magisk Manager and disable suspect modules. Before rebooting, go to Magisk Manager's settings and disable Magisk Core-Only Mode. Once you disable the incompatible module, the phone should boot back up.
- See this post (or thread) for more tips / context / an example: https://forum.xda-developers.com/showpost.php?p=82509691&postcount=16
Since Magisk v21.x, Core Only mode has been replaced by using Android's built-in Safe Mode. Booting into Safe Mode should essentially boot you back into your system but with all modules disabled (as well as Magisk Hide). Keep in mind that even after you reboot, modules will remain disabled, unless you re-enable them first. Also remember to re-enable Magisk Hide if you had it enabled before.
Please see @Didgeridoohan's guide for more details: https://www.didgeridoohan.com/magisk/MagiskModuleIssues#hn_Core_Only_Mode
It's also worth mentioning, his guide is extremely well-made and contains a lot of useful information that could benefit all Magisk users and modders. I highly recommend looking through it anyway!
Used your files, worked like a charm, thanks.
Thanks
October OTA is available!
https://dl.google.com/dl/android/aosp/coral-ota-rq3a.211001.001-d641dc96.zip
Ghisy said:
October OTA is available!
https://dl.google.com/dl/android/aosp/coral-ota-rq3a.211001.001-d641dc96.zip
Click to expand...
Click to collapse
Lel, where is our Android 12 rollout o.o
This is just a security update without any functional features. The heck.
Morgrain said:
Lel, where is our Android 12 rollout o.o
This is just a security update without any functional features. The heck.
Click to expand...
Click to collapse
It's coming in a "few weeks" for Pixel phones, per Google.
Lughnasadh said:
It's coming in a "few weeks" for Pixel phones, per Google.
Click to expand...
Click to collapse
So the Android 12 "release" early October was a lie. Jikes.
Companies should really start communicating release dates better. There are rumors now that Battlefield will also get delayed until 03/2022. Well...
Morgrain said:
Lel, where is our Android 12 rollout o.o
This is just a security update without any functional features. The heck.
Click to expand...
Click to collapse
I'm not in a hurry to update to 12 so I don't mind.
It would have been nice however to get a feature drop in the meantime.
Android 12 has been "really" released now.
Google rolling out Android 12 to current Pixel phones today
After three developer previews and four betas, Android 12 is ready to launch on Pixel phones as Google's biggest mobile OS release...
9to5google.com
Did someone used this method voor Android 12?
Which methods are you using, with flashall without -w?
knopie said:
Did someone used this method voor Android 12?
Which methods are you using, with flashall without -w?
Click to expand...
Click to collapse
Late to the game here.
I updated from October 11 to November and 12 following this method without an issue. (I skipped the October 12 release)
I'm on a Verizon MVNO and used the "unbranded" version 12.0.0 (SP1A.211105.002, Nov 2021).
I didn't flashall. Followed this guide exactly, using Magisk to extract and patch the boot image myself.
Haven't had a problem, beyond not getting the the wireless internet connection quick toggle mod to stick (adb shell settings put secure sysui_qs_tiles “wifi,cell,$(settings get secure sysui_qs_tiles)”)
I used the flashall method and it worked, no problems for me and simple.
Could someone share the boot image for 12 (SP2A.220305.012) please?
I don't know why but I had an issue and now I'm stuck without root.
*EDIT*
Here it is, if you find yourself in the same situation of taking the March 2022 OTA and lost root here is the unmodified boot image ready for Magisk patching.
Google Drive - Virus scan warning
drive.google.com

How To Guide [OUTDATED - PLEASE USE UNOFFICIAL LINEAGEOS INSTEAD] Installing a GSI on Samsung M12/A12.

I am deleting this guide since M12 will soon recieve an unofficial build of LineageOS 19.1. Don't ask when, as I'm not the lead developer but I helped with it
Update 1: I figured out how to make script run on boot. Instructions revised. If you followed earlier check them again
Update 2: Magisk 24.1 is now stable. Instructions revised.
Update 3: I contacted phh and he implemented the script inside his trebleapp. Instructions revised and modified trebleapp is attached. NOTE: GSIs newer than 7/Feb/2022 will include this workaround by default.
Update 4: This guide is now unnecessary now that unofficial LineageOS is very close to release
Achievement unlocked: flashed GSI with FBE enabled! ​
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
In short, I've successfully done flashing of @phhusson's latest version of Android 12 GSI (which is v402 as of today). To do this, I needed to modify the multidisabler script so it won't disable FBE, format the userdata using the stock recovery, flash TWRP, resize tmpfs to proper size, push GSI image into tmpfs and flash it using TWRP. I used the securized image with vndklite variant, since there was no securized images for regular vndk releases (but it seemed that vndk was working better for me, at least I have no USB connection anymore where with VNDK I was able to have USB debugging). Maybe I'll try re-flashing it once I'll patch the regular images and securize them (since I'm on *nix, I can just mount them and modify their contents) and take an approach of finding how Samsung ROMs are working OK. For now, I need to take a break from all bootloops I had in the process of FBE flashing .
Anyway, the goal of this experiment was to use GSI ROMs as a daily driver and having FBE disabled could otherwise cause a serious problem on device loss.
So, onto the list what's been tested (that wasn't noted before):
Screen locking – it seems that the workaround for the screen is not applied before unlocking the phone, probably because the app is not running yet. This might work with the script used as postfs module.
EDIT: I've found some notes in the Magisk documentation that both post-fs data and late_start services are run after data is decrypted, which basically means applying this workaround using Magisk seems to be pointless for now (maybe not after PPH app will stop providing the workaround)... Probably the best option would be patching the ROM itself, either with flashable ZIPs or directly before flashing it (most GSIs can be mounted under Linux and tweaked).
Adaptive brightness – not working, since all virtual sensors are not working for now. Might be easy to fix through as I've found some stuff in the official ROM that I had an idea to experiment with putting them into GSIs (as a Magisk module, to avoid a breakage).
USB – as I said, a data transfer via USB is not working for me for some reason. It worked for me once I had VNDK Android 12 GSI installed (same version).
Booting with stock kernel – I had some successful attempts doing that, but it further was a cause of a bootloop, at least once I had installed Magisk. Therefore, I'll recommend patching the Magisk the way as in tutorial (after patching the kernel) to have everything working for now.
For people who wants to play with stock images but don't know how: you can use simg2img, lpunpack and Linux to extract and mount the official ROM image in approach of finding there some tips like in initrc services why some stuff is working fine on Samsung while it doesn't on GSIs. Maybe I would tinker with it a bit, trying to export a few services and libraries in an approach to create a Magisk module with all stuff needed to have a fully functional GSI, but I'm tired of modding for now, especially when this is my first Samsung phone I had to deal with.
Edit: Typo fixes, added additional text formatting.
Amazing work. If you need testers feel free to PM me. As a sidenote, poking in sysfs led me to believe that android is sending the info needed to read the proximity but the kernel is sending garbage which gets interpreted as the sensor not being triggered. Also phh should have added the workaround into his trebleapp starting from phh AOSP 12 v401, so aside from installing magisk no post install workarounds should be needed.
Attached is a photo of what cmd_result reads when a whatsapp voice message is played which reads proximity to play the message in the earpiece and turn screen off when proximity is triggered
ap4ss3rby said:
Also phh should have added the workaround into his trebleapp starting from phh AOSP 12 v401, so aside from installing magisk no post install workarounds should be needed.
Click to expand...
Click to collapse
Unfortunately, the commit was reverted as of master branch, so we should prepare for it to stop to work unless phh will work on it before releasing an another version. Also I wrote that the workaround didn't seem to apply itself before unlocking the phone (FBE encrypted) the first time and therefore decrypting sensitive data after boot. For now this makes it an requirement when using PHH app to unlock the phone before it sleeps so the touch is going to be responsive.
Anyway, it seems that even Magisk (v24.1) is not capable of running the services before data is decrypted, so now I have no idea how to bypass that in other way than patching the ROM itself and creating the `initrc` service... Anyway, this is also a hint that what samsung is doing starts before basically everything, so no APK file nor script is going to really fix it since they are meant to start after data is decrypted...
SB3P said:
Unfortunately, the commit was reverted as of master repo, so we should prepare for it to stop to work unless phh will work on it before releasing an another version. Also I wrote that the workaround didn't seem to apply itself before unlocking the phone (FBE encrypted) the first time and therefore decrypting sensitive data after boot. For now this makes it an requirement when using PHH app to unlock the phone before it sleeps so the touch is going to be responsive.
Anyway, it seems that even Magisk (v24.1) is not capable of running the services before data is decrypted, so now I have no idea how to bypass that in other way than patching the ROM itself and creating the `initrc` service... Anyway, this is also a hint that what samsung is doing starts before basically everything, so no APK file nor script is going to really fix it since they are meant to start after data is decrypted...
Click to expand...
Click to collapse
I guess for now we have two options:
A: Build custom kernel/vendor specifically for GSIs that correctly reports sensors as GSIs expect them to
B: Fix GSI issues through Magisk services implementing various workarounds in scripts. (an example is the touchscreen sleep/wake issue)
ap4ss3rby said:
Attached is a photo of what cmd_result reads when a whatsapp voice message is played which reads proximity to play the message in the earpiece and turn screen off when proximity is triggered
Click to expand...
Click to collapse
Also that's interesting those virtual sensors are still present, I personally thought that Samsung made it the way there's an virtual device create as on Linux and there's their proprietary software running somewhere in the system that uses the camera as an input and calculates it to provide the data... On the other hand, when I think about that logic, even some (if not all) virtual devices on Linux (e.g. v4l2loopback) needs to have their module loaded with the kernel to work. I'm glad at least there's no need to reinvent the wheel and no one really needs to recreate the entire algorithm for it if it's going to be in the kernel sources...
ap4ss3rby said:
I guess for now we have two options (...)
Click to expand...
Click to collapse
I feel like the B option is worse than patching the GSI ROMs, either via flashable ZIPs or on your own... This is because I couldn't find anything in docs that would let me run services before /data is going to be decrypted... Personally, I've made myself a such service using the statically-compiled Linux ARM binary (non-NDK, using GNU libs – yes, it is still runnable on Android as well) – it applies the workaround for now both when screen is turned on and off (I had no idea on which event it should really run, so I made it to run on both just to be safe) by watching the file changes based on (AFAIK) filesystem events – so it has a major advantage over your script, as it won't run in endless loop, yet watch the file responsible for brightness to change and then do its job. But even with that, TSP doesn't seem to make touch available immediately and it is still expected to be revived after 1-2 seconds.
Also, as of the methods of applying these workarounds, the other way could be modifying the ramdisk (maybe with the help of Magisk, which I believe has documented how it's actually doing it itself and how others could modify the root and init as Magisk does to load files before the OS will properly initalize itself. Yet I don't like an idea of messing myself with the boot partition, at least for now...
Debug info: I tried flashing stock to grab logs from the touchscreen driver. The logs attached here do not appear at all on an unpatched GSI (I.E flashing the GSI as is without any touch workaround).
ap4ss3rby said:
Hi, I installed LineageOS 18.1 GSI on my M127F. I want to share my guide to installing this GSI.
Code:
DISCLAIMER:
By following this guide you accept that you
may do irreversible damage to your phone.
If something breaks the responsibility is
yours only. If you want stable software that
is guaranteed to work 100% don't follow
this guide.
I assume you are running a fully stock system and and locked bootloader and firmware U3/U4.
Installing TWRP and custom kernel
Enable Developer Options by tapping on software information > build number 7 times
Enter developer options then toggle OEM Unlocking on.
Power off your phone.
Hold Vol Up + Vol Down then plug in your phone to enter download mode
THIS WILL ERASE ALL YOUR DATA AND VOID YOUR WARRANTY. Follow on screen instructions to unlock your bootloader. THIS WILL ERASE ALL YOUR DATA AND VOID YOUR WARRANTY
After this you want to download and install attached Orangefox recovery using odin. After odin is done flashing enter recovery
Format data (not wipe) in recovery
Enter terminal and type multidisabler twice
Reboot to system and verify that under security encryption is disabled
Download TWRP and custom kernel for your phone
Reboot into recovery and locate the downloaded twrp image
Select recovery.
Reboot into recovery
Install kernel, then wipe cache and reboot. You should now see that it is complaining about some internal issue. This is normal.
Installing the GSI
Download your favorite ROM from the list provided below. You want to install an arm64 a/b image.
Extract the image file
Reboot to recovery.
Select install then install image
Locate the GSI image
Select install system
After that is done return to recovery and select factory reset.
Reboot then do setup (if applicable) then download attached magisk and phh trebleapp. If your phone is stuck on bootanimation check under to fix it.
IMPORTANT: DO NOT LET THE SCREEN TURN OFF OR YOU WILL HAVE TO REBOOT TO MAKE TOUCH WORK AGAIN.
Install attached magisk
Open magisk and click on install then direct install
Download and install the attached phh-treble app apk.
Touch should now work. Enjoy your GSI.
Extras
Magisk 24.1
Open Magisk
Go to settings
Update Magisk Manager app to version 24.1
Relaunch Magisk then install magisk
Choose direct instal
Migrating to patched trebleapp
Download and install attached trebleapp
Open your root file manager
go to /data/adb/service.d
Delete the script you added earlier
Tips in case things don't work
In case after rebooting to the GSI the phone bootloops:
Download stock image from wherever you download your firmware (I use a python program called samloader)
Extract the AP of the downloaded firmware
Find userdata.img.lz4 and create a .tar archive only containing this file
Reboot to download mode
In odin select AP then locate the newly created .tar archive Then click on flash
Reboot
Continue from step 7 under the "Installing the GSI" portion of the guide
To revive the touchscreen using ADB:
In case you didn't grant adb root access but installed magisk, run adb shell then su. A root access for the app shell will appear. Grant root permission
Plug in phone to a computer with ADB
adb shell
su
cat /sys/class/sec/tsp/cmd_result
echo check_connection > /sys/class/sec/tsp/cmd
What works:
Boots
RIL
Fingerprint
Main rear camera
Front camera
Sleep/Wake (workaround in steps above, may need to sleep wake several times before it works)
WiFi
Flashlight
Rotation
Magisk 24
90Hz (M12 only. A12 doesn't have 90Hz refresh rate)
LineageOS 18.1
LineageOS 19
CAOS (GApps variant available)
phh AOSP 11 v313
phh AOSP 12 v400h
Untested
GPS
Flashing GApps. (I use fdroid and aurora store on LineageOS and CAOS has built in GApps)
USB-OTG
A127F
M127G
If I didn't list it under broken or working I didn't try it or forgot to test it.
Broken
Double tap to wake. Touchscreen turns off and I have no idea how to keep it alive while lcd is off
MTP
Virtual Proximity. Screen will stay on in phone calls and WhatsApp will always play voice messages through speaker
Flashlight brightness. Flashlight will always stay on weakest brightness with no way to adjust.
Adaptive refresh. The framerate you set in phh addons is what you get. Be prepared for slightly reduced battery.
You tell me (even though I probably don't have the solution)
Bugs
You may need to wait a little bit before touchscreen responds or sleep/wake several times before screen responds after turning the screen off
Credits
@physwizz for kernel, TWRP and orangefox
@phhusson for implementing workaround in trebleapp as well as GSI list
me for touch workaround
Links
Kernels and recoveries: https://t.me/a127f_res/113
GSIs: https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-(GSI)-list
Click to expand...
Click to collapse
Great guide.
Well done
Thanks for the great guide. Unfortunately, I don't know how to resize tmpfs. Can anybody tell me how to do that? I only have 4 GB or less on my Samsung Galaxy A12 with 64 GB of Storage (it should have, it only shows something like 3 or 4 gigabytes like I mentioned)
matahbeyz said:
Thanks for the great guide. Unfortunately, I don't know how to resize tmpfs. Can anybody tell me how to do that? I only have 4 GB or less on my Samsung Galaxy A12 with 64 GB of Storage (it should have, it only shows something like 3 or 4 gigabytes like I mentioned)
Click to expand...
Click to collapse
You don't have to resize TMPFS if you don't want to have FBE encryption or have the external SD card (you can use microSD for flashing, which might be a better choice if you need to flash a larger devices). Also you can't resize TMPFS to 64 GB, it uses your RAM to store regular data instead of storage (this is basically the concept of TMPFS). What I was mentioning is that /data won't work under FBE and custom recoveries for now, so you need to use your RAM instead if you don't have any external storage device to save images somewhere via ADB.
As of resizing the TMPFS, you should be able to find some Linux tutorial how to do that, on Android this is works basically the same (even on both Linux and Android you have /tmp directory with TMPFS by default).
Anyway, I've decided to share some stuff that you may need for that. Here's the multidisabler script I was using for flashing GSIs with FBE encryption preserved. I was also working on the native binary that would work as the workaround for the touchscreen so it can be used instead of the script. The advantages are that it actually listens to filesystem events and therefore does not need to read file in loop in order to get the information if brightness has changed. Maybe I'll share it with you once I find it to be ready, right now I'll just share my multidisabler script with patches.
BTW, I've tested LineageOS GSIs (both 11 and 12) and noticed they behave completely different, no matter of variant (the USB actually uses some driver, which is not fully compatible with M12 but close enough to provide basic communication through ADB). I guess pphusson just changed something and now these drivers aren't applied by default, yet I think I've noticed the issues with Bluetooth's HSP/HFP profiles which as I remember was not the case with latest stable pphusson's vanilla Android 12 GSIs. Now I just hope these problems are going to be resolved in the next builds of Android's GSIs with phhusson's patches and with the knowledge that MTP just worked fine on TWRP I used, there's a little hope that we will gain the proper combination of drivers/firmware to have both USB and Bluetooth functional at the same time someday.
I've also approached patching the kernel under newer kernel base 4.19.112, yet I gave up on properly resolving its conflicts. I may work on that as well in order to patch some vulnerabilities, with a hope that I'll succeed updating kernel as closest to the latest patch as possible. The 4.19.112 is going to be just a test if Samsung is capable of actually booting from it and if I may be able to use git with common human logic and my limited programming skills to actually patch it the way it would do so (without much understanding about the code itself, yet basic knowledge about C syntax). For now I've only succeed reproducing the upstream Linux kernel commit structure from 4.19.111, with a single additional commit for Samsung changes and another one for physwizz ones.
can anyone guide me how to unlock bootloader on Samsung Galaxy M12G ?
@SB3P Thanks so much. Sorry for my late reply, but thank you!
SB3P said:
Achievement unlocked: flashed GSI with FBE enabled! ​View attachment 5533799​In short, I've successfully done flashing of @phhusson's latest version of Android 12 GSI (which is v402 as of today). To do this, I needed to modify the multidisabler script so it won't disable FBE, format the userdata using the stock recovery, flash TWRP, resize tmpfs to proper size, push GSI image into tmpfs and flash it using TWRP. I used the securized image with vndklite variant, since there was no securized images for regular vndk releases (but it seemed that vndk was working better for me, at least I have no USB connection anymore where with VNDK I was able to have USB debugging). Maybe I'll try re-flashing it once I'll patch the regular images and securize them (since I'm on *nix, I can just mount them and modify their contents) and take an approach of finding how Samsung ROMs are working OK. For now, I need to take a break from all bootloops I had in the process of FBE flashing .
Anyway, the goal of this experiment was to use GSI ROMs as a daily driver and having FBE disabled could otherwise cause a serious problem on device loss.
So, onto the list what's been tested (that wasn't noted before):
Screen locking – it seems that the workaround for the screen is not applied before unlocking the phone, probably because the app is not running yet. This might work with the script used as postfs module.
EDIT: I've found some notes in the Magisk documentation that both post-fs data and late_start services are run after data is decrypted, which basically means applying this workaround using Magisk seems to be pointless for now (maybe not after PPH app will stop providing the workaround)... Probably the best option would be patching the ROM itself, either with flashable ZIPs or directly before flashing it (most GSIs can be mounted under Linux and tweaked).
Adaptive brightness – not working, since all virtual sensors are not working for now. Might be easy to fix through as I've found some stuff in the official ROM that I had an idea to experiment with putting them into GSIs (as a Magisk module, to avoid a breakage).
USB – as I said, a data transfer via USB is not working for me for some reason. It worked for me once I had VNDK Android 12 GSI installed (same version).
Booting with stock kernel – I had some successful attempts doing that, but it further was a cause of a bootloop, at least once I had installed Magisk. Therefore, I'll recommend patching the Magisk the way as in tutorial (after patching the kernel) to have everything working for now.
For people who wants to play with stock images but don't know how: you can use simg2img, lpunpack and Linux to extract and mount the official ROM image in approach of finding there some tips like in initrc services why some stuff is working fine on Samsung while it doesn't on GSIs. Maybe I would tinker with it a bit, trying to export a few services and libraries in an approach to create a Magisk module with all stuff needed to have a fully functional GSI, but I'm tired of modding for now, especially when this is my first Samsung phone I had to deal with.
Edit: Typo fixes, added additional text formatting.
Click to expand...
Click to collapse
Could you explain how you done this.... i mean please explain step by step... i am using Galaxy M12G Varient....thanks in advance
milindbhaliwade said:
Could you explain how you done this.... i mean please explain step by step... i am using Galaxy M12G Varient....thanks in advance
Click to expand...
Click to collapse
If you would see the *untested* section at the initial post of this thread, it is unknown whetever this works or not for M127G phones (if it bootloops it might not work at all). Anyway, here's how I did it on M127F (at least how I remember this):
1. I did steps from 1-6, I believe I skipped 7 since I was aware it will mess something up with the data partition.
2. I modified the multidisabler script and pushed it to my phone via the ADB (to TMPFS). You can find this script pushed as xz compressed file. Before executing multidisabler script I have done a backup of the recovery and system partitions (using dd tool) which I am going to reflash later.
3. I rebooted to download mode and flashed TWRP image.
4. After TWRP ended flashing, I booted into the recovery. I flashed the physwizz kernel and then my own GSI image as it was described in the instructions at the initial post. Just remember that /data partition is not functional with FBE and TWRP so you need to push your images somewhere else like microSD card or TMPFS partition. OTG might work here as well, this is something I haven't tested yet through...
5. Once you are done with flashing you need to restore the original recovery partition via the download mode. TWRP won't boot the GSIs with FBE encryption enabled actually it does boot now for me, yet I still recommend switching to stock recovery if your phone bootloops or you need to format/wipe userdata partition. You can then safely format your /data partition with the stock recovery.
ap4ss3rby said:
Hi, I installed LineageOS 18.1 GSI on my M127F. I want to share my guide to installing this GSI.
Code:
DISCLAIMER:
By following this guide you accept that you
may do irreversible damage to your phone.
If something breaks the responsibility is
yours only. If you want stable software that
is guaranteed to work 100% don't follow
this guide.
I assume you are running a fully stock system and and locked bootloader and firmware U3/U4.
Installing TWRP and custom kernel
Enable Developer Options by tapping on software information > build number 7 times
Enter developer options then toggle OEM Unlocking on.
Power off your phone.
Hold Vol Up + Vol Down then plug in your phone to enter download mode
THIS WILL ERASE ALL YOUR DATA AND VOID YOUR WARRANTY. Follow on screen instructions to unlock your bootloader. THIS WILL ERASE ALL YOUR DATA AND VOID YOUR WARRANTY
After this you want to download and install attached Orangefox recovery using odin. After odin is done flashing enter recovery
Format data (not wipe) in recovery
Enter terminal and type multidisabler twice
Reboot to system and verify that under security encryption is disabled
Download TWRP and custom kernel for your phone
Reboot into recovery and locate the downloaded twrp image
Select recovery.
Reboot into recovery
Install kernel, then wipe cache and reboot. You should now see that it is complaining about some internal issue. This is normal.
Installing the GSI
Download your favorite ROM from the list provided below. You want to install an arm64 a/b image.
Extract the image file
Reboot to recovery.
Select install then install image
Locate the GSI image
Select install system
After that is done return to recovery and select factory reset.
Reboot then do setup (if applicable) then download attached magisk and phh trebleapp. If your phone is stuck on bootanimation check under to fix it.
IMPORTANT: DO NOT LET THE SCREEN TURN OFF OR YOU WILL HAVE TO REBOOT TO MAKE TOUCH WORK AGAIN.
Install attached magisk
Open magisk and click on install then direct install
Download and install the attached phh-treble app apk.
Touch should now work. Enjoy your GSI.
Extras
Magisk 24.1
Open Magisk
Go to settings
Update Magisk Manager app to version 24.1
Relaunch Magisk then install magisk
Choose direct instal
Migrating to patched trebleapp
Download and install attached trebleapp
Open your root file manager
go to /data/adb/service.d
Delete the script you added earlier
Tips in case things don't work
In case after rebooting to the GSI the phone bootloops:
Download stock image from wherever you download your firmware (I use a python program called samloader)
Extract the AP of the downloaded firmware
Find userdata.img.lz4 and create a .tar archive only containing this file
Reboot to download mode
In odin select AP then locate the newly created .tar archive Then click on flash
Reboot
Continue from step 7 under the "Installing the GSI" portion of the guide
To revive the touchscreen using ADB:
In case you didn't grant adb root access but installed magisk, run adb shell then su. A root access for the app shell will appear. Grant root permission
Plug in phone to a computer with ADB
adb shell
su
cat /sys/class/sec/tsp/cmd_result
echo check_connection > /sys/class/sec/tsp/cmd
What works:
Boots
RIL
Fingerprint
Main rear camera
Front camera
Sleep/Wake (workaround in steps above, may need to sleep wake several times before it works)
WiFi
Flashlight
Rotation
Magisk 24
90Hz (M12 only. A12 doesn't have 90Hz refresh rate)
LineageOS 18.1
LineageOS 19
CAOS (GApps variant available)
phh AOSP 11 v313
phh AOSP 12 v400h
Untested
GPS
Flashing GApps. (I use fdroid and aurora store on LineageOS and CAOS has built in GApps)
USB-OTG
A127F
M127G
If I didn't list it under broken or working I didn't try it or forgot to test it.
Broken
Double tap to wake. Touchscreen turns off and I have no idea how to keep it alive while lcd is off
MTP
Virtual Proximity. Screen will stay on in phone calls and WhatsApp will always play voice messages through speaker
Flashlight brightness. Flashlight will always stay on weakest brightness with no way to adjust.
Adaptive refresh. The framerate you set in phh addons is what you get. Be prepared for slightly reduced battery.
You tell me (even though I probably don't have the solution)
Bugs
You may need to wait a little bit before touchscreen responds or sleep/wake several times before screen responds after turning the screen off
Credits
@physwizz for kernel, TWRP and orangefox
@phhusson for implementing workaround in trebleapp as well as GSI list
me for touch workaround
Links
Kernels and recoveries: https://t.me/a127f_res/113
GSIs: https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-(GSI)-list
Click to expand...
Click to collapse
try to install @phhusson (system-squeak-arm64-ab-vndklite-gapps-secure.img) GSI using above method on Samsung Galaxy M12G (SM-M127G) BUT failed to boot up
facing following issue:
1) unable to boot in OrangeFox Recovery
2) boot in TWRP Recovery but not detected MicroSD Card
3) samehow manage to push Kernal.zip, SystemGSI.img by adb push file_name_with_extension /sdcard BUT not flash properly as TWRP reboot again and again in 2-3 minutes
so friends, don't try this method on Samsung Galaxy M12G (SM-M127G) unless Senior member come up with this specific model
For anyone who has starred this thread, I and other devs have released a proper build of LineageOS with /vendor. Aside from VoLTE (which I don't think worked in GSIs anyways) everything should work. Moderators, please close this thread
ap4ss3rby said:
For anyone who has starred this thread, I and other devs have released a proper build of LineageOS with /vendor. Aside from VoLTE (which I don't think worked in GSIs anyways) everything should work. Moderators, please close this thread
Click to expand...
Click to collapse
LineageOS is not only GSI available, I think someone might still find it useful if they want to flash another ROMs. Also Phhuson's GSI also contains some features that unofficial GSI release don't have (i.e. flashlight control in Phhusson's app), so they still might be useful for someone.
This is why I think it is better to not close this thread and maybe revive original guide.
SB3P said:
LineageOS is not only GSI available, I think someone might still find it useful if they want to flash another ROMs. Also Phhuson's GSI also contains some features that unofficial GSI release don't have (i.e. flashlight control in Phhusson's app), so they still might be useful for someone.
This is why I think it is better to not close this thread and maybe revive original guide.
Click to expand...
Click to collapse
Our rom is built completely from source, not a GSI, and it is more or less a complete replacement of stock firmware. If you want you can use a GSI over that instead, and it should function much better than just replacing stock firmware
ap4ss3rby said:
Our rom is built completely from source, not a GSI, and it is more or less a complete replacement of stock firmware. If you want you can use a GSI over that instead, and it should function much better than just replacing stock firmware
Click to expand...
Click to collapse
I haven't said GSI are better, I personally use this unofficial LineageOS build. But what I've said, GSI brings much more variety of picking the OS you can install. Even Linux can be installed on phones nowadays using GSI with only Halium-patched kernel as an requirement. This is why I think leaving this tutorial archived (no updates, interest on fixing bugs etc.) is better than removing it.

General [Magisk] Magisk Zygote64_32: Enabling 32-bit Support For Apps

The 32-bit apps are back!​
screen-20221120-112309
Watch "screen-20221120-112309" on Streamable.
streamable.com
Synopsis​The Pixel 7 line is Google's first "64-bit only" phones, along with being the highest profile release of a 64-bit only device so far. The device uses the Tensor G2 (GS201), which is a close descendant of the Tensor (GS101) from the Pixel 6 line. So close, that the only major change was swapping out the ARM Cortex-A76 cores for ARM Cortex-A78 cores. The SoC still has full 32-bit support.
This was seemingly done at the last minute to get the ball rolling on switching Android to becoming 64-bit only at some point in the future. That future might be soon for other currently supported Pixel phones as the Android 13 QPR1 Beta includes optional firmware images that are 64-bit only. Given that it is currently optional on QPR1, there is a chance that at the earliest Android 14 will be 64-bit only across all supported Pixels, with a slimmer chance that it will be 64-bit only for AOSP also.
The three items that are of importance are AArch32, what Zygote services are set to start, and whether the build supports multilib.
AArch32​Is a mode starting with ARMv8 that provides support for the 32-bit ARM ABIs: armeabi and armeabi-v7a. An ABI is what defines how software is to be built and ran for specific instruction sets.​AArch32 is not required to be supported with ARMv9-A architectures, which would be processors starting with ARM Cortex-X2/X3/A715. These processors support AArch64 only.​The ARM Cortex-A510 is currently the only ARMv9-A processor that supports AArch32. This combination of processors (X2/X3/A715 with A510) results in asymmetric 32-bit support. This is the likely reason for Google expediting these changes. It is speculated that the Cortex-A520 will not support AArch32, which would put a stop to native 32-bit support completely for future devices.​Tensor G2 cores are still on ARMv8-A and thus still support AArch32.​​Zygote​Is a service that handles creating VMs for starting applications, and is responsible for allowing resources to be shared to reduce memory bloat from duplication. There are two Zygote services, Zygote64 and Zygote (colloquially referred to as Zygote32). Each handle a "warm" VM that is preloaded with libraries, which gets cloned for starting an application. This is done via copy-on-write, which means a copy is only made and occupies memory when attempting to modify a resource. The untouched copies all point back to the original, saving memory.​Without Zygote32, 32-bit applications can't be started. Without Zygote64, 64-bit applications can't be started.​Having multiple Zygote processes is referred to as "Zygote64_32"​​Multilib​Is a scheme that allows for 32-bit and 64-bit libraries to reside on the same device. This is required to support running 32-bit applications on 64-bit devices. Android has it's own implementation that differs from most Linux distributions, which may also differ between each other.​Obviously, without 32-bit libraries (or inversely without 64-bit libraries), a build does not support multilib.​​Somewhat important to note is that the 64-bit only QPR Beta images for the Pixel 4a to 6 are true 64-bit only, they do not support multilib. However, as noted here by Google, the Pixel 7 is 64-bit only but does support multilib.
The support matrix is as follows:
Phone + SoC, Build​SoC AArch32 Support​Zygote Property​Multilib​32-bit Support?​Pixel 6 with Tensor​Yes​Zygote64_32​Yes​Native​Pixel 6 with Tensor, 64-bit Only Build​Yes​Zygote64​No​Not Possible*​Pixel 7 with Tensor G2​Yes​Zygote64​Yes​With Modification​Pixel 7 with Tensor G2, 64-bit Only Build**​Yes​Zygote64​No​Not Possible*​Phone with AArch64-only ARMv9-A​No​Zygote64​No​Not Possible***​
* If no multilib build is also available. It may be possible with extensive work to use Treble to bring 32-bit libraries forward, assuming Android 14+ doesn't remove AArch32 and Zygote32. Emulation could be a possibility but has not been done yet.​** Build does not exist yet. It may be realized with a QPR build or it may be done with Android 14 instead.​*** Emulation could be a possibility but has not been done yet. Currently just the Pixel 6 and 7 have KVM built-in, but the Pixel 7 is the only one with it on by default.​
This means that with the right changes 32-bit support can be enabled and used if 32-bit libraries are on the device and the SoC supports AArch32.
Modifications​The changes required are as follows:
ro.zygote=zygote64_32​ro.vendor.product.cpu.abilist=arm64-v8a,armeabi-v7a,armeabi​ro.vendor.product.cpu.abilist32=armeabi-v7a,armeabi​​Genuinely that simple, property changes. Because the libraries are already in the firmware images it is just the need to instruct Android to use them.
Zygote64_32 refers to starting Zygote64 as the primary process, then starting Zygote32 as the secondary process. With this in place 32-bit applications can be installed and ran as 32-bit libraries are now able to be loaded.
The changes that need to be done are to either be applied to /vendor/build.prop, or done with init.rc modifications, or applied in some way before init.rc is read.
The last point is the critical issue that has halted this: there has not been any easy way to set properties very early in the boot process outside of simply just modifying the file on the partition.
This can't be done easily due to dynamic partitions requiring a custom super partition, and with the larger issue being AVB.
Luckily we can patch Magisk to do these changed early enough in the boot process.
Forewarning​A wipe is required​I do not know exactly why, but when a device is first booted with only Zygote64 it can't be switched over to use Zygote64_32. For some reason the 32-bit libraries inside APEXs are not discovered and loaded by Zygote32.
Support for custom ROMs is not guaranteed​It may or may not work. As a matter of fact, doing this modification isn't necessary as custom ROMs could implement this change themselves.
It is known that the modification does work on LineageOS.
I have not tested all 32-bit applications​I don't actually use any 32-bit apps. I have done testing with a few 32-bit apps I've gotten from APKMirror. So no, I don't know if your Instagram mod is working. I don't see any reason why it wouldn't.
Download Links​
Spoiler
All files are hosted at my download repository
Magisk Zygote64_32:​Recommended:​Release Build​​If you are having troubles and need to produce logs:​Debug Build​​Magisk Delta 32-bit:​For Advanced Users:​Release Build​
If you are having troubles and need to produce logs:​Debug Build​
Installation Instructions​General Prerequisites:​A working platform-tools environment
platform-tools 33.0.3 is required with the Pixel 7​The version you are running can be checked with adb --version and fastboot --version​If you need assistance then read this thread by @roirraW "edor" ehT.​Tools like PixelFlasher can be used, just read into how to use it.​​The factory image for the firmware version you are running or plan to run
Part of the steps are requires the firmware for your phone, you can download it from here..​Copy init_boot.img out from image-xxx.zip inside the firmware archive.​
Backup your data
A wipe is required.​​With my Magisk Zygote64_32 fork (Recommended)​
Spoiler
Magisk Zygote64_32 with the rebased patch by me.​Direct download link for my Magisk Zygote64_32 APK​​Installation with Wipe​
Spoiler
Steps:​Note: If you are unrooted and stock then skip to step 4​
On your phone uninstall the stock Magisk app
Do not use the uninstall Magisk button from within the app, simply just uninstall the app itself
Reboot your phone into the bootloader
Flash the stock init_boot.img for your version and then boot into Android
Install the Magisk Zygote64_32 app from my repository
Copy over the stock init_boot.img to your phone and patch it in the Magisk app
Copy the patched Magisk init_boot.img over to your computer
Reboot your phone into the bootloader
Flash and wipe via fastboot -w flash init_boot magisk_init_boot.img
Complete the setup wizard as normal
Install the Magisk Zygote64_32 app or use the Magisk stub to download the full app from your phone
Stub will not be available until the next reboot after finishing the setup wizard
Open the Magisk app and finish setup for Magisk
Attempt to install and run a 32-bit application. If you are unable to, then verify that you used my Magisk Zygote64_32 app to patch your init_boot.img and that you flashed it to your phone. You will have to perform the steps including the wipe over again.
​With my Magisk Delta 32-bit fork (Not Recommended For General Use, Advanced Users Only)​
Spoiler
Magisk Delta 32-bit with the rebased patch by me.​Direct download link for my Magisk Delta 32-bit APK​
Warning:​Magisk Delta will mount the persist partition for it's early-mount feature, meaning that modules using early-mount could inadvertently fill up the partition, leading to possible corruption.​The steps will take you through creating a backup of the partition to restore if you ever need to.​
Prerequisites:​You need to already have root with Magisk so you can backup the persist partition​
Steps:​Note: If you already have backed up your persist partition then you can skip steps 4 to 7.​
Install my Magisk Delta 32-bit app, it may be installed alongside stock Magisk without issue as it has a different package name.
Copy over the stock init_boot.img to your phone and patch it in the Magisk Delta 32-bit app.
Copy it back over to your computer
Enter a root shell via either method
adb
adb shell
su
You will need to approve the attempt on your phone
Terminal emulator
su
Run the following command:
dd if=/dev/block/by-name/persist of=/sdcard/persist.img
Copy persist.img over to your computer, keep it safe, keep it in multiple places
This is not the Google Pixel 7 persist image, this is uniquely your phone's persist image
Reboot phone to bootloader
Flash and wipe via fastboot -w flash init_boot magisk_init_boot.img
Complete the setup wizard as normal
Install my Magisk Delta 32-bit app
Open the Magisk app and finish setup for Magisk
Attempt to install and run a 32-bit application. If you are unable to, then verify that you used my Magisk Delta 32-bit app to patch your init_boot.img and that you flashed it to your phone. You will have to perform the steps including the wipe over again.
System Upgrade Instructions (Post Mod Installation)​
Spoiler
Either of my Magisk Zygote64_32 forks​
Extract the init_boot from image-xxx.zip of the firmware you want to upgrade to
Patch it in the Magisk app that you are using
Copy the patched Magisk image back over to your computer
Reboot your phone into fastboot
Update the bootloader and radio if necessary
fastboot --skip-reboot update image-xxx.zip
No -w it will wipe your userdata partition
Wait until it is finished
Don't boot the phone into Android
Flash the patched Magisk init_boot.img
This can be done from inside fastbootd
Magisk Upgrade Instructions​
Spoiler
Magisk Zygote64_32 via app​Update normally as you would, by installing the update in the app.​
Magisk Zygote64_32 or Magisk Delta 32-bit manually​
Unhide the Magisk app if you are currently hiding it
Download and install the latest APK for the 'flavor' you are using from my repository
It may be required that you uninstall the app if Android won't let you upgrade it
Perform a direct install from the install menu
Reboot
Changing Between My Magisk Forks​
Spoiler
Download and install the app you want to switch to from my repository
Uninstalling the previous Magisk app is not necessary
Copy the stock init_boot.img for your system version over to your phone
Patch it in the Magisk app you want to switch to
Copy the patched Magisk image back over to your computer
Reboot your phone into fastboot
Flash the patched Magisk init_boot.img
If moving from Magisk Delta 32-bit to Magisk Zygote64_32 then at the same time you can flash your backed up persist fastboot flash persist persist.img
Remove the other Magisk app
Finish setup in the remaining Magisk app.
Uninstallation Instructions​
Spoiler
My Magisk Zygote64_32 fork​Flash the stock init_boot.img​
My Magisk Delta 32-bit fork​
Flash the stock init_boot.img
fastboot flash persist persist.img
Manual method on phone if without original persist image​
Uninstall all Magisk modules, they will clean up any files they put into early-mount.d
Enter a root shell via either method
adb (heavily preferred)
adb shell
su
You will need to approve the attempt on your phone
Terminal Emulator
Navigate to the persist mount
cd $(magisk --path)/.magisk/mirror/persist/
Remove the directory early-mount.d
rm -ir early-mount.d
You will be prompted for each removal and descending into directories, respond with y to approve the action
Can now reboot and flash stock init_boot
Troubleshooting​Stuck at boot animation or bootlooping​Restore stock init_boot.​Grab a logcat with adb to determine what the problem may be.​You might not have wiped your device.​​Booted after installing new Android update but forgot to flash Magisk​Run through the installation instructions again, you will have to wipe your device.​​Unable to install 32-bit apps​Run getprop ro.zygote; getprop ro.vendor.product.cpu.abilist; getprop ro.vendor.product.cpu.abilist32​If the values do not match these then the modification was not applied.​zygote64_32​arm64-v8a,armeabi-v7a,armeabi​armeabi-v7a,armeabi​​32-bit apps force close​This only happened in my testing when I did a first boot with Zygote64 and then installed the modification to use Zygote64_32. Wipe your device or perform the wipeless installation instructions.​It is possible the app may just have issues, or will not work because of missing libraries.​​Clobbered the persist partition​Follow the uninstall steps for Magisk Delta, easiest to use the fastboot steps.​If you didn't backup your persist partition, then RIP.​
Questions​Will I have to wipe on every system update?​I'm glad to say no.​I've tested with my Magisk Delta 32-bit, going from October -> November, while keeping Zygisk/MagiskHide enabled along with the Magisk app being hidden.​I also tested December -> January with my Magisk Zygote64_32 and even swapping to my Magisk Delta 32-bit in the process without issue.​​Can I take OTAs instead of flashing factory images?​I would heavily recommend against doing so, however I have done Android 14 Beta 1 to Beta 1.1 on device and it works.​
I booted with the patch, but then accidentally flashed over init_boot without changing to a different build version, what do I do?​Simply just flash the patched Magisk image back over. I've tested it, 32-bit applications are still kept, and I haven't encountered any issues once I flashed the patched Magisk image back onto it.​​If this was because of an update then follow the installation instructions, you will have to wipe your device.​
Will my persist partition be destroyed?​You shouldn't have to worry about that, a backup persist image will be able to completely restore it. Just don't install modules that will attempt to install more than 32MB of data to the earlymount.d folder.​
Thanks To​Thomas King for Pixel 7 32-bit Helper​@huskydg for Magisk Delta and letting me know about the Zygisk implementation maru​5ec1cff for maru​@nickelnine for bringing attention to Pixel 7 32-bit Helper​Posters in the thread for helping me debug the issues that have come up.​
Reserved 1
FYI - Corvus OS for Pixel 7's does have 32bit app support
Wi1son said:
FYI - Corvus OS for Pixel 7's does have 32bit app support
Click to expand...
Click to collapse
Never heard of it before.
The download page on their home page makes no reference to any Pixel devices.
It's not until viewing their download backend that the ROM comes up.
And most importantly, not a single source on one of their GitHub accounts and the other doesn't have any for the Pixel 7.
thank you, it worked straight away. I'm on LineageOS and just patched the init_boot with your magisk version, flashed it, and everything works - thanks a lot!
bhammler said:
thank you, it worked straight away. I'm on LineageOS and just patched the init_boot with your magisk version, flashed it, and everything works - thanks a lot!
Click to expand...
Click to collapse
Great to know it works on LineageOS.
What steps did you take for installing it? Just flash the patched init_boot along with the other images then booted into the recovery to install the the system?
Great work namelesswonder
Namelesswonder said:
Great to know it works on LineageOS.
What steps did you take for installing it? Just flash the patched init_boot along with the other images then booted into the recovery to install the the system?
Click to expand...
Click to collapse
I was on a running LineageOS 20 with Magisk 25.2. First I've installed your Magisk Delta on top of my Magisk version, patched the stock init_boot.img with Magisk Delta, booted into the bootloader and just flashed the patched init_boot.img without wiping.
Then I've uninstalled the regular Magisk version and everything works since yesterday
bhammler said:
I was on a running LineageOS 20 with Magisk 25.2. First I've installed your Magisk Delta on top of my Magisk version, patched the stock init_boot.img with Magisk Delta, booted into the bootloader and just flashed the patched init_boot.img without wiping.
Then I've uninstalled the regular Magisk version and everything works since yesterday
Click to expand...
Click to collapse
I would be careful since in my testing enabling Zygote32 without a wipe would allow 32-bit applications to be installed but they wouldn't run right as the libraries they're trying to use aren't being loaded for some reason.
The app that would consistently crash in this scenario was Flappy Bird, so try running it to see if it crashes.
If it works fine then I guess LineageOS isn't affected then.
brilliant work. cheers.
Flappy Bird crashes. But the Apps that I use are working: -)
Namelesswonder said:
I would be careful since in my testing enabling Zygote32 without a wipe would allow 32-bit applications to be installed but they wouldn't run right as the libraries they're trying to use aren't being loaded for some reason.
The app that would consistently crash in this scenario was Flappy Bird, so try running it to see if it crashes.
If it works fine then I guess LineageOS isn't affected then.
Click to expand...
Click to collapse
bhammler said:
Flappy Bird crashes. But the Apps that I use are working: -)
Click to expand...
Click to collapse
Well that's good to know that at least some 32-bit apps work when you don't wipe. If you're only using a static set of apps that don't change and they work that's good for you.
@Ghisy you might be able to use the modification without wiping. Your mileage may vary and some apps might not work. If you get stuck at the boot animation you can just flash the previous init_boot you were using and let the phone sort itself out for a few minutes.
Nice work. For anyone building, there's this
https://review.lineageos.org/c/LineageOS/android_device_google_gs201/+/344324
Namelesswonder said:
@Ghisy you might be able to use the modification without wiping. Your mileage may vary and some apps might not work. If you get stuck at the boot animation you can just flash the previous init_boot you were using and let the phone sort itself out for a few minutes.
Click to expand...
Click to collapse
I'm traveling right now so I don't wanna mess around with my phone. I'll take a look when I'm back home in a couple of weeks.
so this is what's needed to get viper4android working? has anyone verified v4a works using this? if so, what version? there are so many at this point it's hard to keep track.
This type of workaround will only persist if future pixel phones or current devices have multilib, correct?
Edit: never mind, I read more of your detailed explanation and I understand now
Schroeder09 said:
so this is what's needed to get viper4android working? has anyone verified v4a works using this? if so, what version? there are so many at this point it's hard to keep track.
Click to expand...
Click to collapse
I doubt this will get V4A working on this device. The problem, in a nutshell, is that V4A uses arm32 audio drivers while this device and some other devices on Android 13 (e.g. Pixel 6 series) use arm64 audio drivers. It's V4A itself that needs updating, which someone is working on at the moment but I don't know how far it has progressed.
Namelesswonder said:
The changes that need to be done are to either be applied to /vendor/build.prop, or done with init.rc modifications, or applied in some way before init.rc is read.​
The last point is the critical issue that has halted this: there has not been any easy way to set properties very early in the boot process outside of simply just modifying the file on the partition.
This can't be done easily due to dynamic partitions requiring a custom super partition, and with the larger issue being AVB.
Click to expand...
Click to collapse
Great work on this. Just curious, in your testing did you try overlay.d to see if that worked early enough to change the props? I saw osm0sis suggest this (as you probably have seen as well) but wasn't sure if you tried it. Just throwing this out there in case...
Lughnasadh said:
Great work on this. Just curious, in your testing did you try overlay.d to see if that worked early enough to change the props? I saw osm0sis suggest this (as you probably have seen as well) but wasn't sure if you tried it. Just throwing this out there in case...
Click to expand...
Click to collapse
Magisk/docs/guides.md at master · topjohnwu/Magisk
The Magic Mask for Android. Contribute to topjohnwu/Magisk development by creating an account on GitHub.
github.com
I do not believe it will work to change props because overlay.d custom rc files are read after init.rc, which means that the init has already been read and init.zygote64.rc has already been imported. The custom rc and supplemental script to change the property would be running after that which wouldn't do anything since the init is already setup.
I have not tested the file replacing ability of overlay.d to see if it can overlay onto the preexisting init files. Would still need a service to set the properties so that when the zygote services launch they know what ABIs are supported.
I didn't go through with that since modifying magiskinit to set up build.prop in a build version agnostic way seemed like a better idea since I knew it already worked. If overlay.d can replace init.rc then that means having to modify the init_boot to contain the new init.rc for each build if Google ends up changing them. I haven't checked init.rc for changes, but I do know that init.zygote64_32.rc did have inconsequential changes from stable Android 13 -> QPR1, so they probably did do some changes.
Thank you for the detailed steps! I could finally enjoy ad free experience on Instagram without having to decompile the app just to add 64bit lib support (and it failed to start regardless...)

Categories

Resources