Wiki source for MagiskHideHidingRoot


Show raw source

@@[[MagiskHide | -- To the top/main article --]]@@
=====**{{color text="Hiding root from apps" c="blue"}}**=====

There's a corresponding section about hiding root from apps and ""SafetyNet"" in the [[https://topjohnwu.github.io/Magisk | official Magisk documentation]]. That is also very well worth a look.

It might also pay to check out what others have been discussing about the app you are having trouble with. Take a look at the [[MagiskHideAppsList | App resources]] for links to discussions and workarounds for a few select apps that are known to be troublesome when it comes to hiding root.

If you have apps that you need to hide root from, that detect that your device is rooted even if you can pass ""SafetyNet"", here are a few tips //(if you can't pass ""SafetyNet"", see [[MagiskHideSafetyNet | the section about SafetyNet]])//. A good aproach would be to try one thing at a time and see if the app in question stops detecting root. No need to try all tips at once...
---
==The Hide list==
- Make sure that the app in question is selected in the Hide list (Under Magisk Hide in the Manager). But, don't go crazy... Only add those apps that actually detect root. If you add too many unnecessary apps and processes you will very likely experience system instabilities //(also see [[MagiskIssues | "System instabilities"]])//


==Hide the Manager==
- Many apps look for the Magisk Manager as a sign of your device being rooted. For this you can use the feature to hide the Manager (repackage it with a random name), //see “Hiding the Magisk Manager” below//. If the app still detects Magisk, first make sure that the hiding of the Manager actually worked and that you haven't ended up with [[https://www.didgeridoohan.com/magisk/ManagerIssues | two managers installed]]. Unfortunately, the way that Android works, it is almost impossible for an app to completely hide from other apps and services without advanced hacks (like Xposed). If an app still can detect Magisk, even if you have it on the Hide list, the Manager is repackaged and everything else from this list of tips is ok, simply try to uninstall the Manager and see if this helps. If that works, you might be out of luck and the only way to fully use the app in question is to regularly uninstall and then reinstall the Magisk Manager... Fortunately, topjohnwu is currently working on a solution that will make it impossible to detect the Manager, but only on Android Pie and above.


==Test ""MagiskHide""==
- Make sure MagiskHide works, if you haven't already. Easiest is to make a ""SafetyNet"" test in the Manager. If at least basic integrity passes, MagiskHide works. If it doesn't work, the first thing to test is to toggle MagiskHide off and on again //(also see [[MagiskHideIssues | "Test MagiskHide"]])//.


==The Basics==
- Also make sure that your device conforms with the basics for MagiskHide to work and take a look at what Magisk can and cannot hide //(also see [[MagiskHideBasics | "Basics"]])//.


==""Passing SafetyNet""==
- Passing ""SafetyNet"", both CTS profile and basic integrity, is a good start. That way you know that MagiskHide is working and the apps that do use ""SafetyNet"" won't trigger that way. See [[MagiskHideSafetyNet | SafetyNet]] for more details on that.


==Update==
- Make sure you're up to date with the latest Magisk version. Magisk and MagiskHide is constantly being improved upon and there might have been changes that impact the app you're trying to hide root from.
- Also, if MagiskHide suddenly stops working after an update to Magisk or the Magisk Manager, try toggling MagiskHide off and on again in the Manager settings.


==Canary build==
- It might also be worth to try the latest [[https://forum.xda-developers.com/apps/magisk/dev-magisk-canary-channel-bleeding-edge-t3839337 | Canary bleeding edge build]]. It might have been updated with an improved MagiskHide.


==Clear data==
- You may also have to clear data for the app in question since some apps “remember” root after finding it the first time.


==Dependencies==
- The app may also rely on other apps/services that detect root //(also see [[MagiskHideMore | "Dependencies"]])//.


==Other root apps==
- Some apps also detects other root apps on your device and stop working if they detect these. You can test by uninstalling these apps //(also see [[MagiskHideMore | "Detecting apps requiring root"]])//.


==UDS detection==
- //From Magisk v19.4 this detection method is no longer possible, but I'll leave the tip in here for those who refuse to update (for whatever reason).// There is a very simple but currently effective detection method that started surfacing recently. It's easily circumvented by simply running the following command in a terminal: %%su -c chmod 440 /proc/net/unix%% This will prevent the apps that use this method to read the file. The command needs to be run at every boot, so as not to have to do it every time it is very convenient to put the command (without the "su -c" part since it isn't necessary to call su in the boot scripts) in a service.d boot script.


==Old root==
- If you've previously had your device rooted with a different root solution it is possible that there are remnants of that triggering whatever app you're having trouble with. Uninstall any management app you might still have and run [[https://forum.xda-developers.com/member.php?u=4544860 | osm0sis']] [[http://forum.xda-developers.com/showpost.php?p=63615067 | unSU script]] to remove any traces. Magisk should reinstall itself, but if not you can just reinstall.


==Adoptable/external storage==
- MagiskHide does not work on apps installed to adoptable/external storage. Any apps you want to hide root from has to be installed to the internal storage.


==Magisk Modules==
- Most Magisk modules can be hidden by MagiskHide, but that depends on exactly what the module does. If you can't figure out what is triggering an app, try disabling all modules (could be easiest to do by enabling Core Only Mode in the Manager settings). If the app no longer triggers you can enable your modules one by one until you find the culprit (but remember to disable Core Only Mode first).


==File on the internal storage==
- Another variant of root detection is that the app looks through your internal storage and triggers if it finds any files or folders that may hint at you having a rooted device. Magisk zips, etc. One such folder is ""MagiskManager"". Magisk v17+ no longer uses the ""MagiskManager"" folder for downloading zips and storing logs. If you have the folder on your device, it's a remnant of an old Magisk installation and can be deleted.


==External connection==
- Some apps will connect to an external web service that performs the check for it. This might mean that adding the app to the Hide list or repackaging the Magisk Manager won't help. One solution to this issue is to simply block the connection to the web service. One way is to use Magisk's Systemless Hosts and [[https://forum.xda-developers.com/showthread.php?t=2190753 | AdAway's]] "Log DNS requests" feature to figure out what domain to block. You can then add this domain directly to the ""AdAway"" blacklist and apply the hosts file. **Keep in mind that you're disabling part of the apps security.** See [[https://forum.xda-developers.com/apps/magisk/how-to-bypass-lloyds-root-detection-t3837206 | this thread]] for an example.


==Update Android==
- Update your device to a newer Android version. It is not possible to fully prevent detection on devices with Android versions lower than 7.0.


==procfs leaks==
- It was discovered by topjohnwu that many OEMs ship their devices with a broken implementation of how /proc is handled and thus there are procfs leaks letting apps monitor information about other processes on your device (see [[https://medium.com/@topjohnwu/from-anime-game-to-android-system-security-vulnerability-9b955a182f20 | here]] for an in-depth write-up) . This will let those apps detect Magisk... Since Android 7.0 this is not supposed to be allowed, but manufacturers being manufacturers, and whatever. From Magisk v18.0 MagiskHide will fix the leak on any Android 7.0+ devices. Unfortunately, nothing can be done about this on earlier Android versions.


==Prop values==
- There's always a possibility that the ROM you are using have some props that makes it possible for an app or service to decide if your device is "compromised" or not. An example is //persist.sys.root// which can be found on some ROMs (Lineage) and need to be set to 0. Changing props can be done directly in the prop files, by a [[https://topjohnwu.github.io/Magisk/guides.html#boot-scripts | Magisk boot script]] or with the Magisk module [[https://forum.xda-developers.com/apps/magisk/module-magiskhide-props-config-t3789228 | MagiskHide Props Config]].


==Blacklist==
- It has been reported that some apps go to extremes and blacklist your device with the bank/service provider/etc. If that's the case you're likely going to have to reflash your device or otherwise change your device id to get around it. This is kind of uncommon though. Consider it a last resort.


==Other stuff==
- If none of the above works, try disabling USB debugging, OEM Unlocking, developer options, etc //(see [[MagiskHideBasics | ”Magisk can not hide”]])//. There are also apps that need a little more TLC when trying to hide root from them. Take a look at //[[MagiskHideAppsList | App Resources]]// below. Also keep reading the rest of the guide...

Unfortunately, there are apps out there with their own ways of detecting root that may circumvent MagiskHide //(also see [[MagiskHideMore | “More hiding tips”]])//. Magisk is constantly being updated and improved upon though, so it can pay to try again with a new Magisk update.

===**Hiding the Magisk Manager**===
This is done by going to the Manager settings and choosing “Hide Magisk Manager”. When this is done, the Manager is repackaged with a random package name and can therefore not be detected by any apps or services looking for com.topjohnwu.magisk. Since v6.1.0 of the Manager, the app name is also changed to simply "Manager" to circumvent apps and services detecting "Magisk" in the app name. If you have the app hidden, but it is still called "Magisk Manager", even though you are on app version v6.1.0+, try unhiding it and hiding it again. The name can't be changed when updating from an earlier version of the Manager if it is already hidden.

You can see if your Manager is hidden on the main screen of the app. Under the information about the latest Manager release there will be a package name consisting of a random string. The “Hide Magisk Manager” option will also be changed to "Restore Magisk Manager" in the settings on a hidden Manager.

===**Unhiding the Magisk Manager**===
Go to the Manager settings and choose "Restore Magisk Manager".

You can also unhide the Manager by uninstalling the repackaged Manager and manually install the apk. Get it from the ([[https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445 | release thread]] or [[https://github.com/topjohnwu/MagiskManager/releases | GitHub]])

===**Can't hide the Magisk Manager**===
If you're having issues trying to hide (repackage) the Magisk Manager, this is often caused by having the Manager installed as a system app, either by you or the ROM creator. This is a bad idea... See [[ManagerIssues | "Can't hide the Magisk Manager"]] for more info.

===**USB/ADB debugging**===
If you haven’t yet, try disabling USB/ADB debugging to see if this helps you use your root detecting app.

===**OEM Unlocking**===
If you haven’t yet, try disabling OEM Unlocking to see if this helps you use your root detecting app.
**WARNING** On some devices (known: Huawei) both OEM Unlock and an unlocked bootloader is necessary for the fastboot flash command to work. This should not be the case on devices that use vanilla Android (Google), or stay close to vanilla Android. Please exercise caution.

===**Developer options**===
If you haven’t yet, try disabling Developer options to see if this helps you use your root detecting app.

===**Samsung Knox**===
If you have a Samsung device you have likely triggered [[https://en.wikipedia.org/wiki/Samsung_Knox | Knox]] when rooting your device. This cannot be undone and it cannot be hidden, so if an app is using the Knox fuse to determine if you have been modding your device there is nothing that can be done.

I don't do Samsung, so I do not know how to determine if an app detects Knox or not, except that it might show up in a [[https://www.didgeridoohan.com/magisk/MagiskHideHelp | logcat]]. If the app works perfectly with Magisk and MagiskHide on a non-Samsung device, but doesn't on a Samsung it's very probable that it's Knox that is causing issues.

===**Nothing works**===
If you can't get it working even though you've tried everything, grabbing a logcat when the app detects root might show something //(see [[MagiskHideHelp | "Asking for help/reporting bugs"]])//. Save the log and post it in the [[https://forum.xda-developers.com/apps/magisk/mod-magisk-v1-universal-systemless-t3432382 | General support thread]], with plenty of details about the issue. Just make sure you've tried everything first.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki