[KERNEL] Stock Kernel + SafetyNet Patch - Google Pixel 2 XL ROMs, Kernels, Recoveries, & Oth

Stock Pixel 2 XL Kernel + SafetyNet Patch
Current version: android-9.0.0_r0.112
Suitable for build(s): All August 2019 builds
Suitable for devices(s): Pixel 2 XL (taimen)
I compiled the stock kernel for the Pixel 2 XL/Pixel 2 and applied the SafetyNet patch by sultanxda.
Use case for this kernel:
- If you want to stay completely stock, but have an unlocked bootloader, the SafetyNet is tripped which disables features such as Android Pay and Netflix.
- This kernel is completely stock except for the addition of a patch that removes the SafetyNet check.
- This kernel is only for the builds listed above!!!! This will not work on any prior build.
- All stock features will work with this kernel (since it's just the stock kernel + patch).
- If you do not have an unlocked bootloader there is no need to use this kernel. It's exactly the same as the stock kernel, except with the addition of the SafetyNet patch.
- This will not prevent SafetyNet from tripping for other reasons, like rooting.
- This will not remove the "device corrupted" warning when the phone is turned on or rebooted.
Installation:
- Be prepared with backups or the factory image from Google in case you do something wrong
- Extract boot image from zip file
- Test with command: fastboot boot filename.img
- Flash with command: fastboot flash boot filename.img
**WARNING**
If flashing this kernel for whatever reason ruins your device, I am not accountable. Use this at your own risk!
The current version will always be attached to this post (check the Downloads tab). Older versions can be found HERE.
XDA:DevDB Information
Stock Kernel + SafetyNet Patch, Kernel for the Google Pixel 2 XL
Contributors
iissmart
Kernel Special Features:
Version Information
Status: Beta
Created 2017-11-18
Last Updated 2017-12-11

Will this still allow OTAs?

Testing via fastboot boot worked like a charm. Could not flash the kernel, however. I get:
sending 'kernel' (18887 KB)...
OKAY [ 0.601s]
writing 'kernel'...
FAILED (remote: No such partition.)
finished. total time: 0.610s
I'm unlocked, but otherwise stock.

I get the same message as facted - booting works fine but can't flash the kernel.

Hm, I might need help getting the flashing instructions working for a Pixel 2 XL. It works fine on a Pixel 2 (which is what I have), so I assumed it was the same for both.
I'll look around and see what others are doing.

I don't have time right now to test, but I wonder if I need a new adb. In have a version installed from a few months ago. I'll test later this afternoon and get back to you.

Shouldn't the flash command be:
fastboot flash boot <boot.img>
Sent from my Pixel 2 XL using XDA Labs

Yes it is.

So "fastboot flash boot" works with my kernel image? If so I'll update OP.

iissmart said:
So "fastboot flash boot" works with my kernel image? If so I'll update OP.
Click to expand...
Click to collapse
Unfortunately, this causes a frozen screen at the G on boot. Giving it time, but it's been a few minutes and not looking good...
EDIT: Gave it a few more minutes (maybe 10 total) and still nothing, so I just reflashed the factory image without wiping and all good. But this method (or your kernel) does not work with stock Nov. Gonna try one of the other kernels.

Maybe it can't tell which is the active partition for boot? Maybe you guys need to modify the command to the a or b partition?

OP was right. The command is fastboot flash kernel kernelname. Kernel only flashes the kernel inside of the boot image, whole boot images are supposed to have a kernel and ramdisk.
For those of you who can't flash 'kernel', just update fastboot from the platform tools site Google proveds. It'll work like a charm.

I updated fastboot, but still get the same error...

Can someone on the January 2018 build test the new boot image I've attached to OP? This is a full boot image with the patched kernel included, so it needs to be flashed with "fastboot flash boot filename.img" after extracting from the zip file.

There has been talk of TWRP touch issues with stock kernel. Maybe you can talk with one of the kernel devs about adding drivers to your build. If indeed this is the actual root cause of said touch issues. Lol

iissmart said:
Can someone on the January 2018 build test the new boot image I've attached to OP? This is a full boot image with the patched kernel included, so it needs to be flashed with "fastboot flash boot filename.img" after extracting from the zip file.
Click to expand...
Click to collapse
I flashed the latest one you had up on the 5th and it worked fine for me. Flashed with the fastboot flash boot file.img with no issue. SafetyNet is good, no issues with it at all.
Just for reference, I'm running a Magisk installed 8.1 stock build with all current security patches.

KyleK29 said:
I flashed the latest one you had up on the 5th and it worked fine for me. Flashed with the fastboot flash boot file.img with no issue. SafetyNet is good, no issues with it at all.
Just for reference, I'm running a Magisk installed 8.1 stock build with all current security patches.
Click to expand...
Click to collapse
Thanks. I've updated OP to reference the boot image for January 2018. Should work fine for everyone now!

iissmart said:
Thanks. I've updated OP to reference the boot image for January 2018. Should work fine for everyone now!
Click to expand...
Click to collapse
Also worked great for me. Jan build, stock. Although I didn't see anything attached to OP, but I followed the link you provided and simply found the most recent file.
Android Pay works, woo hoo!

which file should I download for Jan?
kernel_wahoo_android-8.1.0_r0.13.zip ? or boot_wahoo_android-8.1.0_r0.13.img.zip?
Thanks!

facted said:
which file should I download for Jan?
kernel_wahoo_android-8.1.0_r0.13.zip ? or boot_wahoo_android-8.1.0_r0.13.img.zip?
Thanks!
Click to expand...
Click to collapse
The boot image.
FYI- I've updated OP with the mid-month update to r0.18.

Related

Flashable TWRP v2.8.7.0 for Sony Z3+ E6553 Ivy_Kitakami

Introduction
Disclaimer: While this TWRP has been tested by myself on my own device to flash, wipe and backup, I make no warranties as to it's performance. Use at your own risk.
WARNING: flashable version contains a kernel boot image which will be flashed to your device along with the recovery image.
Click to expand...
Click to collapse
Installation instructions
This recovery image is for the E6553 single SIM Z3+. Do not use it on another model.
This recovery image requires an unlocked bootloader. You will lose some functionality on your phone if you unlock your bootloader
Do your research and make sure you're using the latest version of the relevant tools if you do decide to unlock.
DO NOT enable MyXperia functionality if you've unlocked your bootloader. You will brick your device.
This first download of this recovery image CANNOT be flashed to your phone and must be used in fastboot mode only
The second download is a flashable recovery
Use the first version to flash the second dual-boot.zip version
Unzip the recovery.zip file to extract the recovery.img file to use in fastboot mode
Code:
C:\>adb reboot bootloader
C:\>fastboot boot recovery.img
C:\>adb push dual-boot.zip /sdcard/dual-boot.zip
C:\>adb push dual-boot.zip.md5 /sdcard/dual-boot.zip.md5
Click to expand...
Click to collapse
Now use the TWRP install feature to install dual-boot.zip. Follow the prompts of the Aroma graphical installer.
CAVEAT: this extends the boot time by about 5 - 10 seconds as ramdisk images need to be unpacked and there's a wait on a keypress to determine whether to enter recovery mode. In order to boot into recovery, press power on. When you see the yellow LED come on then press the down volume button once or twice. You will then boot into TWRP.
NOTE: the dual-boot.zip installs a new 28.0.A.8.251 kernel. If you're using the autoroot kernel from Devries you will need to flash SuperSU to re-root your device
This dual boot/recovery works by flashing the recovery image to the FOTAkernel partition. A custom ramdisk image contains the normal boot image. If the down volume keypress is detected, then the recovery ramdisk is automatically extracted from the FOTAKernel partition and flow of control switches to recovery. If no keypress is detected then the normal ramdisk is extracted and normal android boot ensues.
Those of you who installed version 1.0 please download and install this version 1.1 to fix the error with the startup of the trim area daemon
Download
Binary
Fastboot TWRP Recovery Image v2.8.7.0-e6553-1.0 for Z3+ E6553
Flashable TWRP Recovery Image v2.8.7.0-e6553-1.1 for Z3+ E6553 (MD5: 52d4b7d406308dbd457e8b94210b7c87)
Flashable TWRP Recovery Image v2.8.7.0-e6553-1.1 for Z3+ E6553 - MD5
Sources @ github
device_sony_kitakami
device_sony_ivy
Click to expand...
Click to collapse
Changelog
Code:
Current changelog: -- 29 September 2015
[new] v1.1 fix up problem in combined ramdisk preventing trim area daemon from starting correctly
[new] Flashable recovery - 28 September 2015
[new] Fixed various sys/class issues so that CPU temperature and LED / backlight control work correctly
[new] Updated to use 28.0.A.8.251 kernel (as opposed to the AOSP kernel)
[old] Initial release - 10 September 2015
Click to expand...
Click to collapse
Thanks To
The regular contributors to the Z3+ forum, among others @[NUT], @ChrisJ951, @DHGE, @Devries, @zxz0O0, @Venkat Kamesh, @AndroPlus, @Sacktreter who pass on knowledge and who make the forum a lively and cooperative place
Click to expand...
Click to collapse
People who installed version 1.0 of the Flashable TWRP must please update to version 1.1 to correct a bug.
Awesome work.
Glad you were able to get the screen working for it! Boots up fine w/o issue for me
This is fantastic. Is there any way of getting this to work with a locked bootloader?
Sent from my Xperia Z3+
AMoosa said:
This is fantastic. Is there any way of getting this to work with a locked bootloader?
Sent from my Xperia Z3+
Click to expand...
Click to collapse
I'd venture to suggest that it's highly unlikely that locked bootloader recovery could work. The DM_VERITY is almost a guarantor of that. Just search for CONFIG_DM_VERITY or Verity in the Z3+ forums for more info.
Even if an exploit works, the second it modifies the system partition, the kernel panics and refuses to boot. The only way of preventing that is to flash a new kernel or edit the ramdisk to remove the verity key. And the only way to flash a new kernel / edit the ramdisk is to unlock the bootloader.
Thank you first for development... maazing!
I have unlocked the bootloader via Sony and then used an boot.img from Devries to root as root was my primary goal. I have flashbooted as per instructions the TWRP recovery.img that is provided here by the awesome dl12345 .
However the issue is that I am unable to boot to recovery after rebooting from TWRP. In other words the flashboot works and I am able to make a backup and use TWRP well but it doesn't seem to stick.
Am I doing something wrong. Should I have flashed a ROM first from xperfirm, Flashtools, and/or can I flash a kernel without it effecting the recovery. My knowledge is sketchy but I am totally up for testing if I can help.
elladroid said:
Thank you first for development... maazing!
I have unlocked the bootloader via Sony and then used an boot.img from Devries to root as root was my primary goal. I have flashbooted as per instructions the TWRP recovery.img that is provided here by the awesome dl12345 .
However the issue is that I am unable to boot to recovery after rebooting from TWRP. In other words the flashboot works and I am able to make a backup and use TWRP well but it doesn't seem to stick.
Am I doing something wrong. Should I have flashed a ROM first from xperfirm, Flashtools, and/or can I flash a kernel without it effecting the recovery. My knowledge is sketchy but I am totally up for testing if I can help.
Click to expand...
Click to collapse
This is correct behaviour. You're not actually flashing the recovery image, just temporarily booting a recovery kernel and associated ramdisk. Sony Xperia devices don't have a recovery partition, or more accurately, they don't have a bootloader than can check and load a boot image from a recovery partition.
Technically it's possible to make the boot image check for a ramdisk on another partition and use this instead of the normal ramdisk, but this is step two. Sony should be releasing an open recovery bootloader fairly soon for the Z3+ which will allow this recovery image to be flashed. It's already been released for other devices.
Until Sony releases open recovery for Z3+ or I spend the time trying to implement a feature that probably only has days or weeks of utility (until Sony releases the open recovery for Z3+) , you're stuck with a TWRP that you need to launch every time in fastboot mode.
On the first screen immediately after the TWRP logo comes up, the battery is always being reported at being 50%. Sometimes the correct number is displayed when in the flashing screen. Otherwise works great!
Also, link to Sony Z3+ windows drivers
How to install unsigned drivers in Windows 8.1/10 with secure boot
elladroid said:
Thank you first for development... maazing!
I have unlocked the bootloader via Sony and then used an boot.img from Devries to root as root was my primary goal. I have flashbooted as per instructions the TWRP recovery.img that is provided here by the awesome dl12345 .
However the issue is that I am unable to boot to recovery after rebooting from TWRP. In other words the flashboot works and I am able to make a backup and use TWRP well but it doesn't seem to stick.
Am I doing something wrong. Should I have flashed a ROM first from xperfirm, Flashtools, and/or can I flash a kernel without it effecting the recovery. My knowledge is sketchy but I am totally up for testing if I can help.
Click to expand...
Click to collapse
New version now flashable so that you can boot into recovery...read top post carefully before using.
serrin85 said:
On the first screen immediately after the TWRP logo comes up, the battery is always being reported at being 50%. Sometimes the correct number is displayed when in the flashing screen. Otherwise works great!
Also, link to Sony Z3+ windows drivers
How to install unsigned drivers in Windows 8.1/10 with secure boot
Click to expand...
Click to collapse
Fixed in latest version
http://www.kz3.eu:18998/dual-boot.zip link gives 404 ..
deecept said:
http://www.kz3.eu:18998/dual-boot.zip link gives 404 ..
Click to expand...
Click to collapse
Yes, I've temporarily disabled the link while I resolve a problem relating to the trim area daemon not starting up due to some peculiarity of the dual boot ramdisk. I'll reinstate it as soon as I fix the problem.
dl12345 said:
Yes, I've temporarily disabled the link while I resolve a problem relating to the trim area daemon not starting up due to some peculiarity of the dual boot ramdisk. I'll reinstate it as soon as I fix the problem.
Click to expand...
Click to collapse
Oh, ok, sweet! Looking to flash this to my Z3+. More than happy to test if needed =) Great work on these!!
deecept said:
Oh, ok, sweet! Looking to flash this to my Z3+. More than happy to test if needed =) Great work on these!!
Click to expand...
Click to collapse
Download back online and problem fixed
Those who downloaded the 1.0 please download this 1.1 version and install to correct the problem with trim area daemon startup. Thanks
dl12345 said:
Download back online and problem fixed
Those who downloaded the 1.0 please download this 1.1 version and install to correct the problem with trim area daemon startup. Thanks
Click to expand...
Click to collapse
HI dl12345,
this recovery support Dual model? E6533
hi.question...i get remote: dtb not found error when trying to boot the recovery..any ideas?
didnt get a thing... how do i install?
please, release TWRP for 6533 too
we need custom recovery so bad
Dathrex said:
please, release TWRP for 6533 too
we need custom recovery so bad
Click to expand...
Click to collapse
Pleaseee ????
Brother, please, help us with twrp to E6533, please.
Enviado de meu E6533 usando Tapatalk

Custom kernel Z3+ E6553 - Nuke Verity / Sony RIC and allow SELinux permissive

Introduction
The stock Sony kernels use SONY RIC, SELinux and CONFIG_DM_VERITY that together make it exceptionally hard to root. With the stock kernel, it's impossible to run a modified ROM of any form (incorporating changes to the system partition). Attempting to boot with the stock kernel off a modified system partition results in a kernel stop or panic, manifested either by getting stuck on the Sony screen or a bootloop.
This kernel removes the Sony RIC and CONFIG_DM_VERITY and sets boot and runtime parameters that allow SELinux to be disabled or to be set into permissive mode. Once this kernel is flashed, you can download SuperSU flashable zip and flash it to your phone using the TWRP recovery image I posted in this forum in order to get root on your stock ROM.
This kernel contains no source patches. It's a completely stock kernel from the Sony github repository.
Click to expand...
Click to collapse
Features
SELinux configurable at boot and runtime
Sony RIC disabled
CONFIG_DM_VERITY disabled
Click to expand...
Click to collapse
Installation instructions
This boot image requires an unlocked bootloader. You will lose some functionality on your phone if you unlock your bootloader
Do your research and make sure you're using the latest version of the relevant tools if you do decide to unlock.
Unzip the boot.zip file to extract the boot.img file
Code:
C:\>adb reboot bootloader
C:\>fastboot flash boot boot.img
C:\>fastboot boot recovery.img
C:\>adb push UPDATE-SuperSU-v2.46.zip /sdcard/supersu.zip
Then switch to the TWRP interface, go to the Install menu and flash /sdcard/supersu.zip. Reboot and you're rooted. You can then modify your system partition as you please.
Click to expand...
Click to collapse
NOTE: if you install Xposed you MUST wipe cache/dalvik after installation otherwise you will get an error message telling you that you are running out of storage space and any apps you install with Play store will fail the installation with a 504 error. This is NOT related to the kernel, but is caused by failing to wipe cache after installing Xposed.
Download
Binary
28.0.A.8.251 custom kernel for Z3+ E6553
TWRP Recovery Image V0.1 for Z3+ E6553
Sources @ github
Kernel config
Sony kernel-copyleft repository
Click to expand...
Click to collapse
Changelog
Code:
[B]Changelog[/B]
[new] 12 September 2015- Update to 28.0.A.8.251
[old] 10 September 2015 - Initial release
Thanks To
Code:
[url="http://forum.xda-developers.com/member.php?u=631273"]@Chainfire[/url]. What would we do without SuperSU.....
Click to expand...
Click to collapse
Awesome work, works without any issues.
I must be being really stupid....
Unable to boot into recovery without reflashing recovery.img. I must be missing something!
Otherwise no other issues to speak of. Amazing Thanks!
elladroid said:
I must be being really stupid....
Unable to boot into recovery without reflashing recovery.img. I must be missing something!
Otherwise no other issues to speak of. Amazing Thanks!
Click to expand...
Click to collapse
"Until Sony releases an open bootloader you need to use this image via fastboot boot mode."
really 28.0.A.8.251?
@dl12345
searching for 28.0.A on GitHub gave me:
28.0.A.7.xxx Updated 2 months ago by jerpelea
28.0.A.6.xxx Updated 3 months ago by jerpelea
28.0.A.4.xxx Updated 4 months ago by jerpelea
Did you try the source posted on SONY Developer?
http://developer.sonymobile.com/dow...rchives/open-source-archive-for-28-0-a-8-251/
Does your boot.img work as a replacement for the boot.img flashed with 28.0.A.8.251 FTF?
I ask because I failed booting a boot image compiled from the SONY Developer source and an older kernel from 28.0A.7.24/31 as replacement for the image in the latest 8.251 FTF for my SGP712/karin_windy
DHGE said:
@dl12345
searching for 28.0.A on GitHub gave me:
28.0.A.7.xxx Updated 2 months ago by jerpelea
28.0.A.6.xxx Updated 3 months ago by jerpelea
28.0.A.4.xxx Updated 4 months ago by jerpelea
Did you try the source posted on SONY Developer?
http://developer.sonymobile.com/dow...rchives/open-source-archive-for-28-0-a-8-251/
Does your boot.img work as a replacement for the boot.img flashed with 28.0.A.8.251 FTF?
I ask because I failed booting a boot image compiled from the SONY Developer source and an older kernel from 28.0A.7.24/31 as replacement for the image in the latest 8.251 FTF for my SGP712/karin_windy
Click to expand...
Click to collapse
Correct. The sources on github are old. I dowloaded the archive from the Sony website and compiled it. Yes the boot.img I compiled works perfectly as a replacement. I'm currently running it on my phone.
How to modify system partition
Hi all,
Nob question but need help urgently. After installing the kernel I'm now getting storage space almost full and error 504 due I think to some modifications to the kernel to get root. I'm aware OP did say to modify system partition but don't have a clue how to do so in order to get storage space back and also install apps. Urgent help needed pls.
Cheers and thanks for your assistance.
yawo76 said:
Hi all,
Nob question but need help urgently. After installing the kernel I'm now getting storage space almost full and error 504 due I think to some modifications to the kernel to get root. I'm aware OP did say to modify system partition but don't have a clue how to do so in order to get storage space back and also install apps. Urgent help needed pls.
Cheers and thanks for your assistance.
Click to expand...
Click to collapse
The kernel makes no modifications to the system partition and is unrooted. You need to flash SuperSU to get root.
This error you're getting is caused by the Xposed framework. You've installed the Xposed framework but you forgot to do a wipe dalvik and cache after installing. This is exactly what happens when you forget to wipe cache after installing xposed.
You can try to use the xposed uninstaller which may fix it. If not, you need to do a full wipe and reflash a ROM.
dl12345 said:
The kernel makes no modifications to the system partition and is unrooted. You need to flash SuperSU to get root.
This error you're getting is caused by the Xposed framework. You've installed the Xposed framework but you forgot to do a wipe dalvik and cache after installing. This is exactly what happens when you forget to wipe cache after installing xposed.
You can try to use the xposed uninstaller which may fix it. If not, you need to do a full wipe and reflash a ROM.
Click to expand...
Click to collapse
Thanks very much. It's true I installed Xposed Framework and didn't wipe cache. I have already reinstalled the Rom so will remember this time not to repeat the same mistake.
dl12345 said:
Introduction
NOTE: if you install Xposed you MUST wipe cache/dalvik after installation otherwise you will get an error message telling you that you are running out of storage space and any apps you install with Play store will fail the installation with a 504 error. This is NOT related to the kernel, but is caused by failing to wipe cache after installing Xposed.
Download
[B
Click to expand...
Click to collapse
I'm on .251 (modified system partition) without XPOSED installed. Using the kernel just causes boot loops (Sony Logo then 3 red flashes from the LED) the same way the stock kernel does. Is there something special I need to get SONY RIC / Verity to not run at boot?
This looks like a bad flash. Can you fastboot this kernel?
dl12345 said:
This looks like a bad flash. Can you fastboot this kernel?
Click to expand...
Click to collapse
No luck doing fastboot boot, or fastboot flash boot (both have the same issue of red led 3x then rebooting)
I re-downloaded it and the md5sum matched between the downloads:
768eac3ba2ebcbdaf67e12d8bd11450b /home/chris/Downloads/boot-251.img
768eac3ba2ebcbdaf67e12d8bd11450b /home/chris/Downloads/boot-251.img (2)
EDIT:
Also just in case it matters, the exact build I'm on is
28.0.A.8.251
Edit2: Went back to complete stock from FTF flash and the kernel boots. Need to modify system partition and recheck
Edit3: Flashes SuperSU.zip and it is booting with SU installed. Unsure why my old rom was incompatible with it
ChrisJ951 said:
No luck doing fastboot boot, or fastboot flash boot (both have the same issue of red led 3x then rebooting)
I re-downloaded it and the md5sum matched between the downloads:
768eac3ba2ebcbdaf67e12d8bd11450b /home/chris/Downloads/boot-251.img
768eac3ba2ebcbdaf67e12d8bd11450b /home/chris/Downloads/boot-251.img (2)
EDIT:
Also just in case it matters, the exact build I'm on is
28.0.A.8.251
Edit2: Went back to complete stock from FTF flash and the kernel boots. Need to modify system partition and recheck
Edit3: Flashes SuperSU.zip and it is booting with SU installed. Unsure why my old rom was incompatible with it
Click to expand...
Click to collapse
Me neither - this bootimage has very few modifications: only CONFIG_DM_VERITY and RIC removed, some options for runtime control of SELinux added and the verity keys removed from the ramdisk. It boots fine on a stock 251 ROM for me. The kernel source is .251 source too...
I have noticed that I occasionally get bad flashes and odd behaviour when flashing ROMs (with everything from fastboot to flashtool to TWRP). I think the platform itself isn't totally stable and bug free. Usually I fix it by just wiping and reflashing
Hi @dl12345, can you make the same kernel for Z3 (D6603) or at least point me in direction to know what I need to change by compiling own kernel from sources? Or modifying the original ramdisk..
The issue is that the new Concept M firmware from Sony uses the same security features. Guys (@Gustavo RD78) made successfully kernel for previous Concept L (5.1.1) based firmware, however the same approach seems to fail in case of Marshmallow. Your help will be very appreciated.
EDIT - removed full OP quoted by mistake.
ondrejvaroscak said:
Hi, can you make the same kernel for Z3 (D6603) or at least point me in direction to know what I need to change by compiling own kernel from sources? Or modifying the original ramdisk..
The issue is that the new Concept M firmware from Sony uses the same security features. Guys (@Gustavo RD78) made successfully kernel for previous Concept L (5.1.1) based firmware, however the same approach seems to fail in case of Marshmallow. Your help will be very appreciated.
Click to expand...
Click to collapse
You need kernel source (Sony won't upload it since it's closed beta test).
Also do not quote full OP.
[UPDATE]
AOSP and copyleft source are different things. You need kernel source for concept rom's kernel, and it won't be published so it's impossible to build custom kernel for concept rom.
AndroPlus said:
You need kernel source (Sony won't upload it since it's closed beta test).
Also do not quote full OP.
Click to expand...
Click to collapse
Do I get it right, that I can't justo compile kernel for use with this firmware from AOSP / Sony Copy-left sources?

Updating Using Factory Images And Fastboot Mode

Hi all,
Within the last month I successfully unlocked my 5x, rooted it, installed a custom recovery and have kept it on stock ROM with a custom kernel (ElementalX) and some minor tweaks (AdAway, Viper4Android). So far, so great.
However, when I was locked and unrooted, I used to use ADB and the sideload OTA function to update to the newest builds, usually within 3-5 days after the binaries first drop.
Now, with the desire to remain on an updated stock ROM, keep root, custom recovery, and the minor tweaks noted above, I wanted some confirmation from the great minds here as I navigate Heisenberg's thread and use fastboot on my own for the first time.
What I've done so far: Download and extract the binaries from my current build (MHC19Q) as well as today's new build (MTC19T).
Compared them and see there is a new radio that I'll have to flash.
I want to keep my custom recovery (TWRP) and boot image (ElementalX kernel), so I believe I leave those untouched.
So, my process here is:
1. Boot into bootloader mode. Open a command prompt and confirm via fastboot devices that my device is connected/recognized through USB.
2. Enter "fastboot flash radio {insert radio.img here}"
3. Enter fastboot reboot-bootloader
4. Enter "fastboot erase cache"
5. Enter "fastboot flash cache {insert cache.img here}", repeat step 3
6. Enter "fastboot flash system {insert system.img here}, repeat step 3
7. Enter "fastboot flash vendor {insert vendor.img here}
My 2 questions are - will this process above succeed in updating my security/build and leave my recovery and kernel untouched? And will I keep root and modifications, or have to reflash TWRP, SuperSU, AdAway, Viper4Android, etc.?
Thanks for the patience, all. Once I do this once or twice, I'm sure it'll become old hat!
Moonboots said:
Hi all,
Within the last month I successfully unlocked my 5x, rooted it, installed a custom recovery and have kept it on stock ROM with a custom kernel (ElementalX) and some minor tweaks (AdAway, Viper4Android). So far, so great.
However, when I was locked and unrooted, I used to use ADB and the sideload OTA function to update to the newest builds, usually within 3-5 days after the binaries first drop.
Now, with the desire to remain on an updated stock ROM, keep root, custom recovery, and the minor tweaks noted above, I wanted some confirmation from the great minds here as I navigate Heisenberg's thread and use fastboot on my own for the first time.
What I've done so far: Download and extract the binaries from my current build (MHC19Q) as well as today's new build (MTC19T).
Compared them and see there is a new radio that I'll have to flash.
I want to keep my custom recovery (TWRP) and boot image (ElementalX kernel), so I believe I leave those untouched.
So, my process here is:
1. Boot into bootloader mode. Open a command prompt and confirm via fastboot devices that my device is connected/recognized through USB.
2. Enter "fastboot flash radio {insert radio.img here}"
3. Enter fastboot reboot-bootloader
4. Enter "fastboot erase cache"
5. Enter "fastboot flash cache {insert cache.img here}", repeat step 3
6. Enter "fastboot flash system {insert system.img here}, repeat step 3
7. Enter "fastboot flash vendor {insert vendor.img here}
My 2 questions are - will this process above succeed in updating my security/build and leave my recovery and kernel untouched? And will I keep root and modifications, or have to reflash TWRP, SuperSU, AdAway, Viper4Android, etc.?
Thanks for the patience, all. Once I do this once or twice, I'm sure it'll become old hat!
Click to expand...
Click to collapse
Yes, that will keep your recovery untouched, however you might want to wait until flar2 and/or other kernel devs confirm there are no changes to the kernel before you upgrade your system. More often than not, there are improvements to the kernel source.
About Adaway, Viper4Android, etc... I'm almost sure you will have to reflash those, as they are part of the system.
I am myself waiting for confirmation about the kernel stuff, but in the meantime will flash bootloader and radio.
redsmith said:
Yes, that will keep your recovery untouched, however you might want to wait until flar2 and/or other kernel devs confirm there are no changes to the kernel before you upgrade your system. More often than not, there are improvements to the kernel source.
About Adaway, Viper4Android, etc... I'm almost sure you will have to reflash those, as they are part of the system.
I am myself waiting for confirmation about the kernel stuff, but in the meantime will flash bootloader and radio.
Click to expand...
Click to collapse
Excellent, thank you for the quick reply. I'll put a subscription on the ElementalX Kernel thread and keep an eye out before making any changes.
Also, if I'm reading the updates correctly, the bootloader remains unchanged at version bhz10m. In your experience, are there changes under the hood there that don't appear in the version number, or is there no need to flash the "new" bootloader, as it's identical?
I would like to have a sort of ota to install just the updated files that leaves my system mod untouched. But I think there is no way to keep everything...
redsmith said:
Yes, that will keep your recovery untouched, however you might want to wait until flar2 and/or other kernel devs confirm there are no changes to the kernel before you upgrade your system. More often than not, there are improvements to the kernel source.
About Adaway, Viper4Android, etc... I'm almost sure you will have to reflash those, as they are part of the system.
I am myself waiting for confirmation about the kernel stuff, but in the meantime will flash bootloader and radio.
Click to expand...
Click to collapse
To be a little bit more specific, you have to flash again whatever you have flashed so far.
Adaway is an app, you don't have to flash it nor reinstall.
Same for xposed, you have to flash over the framework, but your installed modules will remain and work once you have reflashed xposed for instance.
exploreresp said:
To be a little bit more specific, you have to flash again whatever you have flashed so far.
Adaway is an app, you don't have to flash it nor reinstall.
Same for xposed, you have to flash over the framework, but your installed modules will remain and work once you have reflashed xposed for instance.
Click to expand...
Click to collapse
Thank you for the clarification. I've been keeping an eye on the ElementalX thread and it appears everything works with the newest build without a need for an update to the kernel.
With that being said, do I need to flash the new boot.img and recovery.img, then re-flash TWRP and ElementalX, or can I just not push the new binaries for boot and recovery, and just do radio, system, and vendor?
Moonboots said:
Thank you for the clarification. I've been keeping an eye on the ElementalX thread and it appears everything works with the newest build without a need for an update to the kernel.
With that being said, do I need to flash the new boot.img and recovery.img, then re-flash TWRP and ElementalX, or can I just not push the new binaries for boot and recovery, and just do radio, system, and vendor?
Click to expand...
Click to collapse
Don't think it'll hurt to try
I already avoided to flash the recovery img last month but it still got patched and had to flash TWRP again so I'm not sure...
Anyway, don't think this May update is worth all the trouble... Only security updates that haven't even been reported by users. Unless you're really worried about smtg, this won't bring you anything.
exploreresp said:
Don't think it'll hurt to try
I already avoided to flash the recovery img last month but it still got patched and had to flash TWRP again so I'm not sure...
Anyway, don't think this May update is worth all the trouble... Only security updates that haven't even been reported by users. Unless you're really worried about smtg, this won't bring you anything.
Click to expand...
Click to collapse
Confirming here for the group and anyone that hasn't used fastboot before - totally easy and worked like a charm. I know you mentioned there wasn't much to the May update but I still wanted to do it as an academic exercise for myself so I know how to do it in the future.
I flashed the new radio.img, vendor.img and system.img. Bootloader stayed the same. Recovery held at TWRP and the kernel (boot.img) patched over ElementalX on first boot. I flashed SuperSU, ElementalX and the Viper4Android drivers and everything was back up and running, fully updated. The whole thing took about 15 min.
Thanks for the help and encouragement, all.

December firmware update!

Does anyone know where i can find the newest security December 1, 2019 update for the g7 play? i've searched online and cannot find it anywhere. My phone keeps reminding me of a failed update so i went looking for the new one. Do i re-flash the phone to stock and update it that way before re-rooting it or wait until someone post the newest update in the mirrors repository? What do you guys suggest?
dominoeflux said:
Does anyone know where i can find the newest security December 1, 2019 update for the g7 play? i've searched online and cannot find it anywhere. My phone keeps reminding me of a failed update so i went looking for the new one. Do i re-flash the phone to stock and update it that way before re-rooting it or wait until someone post the newest update in the mirrors repository? What do you guys suggest?
Click to expand...
Click to collapse
https://support.motorola.com/us/en/Solution/MS147329
Oct 2019 seems to be the latest:
https://www.theandroidsoul.com/spri...lay-moto-g6-play-with-october-security-patch/
Normally you go back to stock, patch and then re-root.
What model do you have?
I cannot get root on my XT1952-4.
mtmtumbo said:
https://support.motorola.com/us/en/Solution/MS147329
Normally you go back to stock, patch and then re-root.
What model do you have?
I cannot get root on my XT1952-4.
Click to expand...
Click to collapse
I have the same model with boost mobile...do you need help rooting it? I just followed the instructions for the boot.img magisk patch but when you patch it make sure you select beta in magisk and in advanced settings make sure all are checked especially recovery mode before you patch and lastly when you reboot, reboot to recovery every time or the root will not stick...that's something no one mentioned when i was trying to root mine. I had to research the problem of why the root wasn't sticking. When you reboot to recovery it will stay on a blank screen and then vibrate, that's normal. It does that before it boots up. Once it's booted, check to make sure you have root by opening the magisk app, you should see both green check marks and thanks for you help with how to update.
dominoeflux said:
I have the same model with boost mobile...do you need help rooting it? I just followed the instructions for the boot.img magisk patch but when you patch it make sure you select beta in magisk and in advanced settings make sure all are checked especially recovery mode before you patch and lastly when you reboot, reboot to recovery every time or the root will not stick...that's something no one mentioned when i was trying to root mine. I had to research the problem of why the root wasn't sticking. When you reboot to recovery it will stay on a blank screen and then vibrate, that's normal. It does that before it boots up. Once it's booted, check to make sure you have root by opening the magisk app, you should see both green check marks and thanks for you help with how to update.
Click to expand...
Click to collapse
thanks, I followed the instructions as well to patch boot.img and use fastboot with magisk_patched.img, but when I rebooted, I only got the xxxxxx-xxxxxx-xxxxxxx-xxxxxxx-xxxxxx code and then no vibration and nothing else - seems stuck and just looping at this point
what do you mean select beta in magisk?
what version of apk did you create the patched img from? 7.4.0?
and yes, i made sure i checked all the advanced options (including recovery) before creating the patched img file
mtmtumbo said:
thanks, I followed the instructions as well to patch boot.img and use fastboot with magisk_patched.img, but when I rebooted, I only got the xxxxxx-xxxxxx-xxxxxxx-xxxxxxx-xxxxxx code and then no vibration and nothing else - seems stuck and just looping at this point
what do you mean select beta in magisk?
what version of apk did you create the patched img from? 7.4.0?
and yes, i made sure i checked all the advanced options (including recovery) before creating the patched img file
Click to expand...
Click to collapse
when you go in the magisk manager, select the three lines at the top left and go to settings/update channel and select beta....if you don't you will loop. i used the latest magisk version which is 7.4.0 so yes you're using the correct one. your suppose to see those codes it's normal, if the phone does not vibrate, then that means that it didn't work.
dominoeflux said:
when you go in the magisk manager, select the three lines at the top left and go to settings/update channel and select beta....if you don't you will loop. i used the latest magisk version which is 7.4.0 so yes you're using the correct one. your suppose to see those codes it's normal, if the phone does not vibrate, then that means that it didn't work.
Click to expand...
Click to collapse
Thanks, I enabled beta in magisk and tried it again and it still did not vibrate after showing the codes - just rebooting in a loop as before.
What size is your magisk_patched.img and boot.img files?
Here are mine:
33,554,432 boot.img
18,103,592 magisk_patched.img
You can see after the patching that the size of the boot image drops almost in half - is that normal?
I transfer these files using adb push and pull as I heard MTP transfers could corrupt the files.
Anyhow, since we're on the same build, can you post up your boot and patched img somewhere so I can try them?
mtmtumbo said:
Thanks, I enabled beta in magisk and tried it again and it still did not vibrate after showing the codes - just rebooting in a loop as before.
What size is your magisk_patched.img and boot.img files?
Here are mine:
33,554,432 boot.img
18,103,592 magisk_patched.img
You can see after the patching that the size of the boot image drops almost in half - is that normal?
I transfer these files using adb push and pull as I heard MTP transfers could corrupt the files.
Anyhow, since we're on the same build, can you post up your boot and patched img somewhere so I can try them?
Click to expand...
Click to collapse
Did you repatch the stock boot.img before flashing again? The magisk patch is different if not on beta and the magisk recovery is not selected, that's why it's probably still not working.
also make sure that you're patching the correct boot.img from your stock firmware that you're on, it creates problems if you're not. I can't upload my .imgs for some reason and you're correct it didn't vibrate the first time i was successful, but after i have to reboot the phone i would reboot to recovery so when the phone boots the root sticks, that's when it will vibrate.
@mtmtumbo I apologize I haven't been on here in a couple of days, any update on rooting your g7 play?
dominoeflux said:
Did you repatch the stock boot.img before flashing again? The magisk patch is different if not on beta and the magisk recovery is not selected, that's why it's probably still not working.
also make sure that you're patching the correct boot.img from your stock firmware that you're on, it creates problems if you're not. I can't upload my .imgs for some reason and you're correct it didn't vibrate the first time i was successful, but after i have to reboot the phone i would reboot to recovery so when the phone boots the root sticks, that's when it will vibrate.
Click to expand...
Click to collapse
happy new year all
yes i re-patched the stock boot.img before flashing, magisk was on beta and yes the third option in advanced for recovery was selected before i patched the boot.img
after i saw the codes and it was looping, i rebooted the phone to recovery but no difference
i'm also having a problem flashing twrp without just using fastboot boot twrp.img - flashing it with fastboot flash doesn't work (using dtbo.img first to avoid the black screen)
btw you can use mega.nz to upload your img's - give it a shot and post the URL here
if it matters, this is the ROM I'm using:
XT1952-4_CHANNEL_RETCA_9.0_PPY29.105-134_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC
mtmtumbo said:
happy new year all
yes i re-patched the stock boot.img before flashing, magisk was on beta and yes the third option in advanced for recovery was selected before i patched the boot.img
after i saw the codes and it was looping, i rebooted the phone to recovery but no difference
i'm also having a problem flashing twrp without just using fastboot boot twrp.img - flashing it with fastboot flash doesn't work (using dtbo.img first to avoid the black screen)
btw you can use mega.nz to upload your img's - give it a shot and post the URL here
if it matters, this is the ROM I'm using:
XT1952-4_CHANNEL_RETCA_9.0_PPY29.105-134_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC
Click to expand...
Click to collapse
Happy New Year man.....i believe i figured out why you're still boot looping, did you reboot back into the bootloader after you flashed the patched.img?
edit: when your doing twrp, you have to boot into it before installing it to the ramdisk. there's a how to in this forum here: https://forum.xda-developers.com/g7-play/how-to/how-to-successfully-install-twrp-g7-play-t3979701
the GSI's don't work for me so i'm waiting for a legit custom build before installing twrp again
Update 134-7
XT1952-2
ATTMX
https://mirrors.lolinet.com/firmwar...USMXLA_regulatory-XT1952-2-MEXICO_CFC.xml.zip
OpenMX
https://mirrors.lolinet.com/firmwar...EFAULT_regulatory-XT1952-2-MEXICO_CFC.xml.zip
RETAR
https://mirrors.lolinet.com/firmwar...ULT_regulatory-XT1952-2-ARGENTINA_CFC.xml.zip

Question [Latest OOS C.44 EU] Rooting via Magisk/fastboot not working

Hello all,
yesterday I've updated to latest OOS LE2123_11.C.44_1440_202201182111 (Android 12). I was previously on root, so I've updated the phone via full 4GB OTA through the system updater.
Everything was fine until I've tried to root by following these steps:
ATTENTION: if you're a Googler and willing to root the OPO 9 Pro, don't use the steps below, because they lead to a soft-bricked phone! (at least, for me)
Download the full OTA via Oxygen Updater
Extract the boot.img (192MB) via Payload Dumper (and I was confused, because the previous Android 11 boot.img was exactly the half in size)
Let the phone update itself
Throw the boot.img inside Magisk and create a patched boot.img
Flash the pathed boot image via fastboot with "fastboot flash boot Magisk_patched_blabla.img"
The phone was refusing to boot, as it was automatically booting in Fastboot mode.
So I've reflashed the patched IMG file, and the phone switched to Qualcomm Crashdump mode
Then, don't ask me how, I've managed to get it back to fastboot mode. Searched XDA for a clean and tested boot.img, understood that the boot contains 2 slots A/B, set the active boot slot to A, flashed the boot.img downloaded before, and the phone turned back to life.
So...what am I doing wrong? Maybe everything?
What are the correct steps to root the phone?
Thank you in advance
you don't have to flash the magisk_patched.img but instead boot it with : "fastboot boot magisk_patched.img"
Then you can install magisk by it's manager and reboot the phone.
Here is everything explained: https://forum.xda-developers.com/t/guide-magisk-unlock-root-keep-root-oos-12-0-0-0.4252373/
OS Update with install to inactive slot in magisk works too.
nicoilboss said:
you don't have to flash the magisk_patched.img but instead boot it with : "fastboot boot magisk_patched.img"
Then you can install magisk by it's manager and reboot the phone.
Here is everything explained: https://forum.xda-developers.com/t/guide-magisk-unlock-root-keep-root-oos-12-0-0-0.4252373/
Click to expand...
Click to collapse
I follow those steps I can get the boot and install alpha apk after it's install completed to reboot, phone gets bricked and stuck in fastboot.
Wait for the new Magisk, it's going to support Android 12.
https://twitter.com/topjohnwu/with_replies
djsubterrain said:
Wait for the new Magisk, it's going to support Android 12.
https://twitter.com/topjohnwu/with_replies
Click to expand...
Click to collapse
Missed this one...
How come some people is actually running on the rooted OOS C.44 EU? Are they using a particular version of a patched boot.img that's floating underground?
l_mike said:
OS Update with install to inactive slot in magisk works too.
Click to expand...
Click to collapse
I've clickbaited like a moron on the UPDATE/REBOOT button after OTA, and I've missed the opportunity to do it *before* rebooting the phone... then followed the steps I've posted and knocked out of the door...
xmff00 said:
Missed this one...
How come some people is actually running on the rooted OOS C.44 EU? Are they using a particular version of a patched boot.img that's floating underground?
Click to expand...
Click to collapse
Your post doesn't specify which version of magisk you're using, unless I overlooked it. If you're not using alpha already, use alpha. And make sure you also patch the boot.img with alpha and not a different version than you're trying to install. A couple of people have said canary works now (at least for C40), but I can't confirm whether it still works on C44. Stable doesn't work (yet).
terlynn4 said:
Your post doesn't specify which version of magisk you're using, unless I overlooked it. If you're not using alpha already, use alpha. And make sure you also patch the boot.img with alpha and not a different version than you're trying to install. A couple of people have said canary works now (at least for C40), but I can't confirm whether it still works on C44. Stable doesn't work (yet).
Click to expand...
Click to collapse
New stable V24 is released. Works great
nicoilboss said:
you don't have to flash the magisk_patched.img but instead boot it with : "fastboot boot magisk_patched.img"
Then you can install magisk by it's manager and reboot the phone.
Here is everything explained: https://forum.xda-developers.com/t/guide-magisk-unlock-root-keep-root-oos-12-0-0-0.4252373/
Click to expand...
Click to collapse
I've tried to use this method but when I try to flash using the 'fastboot boot magisk_boot.img' I get the error "failed - command boot not recognized"
ADB shows the 'sending' command but then nothing happens other than error mentioned above. I've tried to use both the patched and unpatched images but same error. No idea how to proceed from here

Categories

Resources