Jump to content

Magisk Install - Step by Step [ROOT]


Recommended Posts

55 minutes ago, rtuz2th said:

Okay. After uninstalling Magisk (no, i did not reboot) my phone froze, shut down and now gives me the little android robot saying 'no command'. Yiha, this will be one night of trying to revive my pro1.

You can try holding in the power for an extended time to see if it will get you out of some odd state.

Link to post
Share on other sites
  • Replies 217
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

The typical installation method as described on XDA won't work yet on Pro1, because we don't have a fully working version of TWRP yet.  But never fear, it's still easy, five simple steps and you

For those getting their devices and wanting to root now, the recommended procedure has changed!     This method should allow you to take future OTA updates keeping root using the A/B method link

If someone need - i upload to google drive stock versions of  boot.img, backuped by Magisk from all versions i had:  - 20191028 - 20191111 - 20191129 - 20191210 - 20200106

Posted Images

19 minutes ago, rtuz2th said:

I did, thank you. I already reflashed stock via fastboot, rooting again, reinstalling titanium backup hoping for the best

Stock back to 2019 factory images?  Did you go through all the OTA's again?

Good that you got it working.

Link to post
Share on other sites
25 minutes ago, david said:

Stock back to 2019 factory images?  Did you go through all the OTA's again?

Good that you got it working.

Exactly. I think I have to go through all the OTAs, but I will root it first.

EDIT: Rooting first seems like a bad Idea, worst case is running through all the hiccups I just had. So installing all the OTA's first, rooting afterwards seems to be smarter. Does anyone have the 20200306 image?

Edited by rtuz2th
  • Like 1
Link to post
Share on other sites
1 hour ago, rtuz2th said:

Exactly. I think I have to go through all the OTAs, but I will root it first.

EDIT: Rooting first seems like a bad Idea, worst case is running through all the hiccups I just had. So installing all the OTA's first, rooting afterwards seems to be smarter. Does anyone have the 20200306 image?

Yeah, you would be stuck, unless someone has that image.  A bunch of us updated with the 20200304 update, so we can't easily get the 20200306 image.  You will know right away if the process of temporarily disabling root and getting the Ota and re-enabling root works, on the first Ota.  Then it should be a matter of doing that for each one.  

Link to post
Share on other sites
1 minute ago, david said:

Yeah, you would be stuck, unless someone has that image.  A bunch of us updated with the 20200304 update, so we can't easily get the 20200306 image.  You will know right away if the process of temporarily disabling root and getting the Ota and re-enabling root works, on the first Ota.  Then it should be a matter of doing that for each one.  

I've updated to 20200106 without magisk, patched the image the same way I did last time, Magisk Manager is fine with everything, but when I try to flash the patched image I get this:

C:\Minimal ADB and Fastboot>fastboot flash boot magisk_patched.img
target reported max download size of 536870912 bytes
sending 'boota' (22080 KB)...
OKAY [  0.071s]
writing 'boota'...
FAILED (remote: (boota_a) No such partition)
finished. total time: 0.076s

When I do fastboot devices my pro1 shows up and everything seems fine. What am I doing wrong?
 

  • Like 1
Link to post
Share on other sites
6 hours ago, david said:

Thank you. When uninstalling Magisk Manager, "Restore Images" I get "Stock backup does not exist". What can I do in this case?

  • Like 1
Link to post
Share on other sites
36 minutes ago, rtuz2th said:

I've updated to 20200106 without magisk, patched the image the same way I did last time, Magisk Manager is fine with everything, but when I try to flash the patched image I get this:


C:\Minimal ADB and Fastboot>fastboot flash boot magisk_patched.img
target reported max download size of 536870912 bytes
sending 'boota' (22080 KB)...
OKAY [  0.071s]
writing 'boota'...
FAILED (remote: (boota_a) No such partition)
finished. total time: 0.076s

When I do fastboot devices my pro1 shows up and everything seems fine. What am I doing wrong?
 

Okay. Resolved the issue by removing the SD-Card from phone, using a different USB-Cable and using the linked platform tools instead of Minimal ADB. Yay, one step further!

  • Like 1
Link to post
Share on other sites
7 hours ago, rtuz2th said:

Okay. Resolved the issue by removing the SD-Card from phone, using a different USB-Cable and using the linked platform tools instead of Minimal ADB. Yay, one step further!

Glad to hear it.  Yeah, some people have reported that if you install Magisk Manager on a phone with the SD card set to be shared with internal storage, it will put the app on the SD card and it won't work.  Others have reported some issues with using USB 3 cables/ports vs USB 2 cables/ports (with one type working for some and another type working for others).  And others have found issues depending on the fastboot version used.  Seems like you hit all 3 of those (or just reduced your risks by changing all 3 out at the same time).

So did you get it all working in the past 7 hours? :-)

Link to post
Share on other sites
9 hours ago, dreamflasher said:

Thank you. When uninstalling Magisk Manager, "Restore Images" I get "Stock backup does not exist". What can I do in this case?

That means it didn't create the patched boot image originally, or you possibly uninstalled it temporarily (without having an new OTA to point it at), and that got it confused.   And if you have an SD card and have it set to be used as combined storage with the internal storage, Magisk doesn't work properly (have to move magisk manager back to the internal storage).  I thought it wouldn't work at all, but maybe it could work, but be confused and fail with this procedure.

My guess is that you have 2 main options and 1 more time consuming option:

1)  You can get the boot image file for your current firmware version from someone on here.  We'd need to know what version you have.  You could then go through the proper initial steps to patch it, thus giving Magisk Manager the backup copy that it needs.

2)  You can follow the procedure linked to in the sub-note of this post:

3)  Your third option is to go all the way back to the factory image from last year, flash that, install Magisk the needed way, and then use the Magisk process for each OTA and apply each one to get you current.  Alternatively, flash the factory image, do OTAs up until 20200106, then use the boot image provided by another user on here (I can get the link if you choose to go down this path), go through the proper process to install Magisk, then OTA to the 20200306 firmware, using the proper steps to disable Magisk and re-enable it, before and after the OTA, without rebooting.

Edited by david
  • Thanks 1
Link to post
Share on other sites

One thing to add...

For those who are going back to older images, I *believe*, in theory, you could run into problems with not clearing the /data partition.  If some system apps have changed their data structures between the various versions, then going back could lead to an incompatibility.  I don't know if we can say that jumping forward through all the OTAs to where you were before you flashed the factory images will get you back in sync, because it might be possible for those system apps to get into a weird state when provided with incompatible data structures in the /data partition from future versions of themselves, somewhere along the journey back into the future firmware versions.

I believe people have reported some odd system behaviors that other people have *possibly* gotten around by doing factory resets.  Factory resets clear out /data, so any system (and user) apps will recreate their data structures and values cleanly with the fresh set-up of the phone again.  

I think it is even theoretically possible that from one OTA to another, a system app could change its data structures in such a way that the new one isn't backwards compatible with the old data.  If so, a factory reset after an OTA could be done to get things in sync again.

Of course, clearing cache and data for the apps could fix this type of issue too, but you'd have to know or guess which system apps to do that to.

Someone like @tdm can tell me if I'm talking crazy here.

I'm just mentioning it so that people can be aware of the risk of not clearing /data when flashing the factory image.  The risk might be small or non-existent.

Backing up your non-system app data with a backup app and restoring it after clearing /data and getting back to where you were before being forced to go back to the factory images would be one way to get around the issue.  That doesn't help for system app data.  Restoring system apps or system app data can lead to problems too.  So you'll still lose your system settings if you clear /data.

*However*, google does backup a lot of that stuff for you if you have google backup enabled on the phone.  If it doesn't prompt you to restore from your cloud backup (I had that happen at least once with the Pro1), you can trigger that process as follows:

1)  Install Activity Launcher:  https://play.google.com/store/apps/details?id=de.szalkowski.activitylauncher&hl=en_US

2)  Scroll down to find the "Android Setup" app (the one with the clock icon, not the gear icon).

3)  Tap on that app to give you the list of activities and tap the one ending in "CloudRestoreFlowActivity".  (instead of 2 and 3, you can use the search feature to search for that string too).  This should start that activity and present you with the dialog where you can restore from your previous cloud backup(s).

Not only will this give you back any system settings that google backs up (it doesn't do all of them, unfortunately), but it will also allow tell android to re-install any apps for which it has data backups, and then restore the data for those apps too.  A lot of apps don't backup their data through the google backup mechanism.  For those, you'd need to rely on a 3rd party backup app.

Having said all that, I'm in a weird state in my phone, where the google store activity isn't working right now.  It wouldn't even launch the activity until I cleared data from the Android Setup app (again the one with the clock icon) and then it would launch, but said there is no backups found, even though it shows in my google account online.  I'll mess around with that and update this post if I get it working.  The OTA that I used that has a certification issue with google might be causing this or it could be any number of other root causes.

UPDATE:  I removed my google account from my phone and re-added it.  I have another google account on the phone too, and that became the account that he restore activity latched onto.  I had to remove that account add re-add it too, in order to get the restore activity pointed back at my main account.  When I re-added my google account, it asked if I wanted to restore a bunch of apps.  I skipped that.  

When I launched the restore activity again, it found a bunch of old backups from February, but not the one from yesterday.  I decided to tell it to do a new backup.  I'll report back, probably tomorrow, after that backup is done, to report if the restore activity will find that backup.

UPDATE 2:  Even though it just got done doing a backup and that backup is in my account online, the google restore can't find that backup.  It can only find older backups.  For some reason it doesn't think that backup is compatible with my device.  I'm going to assume this is due to the issue with the latest OTA.  I'll try again after we get the fix for that.

Edited by david
Link to post
Share on other sites
9 hours ago, david said:

That means it didn't create the patched boot image originally, or you possibly uninstalled it temporarily (without having an new OTA to point it at), and that got it confused.   And if you have an SD card and have it set to be used as combined storage with the internal storage, Magisk doesn't work properly (have to move magisk manager back to the internal storage).  I thought it wouldn't work at all, but maybe it could work, but be confused and fail with this procedure.

My guess is that you have 2 main options and 1 more time consuming option:

1)  You can get the boot image file for your current firmware version from someone on here.  We'd need to know what version you have.  You could then go through the proper initial steps to patch it, thus giving Magisk Manager the backup copy that it needs.

2)  You can follow the procedure linked to in the sub-note of this post:

3)  Your third option is to go all the way back to the factory image from last year, flash that, install Magisk the needed way, and then use the Magisk process for each OTA and apply each one to get you current.  Alternatively, flash the factory image, do OTAs up until 20200106, then use the boot image provided by another user on here (I can get the link if you choose to go down this path), go through the proper process to install Magisk, then OTA to the 20200306 firmware, using the proper steps to disable Magisk and re-enable it, before and after the OTA, without rebooting.

Thank you so much for your kind help @david

I followed the steps exactly from @Craig from the inital post here. The post doesn't mention something with a backup image. Does Magisk do this automatically or is there a dialogue box that one needs to answer correctly? I didn't uninstall Magisk temporarily, nor do I have an SD card. Maybe there are other cases in which Magisk forgets/cant find their backup anymore? What would be the location/name of the backup?

Where can I find the firmware version? In "about phone" there is only Build number, it's QX1000_EEA_20200106110245.

  • Like 1
Link to post
Share on other sites
8 minutes ago, dreamflasher said:

Thank you so much for your kind help @david

I followed the steps exactly from @Craig from the inital post here. The post doesn't mention something with a backup image. Does Magisk do this automatically or is there a dialogue box that one needs to answer correctly? I didn't uninstall Magisk temporarily, nor do I have an SD card. Maybe there are other cases in which Magisk forgets/cant find their backup anymore? What would be the location/name of the backup?

The location of the backup can be found in the link provided in the subnote of my post here:

https://community.fxtec.com/topic/2537-magisk-install-step-by-step-root/?do=findComment&comment=46413

When you tell Magisk Manager to patch a boot image, it makes a backup copy of it for later use.

8 minutes ago, dreamflasher said:

Where can I find the firmware version? In "about phone" there is only Build number, it's QX1000_EEA_20200106110245.

The date at the end of that is what we are referring to as the version.  You can find the boot image for 20200106 online in the link provided by @Ilrilan here:

https://community.fxtec.com/topic/2537-magisk-install-step-by-step-root/?do=findComment&comment=39635

 

  • Thanks 1
Link to post
Share on other sites
12 hours ago, david said:

Glad to hear it.  Yeah, some people have reported that if you install Magisk Manager on a phone with the SD card set to be shared with internal storage, it will put the app on the SD card and it won't work.  Others have reported some issues with using USB 3 cables/ports vs USB 2 cables/ports (with one type working for some and another type working for others).  And others have found issues depending on the fastboot version used.  Seems like you hit all 3 of those (or just reduced your risks by changing all 3 out at the same time).

So did you get it all working in the past 7 hours? 🙂

Yeah, I did, thank you very much. Got it running, cursing titanium backup (for real, how can anyone use this??) reinstalling most of my apps by hand, but it works. For any reason my Pro1 wanted me to do the 06032020 OTA again after rebooting, I will look into this later.

  • Like 1
Link to post
Share on other sites
1 hour ago, rtuz2th said:

Yeah, I did, thank you very much. Got it running, cursing titanium backup (for real, how can anyone use this??) reinstalling most of my apps by hand,

The best way I found is to do a batch restore (of only regular apps, not system apps) and then after it fails on one, start it again, but filter out the ones it has already restored (there is an option to filter out those that are already installed), in addition to the most recent app it failed on.  For the apps it fails on, I add those to a 
"label" and then check "inverse" to exclude those in that label.  That greatly reduces the amount of time each pass takes.

But yes, if they would have simply given an option to skip the app it is currently restoring, and give you a list of those at the end, that would have made it so much better.

1 hour ago, rtuz2th said:

but it works. For any reason my Pro1 wanted me to do the 06032020 OTA again after rebooting, I will look into this later.

Does it show that the current version is 220200306?  Maybe there are two OTAs that are very similar, or maybe it is confused.

Congratulations on getting it working.

Link to post
Share on other sites
11 minutes ago, david said:

The best way I found is to do a batch restore (of only regular apps, not system apps) and then after it fails on one, start it again, but filter out the ones it has already restored (there is an option to filter out those that are already installed), in addition to the most recent app it failed on.  For the apps it fails on, I add those to a 
"label" and then check "inverse" to exclude those in that label.  That greatly reduces the amount of time each pass takes.

This is the way I ended up doing it, but with like 20 Apps that Titanium could not do. Everytime Titanium got stuck I had to end it via app settings, start a new batch process excluding the app it just failed. You can't tell me this is the most convenient Android Backup Routine 😅

11 minutes ago, david said:

Does it show that the current version is 220200306?  Maybe there are two OTAs that are very similar, or maybe it is confused.

Congratulations on getting it working.

I just did the update again. It failed with reason 20 (I'm sure I've read about this anywhere in this forum yesterday), but then said I'm on the newest patch and it seems I was. I rebooted again (of course after activating magisk again) and it wants me to install the patch again.

EDIT: Just confirmed. After rebooting build number goes down to 20200106 indeed. I'm out of ideas, can anyone help with this? 😅

Edited by rtuz2th
  • Thanks 1
Link to post
Share on other sites
36 minutes ago, rtuz2th said:

This is the way I ended up doing it, but with like 20 Apps that Titanium could not do. Everytime Titanium got stuck I had to end it via app settings, start a new batch process excluding the app it just failed. You can't tell me this is the most convenient Android Backup Routine 😅

I understand completely.  I had the same experience.  Very frustrating.  I don't think there is a truly *good* app anywhere to be found.

36 minutes ago, rtuz2th said:

I just did the update again. It failed with reason 20 (I'm sure I've read about this anywhere in this forum yesterday), but then said I'm on the newest patch and it seems I was. I rebooted again (of course after activating magisk again) and it wants me to install the patch again.

EDIT: Just confirmed. After rebooting build number goes down to 20200106 indeed. I'm out of ideas, can anyone help with this? 😅

Did you change anything in /system?

Link to post
Share on other sites
2 minutes ago, david said:

I understand completely.  I had the same experience.  Very frustrating.  I don't think there is a truly *good* app anywhere to be found.

  I'll give oandbackup a go, I'll report back.

2 minutes ago, david said:

Did you change anything in /system?

Hm. I'm using adaway, that does change the host file in /system, doesn't it?

  • Like 1
Link to post
Share on other sites

@rtuz2th, you could try capturing the download URL (https://www.thecustomdroid.com/how-to-capture-ota-update-url-android/) and then download the OTA with a web browser and install it from the SD card.  I have no idea if that will get around the "reason 20" error, but it is something to try.  I'm guessing you'd want to follow the same steps with regard to Magisk Manager before and after, and not reboot until Magisk is re-enabled.

  • Like 1
Link to post
Share on other sites
1 minute ago, rtuz2th said:

Hm. I'm using adaway, that does change the host file in /system, doesn't it?

Yes, I believe so.  

Here are some options to use adaway in a systemless way, or using an equivalent ad blocking module in Magisk:

https://forum.xda-developers.com/mi-a1/help/systemless-adaway-magisk-t3733839

Link to post
Share on other sites
2 minutes ago, david said:

@rtuz2th, you could try capturing the download URL (https://www.thecustomdroid.com/how-to-capture-ota-update-url-android/) and then download the OTA with a web browser and install it from the SD card.  I have no idea if that will get around the "reason 20" error, but it is something to try.  I'm guessing you'd want to follow the same steps with regard to Magisk Manager before and after, and not reboot until Magisk is re-enabled.

Okay. I'll keep you updated if there is any progress. Thanks for your time and effort helping me with this!!

  • Thanks 1
Link to post
Share on other sites
1 minute ago, rtuz2th said:

Could this be the root of the problem? I'll uninstall adaway restoring the original hosts file and see how it goes on from there.

That's my guess (unless you have something else installed that also modifies /system).  Android won't allow an OTA if /system has been changed, because it is an incremental update and it can't be sure of the result unless the /system that the incremental update was created from is identical to the one it is applying the update to.

Edited by david
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Terms