[Solved][Question] How to delete /system/xbin files via Magisk Module? - Magisk

Today I have installed Built-In BusyBox module by zgfg to overwrite meefik's busybox binaries in /system/xbin which I couldn't remove due Resource or Device Busy error.
Then I found out that busybox is one of the ways to detect modified android so I want to remove it but module unfortunately doesn't come with uninstaller so I am stuck with busybox in my /system/xbin directory with no way to remove. All I found on Magisk's docs is to replace files or directories not remove them but 2018's version said that removal is possible, just that it is hassle or something.
Can anyone help?
Additional info: I don't have any Custom Recovery and don't tell me to get one.
Click to expand...
Click to collapse
NOTE! To help others with same problem I am planning to compile answer as Magisk Module so please open PR in this repo:
Click to expand...
Click to collapse
GitHub - UltraStudioLTD/BuiltIn-BusyBox-Uninstaller: Uninstall busybox
Uninstall busybox. Contribute to UltraStudioLTD/BuiltIn-BusyBox-Uninstaller development by creating an account on GitHub.
github.com

Have you tried removal via TWRP?
How to disable Magisk modules without Magisk and TWRP recovery
Hi, I installed an incompatible Magisk module in the past, which cause bootloop of my phone. Co I dirty flashed my ROM (Pixel Experience) to get my phone work again. My current situation is that I cannot flash Magisk because an incompatible...
forum.xda-developers.com

lemon567 said:
Have you tried removal via TWRP?
How to disable Magisk modules without Magisk and TWRP recovery
Hi, I installed an incompatible Magisk module in the past, which cause bootloop of my phone. Co I dirty flashed my ROM (Pixel Experience) to get my phone work again. My current situation is that I cannot flash Magisk because an incompatible...
forum.xda-developers.com
Click to expand...
Click to collapse
I don't have TWRP and I can't install any Custom Recovery.
Please don't tell me to follow that or this instructions to install them, I followed everything and still no luck.

What you could do is enter safmode of your phone (Google how to enter safe mode for your phone) and remove the files manually or use the BusyBox cleaner zip and flash it in magisk manager and if you're lucky it will remove it
Release v1.29.0-YDS-201807132149 · yashdsaraf/bb-bot
Bot to compile, package and release busybox for all android architectures - Release v1.29.0-YDS-201807132149 · yashdsaraf/bb-bot
github.com

Unfortunately safe mode in my phone is kinda broken, I think. Cause every 3rd party app was not only disabled but also disappeared like magic. Also I don't trust unknown ZIPs so I haven't tried that link.
**I solved problem by disabling every Magisk module I had, rebooting and after that it succeed in deletion with no problem**

Related

[BUG] Magisk refuses to install modules from repo (The zip is not a Magisk Module!)

I've had magisk installed since version 6, I've published some magisk modules already and never had a problem until today.
After a full clean reinstall of Nougat NBD90Z (with wipe) on my Nexus 6 and then flashing Magisk, phh's superuser for magisk, installing phh's superuser apk from play store and magisk manager apk I stumbled upon a previously reported (without details) bug where magisk manager would refuse to install modules from repo claiming they are not magisk modules.
I've struggled trying everything I could including the full wipe (more details here: http://forum.xda-developers.com/apps/magisk/module-app-systemizer-t3477512/69230448#69230448) and bounced some ideas off @pnwsr6 who's had the similar problem on Nexus 6 device.
I've achieved a partially working Magisk Manager (manual installs of ZIP files work, but installs from repo still fail) and here's the list of steps which lead to me having semi-working magisk manager again:
1. I flashed ZIP files of some modules in twrp (I'm attaching App Systemizer and Nexus 6 LED Enabler which I flashed)
2. After the phone booted up I saw the modules active and working
3. Within Magisk Manager I then added the ZIP file of the phh's superuser module from that thread (http://forum.xda-developers.com/attachment.php?attachmentid=3893967&d=1475554052)
4. Now at least manual installation of modules within Magisk Manager are working fine.
@topjohnwu -- I've enabled verbose logging and extra logging for bash commands, but I'm still not seeing anything in the log on top of the regular output.
Created an issue against Magisk Manager so it's easier to track for developers: https://github.com/topjohnwu/MagiskManager/issues/20
Looks like that even after flashing some modules in twrp, Magisk Manager only allows to install from zip only exactly the same ZIP I've already flashed (even a minor change and bump of versionCode results in "This ZIP is not a Magisk Module!"). So it might be an issue of Magisk Manager being unable to write to /magisk despite having storage permission and being granted root access.
Well, it works now (you'll have to wipe again). So here's the sequence of events:
1. Flashed @RatchetPanda's busybox http://forum.xda-developers.com/attachment.php?attachmentid=3850579&d=1471875389 from twrp -- got stuck on a boot animation, rebooted again in twrp, flashed magisk uninstall and it didn't help for some reason.
2. So I force-rebooted into fastboot and flashed nbd90z with wipe.
3. After apps were restored and everything was set up, I booted into twrp (it didn't even ask me if I want to allow /system modifications for some reason), added magisk v8 and phh's r259 root to the list, flashed them both.
4. Once the phone booted I could again install modules from repo/zips.
Maybe something didn't get properly wiped first two times but it's working now @pnwsr6!
I've seen this error as well on my Nexus 6 NBD90Z with Magisk v8. Started with v7 after some heavy modification on my part .
I was sometimes able to fix it by simply extracting the zip and then Magisk Manager would somehow recognize it as a module.. Other times I could extract the zip and then re-archive the contents and Magisk Manager would recognize that as a module. Weird, but doable.
stangri said:
Well, it works now (you'll have to wipe again). So here's the sequence of events:
1. Flashed @RatchetPanda's busybox http://forum.xda-developers.com/attachment.php?attachmentid=3850579&d=1471875389 from twrp -- got stuck on a boot animation, rebooted again in twrp, flashed magisk uninstall and it didn't help for some reason.
2. So I force-rebooted into fastboot and flashed nbd90z with wipe.
3. After apps were restored and everything was set up, I booted into twrp (it didn't even ask me if I want to allow /system modifications for some reason), added magisk v8 and phh's r259 root to the list, flashed them both.
4. Once the phone booted I could again install modules from repo/zips.
Maybe something didn't get properly wiped first two times but it's working now @pnwsr6!
Click to expand...
Click to collapse
I probably won't try again until next update, and hope the wipe just wasn't clearing something. I have the zip installed through twrp and working for now so I'm good till then.
just wondering if you're still having this issue with v9? I had modules installed fine under v6, but never really installed any modules under v8 to see if this problem occurred for me. now that I'm on v9, which has been wiped clean to start, I can no longer install any modules via Downloads or in the Modules section... any suggestions?
I have the same issue when trying to install viper with v9 on Nexus 6P DP2
Skickat från min Nexus 6P via Tapatalk
Same here. Find a fix ?
From what I hear, ZIP/module management has been reworked in the upcoming magisk v10, so unless you want to go the route I went thru, you can just wait for that.
stangri said:
From what I hear, ZIP/module management has been reworked in the upcoming magisk v10, so unless you want to go the route I went thru, you can just wait for that.
Click to expand...
Click to collapse
Just an FYI, I do still have this problem, but can install the zip through twrp. Maybe 10 will be the solution.
I had the same problem, I cleared magisk manager data and it works fine now
Didn't help
Sent from my SM-G532F using Tapatalk
I've published snapshot builds of magisk v10 and magisk manager v2.6, try these together to see if they'd help.
stangri said:
I've published snapshot builds of magisk v10 and magisk manager v2.6, try these together to see if they'd help.
Click to expand...
Click to collapse
I tried the latest one from the 26th, magisk manager keeps crashing when trying to install the downloaded dialer/contacts on HTC 10.
Meowdib said:
I tried the latest one from the 26th, magisk manager keeps crashing when trying to install the downloaded dialer/contacts on HTC 10.
Click to expand...
Click to collapse
Weird, do you have the same problem with magisk manager 161223?
stangri said:
Weird, do you have the same problem with magisk manager 161223?
Click to expand...
Click to collapse
Same
I need a Help to download modules using magisk
Lastest version, Included phh root, manager is from G. play,
But Modules download function is not working
Say "No modules found" for download to install via magisk.

Root using Magisk v14

Hello,
I just got my P10 (VTR-L29) yesterday, coming from a P8 Lite that I used to play a lot with and I already miss the adblock and the clean debloated system.
According to the new version of Magisk here, there is a new install method that works if you don't have a custom recovery like it used to be in the past. The new method modifies the boot.img via Magisk Manager, stores it in a folder and then you have to flash it with adb.
My question is: Do I have to unlock my phone in order to do that trick? Anyone else that tried something similar?
Nobody?
Maybe I'm not clear enough..
Steps to reproduce:
-install Magisk Manager 14 and use the inside app patcher
-find the patched boot.img on storage
-move the boot.img in PC storage
-use the PC in order to flash the patched boot.img
-reboot and wait
It's supposed to work that way but I don't want to unlock the bootloader,atleast for now.
Is it safe to do?
Xperias do not boot with the bootloader locked if boot.img is changed. I guess it will be the same for Huaweis.
So the only way to do that is to unlock the bootloader..seems like I have to do it lol.
Magisk v14 is working on my device. Unfotunately, i cannot pass safetynet. How about you guys?
Working but I Guess that You unlocked the bootloader,right?
You can try to use the universal safetynet fix, flash it in twrp and check.
Firicel69 said:
Working but I Guess that You unlocked the bootloader,right?
You can try to use the universal safetynet fix, flash it in twrp and check.
Click to expand...
Click to collapse
Already tried that (the new one for v14). Unfortunately, it didn't work.
Thank you anyway
garris_bibop said:
Magisk v14 is working on my device. Unfotunately, i cannot pass safetynet. How about you guys?
Click to expand...
Click to collapse
I had the same problem. Maybe my experience will help:
Open Magisk manager and check Log->Magisk. Are there any messages from MagiskHide? It should be.
Try this:
1. Open Magisk manager and disable Magisk hide.
2. Reboot
3. Open Magisk manager and enable Magisk hide.
I used commands in Terminal Emulator
Code:
su
magiskhide --disable
magiskhide --enable
At first it didn't work out but after a lot of desperate enabling/disabling and few reboots MagiskHide started to work (I couldn't determine the reason of its misbehaving).
For now I successfully pass SafetyNet checks.

Strange Magisk installation behaviour

Hi guys.
I'm facing an issue with Magisk (stable and beta) that I never had before. I'm on OP5, PixelExperience, Android Pie (but I've tried also on a Oreo ROM yesterday, not sure if it was stable or beta version of Magisk). Here's the flash routine I do for every single ROM:
- Wipe everything, internal storage included
- Flash ROM
- Flash Magisk
- Boot
In the past few days, Magisk isn't installing MM, don't know why. It always installed MM on every single flash I did in my life, now suddenly it isn't installing it anymore. I haven't changed my flashing "habits", I do the exact steps I wrote above on every single flash (not on updates, of course).
This issue also leads to not being able to install modules from MM, but I can install them via TWRP (I've got the latest blu_spark, I'm decrypted, flashed no_verity_v2 for OP5). When I install modules via MM it says:
! /data/adb/magisk_merge.img mount failed.
I tried re-installing Magisk, using the uninstaller and then first time the stable, then the beta, but they won't installing MM after flashing.
What do you guys think?
Thanks.
EDIT: I've recreated the issue, I've attached the log. I tried 2 different modules, Sysconfig Patcher and Busybox. The first one is installing only via TWRP (via MM it produces the log in the attachments), the second one is istalling via MM correctly.
"update-binary: line 203: make_ext4fs: not found"
Unable to format the .IMG to ext4 it seems so there's no magisk merge image to be mounted
Not entirely sure where to go with that but it could be a start.
Bad version of twrp?
If I understand you correctly, the Busybox module install just fine, no matter if installed through the Manager or TWRP.
Have you tried other modules?
The Sysconfig Patcher module isn't using the official module template, so it's very likely that @VR25 need to fix something in his install script.
Didgeridoohan said:
If I understand you correctly, the Busybox module install just fine, no matter if installed through the Manager or TWRP.
Have you tried other modules?
The Sysconfig Patcher module isn't using the official module template, so it's very likely that @VR25 need to fix something in his install script.
Click to expand...
Click to collapse
Indeed, there's stuff to "fix". I've been working on that for a few days now. I noticed [some] recent ROMs lack a bunch of useful binaries, such as make_ext4fs and resize2fs. So, I'm migrating to Magisk Module Template and relying on Magisk's util_functions.sh for better "future-proof" compatibility.
Didgeridoohan said:
If I understand you correctly, the Busybox module install just fine, no matter if installed through the Manager or TWRP.
Have you tried other modules?
The Sysconfig Patcher module isn't using the official module template, so it's very likely that @VR25 need to fix something in his install script.
Click to expand...
Click to collapse
I tried YTVanced module, downloaded via MM and it installed just fine. So I think that, as VR25 said, the ROMs I've tried these days might have lacked of those utilities. So we might have "solved" this issue.
And what about the fact that flashing Magisk from TWRP doesn't install MM? Is it also related to the fact that those ROMs are recent?
Pipodi93 said:
And what about the fact that flashing Magisk from TWRP doesn't install MM? Is it also related to the fact that those ROMs are recent?
Click to expand...
Click to collapse
That happens once in a while, and may very well be ROM related. Fortunately, it's easy to install manually...
Didgeridoohan said:
That happens once in a while, and may very well be ROM related. Fortunately, it's easy to install manually...
Click to expand...
Click to collapse
Yeah, I thought so too. Because when I was on AICP, MM was installed after flashing. My concern was that "mount failed" was related to the fact that MM wasn't installed during the flashing operation, but I'm glad to see that's not the case and my phone isn't cursed. Thank you!

[TOOL] Magisk Module Manager for recovery v2.5 (Magisk 19)

Since mm isn't working on new Magisk 19, I took it for inspiration and created a simple manager, just for bypass some "bootlooper" module.
Just install it using recovery and run on terminal /data/media/magisk.
v1.0 - Initial build. Enabling and disabling functions
v2.0 - Added module removal function
v2.5 - No need to use storage to work. May avoid issues. Some others minor changes.
All thanks to
- topjonhwu for Magisk
- VR25 for mm
- TWRP team
- Me? Idk
Great work dev[emoji106], thanks
doesn't works for me (doesn't list modules)
mrhamed said:
doesn't works for me (doesn't list modules)
Click to expand...
Click to collapse
To list modules the script needs to write on /cache or /data. It will choose by itself.
Please send some screenshot of issue.
Looks very promising, especially enjoy having a GUI for this.
mrhamed said:
doesn't works for me (doesn't list modules)
Click to expand...
Click to collapse
I'm working to make script use no external files, so script will depends completely on your recovery binaries.
Hope to release it soon.
I suffer a boot freeze because of a bad module.
Cannot use TWRP and don't have module like Magisk Core Only installed.
I cannot boot to rooted system because of bad module.
Can boot non-rooted system only.
For my device LYA (Mate 20 Pro) which for rooting is using root-through-recovery-boot I can patch boot image with whatever Magisk edition which I assume is the best way to recover the device without full wipe.
Can a Magisk version be easily built which will either skip loading custom modules or delete them during boot? After successfully booting rooted I would flash a standard Magisk.
mikeos said:
I suffer a boot freeze because of a bad module.
Cannot use TWRP and don't have module like Magisk Core Only installed.
I cannot boot to rooted system because of bad module.
Can boot non-rooted system only.
For my device LYA (Mate 20 Pro) which for rooting is using root-through-recovery-boot I can patch boot image with whatever Magisk edition which I assume is the best way to recover the device without full wipe.
Can a Magisk version be easily built which will either skip loading custom modules or delete them during boot? After successfully booting rooted I would flash a standard Magisk.
Click to expand...
Click to collapse
I don't know if I got it correctly.
Well... commonly modules won't survive after Magisk removal.
If you can't access TWRP for flash Magisk uninstaller or disable the problematic module, you can try to flash or even boot the ROM's stock kernel through fastboot.
But if such module did others modifications into data, so you'll have to reflash whole ROM.
Are you planning on publishing this on magisk repo?
This has saved my bacon at least 4 times since installing it, many thanks Adriano
Saved me from bootloop module, works like a charm!
Adriano-A3 said:
Since mm isn't working on new Magisk 19, I took it for inspiration and created a simple manager, just for bypass some "bootlooper" module.
Just install it using recovery and run on terminal /data/media/magisk.
v1.0 - Initial build. Enabling and disabling functions
v2.0 - Added module removal function
v2.5 - No need to use storage to work. May avoid issues. Some others minor changes.
All thanks to
- topjonhwu for Magisk
- VR25 for mm
- TWRP team
- Me? Idk
Click to expand...
Click to collapse
It gives me the error "WTF?! The directory was here just now! It's gone! Please try again... Exiting..."
Thx bro, you saved my day
PixelHead0_0 said:
It gives me the error "WTF?! The directory was here just now! It's gone! Please try again... Exiting..."
Click to expand...
Click to collapse
Same here, on Samsung S10+ with August update, latest Magisk and Twrp.
very useful for android 10, thank you sir !
I can't understand how to run it on the terminal
will it work with Magisk 20.0??
Sivabalan said:
will it work with Magisk 20.0??
Click to expand...
Click to collapse
have you tried it? does it work on magisk 20.1
Confirmed working with Magisk 20.1, thanks a ton for this!
working on 20.2 + android 10

The root permission request is no longer displayed

I have the root with Magisk in Android 8.0. At first, the warning always came out asking if you wanted to grant root rights to the application that you just opened. However, this warning is no longer displayed, even though the configuration of Magisk Manager is configured in this way.
In the Magus Superuser section, I do not see any trace of the applications that I can not 'root'.
I have updated Magisk Manager, but the error continues. I also removed BusyBox, but the error continues.
I can not give root permission to any other application. But the mobile is rooted, since the first applications that I installed that require root continue to function normally. I can even deactivate the root and then activate it again.
Reinstalling the applications is not solved. With Dalvik and Caché wipe either.
That could be happening? How is it solved?
____
Magisk Manager has all the permissions of everything (memory, background, manual battery mode). I have tried to reinstall Magisk Manager and nothing.
Deactivating BusyBox (Magisk module) and Xposed and restarting still does not work.
Returning to install the Magisk image by TWRP or Fastboot is not fixed either.
I have removed all the fret that I had done to the phone (BusyBox, Xposed, root Magisk and boot modified for the root) and the problem has not been solved. I do not know what may be happening. I do not have other rare applications.
I have installed Device Control and the TWRP application. I have not gotten the root request to skip (although it has activated that option in Magisk Manager).
Definitely, it is not the fault of the new applications, which was the first question I wanted to solve.
Magisk version:
19.3 (19300)
And from Manager 7.2.0 (213), although I have also tried 7.3.2 (224).
The root is done with patching (via Magisk) of RAMDISK.IMG.
I understand that some applications are not compatible with systemless. But I'm not going any of the new ones that I'm trying. Interestingly, other applications compatible with Magisk (except those that installed the first days of the mobile) do not work either.
I have installed Magisk Manager 7.0.0 (and also 6.1.0), but the bug is still there. It seems that it does not depend on the APK.
As my Magisk file to root consists of a patch of RAMDISK.IMG created directly from Magisk Manager I do not know how to create one based on a lower version (for example, version 18.1). It only gives me the option to patch with the latest Magisk Manager version (if I have a lower one, it asks me to update the APK).
Whenever I generate the IMG of my patched RAMDISK.img it is based on 19.3.
How could I generate a patched IMG based on a lower version?
I have microG, not the GApps. Could that influence? Does Magisk need them?
@rovo89
@topjohnwu
https://www.didgeridoohan.com/magisk/MagiskHelp
I have added much more information.
Reinstall firmware???
LoneWolfz said:
Reinstall firmware???
Click to expand...
Click to collapse
I'm going to do it today. Will I lose data if I install SYSTEM.img via Fastboot?
535iu said:
I'm going to do it today. Will I lose data if I install SYSTEM.img via Fastboot?
Click to expand...
Click to collapse
No maybe but i suggest you to backup all your data etc. just to be safe

Categories

Resources