Patch boot image without using Magisk App - Magisk

Hello,
I'm trying to patch my boot image without using Magisk App.(via PC) Is there any way to do this?
This is because everytime I do security update every month, I have to:
1. Download factory image
2. Unzip and get boot.img
3. Put boot.img in my phone
4. Patch boot.img with Magisk App
5. Move boot_patched.img to my pc and flash via fastboot
I find this very unefficient, and I want to automate 1~4 by just doing all the process in my PC.

Why wouldn't you install your update and before re-booting the phone go to the Magisk app and let it do the patching for you with "Direct Install" (or "Install to Inactive Slot" if you have device with dual partition)?

Andrologic said:
Why wouldn't you install your update and before re-booting the phone go to the Magisk app and let it do the patching for you with "Direct Install" (or "Install to Inactive Slot" if you have device with dual partition)?
Click to expand...
Click to collapse
@Andrologic This is because I root for VoLTE(Voice over LTE) patch and after that, I assume that I cannot update my phone via OTA. Long ago I tried updating with OTA and for as long as I remember it failed. Ever since that happened, I usually unroot first, do an update with either sideload or OTA or factory image(very often), root again with all the steps above, and so on..

If that's what you really need, just do what Magisk does. It's all on GitHub:
https://github.com/topjohnwu/Magisk/blob/master/scripts/boot_patch.sh

Didgeridoohan said:
If that's what you really need, just do what Magisk does. It's all on GitHub:
https://github.com/topjohnwu/Magisk/blob/master/scripts/boot_patch.sh
Click to expand...
Click to collapse
Ah, this was what I was looking for. Thank you.

@Didgeridoohan Do you happen to know where I can get the essential magiskinit and magiskboot binary?
From magisk v22.0 I see that magisk core and magisk manager got merged into one, and now I can't find the latest executable. (x86 too)

They're in the /lib/x86 and folder inside the .apk. If I remember correctly it should just be a matter of renaming them to magiskinit and magiskboot respectively.

Didgeridoohan said:
They're in the /lib/x86 and folder inside the .apk. If I remember correctly it should just be a matter of renaming them to magiskinit and magiskboot respectively.
Click to expand...
Click to collapse
You are talking about these "lib<binaryname>.so" files right?

Yup

Didgeridoohan said:
Yup
Click to expand...
Click to collapse
Thank you for the answer. I really appreciate it.

After update, make a boot.img backup via twrp (copy in twrp folder and rename to boot.img) patch via Magisk and flash new patched boot.img.
Os. I do not like a new method too.

Thank you guys, with these ideas I have been able to write a bash script to automate the whole process of downloading the latest build of lineageos, patch it on the phone using magisk (using adb shell), and flash it in fastboot mode, without needing any user intervention whatsoever.

Sathors said:
Thank you guys, with these ideas I have been able to write a bash script to automate the whole process of downloading the latest build of lineageos, patch it on the phone using magisk (using adb shell), and flash it in fastboot mode, without needing any user intervention whatsoever.
Click to expand...
Click to collapse
Can you share your script?

Hey @eyal1izhaki , sorry for the late reply.
You can find the script I am using here: https://github.com/NicolasWebDev/reinstall-magisk-on-lineageos
If you find any problem or have a suggestion, please tell me!

Oh nice, I tried to run boot_patch.sh on my Ubuntu, didn't go well.. I'll try to run it on my samsung phone as you did.
In not running lineageos but it should be the same process.
Thanks for the script

eyal1izhaki said:
Oh nice, I tried to run boot_patch.sh on my Ubuntu, didn't go well.. I'll try to run it on my samsung phone as you did.
In not running lineageos but it should be the same process.
Thanks for the script
Click to expand...
Click to collapse
https://github.com/Taewan-P/crosshatch-magisk-generator
This is my automation script FYI.
It's mostly close to an automation workflow though...

Also, you should not use the x86 binaries to patch a boot img of an aarch64 device. Flashing the mispatched img will make you boot loop the device.

i have a big dum dum poopy brain i dont know how to do anything will one of you big brain gentlemen please tell me how to patch the boot.img file with the script you guys are talking about and which app do i use and where do i use it and how do i use it. i can't use magisk because it gets stuck on the splash screen with the logo so i'm trying to patch the boot.img file without it. also will it be a problem that the boot.img file has .lz4 at the end (boot.img.lz4). aight thanks im gonna try elongating my neck by tying it to a fan with a rope.

Hi. I am sorry for bumping this thread but I am finding a solution for patching multi-model boot to add Magisk root without a phone.
Will this be possible?
I read the @Sathors script but he pushes the boot file to the android system to patch it. Can this step work on any phone or must on the exact model of the boot.img

Hi @Tungtata . If you look at the boot_patch.sh script in Magisk (https://github.com/topjohnwu/Magisk/blob/master/scripts/boot_patch.sh), in the header it says the following:
{
"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"
}
So it seems that to work it needs the corresponding binaries, scripts and files. Maybe you can find all of these files in the Magisk repo, maybe not, in my case it seemed too much hassle to try and find out, knowing that it is working when done on the phone.
But if you really need to do that, then here is a path you can follow.
As for needing the exact phone model to patch the boot image, I don't think so because the script in itself is generic, but it depends on the other files it requires. Anyway, doing a real-life test should be quick.

Related

[Recovery] ClockworkMod - TF701T Proxy Thread

{
"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"
}
THIS IS A PROXY THREAD Creator and Maintainer is pershoot
This is CWM for the ASUS Transformer Pad (TF701T – Macallan).
-You must be unlocked (use ASUS’s unlock tool to perform this)
-You must be on 10.26.1.18 bootloader (updating to ASUS’s latest 4.3 release will install this)
For complete Info and Download: VISIT HERE
***Once there, check out the Recent Entries on the right side of the page for latest updates***
-Unlock your device using the ASUS Unlock tool.
-Boot in once and execute: adb reboot bootloader
Fastboot:
To boot the recovery:
fastboot boot recovery.img
To permanently flash the recovery:
fastboot flash recovery recovery.img
Source:
https://github.com/pershoot/android_device_asus_tf701t
https://github.com/pershoot/android_kernel_asus_tf701t
https://github.com/CyanogenMod/android_bootable_recovery
Creator and Maintainer:
@pershoot
Video Tutorial
Video Tutorial Thanks @wwjoshdew
Ah just saw screenies. Nice job pershoot.
Why is the version still 6.0.4.6?
CWM 6.0.4.7
OP Updated
Feb/2 OP updated
Small question: my device is on 10.26.1.17. Updating to the latest official 4.3 will definitely wipe the CWM recovery, and probably will make some of the apps not running any more (not mentioning loosing root, etc..)
Is it possible to install the CWM on such a ROM version (10.26.1.17) ? I've just tested booting it and booting (and using it as a backup) works.
I was on 6.0.4.6 and i used flashify to update. Worked fine.
hetzbh said:
Small question: my device is on 10.26.1.17. Updating to the latest official 4.3 will definitely wipe the CWM recovery, and probably will make some of the apps not running any more (not mentioning loosing root, etc..)
Is it possible to install the CWM on such a ROM version (10.26.1.17) ? I've just tested booting it and booting (and using it as a backup) works.
Click to expand...
Click to collapse
Both cromix and cm11 will require the latest bootloader to eliminate compatibility issues it is recommended to flash to the latest asus firmware
Sent from my SGH-T889 using XDA Premium 4 mobile app
@AngryDinosaur - I made a video on how to install Custom Recovery on your Transformer Pad TF701T!
http://www.youtube.com/watch?v=3IBN1YkBp3g
wwjoshdew said:
@AngryDinosaur - I made a video on how to install Custom Recovery on your Transformer Pad TF701T!
http://www.youtube.com/watch?v=3IBN1YkBp3g
Click to expand...
Click to collapse
included in the post alongside the screenshots. Thanks a lot!!!
OP updated 2/16, installation video tutorial included. Thanks to @wwjoshdew
recovery updated with baseline build and sorted dock sd card functionality and usbdisk functionality.
@pershoot I'd love for this recovery to include touch screen drivers. That way at least aroma could use the touch screen. Any ideas how to compile with the standard drivers included?
sbdags said:
@pershoot I'd love for this recovery to include touch screen drivers. That way at least aroma could use the touch screen. Any ideas how to compile with the standard drivers included?
Click to expand...
Click to collapse
i'll look in to it...
I'm getting a weird error I've never seen before trying to flash something with fastboot. :
fastboot flash recovery recovery.img
target reported max download size of 643825664 bytes
error: cannot load 'recovery.img' : No error
Any ideas?
lortay78 said:
I'm getting a weird error I've never seen before trying to flash something with fastboot. :
fastboot flash recovery recovery.img
target reported max download size of 643825664 bytes
error: cannot load 'recovery.img' : No error
Any ideas?
Click to expand...
Click to collapse
Make sure recovery.img is in the same folder as fastboot and you are running the cmd prompt from that folder.
sbdags said:
Make sure recovery.img is in the same folder as fastboot and you are running the cmd prompt from that folder.
Click to expand...
Click to collapse
Duh, I have platform-tools in my path so I can run them from anywhere. I forgot to cd to the directory. Thanks for airing out my brain fart.
lortay78 said:
Duh, I have platform-tools in my path so I can run them from anywhere. I forgot to cd to the directory. Thanks for airing out my brain fart.
Click to expand...
Click to collapse
Very common mistake that happens to the best of us
updated.
Hi,
I spent hours trying to get this to work before discovering there are two missing steps in the OP's instructions.
There's a shell script that calls an application that restores the stock boot loader on every boot.
You have to delete it.
Steps:
1. Root.
2. Install Root Explorer.
3. Go into /etc
4. Delete install_recovery.sh
5. Go into /system
6. Delete recovery-from-boot.p
You have to delete the files. You can't just rename them or change the extension because the system actually searches the filesystem for a file whose contents matches an MD5 hash and will find it if you rename it.
After you do this, THEN follow OP's instructions.

SM-T813 Factory Reset/Restore Stock Rom Issues Failure to Mount /data

I have inherited a Galaxy Tab S2 that appears to have been modified a few times (TWRP 3.1.0-1 already installed).
My goal was to restore it to factory/"new" conditions before attempting to add Magisk.
I tried to wipe Data. Cache, and Dalvik in TWRP and got the following error:
{
"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"
}
I have what I believe is the stock firmware T813XXU2BRB2_T813XAR2BRB2_HOME.tar from sammobile, but I was hesitant in attempting to flash it with Odin with these other issues.
Edit: Thinking I maybe need to format/data
Any advice on proceeding?
Let me know if there is other useful info I can provide.
Update:
I used TWRP to format/data and used Odin 3.13.1 to flash T813XXU2BRB2_T813XAR2BRB2_HOME.tar, which flashed successfully.
Tablet Rebooted and eventually Android(7.0) started.
Everything seemed okay so I wanted to check the stock Android recovery.
booting to Android Recovery the tablet tries the following;
1) Installing system update...stays there for about a minute or so.
2) No Command error shows up....stays there for about a minute or so.
3) Then eventually the stock Factory Android Recovery starts.
This is repeatable anytime I try to boot to Android Recovery.
If this was not happening I would be semi confident that I had achieved the factory/"new" conditions that I was looking for prior to attempting to proceed with Magisk installation.
Ill continue reading the forum looking for similar issues, any help would be appreciated.
Update #2
After reading some articles on similar problems I thought Id try a few things.
Seemingly I have "fixed" it.
I used Odin 3.13.1 to again flash my stock rom T813XXU2BRB2_T813XAR2BRB2_HOME.tar, which flashed successfully.
Rebooted to OS to check to see if there was any new problems.
Booted into Android Recovery [had the same issue with the system updates and the No Command Error] eventually Android Recovery started and then I Factory reset.
Rebooted to OS to see if any new issues.
Booted to Download mode and flashed TWRP 3.1.0-1 with Odin 3.13.1 with Auto Reboot unchecked. Flashed Successfully
Rebooted Directly into TWRP Formatted Data. Successfully
While still in TWRP I installed the no-verity-no-encrypt_ashyx zip successfully.
While still in TWRP I installed Magisk-v16.0 successfully.
Rebooted, and everything seems to work Magisk is functioning properly.
I imagine a lot of this was unnecessary, but it was hard to know where to start since I wasnt sure what was done to the tablet in the first place.
Crossing my fingers I dont encounter some future issue complicated by all this
[Update 7/27/18:]
Problem: After Adding Magisk, Screen Mirror to TV would not work. It tries to connect and it says "Wi-Fi Direct and Smart View cannot both be on at the same time" then disconnects.
Thought a System Update might help (since I had not updated yet from the stock rom)
System Update would not work through Tablet's System Update "Unrecognized Device".
Using Smart Switch I was able to update the tablet, however this reversed the flashed TWRP, (I hoped that the Smart Switch would fix the issue with Stock Android Recovery but it did not)
So I reflashed TWRP and rebooted to check if Screen Mirroring, worked no problem.
Rebooted to TWRP, reformated, re-install no-verity-no-encrypt_ashyx zip, and reinstall Magisk.
Rebooted, but Screen Mirror now no longer works.
Looking around to see if any others have had this issue before asking about it in separate post. (Logging it here if problem is related to all this and I need to reference all that happened)
Learningthecurve said:
Everything seemed okay so I wanted to check the stock Android recovery.
booting to Android Recovery the tablet tries the following;
1) Installing system update...stays there for about a minute or so.
2) No Command error shows up....stays there for about a minute or so.
3) Then eventually the stock Factory Android Recovery starts.
:
Click to expand...
Click to collapse
Absolutely normal.
Will do this every time you boot to stock recovery.
Stock recovery is intended for installing stock updates.
It will search for the update, not find one, display no command as there is no update and eventually show the menu.
ashyx said:
Absolutely normal.
Will do this every time you boot to stock recovery.
Stock recovery is intended for installing stock updates.
It will search for the update, not find one, display no command as there is no update and eventually show the menu.
Click to expand...
Click to collapse
Thanks a bunch for the verification.
Now I can concentrate on this screen mirroring issue.
The two devices I have with Magisk both have the same issue still trying to determine if anyone else has had this issue I'll prolly start a new thread there once I wrap my head around it as best I can.
Thanks again!
[Update: It appears the screen share is a known issue. Looking into modifying build.prop wlan.wfd.hdcp=disable gonna digest all I can before diving in]
[Update: Seems I just need to edit the build.prop to add that line " wlan.wfd.hdcp=disable" gave ES File Explorer Superuser access with Magisk....however I cant save it says "read only"....*burp* more figuring to do]
Learningthecurve said:
Thanks a bunch for the verification.
Now I can concentrate on this screen mirroring issue.
The two devices I have with Magisk both have the same issue still trying to determine if anyone else has had this issue I'll prolly start a new thread there once I wrap my head around it as best I can.
Thanks again!
[Update: It appears the screen share is a known issue. Looking into modifying build.prop wlan.wfd.hdcp=disable gonna digest all I can before diving in]
[Update: Seems I just need to edit the build.prop to add that line " wlan.wfd.hdcp=disable" gave ES File Explorer Superuser access with Magisk....however I cant save it says "read only"....*burp* more figuring to do]
Click to expand...
Click to collapse
You have to mount system as writable.
Tbh ES file explorer isn't the greatest root file explorer.
ashyx said:
You have to mount system as writable.
Tbh ES file explorer isn't the greatest root file explorer.
Click to expand...
Click to collapse
Thanks ,
Looking around with the words I searched for it seemed others used SuperSU to root and mounted the system as writable and then saved the modified build.prop.
I was trying to avoid the SuperSU route because of Magisk. ( was not sure if I could root it that way and then modify build.prop and then uninstall SuperSU for Magisk to still function and the modification to maintain)
What I tried was this.....
First I installed busybox giving SU rights with Magisk.
Then I used the "Terminal Emulator" app to try the command;
Code:
su
mount -o rw,remount /system
(no errors)
Retried editing the build.prop with ES File Explorer (would love a suggestion for a radical Alternative ) still a no go;
Tried going into the TWRP Terminal and tried the same command;
No errors but Still a no go.
Then I tried using the "BuildProp Editor" app enabled superuser with Magisk to edit the build.prop. Seemingly that saved. (Though I knew something was strange now, as I could not open the build.prop with Es File Explorer anymore.
I rebooted and tried to screen mirror. No Luck.......
I will continue looking around just worried that Im wasting time looking in the wrong direction, and that Im missing something super easy..

Tutorial How to root ZTE z835 (Maven 3) with Magisk.

DISCLAIMER: I AM NOT RESPONSIBLE FOR WHAT MAY HAPPEN TO YOUR DEVICE, DO THIS AT YOUR OWN RISK.
Before I start: everything I'm going to post here, I learned from this thread: https://forum.xda-developers.com/maven-3/help/zte-maven-3-z835-root-t3705687/page9
VERSION OF MAGISK FLASHEAD v17.1 (Unfortunately no one has flashed version v18.1)
What we need (they will be in the links at the end):
-ZPST for AT&T (with this program we are going to flash the modified boot.img)
-Drivers: QDLoader, ZTE AndroidUSB and ZTE_V889F (in case the previous Zte driver does not work).
-Modified boot.img that are already flashed with Magisk, only the following versions are available:
-Z835V2.0.0B10
-Z835V2.0.0B12
-Z835V1.0.0B13
-Magisk Manager version compatible with v17.1
EVERYTHING YOU NEED IS IN A LINK AT THE END OF THE POST.
Let's get started.
I recommend to do a hard reset before starting, however, in one of my devices I did it having data and applications installed, if you have used kingroot or any other software in your phone, erase all trace of it so you do not have problems.
We download all the contents of the folder, install all drivers included, and the ZPST for AT&T.
Starting to flash:
WE NEED AT LEAST 50-60% of Battery
Turn off the phone and turn on pressing Vol Down + Power Button, the phone will start in FTM mode.
Open ZPST for AT&T and select version Z835
{
"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"
}
WARNING, remove the usim and sd card
Once inside the software we proceed to connect the cell phone.
1. You will see if the phone was recognized by the com port.
2. Download, this is where we will enter to download the firmware
3. You will see your information imei and so on.
This is how it will look once connected (Let's go to the download tab)
1. Let's select the firmware (it has to be the same as the cell phone otherwise it can corrupt the imei)
2. We chose where to keep a small log to check if everything went well.
3. HIT THE DOWNLOAD BUTTON!!!!!
WARNING: wait for the device to restart at least 2 or 3 times, one of them will be in FTM mode again, so do not panic, it will take a while in 3% or 5%.
When the phone starts normally, if you did a hard reset configure everything again, otherwise, we will proceed to install the magisk.
DO NOT INSERT THE SD CARD YET!
Magisk asks if I want to update to the latest version, press NO THANKS.
Proceed to uninstall
Now let's install the version of magisk manager we downloaded (com.topjohnwu.magisk_6.1.0-165_minAPI21(nodpi)_apkmirror.com.apk)
When the installation is finished we enter Magisk and this will ask us if we want to upgrade to the latest version, PRESS NO!
Now we will see that magisk is installed correctly.
We see that we can use all its functions.
We will proceed to verify if we have root access.
Download root checker
And Voila!
MEGA link: https://mega.nz/#F!ud8VwKRJ!-cJr7EJyhb1PkziNx5KvLQ
with this can you uninstall original system's apps such as device help, google apps? install recovery and titanium backup? I need to remove a lot of bloatware/default apps that is taking memory from the device
nvizync said:
Root
Click to expand...
Click to collapse
Nice work! This confirms that the bootloader is unlocked, which means we can then use just the firehose to flash these files. I will work on writing something up for that.
deadman96385 said:
Nice work! This confirms that the bootloader is unlocked, which means we can then use just the firehose to flash these files. I will work on writing something up for that.
Click to expand...
Click to collapse
Would love to see that, thanks for the reply! :good:
rickastillo said:
with this can you uninstall original system's apps such as device help, google apps? install recovery and titanium backup? I need to remove a lot of bloatware/default apps that is taking memory from the device
Click to expand...
Click to collapse
You can install titanium backup, twrp is not possible at this point, no one has done it yet, you can delete system apps through adb, using
Code:
adb shell pm uninstall -k --user 0 packagename
But i haven't figured out yet how to get rw permission on system/apps so i can delete system apk's.
@nvizync You should thank me for my boot.img mod of -Z835V2.0.0B10 (Magisk 17.1)
my boot.img mod of:
-Z835V1.0.0B13 (Magisk 18.1) Link: https://mega.nz/#F!88IiFapI!6Peah7woOOaIhusfYCAEcw
-Z835V2.0.0B10 (Magisk 18.1) link: https://mega.nz/#F!V4pAVIYQ!19tWE7_xk_aQtyiu050Y7A
-Z835V2.0.0B12 (Magisk 18.1) Link: https://mega.nz/#F!9lBVkQAZ!WqnRvYa4qcw5MgRxhp1hcA
Thanks for your detailed flash root tutorial
Alijosekt said:
@nvizync You should thank me for my boot.img mod of -Z835V2.0.0B10 (Magisk 17.1)
my boot.img mod of:
-Z835V2.0.0B10 (Magisk 18.1) link: https://mega.nz/#F!V4pAVIYQ!19tWE7_xk_aQtyiu050Y7A
-Z835V2.0.0B12 (Magisk 18.1) Link: https://mega.nz/#F!9lBVkQAZ!WqnRvYa4qcw5MgRxhp1hcA
Thanks for your detailed flash root guide
Click to expand...
Click to collapse
I totally forgot it, yeah, you deserve most of the credit, I linked the original thread, but I'm planning including all the credits.
@nvizync Look what I got! https://github.com/TwrpBuilderTests/android_device_zte_z835/releases/tag/TWRP-3.2.3-TwrpBuilder-2019-01-18_20-13
Some brave who flashes it?
Alijosekt said:
@nvizync Look what I got! https://github.com/TwrpBuilderTests...s/tag/TWRP-3.2.3-TwrpBuilder-2019-01-18_20-13
Some brave who flashes it?
Click to expand...
Click to collapse
Ok my way
nvizync said:
Ok my way
Click to expand...
Click to collapse
not boot twrp
Alijosekt said:
not boot twrp
Click to expand...
Click to collapse
Did you tried it
Alijosekt said:
@nvizync Look what I got! https://github.com/TwrpBuilderTests/android_device_zte_z835/releases/tag/TWRP-3.2.3-TwrpBuilder-2019-01-18_20-13
Some brave who flashes it?
Click to expand...
Click to collapse
I tried to flash it, but instead, I just got a bootloop, and I can't access the recovery mode anymore, I should flash the original recovery and see if it works.
nvizync said:
I tried to flash it, but instead, I just got a bootloop, and I can't access the recovery mode anymore, I should flash the original recovery and see if it works.
Click to expand...
Click to collapse
Done, i managed to enter in normal mode and use flashify to flash stock recovery.img.
Hi, I'm stuck at the first step. The ZPST download fails with the message that it can't find the file: sbl1.mbn Any thoughts?
penn462 said:
Hi, I'm stuck at the first step. The ZPST download fails with the message that it can't find the file: sbl1.mbn Any thoughts?
Click to expand...
Click to collapse
Are you using the custom boot.img listed in mega's folder?
nvizync said:
Are you using the custom boot.img listed in mega's folder?
Click to expand...
Click to collapse
Yes. I'm using the folder "Boot Mod Z835V1.0.0B13"
penn462 said:
Yes. I'm using the folder "Boot Mod Z835V1.0.0B13"
Click to expand...
Click to collapse
Thats odd, try this: download another folder B12 or B10, and just paste the B13 boot.img, maybe that could work, one of the devices i rooted was B13.
Well, I tried what you suggested, and now I get "download failed" and "failed to change mode before downloading firmware" It seems to be stuck in FTM. I guess it's bricked?
---------- Post added at 06:52 PM ---------- Previous post was at 06:48 PM ----------
Update: not bricked. Gonna try again.
penn462 said:
Well, I tried what you suggested, and now I get "download failed" and "failed to change mode before downloading firmware" It seems to be stuck in FTM. I guess it's bricked?
Click to expand...
Click to collapse
Fear not, that happened to me also, just keep in ftm and make a stock boot.img flash, provided in the mega folder. Paste the boot stock image inside the b13 folder
Placed stock boot.img into B13 folder in place of custom boot.img. The process failure point is now back to the missing sbl1.mbn problem. I can get the phone to start, however, so it's not bricked. Whew!

Root Magisk Pie For Unlocked Devices MR0 and MR1

Root by Magisk
Click Here For MR0
Click Here For MR1
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
fastboot reboot
If you get this error
Your device is corrupt. It can’t be trusted and may not work properly.
Use a terminal app or use computer and type this.
su
reboot "dm-verity enforcing"
MR0 rooted to MR1 failed to install workaround
If you're already on rooted MR0 and OTA installation failed for the MR1 Update.
You must boot into fastboot mode and flash MR0 stock boot.img , vendor.img , system.img then check for update follow instructions below.
https://s3.amazonaws.com/cheryl-factory-images/aura-p-global-3040.zip
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
fastboot flash vendor_a vendor.img
fastboot flash vendor_b vendor.img
fastboot flash system_a system.img
fastboot flash system_b system.img
fastboot reboot
Fixed link
I managed to capture the OTA... All I got was payload.bin. How do extract my own boot.img so I can patch it?
I googled how to extract bin files. Install python on your PC. There's a package that will unpack the payload.bin file.
Thanks for this! Was stuck at work when I pulled the OTA and couldn't do it myself. Saved me a few steps
This saves us time. Razer won't put the image on the developer portal for another week
The problem I have is it now says my device is corrupt even after side loading the whole OTA file. Still got the error right after the side loading.
Guys, the payload.bin doesn't contain the full images. It contains bdiff delta files. YOU CANNOT TYPICALLY FLASH THE IMAGES EXTRACTED FROM THE PAYLOAD.
You need to patch the previous factory images with the diff. I'm downloading the update now and will gladly post a stock boot image when I get it (and if nobody else does it before )
Not really needed now though thanks to OP
Edit: Major version upgrades do appear to have flat images, but that shouldn't be an expectation. Always check the patch method in the metadata (extractor programs should at least write this to the console) is image and not bdiff.
Flippy125 said:
Thanks for this! Was stuck at work when I pulled the OTA and couldn't do it myself. Saved me a few steps
Click to expand...
Click to collapse
th3cavalry said:
The problem I have is it now says my device is corrupt even after side loading the whole OTA file. Still got the error right after the side loading.
Click to expand...
Click to collapse
Use a terminal app or use computer and type this.
su
reboot "dm-verity enforcing"
i need erase user data? i get boot loop after flashing boot.img
FellpeSoares said:
i need erase user data? i get boot loop after flashing boot.img
Click to expand...
Click to collapse
are you sure that you are installing it on pie?
RKBD said:
are you sure that you are installing it on pie?
Click to expand...
Click to collapse
yes
{
"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"
}
Is anyone having issues with Google Pay? I have been passing Safety Net with no issue. I even removed all of my modules and still can't make a payment with Google Pay. I noticed the only way to get it working is to go to Magisk Manager and check "Magisk Core Only Mode" so I can then use it. Anyone else having this issue?
Edit:
Razer Phone 2 Android 9
Magisk 18.1
Warrior1988 said:
Root by Magisk
https://drive.google.com/file/d/1eHBPo2YZBWPe6zIe5sTct5SfbHQZUPa5/view?usp=drivesdk
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
fastboot reboot
If you get this error
Your device is corrupt. It can’t be trusted and may not work properly.
Use a terminal app or use computer and type this.
su
reboot "dm-verity enforcing"
Click to expand...
Click to collapse
I did the same way but after flashing the patched boot its booting normaly but i am still stuck in bootanimation.
If i flash again stock boot img works normaly.
what can be the reason for that ?
Best Regards
SimpleGek
CurtisMJ said:
Guys, the payload.bin doesn't contain the full images. It contains bdiff delta files. YOU CANNOT TYPICALLY FLASH THE IMAGES EXTRACTED FROM THE PAYLOAD.
You need to patch the previous factory images with the diff. I'm downloading the update now and will gladly post a stock boot image when I get it (and if nobody else does it before )
Not really needed now though thanks to OP
Click to expand...
Click to collapse
I must of gotten lucky then. I extracted the boot.img from the payload.bin then used magisk to patch the boot.img for root. No issues so far.
rogeriskira said:
I must of gotten lucky then. I extracted the boot.img from the payload.bin then used magisk to patch the boot.img for root. No issues so far.
Click to expand...
Click to collapse
It is certainly possible from what I can tell. Most probably a guarantee when there's an OTA to the next version of Android(deltas would probably be bigger than a flat image). I'm more implying that this shouldn't be an expectation. If you tried to patch the boot.img extracted from the payload in the OTA for O-MR0 to O-MR2 there would most definitely have been problems, for instance.
So 'twas just a warning. That WAS lucky
Alright, so, I'm gonna be the one to ask the stupid question. All a completely stock user has to do to get root now (on an unlocked RP2) is... Update to Android Pie normally, unlock the bootloader, and then follow the OP?
CurtisMJ said:
It is certainly possible from what I can tell. Most probably a guarantee when there's an OTA to the next version of Android(deltas would probably be bigger than a flat image). I'm more implying that this shouldn't be an expectation. If you tried to patch the boot.img extracted from the payload in the OTA for O-MR0 to O-MR2 there would most definitely have been problems, for instance.
So 'twas just a warning. That WAS lucky
Click to expand...
Click to collapse
Do you working now with diff ? so how i understand diff means that we need merge RP2 with RP0 boot.img ?
simplegek said:
Do you working now with diff ? so how i understand diff means that we need merge RP2 with RP0 boot.img ?
Click to expand...
Click to collapse
Ok, so the OTA packages work like this:
The package has some metadata and a number of "payloads"(concatenated in a single file)
There is one sub-payload per partition in a firmware slot(A or B)
The metadata specifies the checksums, sizes etc of each payload, along with a patch method
The patch method tells the update engine how it should go about patching the matching partition with the payload.
Most of the time this patch method will be a bdiff(binary diff).
When its bdiff, the payload is not a full image, hence the previous image is required. This previous image can be extracted from a factory image, and the diff combined with it to form a flat image which you can flash directly (and patch with magisk)
SOMETIMES (like with a major upgrade where a diff will likely be larger than a image) the patch method is image, where the payload is a flat disk image of the partition which is simply written to the partition.
The Pie update evidently contained a flat boot image. So in this case, you DO NOT need to merge the images. But with with subsequent smaller updates, we likely will need to do that.
Thank you for the Intensive information.
Can you tell then , What propably can be my Problem , that i am stucking at the Bootanimation with patched boot.img(Magisk).

[MAGISK][Android 10]Patched Boot Image For OnePlus 7 Pro

Hi guy's here's a short and simple guide on how to patch your own boot.img with Magisk.
Recommended to patch your own image read this
Grab the latest Platform Tools HERE
Code:
1. Download a stock Oxygen OS ROM Zip from [URL="https://www.oneplus.com/support/softwareupgrade/details?code=PM1574156267635"]Here[/URL] Or the general section of XDA many users post links to the latest builds.
2. Download [URL="https://androidfilehost.com/?fid=818070582850510260"]payload_dumper-win64.zip[/URL] And extract/copy it to Desktop.
3. Extract your payload.bin from the stock rom zip and copy it into the payload_input folder.
4. Run the payload_dumper exe.
5. When it's finished open the payload_output folder and copy the boot.img to Desktop keep it there as a backup.
6. Copy the same boot.img to your internal storage on your phone.
7. Install the magisk manager APK from here: [URL="https://github.com/topjohnwu/Magisk"]Magisk Manager[/URL]
8. Open Magisk Manager choose install and select "Select and Patch a file" Or if you wish to use beta release go to settings > Update Channel and switch to beta and then back to Install "Select And Patch A File"
9. Navigate to where you copied your boot.img on the phone.
10. Once it's patched you'll have an magisk_patched.img on your phone in the the Downloads folder.
11. Copy that image to your fastboot folder on your PC and flash it with fastboot flash boot magisk_patched.img
Done!
As always I'm not responsible for any issues your device might have or if your cat sets on fire.
Credits:
topjohnwu for Magisk/Manger
geminids14 for payload_dumper-win64
Nice, that is what we need .. Thanks Liam
How can i load twrp? Fastboot boot command, didnt work
DevrimSeven60 said:
How can i load twrp? Fastboot boot command, didnt work
Click to expand...
Click to collapse
Ask in the TWRP thread
Not working for me get a error file is to large to download when try to flash
dajumper said:
Not working for me get a error file is to large to download when try to flash
Click to expand...
Click to collapse
You're on OB1? It worked fine for me I flashed it multiple times already
I think I know the issue try updating your fastboot files from here: https://developer.android.com/studio/releases/platform-tools
liam_davenport said:
You're on OB1? It worked fine for me I flashed it multiple times already
I think I know the issue try updating your fastboot files from here: https://developer.android.com/studio/releases/platform-tools
Click to expand...
Click to collapse
Still the same
Im already rooted with bootimg having lat pie release. Is it possible to flash Android Q on top of last pie release and be rooted? Again I am rooted with magisk, not having twrp.
To update I always flash full updat from local, not reboot, install magisk to other slot and I was ready to go.
Will this work with Q update?
Not working for me. Both sims dissapear and phone keeps FC.
pister said:
Not working for me. Both sims dissapear and phone keeps FC.
Click to expand...
Click to collapse
Issue is on your end, I've flashed this multiple times no issue.
Working perfectly here I've clean flashed and redownloaded from the link and flashed. I've noticed sometime magisk causes sims to not show on boot before reboot the device and they should show again.
{
"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"
}
I see that when I root, both IMEIs disappears. Very strange
Sent from my [device_name] using XDA-Developers Legacy app
error 1 (or 7 kinstalldeviceopenerror) with 52 and 3.3.1-4 ???
what are the proper steps to cleanflash
pister said:
I see that when I root, both IMEIs disappears. Very strange
Click to expand...
Click to collapse
Mine both show. Not sure why yours have disappeared
liam_davenport said:
Mine both show. Not sure why yours have disappeared
Click to expand...
Click to collapse
Don't know. Tried to root by myself and the same happened
Sent from my [device_name] using XDA-Developers Legacy app
NateDev said:
error 1 (or 7 kinstalldeviceopenerror) with 52 and 3.3.1-4 ???
what are the proper steps to cleanflash
Click to expand...
Click to collapse
If you have twrp already you don't need this I posted this for people that want root without using twrp, Just flash magisk 19.4 in twrp
There is a few guides in this forum section with all info you need on how to flash etc
Weird.. Flashing patched file would always result in bootloop. Restore to boot. IMG fixed it
mgear356 said:
Weird.. Flashing patched file would always result in bootloop. Restore to boot. IMG fixed it
Click to expand...
Click to collapse
You flashed it on Open beta 1?
liam_davenport said:
You flashed it on Open beta 1?
Click to expand...
Click to collapse
Yup open beta 1
Great thanks!
But can we update OTA to B2 with this?
@liam_davenport I'm sorry for the noob question, I just got my OP 7 Pro and never used one before, also, I've been away from everything root related for a long time.
Do I need to unlock the bootloader first in order to do this?

Categories

Resources