How to root M51 with magisk? - Samsung Galaxy M51 Questions & Answers

Hello,
can somebody tell me what i did wrong or where to find a guide on how to root the m51 with magisk?
What i tried was
- install magisk manager
- copy m51's AP file onto phone and install magisk into it using the manager
- flash the patched AP with odin
But after the restart the phone was in a bootloop sometimes displaying a menu saying that the system image could not be loaded with options to try again or to factory reset...

Also tried with just the boot.img from the boot.img.lz4 in the AP, extracted it using 7zip and a lz4.exe i found on github, patched that but then when doing "adb reboot-bootloader && fastboot flash boot patched_boot.img" I get a:
Sending 'boot' (16888 KB) FAILED (remote: 'unknown command')
fastboot: error: Command failed
Bootloader is unlocked, also tried with absolute path to patched file... really dont get it

Related

Install TWRP and then to root.

Hello please can anyone advise me and forgive any wrong terms..
I am trying to push twrp to my lg g4 H815 20g using adb and fastboot but everytime it comes back with
error: cannot load 'twrp.img': No such file or directory
PS C:\Users\Anthony\Desktop\ADB>
i have tried renaming twrp file to various things and changing the command fastboot flash twrp.img or fastboot flash recovery.img
but i keep getting errors of one discription or the other..
I have followed guild after guild but still not made the magic happen..
Bootloader is officially unlocked via LG and twrp for lg g4 downloaded from twrp site.
Been trying for two days to install a recovery so i can also root but having no luck.
please any help or advise would be appreciated..
you must put the "twrp.img" into to your "ADB" folder and then exec this:
Code:
fastboot flash recovery twrp.img
Hi thanks for your help
yes I have the img file in adb/fastboot folder and been doing this and still comes back in cmd as no such file etc..
Tried renaming twrp img file and changing fastboot flash line to match but still no joy..
Tried earlier g4 twrps same outcome it’s as if downloaded recovery’s are corrupt or something as they don’t appear to be being seen..
What is best name for the twrp image or do you leave it as it came downloaded and run the
fastboot flash recovery twrp.img Regardless of what twrp called when downloaded..
Thanks
Have you changed directory to the sdk folder? Or shift + right clicked in folder "open cmd here"?
The command is "fastboot flash *whatever recovery is called in adb folder*"
I ended up changing the name to "twrp3.1.1" or whatever cause it had a hell of a name when downloaded. Just name whatever you want as long as you call it same thing when flashing.
Make sure you also have a copy of it on your SD too because it wont stick and when you reboot to the recovery you then need to reflash the image from in there.
Hi I think it was successful i changed name of twrp on second attempt and it seemed to work..
only problem was when i tried to manually boot into recovery via volume down and power i did something wrong and accidentally reset the dam thing instead of booting into twrp......will have to do it all over again but hopefully i have it sorted..
PS C:\ADB> adb reboot-bootloader
* daemon not running. starting it now at tcp:5037 *
* daemon started successfully *
PS C:\ADB> fastboot flash recovery twrp.img
error: cannot load 'twrp.img': No such file or directory
PS C:\ADB> fastboot flash recovery twrp-3.1.1-1-g4.img
target reported max download size of 536870912 bytes
sending 'recovery' (33952 KB)...
OKAY [ 0.781s]
writing 'recovery'...
OKAY [ 0.422s]
finished. total time: 1.219s
PS C:\ADB> fastboot reboot
rebooting...
finished. total time: 0.031s
PS C:\ADB>
Hello! I reopen this tread.. I have an issue with flashing twrp, via adb I start into bootloader, but when i put the command to flash it.. <waiting for device>. Why?

Rooting Motorola One Action w/ Android 10

I have Motorola One Action w/ Android 10 running. I need to root this phone to recover the data. However, when following the instruction, I received the following error message.
C:\adb>fastboot boot TWRP-3.3.1_Motorola_One_Vision.img
downloading 'boot.img'...
OKAY [ 1.118s]
booting...
FAILED (remote failure)
finished. total time: 1.305s
Can anyone help me what to do?
Thank you very much for your help.
[email protected] said:
I have Motorola One Action w/ Android 10 running. I need to root this phone to recover the data. However, when following the instruction, I received the following error message.
C:\adb>fastboot boot TWRP-3.3.1_Motorola_One_Vision.img
downloading 'boot.img'...
OKAY [ 1.118s]
booting...
FAILED (remote failure)
finished. total time: 1.305s
Can anyone help me what to do?
Thank you very much for your help.
Click to expand...
Click to collapse
Hi!!
I have a model XT2013-1. I was having the same problem as you, so I updated TROIKA-RETBR on 02/22/2020.
After updating, I did the procedure of this link "https://forum.xda-developers.com/one-action/how-to/twrp-magisk-root-motorola-one-action-t3975883", skipping the step "8.2- Now tap on Wipe> Format Data> Type Yes and go back to the home screen again. " This step gave me the looping error.
Now root works perfect !!
Thank you very much. I will try it.
BL1ND4D0 said:
Hi!!
I have a model XT2013-1. I was having the same problem as you, so I updated TROIKA-RETBR on 02/22/2020.
After updating, I did the procedure of this link "https://forum.xda-developers.com/one-action/how-to/twrp-magisk-root-motorola-one-action-t3975883", skipping the step "8.2- Now tap on Wipe> Format Data> Type Yes and go back to the home screen again. " This step gave me the looping error.
Now root works perfect !!
Click to expand...
Click to collapse
I am still getting the following error message. I have no idea why. Would you please help me what to do? Thank you very much.
fastboot flash recovery twrp.img
(bootloader) is-logical:recovery: not found
Sending 'recovery' (37524 KB) OKAY [ 1.209s]
Writing 'recovery' (bootloader) Invalid partition name recovery
FAILED (remote: '')
fastboot: error: Command failed
[email protected] said:
I am still getting the following error message. I have no idea why. Would you please help me what to do? Thank you very much.
fastboot flash recovery twrp.img
(bootloader) is-logical:recovery: not found
Sending 'recovery' (37524 KB) OKAY [ 1.209s]
Writing 'recovery' (bootloader) Invalid partition name recovery
FAILED (remote: '')
fastboot: error: Command failed
Click to expand...
Click to collapse
It's A/B device so it doesn't have dedicated recovery partition. It's inside boot.img.
Use fastboot boot twrp.img
Once booted to twrp, you can use the twrp installer zip to flash twrp recovery ramdisk to your boot.img for permanent installation.
tys0n said:
It's A/B device so it doesn't have dedicated recovery partition. It's inside boot.img.
Use fastboot boot twrp.img
Once booted to twrp, you can use the twrp installer zip to flash twrp recovery ramdisk to your boot.img for permanent installation.
Click to expand...
Click to collapse
Thank you very much for your help. I tried but I was still getting the following error message.
fastboot boot twrp.img
Sending 'boot.img' (37524 KB) OKAY [ 0.990s]
Booting FAILED (remote: '')
fastboot: error: Command failed
Would you tell me what to do?
[email protected] said:
Thank you very much for your help. I tried but I was still getting the following error message.
fastboot boot twrp.img
Sending 'boot.img' (37524 KB) OKAY [ 0.990s]
Booting FAILED (remote: '')
fastboot: error: Command failed
Would you tell me what to do?
Click to expand...
Click to collapse
Did you follow all instructions from twrp thread. like flashing modified vbmeta and wipe data before booting twrp?
Also take a look at the original thread for one vision as it has a newer zip that contains only one modified vbmeta.img instead of two different ones in the older zip that is posted in one action's twrp thread.
I rooted using fastboot, I could never get into TWRP to flash anything.
In fastboot, I flashed the modified vbmeta.img, then flashed the magisk patched boot img file (I created this with magisk), then flashed the patched vbmeta.img file, then did a fastboot wipe.
Rebooted, set up the phone, installed magisk manager and opened, it needed to update some files. Rebooted, and the device was rooted.
goofball2k said:
I rooted using fastboot, I could never get into TWRP to flash anything.
In fastboot, I flashed the modified vbmeta.img, then flashed the magisk patched boot img file (I created this with magisk), then flashed the patched vbmeta.img file, then did a fastboot wipe.
Rebooted, set up the phone, installed magisk manager and opened, it needed to update some files. Rebooted, and the device was rooted.
Click to expand...
Click to collapse
Thank you very much for your input. You must be an expert! WOW! Sorry I am not that expert........ Would you mind explaining (1) how to modify vbmeta.img and (2) how to patch boot.img? It is very impressive to read what you have done, but sorry I am still a beginner. Also, when I flash, "fastboot flash (File Name)" ok?
Thank yuo very much for your help.
[email protected] said:
Thank you very much for your input. You must be an expert! WOW! Sorry I am not that expert........ Would you mind explaining (1) how to modify vbmeta.img and (2) how to patch boot.img? It is very impressive to read what you have done, but sorry I am still a beginner. Also, when I flash, "fastboot flash (File Name)" ok?
Thank yuo very much for your help.
Click to expand...
Click to collapse
You don't need to modify vbmeta.img. I am using the older version of the root Moto Vision package, which has a vbmeta.img file, and a patched vbmeta.img file.
For the modified boot img, I downloaded the full image from https://mirrors.lolinet.com/firmware/moto/troika/official/
Extract, and then take the boot.img file, you will want that saved to a phone that has Magisk installed.
Follow these instructions to patch
https://www.ytechb.com/how-to-patch-a-file-in-magisk-manager/
Once you have that, you will want that patched file into the fastboot directory on your computer. You will also want the vbmeta and the patched vbmeta img files (from the root moto vision package) in this directory. I have not used the updated version, I am using the older. I don't know about using the newer package which only has 1 vbmeta file.
Put your phone into fastboot mode.
Flash the vbmeta.img file, then the magisk patched boot file, then the vbmeta patched file. Then do a fastboot wipe of the phone.
Reboot the phone.
Set it up again, install magisk manager, then open it, and it should ask to configure. Let it do that, it should reboot and after that, you should be rooted.
[email protected] said:
I have Motorola One Action w/ Android 10 running. I need to root this phone to recover the data. However, when following the instruction, I received the following error message.
C:\adb>fastboot boot TWRP-3.3.1_Motorola_One_Vision.img
downloading 'boot.img'...
OKAY [ 1.118s]
booting...
FAILED (remote failure)
finished. total time: 1.305s
Can anyone help me what to do?
Thank you very much for your help.
Click to expand...
Click to collapse
I guess goofball2k detailed reply might have helped by now. On the other hand, I'm just curious to know that the next time you or anyone else for that matter face the same issue, please flash the stock firmware (using any of the Android 10 tools from here ) at that instance, then again start the same process and let me know whether you succeed or not (you will still have to execute the fastboot boot twrp command around 4-8 times, but during all these attempts, you should now get the success message, and after x number of attempts, you should succeed). So in short, if flashing the stock firmware after that error helps you out, do let me know
Thank you
binary**# said:
I guess goofball2k detailed reply might have helped by now. On the other hand, I'm just curious to know that the next time you or anyone else for that matter face the same issue, please flash the stock firmware (using any of the Android 10 tools from here ) at that instance, then again start the same process and let me know whether you succeed or not (you will still have to execute the fastboot boot twrp command around 4-8 times, but during all these attempts, you should now get the success message, and after x number of attempts, you should succeed). So in short, if flashing the stock firmware after that error helps you out, do let me know
Click to expand...
Click to collapse
Thank you very much for your input.
How are you!!
It doesn't leave me at all ... everything I want to flash throws the same error:
C:\platform-tools>fastboot boot vbmeta.img
creating boot image...
creating boot image - 6144 bytes
downloading 'boot.img'...
OKAY [ 0.013s]
booting...
FAILED (remote failure)
finished. total time: 0.184s
What can be?
Polnareff said:
How are you!!
It doesn't leave me at all ... everything I want to flash throws the same error:
C:\platform-tools>fastboot boot vbmeta.img
creating boot image...
creating boot image - 6144 bytes
downloading 'boot.img'...
OKAY [ 0.013s]
booting...
FAILED (remote failure)
finished. total time: 0.184s
What can be?
Click to expand...
Click to collapse
You aren't flashing, your command is trying to boot from vbmeta.img. You are missing the flashing command.

"cannot load recovery.img.IMG" LineageOS, Pixel 4

Hello all,
I am having trouble flashing lineageos on my pixel 4 device.
The bootloader is unlocked.
When I try to flash the recovery I get the error "cannot load recovery.img.IMG"
I tried a few things to solve this:
-I added the recovery file in windows to the folder "platform tools"
-I added ".IMG" to the recovery file itself
-I updated fastboot & adb
-I updated my system (windows 10)
-I tried different commands: flashboot flash recovery, fastboot flash boot and fastboot boot recovery + drag&drop the recovery file to cmd
Reaching out to you for a little help, please.
Thx & regards
caraman said:
Hello all,
I am having trouble flashing lineageos on my pixel 4 device.
The bootloader is unlocked.
When I try to flash the recovery I get the error "cannot load recovery.img.IMG"
I tried a few things to solve this:
-I added the recovery file in windows to the folder "platform tools"
-I added ".IMG" to the recovery file itself
-I updated fastboot & adb
-I updated my system (windows 10)
-I tried different commands: flashboot flash recovery, fastboot flash boot and fastboot boot recovery + drag&drop the recovery file to cmd
Reaching out to you for a little help, please.
Thx & regards
Click to expand...
Click to collapse
Ok, I managed the problem, I guess.
I startet power shell from the "platform tools" folder.
Now there is a other issue:
PS C:\Program Files\platform-tools> fastboot flash boot recovery.img
target reported max download size of 268435456 bytes
sending 'boot' (65536 KB)...
OKAY [ 1.535s]
writing 'boot'...
FAILED (remote: Failed to write to partition Not Found)
finished. total time: 1.836s
PS C:\Program Files\platform-tools>
The problem seems to be the partition, but I have no idea where to start troubleshooting...
Still reaching out to you for a little help, please...
Thx, regards

Problem with installing TWRP on OOS 10.0.1

Hello guys,
Please help me because I'm stuck. I'm trying to install latest TWRP on my OP5 with no success. Let me tell you what I tried.
- I'm running on OOS 10.0.1
- sucessfully installed ADB and drivers on Windows 10.
- sucessfully unlocked bootloader
Then I downloaded latest TWRP, renamed it to twrp.img and placed it in a folder where ADB and fastboot are. Device is seen in both ADB and fastboot.
When in fastboot I tried first the command:
C:\>fastboot boot twrp.img
fastboot: error: cannot load 'twrp.img': No such file or directory
then I googled and tried with file directory:
C:\>fastboot flash recovery c:\adb\twrp.img
Sending 'recovery' (35228 KB) OKAY [ 1.025s]
Writing 'recovery' OKAY [ 0.164s]
Finished. Total time: 1.220s
The second command with direct source I tried both using USB 3.0 and via USB hub and it doesn't work. When I reboot to recovery it enters to the stock OP recovery and no sign of TWRP.
Can you please help me?
Thanks in advance!
Maciej
Hi, i could be misreading your steps but have you tried renaming the twrp image to twrp and then try fast booting with twrp.img again. It may be that by including the .img in the file name it is looking for twrp.img.img.
I'm no ADB expert but that may be all that's needed as it reads like everything else is working as should from my limited experience.

TWRP fails to boot

Trying to install TWRP using the official guide on the TWRP site.
fastboot boot twrp.img results:
fastboot boot twrp.img
Sending 'boot.img' (43886 KB) OKAY [ 1.304s]
Booting FAILED (remote: '')
fastboot: error: Command failed
fastboot devices does output my phone's serial number.
Installed Motorola driver, still not working.
You need to flash another .img file, you can find the tutorial here: TWRP for TROIKA
Kikitovzm said:
You need to flash another .img file, you can find the tutorial here: TWRP for TROIKA
Click to expand...
Click to collapse
Thanks, this one worked!

Categories

Resources