As in the subject, I have a problem with the magisk on the Mi 10 Lite 5G.
I downloaded room miui_MONETGlobal_V13.0.2.0.SJIMIXM_f2b661bdf6_12.0
Due to the fact that on android 12 there is no TWRP working yet, I uploaded magisk 24.3, patched the boot.img file and uploaded via FASTBOOT, everything is loaded, I have root access but the application does not work as it should. When he wants to hide an application under the name of settings installed he gets the message: "Restore application magisk, this application cannot run as root has been lost. Please restore it to its original state." and here I have install at the bottom. after installing the application from scratch, I get another message "Your device requires additional configuration for the magisk to work properly" I click ok and I have the message "configuration failed."
I tried multiple times to patch boot.img and upload it via Fastboot but I have the same problem every time.
Anyone know the solution to this problem ???
I'm still on MIUI 12/A10, I haven't tried this out.
But - since the flash-script is just a fastboot script, you can do it a bit backwards.
Install any pre-A12-rom, after that, boot in to TWRP. Flash boot.img from the A12-rom. Then flash magisk.
Now you edit the fastboot.bat or fastboot.sh-script. Remove the line with fastboot flash boot images\boot.img. Boot in to the bootloader. Then run the script.
You should now have a fully working A12-rom with magisk.
Related
downloaded factory image from googles website
copied latest platform tools to the same directory as the extracted contents of the zip from google.
run the batch file, can boot into android just fine.
reboot to bootloader, use fastboot boot twrp-3.2.3-0-walleye.img
install the twrp zip
android boots fine and i can use my phone normally.
install magisk apk, reboot to recovery, install magisk 16.7 zip, android wont boot
everything was fine until i made a backup last night within twrp. ive repeated the above process idk how many times. any help would be appreciated
EDIT: https://forum.xda-developers.com/pixel-2/how-to/guide-unlock-flash-root-pixel-2-walleye-t3702417 is the guide i was using.
EDIT 2: now when i install TWRP and try to reboot to system, it just reboots back to TWRP...
EDIT 3: looking at the contents of my twrp zip, theres a file called magiskboot so what im going to do is reinstall the factory image using the bash script included in the download directly from google, then just flash twrp-pixel2-installer-walleye-3.2.3-0.zip, then install the magisk manager and see what happens. if that doesnt work ill redo the factory image, boot from twrp-3.2.3-0-walleye.img, install magisk, and see what happens without installing twrp.
I'm using the canary version of Magisk for the Q beta 6. Yesterday I tried to install a self made module to get rid of screenshot sounds (the one on the rep isn't working because Google changed the path. But as I installed it, I can only remember that the last line was "Magisk manager will be removed and your device will reboot in a moment" or something like that
Well, the manager is still installed, but Magisk itself got uninstalled. Besides the fact that I have no clue why that happened, now I can't install it. TWRP doesn't support Q. So I got the Q image from Google, extracted the boot.img and let Magisk Manager patch it (with preserve force encryption and Preserve AVB 2.0/dm-verity turned on) and flash it through Fastboot (fastboot flash boot magisk-boot.img) but it's still not installed. And without TWRP of course I can't flash the uninstaller zip (no clue what was actually removed).
Is there a way through adb or fastboot to find out what's left of the Magisk installation and remove that? Or any other solution I didn't think of?
Ok, via adb is not an option since both /data and /cache refuse permissions so I can't even get logs to find out what happened.
Does anyone have a working pre-patched boot.img? I don't know if that Manual method isn't working because patching isn't really working or because the Magisk files are still present and the module is still conflicting with Magisk. And I don't want to do a factory reset
Nevermind. It was a faulty Magisk database, I had to uninstall and reinstall it to solve the problem
I have a Google Pixel 3a (Google Store), bootloader unlocked, been on Magisk Canary since I got it. When I updated to Android 10, one of the modules I had installed (Miracast enabler) was/is not compatible and caused a bootloop (I know, I'm stupid). Flashing the stock boot.img of course solves the problem because root is gone. This is an A/B boot device an 10 so:
- TWRP cannot decrypt /data which means I cannot access /data/cache
- No access to /data/cache means I cannot add the 'disable_magisk' file to boot Core Only mode
- No data/cache access also means I cannot simply delete the module/s
- Magisk through TWRP command prompt or adb are useless because, again, I cannot access /data/cache
The only possible solution I can think of is to modify my boot.img to boot Magisk in Core Only mode so I can remove the module, then flash a proper modified boot.img to regain full Magisk capability. I have poured over online documentation and cannot seem to find the answer on how, if possible, I can do this. Magisk's own documentation seems to suggest the only solution is to wipe /data.
Is there any way I can modify a boot.img to boot Magisk in Core Only mode always? Thank you!
MichRT said:
I have a Google Pixel 3a (Google Store), bootloader unlocked, been on Magisk Canary since I got it. When I updated to Android 10, one of the modules I had installed (Miracast enabler) was/is not compatible and caused a bootloop (I know, I'm stupid). Flashing the stock boot.img of course solves the problem because root is gone. This is an A/B boot device an 10 so:
- TWRP cannot decrypt /data which means I cannot access /data/cache
- No access to /data/cache means I cannot add the 'disable_magisk' file to boot Core Only mode
- No data/cache access also means I cannot simply delete the module/s
- Magisk through TWRP command prompt or adb are useless because, again, I cannot access /data/cache
The only possible solution I can think of is to modify my boot.img to boot Magisk in Core Only mode so I can remove the module, then flash a proper modified boot.img to regain full Magisk capability. I have poured over online documentation and cannot seem to find the answer on how, if possible, I can do this. Magisk's own documentation seems to suggest the only solution is to wipe /data.
Is there any way I can modify a boot.img to boot Magisk in Core Only mode always? Thank you!
Click to expand...
Click to collapse
Here you go :
https://forum.xda-developers.com/showpost.php?p=80190577&postcount=554
Since then there was also a patch to magisk to resolve this kind of issue.
While you can't boot you can still use "magisk --remove-modules" through adb shell (or twrp I guess), which will automatically remove all your modules next time you boot.
reyqn said:
Since then there was also a patch to magisk to resolve this kind of issue.
While you can't boot you can still use "magisk --remove-modules" through adb shell (or twrp I guess), which will automatically remove all your modules next time you boot.
Click to expand...
Click to collapse
You have to use last magisk (above 19.4 if my memories are right).
HpNoTiQ said:
Here you go :
https://forum.xda-developers.com/showpost.php?p=80190577&postcount=554
Click to expand...
Click to collapse
This looks like it might work, so thank you! I found a similar, though different solution (below)
reyqn said:
Since then there was also a patch to magisk to resolve this kind of issue.
While you can't boot you can still use "magisk --remove-modules" through adb shell (or twrp I guess), which will automatically remove all your modules next time you boot.
Click to expand...
Click to collapse
I ran into the issue that while boot-looping with a magisk patched boot img, I wasn't able to run the command, adb wasn't finding the phone. I tried again after booting TWRP and it basically threw an 'error - command not found'.
HpNoTiQ said:
You have to use last magisk (above 19.4 if my memories are right).
Click to expand...
Click to collapse
I think you are right, in beta/canary channel
@Tulsadiver gave me a hand with this, see here: https://forum.xda-developers.com/showpost.php?p=80398385&postcount=35997
Thank you guys!
Goodmorning everyone. I have a problem with magisk and lineageos 18.1
I have a xiaomi mi mix 2 unlocked
Premise: I've never had any problems with magisk and lineage until now.
I installed magisk scrupulously following the official instructions and using both the boot.img patch system and the direct installation via recovery (adb sideload & lineage recovery)
In both cases magisk appears as not installed when looking from magisk manager and the wifi stops working (the phone connects to the various networks I have tried but reveals them as without internet.)
clearing cache does nothing
resetting network connections does nothing
Updating to the latest version of the radio firmware does nothing
restore boot.img OR reinstall lineage corrects the problem
In all cases I don't get root ...
Honestly, everything is beyond my understanding .. can you help me?
Ork_77 said:
Goodmorning everyone. I have a problem with magisk and lineageos 18.1
I have a xiaomi mi mix 2 unlocked
Premise: I've never had any problems with magisk and lineage until now.
I installed magisk scrupulously following the official instructions and using both the boot.img patch system and the direct installation via recovery (adb sideload & lineage recovery)
In both cases magisk appears as not installed when looking from magisk manager and the wifi stops working (the phone connects to the various networks I have tried but reveals them as without internet.)
clearing cache does nothing
resetting network connections does nothing
Updating to the latest version of the radio firmware does nothing
restore boot.img OR reinstall lineage corrects the problem
In all cases I don't get root ...
Honestly, everything is beyond my understanding .. can you help me?
Click to expand...
Click to collapse
It seems to me like you aren't properly flashing the patched boot.img. What method are you using to flash the patched boot.img?
Droidriven said:
It seems to me like you aren't properly flashing the patched boot.img. What method are you using to flash the patched boot.img?
Click to expand...
Click to collapse
I used both the method I'm aware of
1) I install magisk manager, extract the boot.img from lineage zip, upload it to the phone, patch it with magisk manager (operation ends fine), pass the modified version back to the pc reboot the phone in recovery and install the new boot with adb (installation ends correctly).
2) I rename the magisk app as .zip and then I install it through recovery
The result is the same.
In the past (with lineage 17) i always used the second method and I lived happy and with root for years.
Ork_77 said:
I used both the method I'm aware of
1) I install magisk manager, extract the boot.img from lineage zip, upload it to the phone, patch it with magisk manager (operation ends fine), pass the modified version back to the pc reboot the phone in recovery and install the new boot with adb (installation ends correctly).
2) I rename the magisk app as .zip and then I install it through recovery
The result is the same.
In the past (with lineage 17) i always used the second method and I lived happy and with root for years.
Click to expand...
Click to collapse
Since you have TWRP, you don't need the patched boot.img.
The Magisk Manager app has the root binaries built in now, all you should need to do is a Magisk Manager flashable zip.
Read this:
The Magisk Manager APK can now be flashed from within TWRP
Magisk is now distributed as part of the Manager APK, meaning you no longer need to flash a separate ZIP file from a custom recovery.
www.xda-developers.com
...
Droidriven said:
Since you have TWRP, you don't need the patched boot.img.
The Magisk Manager app has the root binaries built in now, all you should need to do is a Magisk Manager flashable zip.
Read this:
The Magisk Manager APK can now be flashed from within TWRP
Magisk is now distributed as part of the Manager APK, meaning you no longer need to flash a separate ZIP file from a custom recovery.
www.xda-developers.com
Click to expand...
Click to collapse
Yes...this is exatcly what I did.
Method 2.
Ork_77 said:
Yes...this is exatcly what I did.
Method 2.
Click to expand...
Click to collapse
You said that you converted the apk into a flashable zip. I think you should be able to find a MagiskManager.zip that is prepackaged for you to download and flash.
Also, if you use the patched boot.img method, you should rename the patched boot.img to "boot.img", then place the boot.img in your fastboot folder on PC. Then right click inside the fastboot folder and choose the option to open a cmd terminal, then boot your device into fastboot mode, connect your device to PC, type the following command:
fastboot devices(press enter)
If it returns a serial number, you are connected. Next, type the following command:
fastboot flash boot boot.img(press enter)
This should flash the patched boot.img correctly. Then reboot the device to system and try installing the Magisk Manager apk file from your internal storage instead of flashing it as a zip in recovery. If that doesn't work, try flashing the apk as a zip in recovery, wipe cache and dalvik cache after flashing the zip(DO NOT FACTORY RESET OR FORMAT ANYTHING), then reboot to system and see if it works correctly.
Droidriven said:
You said that you converted the apk into a flashable zip. I think you should be able to find a MagiskManager.zip that is prepackaged for you to download and flash.
Also, if you use the patched boot.img method, you should rename the patched boot.img to "boot.img", then place the boot.img in your fastboot folder on PC. Then right click inside the fastboot folder and choose the option to open a cmd terminal, then boot your device into fastboot mode, connect your device to PC, type the following command:
fastboot devices(press enter)
If it returns a serial number, you are connected. Next, type the following command:
fastboot flash boot boot.img(press enter)
This should flash the patched boot.img correctly. Then reboot the device to system and try installing the Magisk Manager apk file from your internal storage instead of flashing it as a zip in recovery. If that doesn't work, try flashing the apk as a zip in recovery, wipe cache and dalvik cache after flashing the zip(DO NOT FACTORY RESET OR FORMAT ANYTHING), then reboot to system and see if it works correctly.
Click to expand...
Click to collapse
Hi Droidriven, thank you for your answers. Perhaps, synthesizing my steps too much, I gave the impression of not being particularly capable in computer science (you even tell me to press "enter" after commands ...). Well, let's say it's not my case.
All steps are performed correctly.
all steps end without errors.
No matter what I do, in the end Magisk appears as n / a, I don't have root, and the data connection doesn't work. Small addition about the latter aspect: when rebooting the wifi connection works for a variable time between 10 and 20 seconds, after which the network appears as without internet (or intranet) but the phone remains connected.
At the reboot, history repeats itself
Restoring the original boot everything returns to normal.
/* excuse windows person in advance for poor grammar */
TL;DR:
LG V20 H918
bootloader unlocked
bootable LOS19.1
no fastboot available
no recovery available
Goal: setup magisk using adb root shell
Is it possible?
What happend:
On stock LG V20 H918 no flashing was available in fastboot, probably done by manufacturer.
No stock recovery available as well.
I was able to unlock bootloader and install TWRP using "lafsploit".
Then I installed LOS 18.1 and Magisk with TWRP.
Everything worked perfectly.
Later I decieded to update to LOS 19.1, and probably forgot some step in the process.
LOS 19.1 boots and works OK, but without root/magisk. TWRP now stucks in splash screen.
I unable to install Magisk or restore backup without TWRP.
I unable to reflash TWRP without fastboot.
But I have acces to adb root shell!!!
So I thought it should be possible to repeat all changes Magisk does when patches boot.img, right?
I examined boot_patch.sh from magisk.akp, then compared original and patched img-s.
Waht I concluded magisk does:
1: create ".backup" folder in root
put there original "init" file
put there ".rmlist" file with what to remove on uninstall
put there ".magisk" file with checksum and other variables
2: create "overlay.d" folder in root
create "sbin" folder in "overlay.d"
put there same ".xz" files mentiond in ".rmlist"
3: perform some modifications to "init" file in root
Will it work if i repeat all this changes through shell?
Or do i need to do something else, like changing that checksum somwhere?
I have all this files from patched "boot.img", including that "init" file.
Is this a guide, or a question?
If this is a guide, you need to write it in such a way that others can easily follow it.
I don't know enough about LG devices to tell you whether you can accomplish what you're trying to do. From what I can see, rooting is extremely complicated. This is why I have a Pixel.
This is a question, I just atempted to give as much information as possible.
IMHO this sitiation should not be specific to this particular device.
In other words, is it possible to install magisk by "patching files" on booted system? (without re-flashing boot.img?)
I had to flash the lineage recovery to replace twrp when i installed the 19.1 rom. You can still install magisk using the lineage recovery.
If I recall however you can also patch the bootloader to install magisk through the installed magisk app itself aswell. As for the specifics of your question of installing it without patching of some way to the bootloader... ive no clue.
I was unable to install recovery, and there was no recovery when I got this phone with "stock ROM". thought it was done this way by oem.
Atempting to boot into recovery results in "brocken android icon" with "no command" text.
Yes, this is how I installed magisk first time: install app -> patch boot image in app -> then re-flash patched image with twrp.
My idea is to do all reqired changes manually, as we have root acces from adb shell:
As for now I mimicked difference betwen patched and original 'boot.img', which coresponds to "Ramdisk Patches" section of Magisk's "boot_patch.sh":
'.backup' and 'root/overlay.d/sbin' folders and their contents, init file and all permissions
Phone boots but no changes in magisk
Also added '99-magisk.sh' to /system/addon.d
It seem to launch, but no changes in magisk too.
Posting in case somebody will search for this.
For magisk to work some changes in kernel may be reqired. If kernel in patched boot image is different from original, then there is no solution this way.
Wiping cache and userdata can possibly fix TWRP bootloop, but If your fastboot unable to flash anything, then it probably also will be unable erase/format cache and userdata.
>>>!!! Backup first if you can, this will erase all your files and apps !!!<<<
Try to do hard factory reset this way, it helped in my case:
- Turn the phone off.
- Press and hold "Vol. down" + "Power btn"
- When LG logo appears, release "Power btn" for ~0.5sec. then push again
- Hold "Vol. down" + "Power btn" until hard reset menu appears.