[APP][1.1] AutoMagisk - Auto-disable Magisk's root when certain apps are running

Status
Not open for further replies.
Search This thread

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
8,493
7,731
23
Salford, Greater Manchester, UK
quinny898.co.uk
AutoMagisk no longer works, as Magisk stopped supporting this method in v8

AutoMagisk
Automatically disable Magisk root when certain apps, such as Android Pay or Pokemon Go are running to bypass SafetyNet

Note: You MUST have Magisk installed, with an unmodified system and Phh's Superuser. This is very important, AutoMagisk will NOT work otherwise.
Confused on how to do this? See this Android Police guide

Note: Using android pay to pay only works from the screen off with the option enabled in AutoMagisk's settings to disable root when the screen is off. If you try to pay with the screen already on from an app which does not have root disabled, AutoMagisk will NOT disable root in time and you will get rejected.

AutoMagisk has the following features:
- Disable Magisk root when an app is launched and re-enable it when an app that's not also set to disable is launched (usually when the app is closed again)
- Disable Magisk root when the screen is locked (optional, enable in the settings), to probably allow Android Pay to work from the screen being off
- Ignore certain apps: Say you have Pokemon Go set to disable root, and you open Facebook's chat heads, with Pokemon Go behind it. Root will not be disabled, but if you open Messenger without Go being open in the background, root will not be disabled
- Notification when root is disabled (can be turned off in the settings), as a reminder

How does it achieve this?
- An AccessibilityService to monitor app launch
- A background service/broadcast receiver for the screen turning off (turning back on is handled when an app is launched)
Because it uses an AccessibilityService, you MUST enable it in settings. You will be prompted to do this when launching AutoMagisk.

Apps with root disabled by default:
Android Pay
Google Play Services
Pokemon Go
NatWest
NatWest Offshore
Isle of Man Bank
Ulster Bank

Apps ignored by default:
Twilight
Facebook Messenger
System UI

Screenshots:
JLMLK9dl.png
9EwMB23l.png
jZeiPEbl.png


Still confused? Watch this video to show it in action

Download from Google Drive (Also available on XDA Labs)
 
Last edited:

gk1984

Senior Member
Jan 4, 2011
2,311
624
Is there any way to add a way or function to hide the superuser app (I'm using phh.su) too? My cable provider is blocking live streaming for root users and the trigger is the su app.

I flashed nexus factory image and removed Magisk. Should be 100% stock. AT&T Uverse app still blocked live tv. I uninstalled the su app, and live tv worked. Re-installed app without root (as in only installed app, didn't flash any form of root) and live tv blocked again.

If this app isn't capable of doing this, any suggestions would be welcome, even of manual steps are required.
 

vexen_darkness

New member
Sep 19, 2016
2
0
Can anybody help me? I follow all the steps, but automagisk disables automatically in accesibility settings. I dont have twilight and in facebook messenger i have disabled facebook bubbles. I restarted my device also, gave to automagisk all the permissions (including authomatic boot).
Solution: Ok I found the problem, for those who suffered as me only have to allow automagisk as a protected app when the screen turns off
 
Last edited:

4930

Member
Aug 12, 2016
47
6
Houston
Working good and awesome job on Moto XT1563 Stock ROM with systemless root Magisk v6, I uninstalled the Magisk Manager after finding out how easy to use this app was instead of toggle on/off.
Thanks for a great job!
 

kryptikal

Senior Member
Mar 1, 2015
75
54
Anytown
Is there any way to add a way or function to hide the superuser app (I'm using phh.su) too? My cable provider is blocking live streaming for root users and the trigger is the su app.

I flashed nexus factory image and removed Magisk. Should be 100% stock. AT&T Uverse app still blocked live tv. I uninstalled the su app, and live tv worked. Re-installed app without root (as in only installed app, didn't flash any form of root) and live tv blocked again.

If this app isn't capable of doing this, any suggestions would be welcome, even of manual steps are required.
Sorry that this post is a bit OT but gk1984 has a bit of a special situation.... I will remove this post if requested.
@gk1984
If you've got a Nexus device (or any other device that supports Multirom), here's what you do.

1. Check out videos of Multirom on youtube and see if it's something that fits your needs (it works perfectly for me on a Nexus 6); if it does, then keep reading...
2. Wipe your phone, except for userdata, install a fresh copy of your stock System image, boot it once and set it up the way you like then Reboot to TWRP and make a full backup.
3. Root your phone and install the Multirom Manager app (this makes the rest very easy, it can all be done manually but this way is much easier) then use it to install a kernel with the kexec-hardboot-patch, Multirom Recovery, and Multirom itself.
***note: many custom kernels already have this patch included and you can use one of those instead. There will be a list in the thread for your device.
4. Reboot to Multirom Recovery, use the Multirom menu to add a Rom, choose from Backup and use the completely-stock backup you made earlier.
5. Reboot to System and choose your Rooted Main Rom or Unrooted Secondary Rom.
6. When you want to switch between Roms just reboot and select the one you want.
 
Last edited:
  • Like
Reactions: gk1984
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 51
    AutoMagisk no longer works, as Magisk stopped supporting this method in v8

    AutoMagisk
    Automatically disable Magisk root when certain apps, such as Android Pay or Pokemon Go are running to bypass SafetyNet

    Note: You MUST have Magisk installed, with an unmodified system and Phh's Superuser. This is very important, AutoMagisk will NOT work otherwise.
    Confused on how to do this? See this Android Police guide

    Note: Using android pay to pay only works from the screen off with the option enabled in AutoMagisk's settings to disable root when the screen is off. If you try to pay with the screen already on from an app which does not have root disabled, AutoMagisk will NOT disable root in time and you will get rejected.

    AutoMagisk has the following features:
    - Disable Magisk root when an app is launched and re-enable it when an app that's not also set to disable is launched (usually when the app is closed again)
    - Disable Magisk root when the screen is locked (optional, enable in the settings), to probably allow Android Pay to work from the screen being off
    - Ignore certain apps: Say you have Pokemon Go set to disable root, and you open Facebook's chat heads, with Pokemon Go behind it. Root will not be disabled, but if you open Messenger without Go being open in the background, root will not be disabled
    - Notification when root is disabled (can be turned off in the settings), as a reminder

    How does it achieve this?
    - An AccessibilityService to monitor app launch
    - A background service/broadcast receiver for the screen turning off (turning back on is handled when an app is launched)
    Because it uses an AccessibilityService, you MUST enable it in settings. You will be prompted to do this when launching AutoMagisk.

    Apps with root disabled by default:
    Android Pay
    Google Play Services
    Pokemon Go
    NatWest
    NatWest Offshore
    Isle of Man Bank
    Ulster Bank

    Apps ignored by default:
    Twilight
    Facebook Messenger
    System UI

    Screenshots:
    JLMLK9dl.png
    9EwMB23l.png
    jZeiPEbl.png


    Still confused? Watch this video to show it in action

    Download from Google Drive (Also available on XDA Labs)
    8
    I just released build 1.1 to XDA Labs, and Google Drive (using the same link which is neat).

    1.1 Changelog said:
    - Added toggle widget
    - Added option to add a shortcut that disables root BEFORE opening an app to the desktop
    - Added lazy loading for those of you with hundreds of apps
    - Removed Superuser check, should now work with SuperSU
    - Added 17 new default enabled apps. If migrating from 1.0 you need to use "Re-add defaults" for this to work
    - Added LastPass as a default ignore. If migrating from 1.0 you need to use "Re-add defaults" for this to work

    I'll also upload it to APKMirror if anyone has Pushbullet alerts for there

    I'm looking into an "invert" mode, and whether it's possible (it should be), expect that soon
    5
    Since root toggling is removed from v7, I'd say: no.

    Yup. This kills the app.

    I'll leave this thread and the app up for anyone who's running v6 and doesn't want to update but for now I'm locking it because I don't want similar rants in here about it being removed as in the main thread.

    And as per my normal policy with my other apps that need old software to work, it won't get updated
    5
    Could there be an option to keep root disabled by default and only enable for applications that require root?

    Potentially, it's something I could look into adding
    2
    It doesn't fit, it's one character below the limit

    Easy: change "Automatically" to "Auto" :p
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone