yashsingh1/xdaforums huggingface dataset:
[Asus ROG Phone Guides, News, & Discussion] trias10:
So I finally tried rooting my ROG Phone running the WW 48 ROM, following the instructions, and I've ended up with a boot loop same as several other users.

The only thing I installed to create the patched boot.img was Magisk Manager 6.0.1 which I downloaded from the Magisk github. I installed this apk on my phone, transferred over the vanilla boot.img from the WW 48 ROM (using the payload dumper), opened Magisk Manager, clicked Install, then Patch Boot File, pointed it at the vanilla boot.img, and it completed successfully. I note that this patched img was only 24 MB in size, whereas the vanilla one is 64 MB.

Flashing this patched img put me into a boot loop, I fixed this by placing the phone into bootloader (hardware mode), the flashing the original vanilla boot.img. This fixed the boot loop and allowed me back into the OS normally. Am not sure if there is now any corruption to the OS as a result, can anyone comment if there would be?

Reading the last few pages, it seems that other people which have experienced this have used some kind of beta channel Magisk Manager? Can someone please point me to where I can obtain this beta Magisk Manager which works on the WW 48 boot.img?
[Asus ROG Phone Guides, News, & Discussion] Mcfeels_Guy:
In magisk manager under settings there is an option that says update channel. If you select it, there is standard, beta and custom channels. Choose the beta and retry.
[Asus ROG Phone Guides, News, & Discussion] Roland 19:
American version?

Just to be clear, this method works on the American version as well international?
[Asus ROG Phone Guides, News, & Discussion] trias10:
Thank you, I'll give this a try.

Do you think flashing the bad patched boot.img (and then getting into the subsequent boot-loop, then fixing it) has in any way corrupted my OS install? I'm just wondering if I should factory reset before I move forward rooting and using this phone as my daily phone.
[Asus ROG Phone Guides, News, & Discussion] Mcfeels_Guy:
Nah, I doubt it. I've boot looped in other devices. It's not too big of a deal. You already re flashed the stock image anyways. I don't think it necessary to factory reset, but if it makes you feel more comfortable knock yourself out. It won't hurt anything. You'd just have set your phone all up again.
[Asus ROG Phone Guides, News, & Discussion] trias10:
I had the same boot loop issue from using a non-beta Magisk Manager to create the patched boot.img. However, I was able to halt the boot loop by turning the phone off, force booting into bootloader, and then flashing back the vanilla boot.img from the WW 48 firmware.

Did you do the same thing on yours? Doing this worked for me, but I'm not seeing any issues in the OS now, my wifi works and there are no crashes. Did you have crashes/issues after flashing the same boot.img as your installed system version prior to flashing the bad patched boot.img?

Am trying to determine if booting from a badly patched boot.img results in permanent corruption of the OS itself.
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
The OS is not affected. Just flash the vanilla boot.img. Then try again with the beta channel. This shouldn't be a problem in the next release of Magisk Manager. I'm not sure why it doesn't use the latest Magisk (17.3) by default.

Edit: Updated guide, step 8
[Asus ROG Phone Guides, News, & Discussion] trias10:
But how do we know that a bad boot.img from Magisk Manager would not corrupt the OS? There's a guy in this forum, faericia, he mentioned that after he boot looped with a bad boot.img from Magisk Manager, he then flashed the vanilla boot.img, and afterwards his OS was all messed up, WiFi didn't work and phone kept crashing.
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
It shouldn't do anything to the OS, but if it does you can reflash the firmware. See attached images in OP. But no matter what you'll need to flash the vanilla boot.img. There isn't any other way to fix the bootloop.
[Asus ROG Phone Guides, News, & Discussion] trias10:
Yup, I have already flashed back the original, vanilla boot.img which did fix my bootloop and allowed me to get back into the OS. And while everything in the OS appears to be working correctly, I don't want to take any chances.

Question though, looking at the images in the OP, I understand that doing "adb sideload firmware.zip" from recovery is for reflashing the official Asus firmware (so WW 48), however, can you sideload the firmware with the Magisk patched boot.img currently flashed to the device, or do you first need to flash the vanilla boot.img to the device? And if you can only sideload with a vanilla boot.img, then what's the purpose of sideloading? If you have vanilla boot.img, then why not just update via OTA?
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
To update the firmware you have to have the vanilla boot.img installed. Once you unlock the bootloader, OTA is disabled.
[Asus ROG Phone Guides, News, & Discussion] Rashad83:
Guys, can you stop saying "Vanilla" it's "Stock Boot Image" Vanilla is relevant to Google stock roms. Using the "Vanilla" term is confusing for non familiar(Noob :)) users.

Secondaly, you can't update with a patched boot.img because the boot partition has been altered by being patched by Magisk. You can't flash a new update without going back to Stock status first.

When the phone runs its tests to execute the update process it checks if the partitions files have been altered or not upon which it will decide to execute or abort an update and that is the case in all phones with stock firmware in general.

Regarding OTA update in our phone case you lose that option the moment you unlock the bootloader.

Finally, flashing a corrupt boot.img doesn't affect the OS files because the System files exist in the System.img and not boot.img. The corruption of boot.img affects how the hardware and system communicate with each other only. So the only thing to do in case you flashed a corrupted boot is to simply flash a non corrupted boot.img and you don't have to flash anything else because the change hasn't affected any other partition.
[Asus ROG Phone Guides, News, & Discussion] Marco589:
I think after having read all these answer you already got :)

by the way yes you have to patch the boot.img with magisk 17.3 (beta channel) not an older version ;)
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
Sorry for any confusion. I do use "unpatched" in the OP. I've also updated step 8 in the guide to address the beta channel and added this to the top of the guide: "** Root will void the warranty and disable OTA updates **"
[Asus ROG Phone Guides, News, & Discussion] Litterbox202:
Phone is stuck in a boot loop and I cannot get the phone recognized by ADB to load the original boot.img.

Could anyone help me out on how to get it unstuck?
[Asus ROG Phone Guides, News, & Discussion] Rashad83:
*You don't need adb commands to flash the stock boot. Make sure to connect your device from the side USB port to be recognized. Launch CMD on Windows. Then type:

fastboot devices

*You should be able to see your device

*Then flash the stock boot.img( make sure it's located within the same adb and fastboot.exe folder. Afterwards enter the following command in CMD:

fastboot flash boot boot.img

*Then reboot.

*If this does not work, please specify exactly in detail what you did so that we can help.
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
Updated guide to include this warning in step 8: *Older versions of Magisk will bootloop.
[Asus ROG Phone Guides, News, & Discussion] Mcfeels_Guy:
How can I tell if I'm rooted 100% just followed all 10 steps exactly and downloaded a root check app and says I'm not rooted. I was able to grant superuser permission to a couple root apps tho.

---------- Post added at 02:25 AM ---------- Previous post was at 02:17 AM ----------

Superuser x app claims I'm rooted

---------- Post added at 02:28 AM ---------- Previous post was at 02:25 AM ----------

Lol, now jrummy's root check app says I'm rooted. Nevermind, I guess I'm rooted. At first a few apps claimed I wasn't. Had no trouble with the boot patch method.
[Asus ROG Phone Guides, News, & Discussion] Mcfeels_Guy:
In regards to my comments yesterday... Yes I'm rooted. Followed all 10 steps no problems. However I did have a few hiccups and farts. At first multiple root checkers claimed I was not rooted, then just 20 mins or so later claimed I was rooted. I thought it maybe had something to do with me opening Magisk and minimizing it in the background. Also I noticed that if I downloaded a root app requiring permissions it would not work unless Magisk was running in background. Only then would it grant superuser permissions. Once granted superuser, apps work regardless if Magisk is open in the background or not. So that's not a big deal at all really. The other thing is safety net. At first I failed, then later in the day I passed. Stayed passed for awhile, now I failed again. Anyone know how to keep safety net passed at all times? Or any info on it. Seems everything is working good now. Also, anyone know how to give apps permission to read from an external USB otg storage? I want my emulators to read roms from an external USB so I can save space on the phone. No matter what emulators I use, none will read external.

-- And if anyone has any info on an upcoming working TWRP that can be flashed and be kept on the phone regardless of firmware, that'd be great.

-- And info about resurrection remix coming to ROG, it's pretty much the sole reason I unlocked bootloader. I have high hopes a good custom ROM is soon to hit. (Hopefully)

-- And lastly, can we flash future boot.img and patched_boot.img with flashfire instead of adb? Or is adb gonna be the only way for ROG.

Forgive me with this bombardment of questions. Any help and info is greatly appreciated.
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
Developers usually flock to mid range phones like the Moto G. I think because if they mess it up, it isn't as big of a loss. I'm sure people will work on this phone, but not as fast as a mid range phone.

I'll let others chime in on the rest of your post.
[Asus ROG Phone Guides, News, & Discussion] SeanBlader:
Thanks bro for this post which closely mirrors my experience.
[Asus ROG Phone Guides, News, & Discussion] Marco589:
does anyone have already patched the firmware 77?

EDIT

First try to flash 77, fail... stuck at 63%

I try flashing it with another version of adb and connecting to the power supply (attach)

EDIT2

firmware flashed

patched boot flashed

magisk 17.3 works great onto 77 version too ;)
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
shakalaca has updated TWRP if anyone wants to try. I believe it is limited to flashing only.

https://mega.nz/#F!pst3URCQ!l_N503AsNmytaErhmuiwqg

shakalaca's thread:

https://www.asus.com/zentalk/tw/thread-362963-1-1.html
[Asus ROG Phone Guides, News, & Discussion] Marco589:
if it works (actually it didn't work on the phone storage) as the one used on the 23, it's useless having it. (just my opinion)
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
Right, I don't see an advantage since it is dependent on firmware version and not fully functional.
[Asus ROG Phone Guides, News, & Discussion] NBK1980:
How can I close the bootloader again?
[Asus ROG Phone Guides, News, & Discussion] Marco589:
Dont know honestly, but have you already running the apk, which let you unlock It? Maybe there Is the option to Lock It back
[Asus ROG Phone Guides, News, & Discussion] NBK1980:
The lock does not work with the app.
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
In #2 of the description of the app:

I apologize if you used the direct link in the OP which doesn't have the description. I added a warning to step 3. I did have a warning at the top that said root would void the warranty, but didn't say what step.
[Asus ROG Phone Guides, News, & Discussion] NBK1980:
I do not have root.

I bought a device that is unlocked.

I would just like to get Ota updates.

I also tried it via adb.

I think I still have to wait for a solution.

*
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
If you bought it new, the bootloader should be locked. When you buy an unlocked phone, it means that it isn't locked to a specific carrier.

Did you try:

Settings > About phone > System updates > Check for updates

You can also try manually updating firmware with adb:

Download firmware and rename firmware.zip

https://www.asus.com/us/Phone/ROG-Phone/HelpDesk_Download/

Make sure phone is connected to the PC via the side port.

Add firmware.zip to your adb folder and type the following commands:

adb reboot recovery

adb sideload firmware.zip
[Asus ROG Phone Guides, News, & Discussion] NBK1980:
The phone was not new.

When I search for updates, none are found.

But I'm also up 2 date.

About Sideload I tried, but not with rename to firmware, but to update.

The strange thing was

The recovery featured installing system update,

but after a restart I did not have to make any new setup.

I am currently testing it with rename to firmware.zip.

Sorry for my bad english, greetz from Germany;)
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
No problem. The name shouldn't make a difference, just easier to type out. I also forgot to mention that the phone needs USB debugging enabled to use adb.

https://www.phonearena.com/news/How-to-enable-USB-debugging-on-Android_id53909
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
Are you on WW-15.1618.1810.77? There isn't any setup required for updates. Did you want to do a factory reset?

Settings > Backup & reset > Device reset

Note all data will be erased .
[Asus ROG Phone Guides, News, & Discussion] NBK1980:
Factory reset did not succeed.

I'll have to wait for devs to find a way to close the bootloader again.

Im on WW-15.1618.1810.77
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
Try a factory reset from recovery. Turn off phone and then hold volume down and power at the same time for five seconds should take you into recovery.
[Asus ROG Phone Guides, News, & Discussion] NBK1980:
I have testet Hardreset (recovery) and softreset ,but nothing.
[Asus ROG Phone Guides, News, & Discussion] Rashad83:
You can't relock the bootloader using an official method.

Even if you could relock it, you have lost the ability to receive OTA updates the moment the bootloader was unlocked using the ASUS unlock app(you get banned from ASUS update servers, that's why you need internet connection when unlocking the bootloader it sends your device serial number to be added to the list of banned devices). It sucks but that's how it is. The only option you have now is to update manually.

That is one of the reasons why I don't want to root the device yet.
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
Are you trying to switch Google accounts?

Settings > Accounts > Google

Select Remove account from the menu (the three dots).

Edit: I found this article that might help:

https://smallbusiness.chron.com/factory-resetting-android-phone-computer-71407.html
[Asus ROG Phone Guides, News, & Discussion] Marco589:
It doesn't lock the BL, I flash it every time I need to update :D
[Asus ROG Phone Guides, News, & Discussion] trias10:
Does anyone know if you need to be running the same ASUS firmware version as the boot.img you are trying to patch using Magisk Manager?

For example: I am currently on WW 48, but am planning to update to WW 77. I have already downloaded WW 77 and extracted its boot.img. Can I move that WW 77 boot.img to my rooted phone, which is currently running WW 48, and use Magisk Manager to patch the 77 boot.img file in anticipation of flashing it once I update the phone to 77? Or, does the phone itself need to be running the same version of boot.img as the one you are patching, because it reads information from the actual phone boot.img during the patch?

And even one step further, can I put an ASUS boot.img on a different phone entirely, say a OnePlus One running Android 7, and use Magisk Manager there to patch the ASUS boot.img?
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
He is trying to do a factory reset. I think he thinks that the BL has to be locked to do a factory reset (full wipe), but I think it can be done unlocked.

I removed that from my post, as when he updated the firmware, he updated the boot.img also.

He bought the phone used and wants to do the setup that you get when you turn on a new phone. I'm not sure why factory reset isn't working for him.
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
I don't believe it matters what the firmware or phone is for patching the boot.img, but what matters is the order that they are flashed.

Flash unpatched/stock boot.img, then the firmware, and then the patched_boot.img

I have always used the unpatched/stock boot.img from the current firmware installed on the phone to avoid bootloop, but if would like, you can try the new unpatched/stock boot.img to see if that is an issue.
[Asus ROG Phone Guides, News, & Discussion] Marco589:
Yes, That's what I did when I updated it to 77.

It doesn't matter on which firmware you are running magisk, it will just patch it.

I think so, maybe he can try via recovery.

if I were him, I would try all the commands via adb in order to lock the BL.
[Asus ROG Phone Guides, News, & Discussion] DaisukeVN:
Hey NBK1980.

Was ist los? Vielleicht kann ich dir helfen? Habe mein ROG Phone auch mal ausversehen Softbricked. Aber läuft inzwischen wieder mit Root.

Grüße aus East-Germany
[Asus ROG Phone Guides, News, & Discussion] Mcfeels_Guy:
I would like to confirm my manual update. I was on WW48 rooted. I downloaded the WW77 firmware, and adb sideloaded the WW77 firmware to update. then extracted boot.img from payload.bin, then ran the boot.img through magisk 17.3 beta channel to get patched_boot.img, then fastboot flashed patched_boot.img, then rebooted. Confirmed that firmware was updated and phone was rooted. I dont mind this manual update at all while having root. took me literally 5 minutes. I have no problem checking this thread or asus website periodically for firmware updates, not a big deal really. hopefully a custom rom will drop on this phone soon, as i think it would be a major improvement to the ROG. Asus is known for their awesome hardware, they need to work on their software , as its always buggy as heck. If we get resurrection remix this phone will be top tits.

Anyways- as far as the WW77 shacalaca twrp... its a no go. I fastboot flashed the twrp img. says partition not found. also tried to sideload it, and it failed. If anyone has correct info on how to install it, i would appreciate it.

Also, I have to use payload_dumperWIN64 to extract the boot.img from payload.bin, i cant for the life of me use the python, its just not working. read the info for the python in the OP and its a no go for me. I can confirm that payload-dumperWIN64 works and is safe, but there are conflicting opinions about the program. so i wouldn't mind if someone can post detailed info on extracting the payload with python.

---------- Post added at 12:37 AM ---------- Previous post was at 12:23 AM ----------

I can confirm you dont have to fastboot flash boot boot.img. All I did was downloaded the WW77 firmware off the asus website, then renamed it firmware77.zip (so you dont have to type the whole thing out) then boot into recovery and adb sideload the firmware update, reboot and go to settings then about phone to confirm the firmware. Then extract the boot.img from payload.bin, patch it with magisk, then fastboot flash boot patched_boot.img

feel free to make a sub OP to the OP for manual updates while rooted and keeping root. All is well on this my friends.
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
When installing Python, did you make sure that it was added to PATH?

You were able to boot into recovery of a patched boot.img? If so, that would save one step when updating.
[Asus ROG Phone Guides, News, & Discussion] Mcfeels_Guy:
Yes indeed I was. I was on rooted WW48 and booted right into recovery to adb sideload the Asus WW77 firmware, than fastboot flashed the patched boot img. Everything went smoothly with no issues. The whole thing took 5 minutes. Afterwards I reconfirmed the firmware update and root was successful. I just wasn't able to flash shacalaca's WW77 twrp. Says partition not found.
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
Strange. You using Win10 and PS?
[Asus ROG Phone Guides, News, & Discussion] Mcfeels_Guy:
Yep Win10, what's the PS tho?
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
PowerShell. The command (.py\Scripts\activate.ps1) is for PowerShell and I don't think it works using CMD (Command Prompt).

PowerShell has a blue background and Command Prompt has a black background.

Edit: If you do use CMD, you use this command instead:

.py\Scripts\activate.bat
[Asus ROG Phone Guides, News, & Discussion] Mcfeels_Guy:
LOL, my bad yeah I was using power shell on Win10 I didn't use command prompt. I opened power shell as administrator just like in the directions. I installed it correctly just like the directions. Like I said tho, I think the command I typed is what's wrong. My backslash is not typing as a backslash, and for whatever reason I can't hold shift or alt and change it to backslash. Looked all through my settings too. Python and power shell work fine, it's just I can't type the command.
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
Is that a problem in all apps or just PowerShell? If just PowerShell, you can try using CMD and use this command instead:

.py\Scripts\activate.bat

Edit: Another option is to try copy/paste. Copy and then ctrl+v

The payload_dumperWIN64 app is probably okay, but I just don't feel comfortable putting it in the guide.
[Asus ROG Phone Guides, News, & Discussion] Mcfeels_Guy:
I'll try tomorrow and extract a payload.bin with CMD. I'll see if CMD let's me type a backslash. I have a backslash on my keyboard, it just comes out as ¥ in power shell. I'll let you know if it's different in CMD or any other typing. And I know what you mean about putting payload_dumperWin64 on here. I didn't have any trouble with it, and it extracts the payload in like 5 seconds. I know people were uneasy about it tho.
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
Also, copy/paste might work. I edited post while you were typing.
[Asus ROG Phone Guides, News, & Discussion] Mcfeels_Guy:
Thanks, I'll give that a try tomorrow too in powershell. I'll report back with it.

Also was trying to find out how to flash shacalaca WW77 twrp. I know at this point it probably doesn't matter, but I'd like to try. I'm able to boot into stock recovery while rooted anyways. So I'm wondering if it's even worth it. I just noticed tho that shacalaca made a twrp for each firmware, just curious if anyone has gotten them to work.
[Asus ROG Phone Guides, News, & Discussion] Tesla74:
They do work, but I don't think it is worth it because I believe it is only good for flashing from usb drive. I don't think that the other features work. Also, it has to be updated every time you update the firmware.

If you would like to try:

adb devices

adb reboot bootloader

fastboot devices

fastboot flash boot twrp.img

fastboot reboot

Then flash Magisk for root. The instructions are quoted in the second post of this thread.
[Asus ROG Phone Guides, News, & Discussion] Marco589:
just patched the boot.img with magisk 18, it works great :)

EDIT

It didn't work properly, actually magisk manager saying that database SU was corrupt. (or something like that). no root at all.

So, as I already had issue when I updated magisk from 16 to 17 on the oneplus, I flashed the stock boot, reboot, than I flashed the patchedboot (18) and reboot again.

in any cases the phone booted.

when I opened magisk manager it stuck, but after a while an advice came up saying to update magisk manager, so I did. (I removed the magisk manager 6.0.2 of shakalaca and Installed 6.1.0)

now It works great :D

Sorry for my bad english.