• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Magisk General Support / Discussion

Search This thread

jons99

Senior Member
Nov 5, 2019
210
244
1. Installed Magisk over twrp
2. It's not pre-installed / oneplus stock oos A10
3. App isn't system app
4. Uninstalled Magisk app/icon as every app like WhatsApp

Oneplus 7 pro, stock oos, Magisk-23.0(23000), installed over twrp

I hope all questions are now answered
dude how do you even pass safetynet without magisk hide? I mean look at pndwal for example he doesn't uninstall magisk yet magisk is undetectable maybe instead of asking pndwal how to uninstall magisk ask him how to hide it properly
 

ipdev

Recognized Contributor
Feb 14, 2016
1,548
1
1,993
Google Nexus 10
Nexus 7 (2013)
Good morning, tell me do someone know if there is a possibility that the Magisk app is not constantly reinstalled after a reboot?

I usually uninstalled the app for online banking, but it's back after every reboot.

I don't want uninstall Magisk/root completely, only the Magisk app.

I tried to rename and hide magisk for my banking apps but it's not working.

Uninstalling Magisk app works fine but after every reboot it's back again.

I was a little confused but, I had an idea that I just checked.
The Magisk stub app seems to be reinstalled while Magisk is active.

I did not go all in and delete my magisk.db but, I assume the stub app would not be reinstalled.
or boot a non-magisk boot image.

This was a quick check.
Anyone can test it. Just uninstall the Magisk app and reboot.

It is the same result once Magisk is configured. Did not matter what device or Magisk installation.

Nexus 7 (2013)
ARM | Lineage 18.1 | Magisk (canary) installed by flashing in TWRP.​

Pixel 3aXL
ARM64 | abcROM (Android 11) | Magisk (canary) installed by patching boot image.​

I never had a reason to uninstall the Magisk app so, I never noticed it before.
I am guessing that if someone has time to look, they will find something in the Magisk release notes about it.

Cheers. :cowboy:
 
  • Like
Reactions: 73sydney and pndwal

ipdev

Recognized Contributor
Feb 14, 2016
1,548
1
1,993
Google Nexus 10
Nexus 7 (2013)
dude how do you even pass safetynet without magisk hide? I mean look at pndwal for example he doesn't uninstall magisk yet magisk is undetectable maybe instead of asking pndwal how to uninstall magisk ask him how to hide it properly
Once you configure Magisk, the app is not necessary.
Magisk settings are stored in magisk.db

You only need the app to configure Magisk.

MagiskHide will still be active unless you turned it off before uninstalling the app.
Root access will still be granted to the processes that you granted it to.
Modules will still load on boot.

I have never used them but, you can configure some Magisk options from command line.

Cheers. :cowboy:
 

pndwal

Senior Member
1. Installed Magisk over twrp
2. It's not pre-installed / oneplus stock oos A10
3. App isn't system app
4. Uninstalled Magisk app/icon as every app like WhatsApp

Oneplus 7 pro, stock oos, Magisk-23.0(23000), installed over twrp
I was a little confused but, I had an idea that I just checked.
The Magisk stub app seems to be reinstalled while Magisk is active.

I did not go all in and delete my magisk.db but, I assume the stub app would not be reinstalled.
or boot a non-magisk boot image.

This was a quick check.
Anyone can test it. Just uninstall the Magisk app and reboot.

It is the same result once Magisk is configured. Did not matter what device or Magisk installation.

Nexus 7 (2013)
ARM | Lineage 18.1 | Magisk (canary) installed by flashing in TWRP.​

Pixel 3aXL
ARM64 | abcROM (Android 11) | Magisk (canary) installed by patching boot image.​

I never had a reason to uninstall the Magisk app so, I never noticed it before.
I am guessing that if someone has time to look, they will find something in the Magisk release notes about it.

Cheers. :cowboy:
I had a feeling it'd have something to do with stub, but I think you've put your finger right on it. 👍

Just tested, first with Alpha setup w/ App hidden. -

Uninstalled app, rebooted, checked and App / Magisk stub was gone from app draw, but Magisk stub was indeed still present in device settings / Manage apps.

Another reboot and stub shows in app drawer / launcher. Clicking brings dialogue asking to download/setup full app.

Next, tried after unhiding App, then uninstall and reboot -

Surprised to see stub still returns!

Had a thought it may be unique Alpha behaviour as this will use local stub when hiding App, so next reverted to regular Canary (both App and Magisk mask) and tried again w/ App hidden, then uninstall and reboot -

Stub still returns.

Next, tried after unhiding App, then uninstall and reboot -

Stub still returns.

(So seems official builds save stub locally also, but use server based stub when hiding!)

My feeling is that there should / may be a way to prevent stub being loaded on reboot, especially if Hide the Magisk app is not selected; probably an easy code edit for someone to identify / post. 😉

ATM I haven't investigated or discovered a a way to disable stub loading at boot time. PW
 
  • Like
Reactions: ipdev and J.Michael

xAxB

Member
Mar 9, 2017
30
7
Great.

Did it flash / boot w/ Magisk root ok?... Also, I'm interested to know if 'Preserve force encryption' is checked or unchecked by default for your device. 👍 PW

To answer your question, 'Preserve force encryption' was checked by default for my device. I bought this device second hand, and it has been upgraded to Android 10 on arrival. I am not sure if the upgrade in itself converted the system to FBE though.

Unfortunately, I am not able to confirm Magisk root works for the Tab S4, with the latest update as I am having trouble with Odin. I tried Odin 3.13.1 and 3.14.1, with three cables and 4 USB ports (though only one is USB 2.0) but while Odin detects my device fine, it simply won't flash the device (doing nothing at either initialisation or setup connection) , not even the most recent stock rom, so I am probably out of luck until I can find another computer to try on.

(Though I am leaning towards the issue being something about my setup not working well with Odin, part of me also wonder if there isn't something wrong with this second hand tablet that makes it not play nice with Odin.. not sure if that kind of issues happen)
 
  • Like
Reactions: pndwal

pndwal

Senior Member
I usually uninstalled the app for online banking, but it's back after every reboot.

I don't want uninstall Magisk/root completely, only the Magisk app.

I tried to rename and hide magisk for my banking apps but it's not working.

Uninstalling Magisk app works fine but after every reboot it's back again.
Bit further on this; can I assume you tried using the standard 'Hide the Magisk app' function in Magisk App settings? - I'm not sure why this wouldn't work... PW
 

pndwal

Senior Member
To answer your question, 'Preserve force encryption' was checked by default for my device. I bought this device second hand, and it has been upgraded to Android 10 on arrival. I am not sure if the upgrade in itself converted the system to FBE though.
Ta. Is it also SAR = Yes?
Unfortunately, I am not able to confirm Magisk root works for the Tab S4, with the latest update as I am having trouble with Odin. I tried Odin 3.13.1 and 3.14.1, with three cables and 4 USB ports (though only one is USB 2.0) but while Odin detects my device fine, it simply won't flash the device (doing nothing at either initialisation or setup connection) , not even the most recent stock rom, so I am probably out of luck until I can find another computer to try on.
Sounds like driver / permission issues on PC?

Not sure of Odin requirements... Take it you confirmed bootloader is unlocked... Have you tried with USB Debugging enabled and checked OEM unlocking is Allowed in Developer options?

A suggestion with ZERO Sammy experience. 😬 :

I saw several guides to root your device w/ Magisk and earlier OS builds, but all involved downloading a prepatched boot image (must be matched to specific ROM version), but imsmc, simply flashing patched boot image did work for your (originally non-SAR) device.

There are also TWRP implementations available.

Official TWRP specifies using Odin to install, but I see you can also get to ADB / Fastboot for this device. Here's a guide using Fastboot to unlock bootloader:
https://www.mobilewithdrivers.com/unlock-bootloader/samsung-galaxy-tab-s4-64gb-4gb-ram

So if you can obtain a .img format TWRP, you can likely flash or simply boot to it (I'd boot it rather than flash) using PC ADB Fastboot connection, then take a TWRP backup of boot.img, locate and rename backup .win file to .img, boot system and patch that from Magisk App, boot TWRP again to flash Magisk-patched image...

Again, I have no Sammy experience, but this (or a variation) may work for you. 😜

(Though I am leaning towards the issue being something about my setup not working well with Odin, part of me also wonder if there isn't something wrong with this second hand tablet that makes it not play nice with Odin.. not sure if that kind of issues happen)
Could be, especially if you obtained it with bootloader unlocked... PW
 

pndwal

Senior Member
26 is out
https://t.me/magiskalpha/324
The beta version does not send channels. Try to support oplus.fstab. No need to update the ones that are already available (translated changelog)
Thanks! I've now updated, all working fine on RN8T.

Latest @vvb2060 Magisk Alpha build (July 26, 2021) change:​

Chinese Translated:

Magisk (1eb83ad8-alpha-26)​

• Support oplus.fstab for Oppo series devices

Nb. This build is available only on Telegram at present. I'll post full Changelog here when available on GitHub.

Last GitHub build, notes, links:
https://forum.xda-developers.com/t/magisk-general-support-discussion.3432382/post-85372173

🤠 PW
 
Last edited:

pndwal

Senior Member
OP Wellbeing Report 😀 :

John's growing up / happy with work... 🙂
John Wu, 3h

Oftenly I want to impulse tweet my "hot takes". Recent years I almost always end up not pressing the button. Having quite a few followers and is formerly/currently employed by Apple/Google, the trouble it could create is never worth it. I guess this is how growing up works, huh?

BTW, this has nothing to do with me being censored by my employers. I'm just reacting to the fact that I had just deleted yet another tweet from my draft after evaluating that it serves absolutely no purpose other than stirring unnecessary drama 🤣

Jane Manchun Wong, 3h

Would you have picked Apple / Google if you were given offers from companies not as closely related to mobile OS security research?

John Wu, 3h

My main priority is to have a stable footing to start my career, the job itself doesn't really matter that much when I'm looking for jobs. There are many other reasons why I chose Apple/Google haha. But I have to say, I'm currently very happy with my position at Google
www.twitter.com/topjohnwu/status/1419562776767340547

... Sometimes I forget he's so young. 😛 PW
 

Devilsho

Senior Member
May 15, 2018
218
91
Islamabad.
ASUS ROG Phone 3
every time i run any command this error came i googled tried everything solution but i dont know why this error.
i reinstall Magisk rooted again but stil this error

/system/bin/sh: pkg: inaccessible or not found

this error is not just for pkg update its for every thing.

Thanks in advance
 

Attachments

  • Screenshot_20210726-164526828.jpg
    Screenshot_20210726-164526828.jpg
    243 KB · Views: 44
  • Screenshot_20210726-171948080.jpg
    Screenshot_20210726-171948080.jpg
    352.6 KB · Views: 42
  • Screenshot_20210726-171850899.jpg
    Screenshot_20210726-171850899.jpg
    359.5 KB · Views: 43

dcarvil

Senior Member
Apr 20, 2016
485
260
every time i run any command this error came i googled tried everything solution but i dont know why this error.
i reinstall Magisk rooted again but stil this error

/system/bin/sh: pkg: inaccessible or not found

this error is not just for pkg update its for every thing.

Thanks in advance

You have to run pkg from the normal (non-root) prompt. It is not the way you expect it to work, but that is how it works on my device.
 

xAxB

Member
Mar 9, 2017
30
7
Ta. Is it also SAR = Yes?

Sounds like driver / permission issues on PC?

Not sure of Odin requirements... Take it you confirmed bootloader is unlocked... Have you tried with USB Debugging enabled and checked OEM unlocking is Allowed in Developer options?
A/B = No
Ramdisk = Yes
SAR = Yes

USB debugging is enabled and OEM unlocking is allowed in the developer options. I have a question though, if I am only trying to flash the current stock rom, a locked bootloader shouldn't be a problem right?

Truth to be said, I -do- wonder if my bootloader is fully unlocked. The Magisk installation guide mentions something about needing the IEM unlocked and greyed before it's truly unlocked (something to do with Samsung's 'Vaultkeeper'), but I following the steps to reproduce that from multiple guides, 'the volume up long press' option to enable 'Device unlock mode' in the warning screen (2:41 in this video, or in this guide) simply doesn't show for my device. As far as I know, the Vaultkeeper 'later' and I do wonder if it hasn't been introduced only from the Tab S5SE in the video and onward. but unfortunately I haven't been able to get any confirmation in the Tab S4 forum.

I saw several guides to root your device w/ Magisk and earlier OS builds, but all involved downloading a prepatched boot image (must be matched to specific ROM version), but imsmc, simply flashing patched boot image did work for your (originally non-SAR) device.

There are also TWRP implementations available.

Official TWRP specifies using Odin to install, but I see you can also get to ADB / Fastboot for this device. Here's a guide using Fastboot to unlock bootloader:
https://www.mobilewithdrivers.com/unlock-bootloader/samsung-galaxy-tab-s4-64gb-4gb-ram

So if you can obtain a .img format TWRP, you can likely flash or simply boot to it (I'd boot it rather than flash) using PC ADB Fastboot connection, then take a TWRP backup of boot.img, locate and rename backup .win file to .img, boot system and patch that from Magisk App, boot TWRP again to flash Magisk-patched image...

Again, I have no Sammy experience, but this (or a variation) may work for you. 😜


Could be, especially if you obtained it with bootloader unlocked... PW
Thanks for that guide, I didn't come across it. I did wonder if there isn't a work around from having to use Odin, but all my searches pointed toward having to use it on Sammys. But first thing first, I just want to be able to restore to a stock ROM first. If I am not mistaken, this shouldn't need an unlocked bootloader, and if something goes wrong in the process, I should at least be able to restore the system.

On a sidenote, the device came with the bootloader locked and Knox hasn't been tripped. I just kind of wondering if the previous owner -really- wanted a rooted device but after spending hours doing all the things I am doing now, gave up and flogged the device and perhaps the issue is something to do with the USB-C port on the tablet (in reality, I think it is unlikely - both the assumption that the previous owner might've wanted to root the device and there is something wrong with the port even though it charges and transfer files perfectly fine). I am pretty sure that I am on the latest Sammy driver, but I guess I will double check.

There is also one more port on my PC that I could try, but it is USB-C, so I am going to have to do it with a USB-C to USB-C cable, and the port will clearly -not- be a USB 2.0 port as many recommends.
 
  • Like
Reactions: J.Michael

BillGoss

Senior Member
Sep 2, 2010
4,749
4,179
Sydney
OnePlus 3T
OnePlus 8T
every time i run any command this error came i googled tried everything solution but i dont know why this error.
i reinstall Magisk rooted again but stil this error

/system/bin/sh: pkg: inaccessible or not found

this error is not just for pkg update its for every thing.

Thanks in advance
That's because Termux won't let you run the pkg command as root because it screws up the the installation. You must only run pkg as user.
Nothing to do with Magisk.
 

pndwal

Senior Member
A/B = No
Ramdisk = Yes
SAR = Yes
FWIW, seems Tab S4 (Launch version Android 8.1, API 27) was using legacy ramdisk boot method when launched since legacy SAR required API Level 28 (Android 9). This is boot method A, Type 1 device here:
https://topjohnwu.github.io/Magisk/boot.html

Also, updates have converted device to 2SI ramdisk SAR, Method C, Type IV device (Running version 29).

Nb, this boot method is not officially considered SAR by Google, (considers only Initial rootdir; how the kernel boots the device). It is SAR by Magisk’s (John's) definition (considers Final rootdir; what the device ends up using when fully booted)
USB debugging is enabled and OEM unlocking is allowed in the developer options. I have a question though, if I am only trying to flash the current stock rom, a locked bootloader shouldn't be a problem right?
Correct, as bootloader will accept signing keys for stock ROM. See Android Verified Boot:
https://source.android.com/security/verifiedboot
Truth to be said, I -do- wonder if my bootloader is fully unlocked. The Magisk installation guide mentions something about needing the IEM unlocked and greyed before it's truly unlocked (something to do with Samsung's 'Vaultkeeper'), but I following the steps to reproduce that from multiple guides, 'the volume up long press' option to enable 'Device unlock mode' in the warning screen (2:41 in this video, or in this guide) simply doesn't show for my device. As far as I know, the Vaultkeeper 'later' and I do wonder if it hasn't been introduced only from the Tab S5SE in the video and onward. but unfortunately I haven't been able to get any confirmation in the Tab S4 forum.
Looks like bootloader is likely locked. Is there no indication in download / Fastboot mode (padlock symbol, etc?)
Thanks for that guide, I didn't come across it. I did wonder if there isn't a work around from having to use Odin, but all my searches pointed toward having to use it on Sammys. But first thing first, I just want to be able to restore to a stock ROM first. If I am not mistaken, this shouldn't need an unlocked bootloader, and if something goes wrong in the process, I should at least be able to restore the system.

On a sidenote, the device came with the bootloader locked and Knox hasn't been tripped. I just kind of wondering if the previous owner -really- wanted a rooted device but after spending hours doing all the things I am doing now, gave up and flogged the device and perhaps the issue is something to do with the USB-C port on the tablet (in reality, I think it is unlikely - both the assumption that the previous owner might've wanted to root the device and there is something wrong with the port even though it charges and transfer files perfectly fine). I am pretty sure that I am on the latest Sammy driver, but I guess I will double check.

There is also one more port on my PC that I could try, but it is USB-C, so I am going to have to do it with a USB-C to USB-C cable, and the port will clearly -not- be a USB 2.0 port as many recommends.
Quite possible previous owner tried I guess.

Seems you'll need to sort out driver / Odin issues, try fastboot method(s), check bootloader status etc to get proper unlock and ability to flash Magisk.

Sammy users may be of more help. 😛 PW
 

xAxB

Member
Mar 9, 2017
30
7
Looks like bootloader is likely locked. Is there no indication in download / Fastboot mode (padlock symbol, etc?)
In the download mode, it also says that the OEM lock is "Off" leading me to think that it's probably unlocked fine. Wish a Tab S4 user could confirm it but it's kinda quiet over there lol.

(While I am at it though, there is a DID number that I often see people remove from photos - I imagine there must be some important security reason for that, but what is it? Simply Googling "DID Number Android" didn't yield anything that seem to explain it..
 

dcarvil

Senior Member
Apr 20, 2016
485
260
(While I am at it though, there is a DID number that I often see people remove from photos - I imagine there must be some important security reason for that, but what is it? Simply Googling "DID Number Android" didn't yield anything that seem to explain it..

Try googling 'Android "Device ID"' instead. Here is one link - https://www.gtricks.com/android/2-ways-to-find-android-device-id-and-change-it/

It is basically a device identifier, but it is tied to the Android installation, not the device hardware. It will change when you flash a different ROM.
 

Top Liked Posts

  • 3
    At the end of the post I said there:

    Now something semi-related.
    My MagiskAlpha IS NOT hidden (not obfuscated)

    But RootBeer does not detect Root mngmt app?!
    It fully passes (when enabled in DenyList)

    If disabled in DenyList it detects BB, su, root, Magisk but still does not detect plain com.topjohnwu.magisk package

    Did I go insane?
    OK... I think I understand that you meant wipe adb dir. only after fixing app conflict... Still not sure why though... Guess possibly to fix other issues...


    Insanity is only a contributing factor...

    You're on Android 11+ I believe. APIs changed w/ SDK 31.

    Momo main screen seems answer your conundrum:


    🤠 PW

    The current version of RootbeerFresh on PlayStore is from February 2019.
    The target API/SDK level is 28 (Android 9).
    Code:
    package: name='com.kimchangyoun.rootbeerFresh.sample' versionCode='10' versionName='0.10' compileSdkVersion='28' compileSdkVersionCodename='9'
    sdkVersion:'15'
    targetSdkVersion:'28'
    It conforms to the regulations Google set for Android 9.​

    The current version of RootBeer Sample on PlayStore is from May 2021.
    The target API/SDK level is 30 (Android 11).
    Code:
    package: name='com.scottyab.rootbeer.sample' versionCode='10' versionName='0.9' compileSdkVersion='30' compileSdkVersionCodename='11'
    sdkVersion:'15'
    targetSdkVersion:'30'
    It conforms to the regulations Google set for Android 11.​

    Even on Android 12..
    RootbeerFresh will still find com.topjohnwu.magisk.
    RootBeer Sample will not find com.topjohnwu.magisk.

    RootbeerFresh - PlayStore - Link
    RootBeer Sample - PlayStore - Link

    Cheers. :cowboy:

    PS.
    I am not sure why the animation does not run on RootbeerFresh when in split screen. ¯\_(ツ)_/¯

    Screenshot from Pixel 5 (Android 12) and Pixel 4a (Android 11).
    Both RootbeerFresh and RootBeer Sample are added to DenyList.
    3
    Just keeping you on your toes. :p
    I corrected my ytpo.🙃

    Google normally refers to changes in Android level by API.
    source.android - WebSite - Link

    SDK is Software Development Kit.
    NDK is Native Development Kit.
    Equal to the API level they use.​
    developer.android - WebSite - Link
    Android 12 = API 31, NDK 31 and SDK 31.

    Cheers. :cowboy:
    Lit of bysdexia never hurts!

    Ah, yes - I'm an amateur sleuth, and was recalling vvb2060 / TJW bumps: 'Add new targetSdk domain' and 'Target SDK 31'. (I got fixated on 31 also 🤪)...

    I see vvb2060 changelogs do say '[App] Suitable for Android 12 API level'

    Interesting that newer Rootbeer fixed app detection for Android 11+, but if you check @zgfg's screenshot, he is already using 'Rootbeer Sample'.
    https://forum.xda-developers.com/t/magisk-general-support-discussion.3432382/post-85817131

    I can now confirm I get exactly the same results (I've just tried Rootbeer Sample; never tried Rootbeer before) on Android 11 device (Mi Pad 4, LOS 18.1, TJW Magisk 23001):

    'No Root Management Apps' are detected w/ Magisk App NOT hidden, whether Rootbeer Sample is added to hidelist or not! (Root Management Apps are detected on Android 10 device (RN8T) unless Magisk App is hidden.)

    My result w/ Rootbeer Sample in hidelist:

    Screenshot_20211023-151040_RootBeer_Sample.png


    So it still seems changes in Android API Level 30 are exactly as I indicated!

    These are summarised well by Momo home-screen comments (vvb2060, Rikka) I cited:
    "Google Play requires all apps updated after Nov 2021 to adapt Android 11, apps will not able to acquire the app list." and "Detecting installed apps has no practical meaning."

    Lesson for all on Android 11+:

    *** There is NO real point using 'Hide the Magisk app' function post Android 10 !!! ***

    This is because apps are prohibited from acquiring app list to detect installed apps anyway!

    Please say if I'm missing something. 😬

    🤠 PW
    2
    ...snip...

    PS.
    I am not sure why the animation does not run on RootbeerFresh when in split screen. ¯\_(ツ)_/¯


    ...snip...
    As I am sure you already understand, the images / layout and theerefore animations are within the APK based on screen resolution. By default, split screen makes the app think its running in landscape and the screen is only half the resolution/density. ie spit screen is two landscape screens of half the resolutioon.
    2
    Just tried Fresh too, same result as you.

    In case there's any confusion, to be even clearer:

    Lesson for all on Android 11+:

    *** There will SOON be NO real point using 'Hide the Magisk app' function post Android 10 !!! ***

    This is because all apps / updates hosted on playstore from Nov 2021 will be prohibited from acquiring app list to detect installed apps anyway!

    Apps older than this are NOT required to comply with Android 11 rules (API Level 30), so may still acquire app list / detect Magisk app. However no updates may be hosted on Playstore without complying, so such apps (banking etc) will clearly become obsolete / be abandoned in a short time anyway.

    - These changes are summarised well by Momo home-screen comments (vvb2060, Rikka).

    😁 PW
    If one still needs to hide the Magisk app, then instead of taking Hide Magisk app option in Magisk app settings page (again, not to be confused with Magisk Hide), the following works:
    Riru and Riru-LSPosed (Magisk modules)
    +
    Hide My Applist (LSPosed module)

    Screenshot below shows how RootBeer Fresh (old target API 28 that otherwise finds the Magisk apk) cannot detect Magisk apk anymore.
    Ofc, I have also DenyList enabled for RBF, to prevent detecting the Magisk itself

    I use that MHA module now also for 'dettaching' four apps from Google Play (same thing, MHA hides them from Google Play) to prevent updating them automatically or by mistake (e.g. one of them is YouTube because of Vanced root that requires me to stay on a particular YT version from July or so)

    Unlike with some other methods, it's easy to stop hiding/dettaching - just disable hiding in the MHA module
    2
    The current version of RootbeerFresh on PlayStore is from February 2019.
    The target API/SDK level is 28 (Android 9).
    Code:
    package: name='com.kimchangyoun.rootbeerFresh.sample' versionCode='10' versionName='0.10' compileSdkVersion='28' compileSdkVersionCodename='9'
    sdkVersion:'15'
    targetSdkVersion:'28'
    It conforms to the regulations Google set for Android 9.​

    The current version of RootBeer Sample on PlayStore is from May 2021.
    The target API/SDK level is 30 (Android 11).
    Code:
    package: name='com.scottyab.rootbeer.sample' versionCode='10' versionName='0.9' compileSdkVersion='30' compileSdkVersionCodename='11'
    sdkVersion:'15'
    targetSdkVersion:'30'
    It conforms to the regulations Google set for Android 11.​

    Even on Android 12..
    RootbeerFresh will still find com.topjohnwu.magisk.
    RootBeer Sample will not find com.topjohnwu.magisk.
    Thanks (mostly that I'm not insane)

    Confirning, RootBeer Fresh target SDK 28, RootBeer Sample target SDK 30

    and yes, the old Fresh still detects (on A11) com.topjohnwu.magisk (Magisk app not hidden)
  • 11
    Hey all,
    As promised, I wrote up a step-by-step tutorial for the Pixel 5a (though it applies to about all the Pixels, much of it I used on my Pixel 2 over the past 4+ years):


    I know it's a book, but I wanted to make sure I put it in everyday language and tried to make it so even a first timer could go through it and feel confident moving forward and getting root, passing SafetyNet, and update with system updates in the future with confidence.

    Anyhow, it's my attempt to give something back to the community I've gained so much from and leaned on so many times for help. If it helps even one person I'll be happy.

    Thanks again to the entire community, and particularly the folks who have been here helping tirelessly and without reserve to get everyone up and going. You all know who you are and I gave proper name attribution in the tutorial thread. I'm exhausted, so I'm gonna go grab some dinner, that took hours to write! hahahahaah!!

    Be well everyone, SO happy my P5a is fully functioning, you folks are just amazing.

    hfam
    11
    diareuse has been MIA for a bit. Pinged him a couple times on the GitHub Issues, but no answer. Hopefully he's okay. 😕

    Mmm. Nothing on his Twitter since February... That's concerning.

    Yeah and in a week it'll be 1 full year since his last commit to Magisk too. 😕

    Good news is diareuse just reached out and is indeed alive and well, just working on multiple paying jobs in real life. 🙂
    11
    Latest Alpha Magisk cb4361b7-alpha

    *** For Mavericks only! ***

    Riru / Zygisk coexistence seems to be back!
    🎉🎊⚡🥝🧀

    Chinese Translated:
    alpha update log
    Magisk (cb4361b7-alpha)


    ● [General] Based on cb4361 b7, the content that has been merged upstream is no longer listed
    ● [App] Correctly process any data from magiskd
    ● [App] Support SharedUserld
    ● [App] Delete the backup file after restoring the boot image
    ● [App] Built-in current version update log
    ● [App] Use the local version when the stub cannot be downloaded, now it can be used completely offline
    ● [App] Switch to the modern time API of Java 8
    ● [DenyList] handle suspicious props
    ● [App] Update SafetyNet extension, update snet.jar version to 18
    ● [General] Add an obsolete cgroup v2 path
    ● [Sepolicy] Add execmem to allow zygote and system_server Hook
    ● [MagiskSU] If necessary, fall back to /dev/pts
    ● [Zygisk] Fix Circumstances that may not take effect
    ● [Busybox] Cancel optimization based on undefined behavior
    ● [General] No longer automatically unlock the device block
    ● [Zygisk] From the current situation, there is no crash report to prove zygisk and riru
    Incompatible, temporarily cancel the restriction, observe the situation

    Upstream update log
    From 23.0 to cb4361b7


    ● [General] supports pure 64-bit devices
    ● [General] Support Android 12 emulator
    ● [Zygisk] Code Injection Framework
    ● [General] Remove MagiskHide
    ● [General] Support special simulator loading module
    ● [MagiskBoot] Support zImage format
    ● [MagiskBoot] Add zopfli encoder
    ● [Magisklnit] Support bootconfig
    ● [App] Repair installation function will now check the script under /data/adb/magisk/ is not updated
    ● [MagiskInit] Support some Meizu devices
    ● [MagiskSU] If the kernel supports it, use isolated devpts
    ● [MagiskSU] Fix the pts configuration code, now no extra sepolicy rules
    ●[MagiskBoot] Support v4 boot image header format
    ● [MagiskInit] Support opltus.fstab for some OnePlus and Opal devices
    ● [App] Update modules to be restarted, not allowed to be marked as pending deletion
    ● [App] Delete online warehouse
    ● [App] Add mounting information to the saved log file
    ● [App] Adapt to Android 12 API level
    ● [App] Display the waiting pop-up window when the app is hidden/restored
    ● [Stub] Open source obfuscation function
    ● [Script] Check and display the sepolicy rule folder of the module
    ● [App] Hide screen overlay for pop-up window, Android 12+ is required
    ● [App] Delete the floating bottom bar and change it to the general bottom operation bar
    ● [General] Support special compilation cache
    ● [General] Add rejection list function
    ● [App]Delete DOH
    ● [App]Delete SafetyNet
    ● [App] Allow the log page to be opened when Magisk is not installed
    ● [App] Display Zygisk status, add restart reminder
    ● [Zygisk] Correctly handle child zygote
    ● [Zygisk] Disable conflicting riru modules
    ● [Sepolicy] Fix Android 8 terminal cannot get root

    👍 PW
    10
    cb4361b7-alpha report:
    w/ RN8T, Stock MIUI, Android 10

    Two reboots needed initially.

    Zygisk & Riru w/ Universal SafetyNet Fix 2.1.1, LSPosed, Un-Share all working fine.

    SafetyNet passing w/ SafetyNet Google Play Services process denied.

    ViPER4Android FX Neon driver status normal.

    With Zygisk enabled Riru-MomoHider causes instability / system crashes even when only app_zygote_magic hiding is configured. 😕

    Great progress! 👍 PW
    Some have been waiting..
    Some have been using vvb2060's alpha builds..

    I have been sneaking a peak by running personal builds from John's master branch. :sneaky:
    Magisk - GitHub - Building and Development - Link

    A few days ago (23.Sep.2021), I was surprised when my OnePlus 6T passed SafetyNet. o_O
    It has been about three or four weeks since it passed SafetyNet.

    Problems I have run into..
    Every now and then, something misfires on boot and Magisk is not active (Installed N/A).
    Normally a reboot is all that is needed, occasionally I have to re-install magisk.

    I ran into an old issue on my 6T (clean install) installing Magisk.
    I had to flash a magisk patched image to both the active and inactive boot slot.
    Need to test again with another clean install.​

    Currently I have a few devices running these (sneak peak) build(s) and passing SafetyNet.

    OnePlus 5T
    Older device, does not have the hardware for hardware attestation.
    • Stock OnePlus OS 10.0.1 (SDK29)
    • Magisk (snapshot build)
    • MagiskHidePropsConf (Magisk Module)
      • Enable Zygisk
      • Enable DenyList
      • add com.google.android.gms.unstable to the DenyList.
        Magisk is in /sbin so only needed to Deny .unstable
      • Enable the MagiskHide props. option in the MagiskHidePropsConf module.
    Reboot in between steps as needed.

    OnePlus 6T
    • Stock OnePlus OS 11.0.0 (SDK30)
    • Magisk (snapshot build)
    • Universal SafetyNet Fix (Magisk Module)
      • Enable Zygisk
      • Enable DenyList
      • add com.google.android.gms.unstable to the DenyList.
      • add com.google.android.gms to the DenyList.
    Reboot in between steps as needed.

    Pixel 3a
    Custom rom that passes SafetyNet on it own.
    Installing Magisk breaks SafetyNet.

    • ABC Rom 11 (SDK30)
    • Magisk (snapshot build)
      • Enable Zygisk
      • Enable DenyList
      • add com.google.android.gms.unstable to the DenyList.
      • add com.google.android.gms to the DenyList.
    Reboot in between steps as needed.

    Earlier today, I setup an update channel so I could test a few more things.
    • Install update from online.
    • Repack (Hide/Restore) the Magisk app.
    All worked. :)
    Note:
    I will have to wait until the next commit(s) to see if I can update while the Magisk app is hidden. 🙃

    ---

    So far The next step of growth and development of Magisk is looking great. :)

    I am excited and eagerly waiting for the next canary build for proper testing. :D

    Cheers all. :cowboy:

    PS.
    Some screenshots from my 6T. ;)


    Edit (5.Oct.2021):
    Please see my follow up post.
    Post 48,294 - Link
    9
    Latest Alpha Magisk Chinese Translated:
    (For mavericks only! 😬)

    alpha update journal Magisk (cb4361b7-alpha-2)

    • [General] Based on cb4361b7, the content that has been merged into the upstream will not be listed anymore
    • [App] Correctly process any data from magiskd
    • [App] Support SharedUserld
    • [App] Delete the backup file after adding a thick boot mirror
    • [App] Built-in current version update log
    • [App] Use the local version when you cannot download the stub, now it can be used completely offline
    • [App] Switch to Java 8 modern time API
    • [DenyList] Dealing with suspicious props
    • [App] Expand and update SafetyNet, update the snet.jar version to 18
    • [General] Add an outdated cgroup v2 path
    • [Sepolicy] Add execmem to allow hook in zygote and system_server
    • [MagiskSU] If necessary, fall back to /dev/pts
    • [Zygisk] Repair may not take effect
    • [Busybox] Cancel optimization based on undefined behavior
    • [General] No longer automatically unlock the device block
    • [Zygisk] There is no report to prove that zygisk is incompatible with riru, remove the restriction
    • [Resetprop] Completely erase the old content when modifying/deleting
    • [General] Fix the race condition of thread pool
    • [Magisklnit] Do not intervene when booting to DSU

    How to install ?

    To install and use Magisk through the Magisk application, the general relationship should be completed directly in the application. For special circumstances such as the first installation, the image should be patched and then flashed in with the fastboot/odin tool. Customizing Recovery is not a supported method.

    You update the journal
    From 23.0 to cb4361b7

    • [General] Support pure 64-bit devices
    • [Generall supports Android 12 emulator
    • [Zygisk] Code injection framework
    • [General] Remove MagiskHide
    • [General] Support Simulator to add modules
    • [MagiskBoot] Support zimage format
    • [MagiskBoot] Add zopfhi encoder
    • [MagiskInit] Support bootconfig
    • [App] The repair installation function will now check if the script under /data/adb/magisk/ has not been updated
    • [Magisklnit] Support some Meizu devices
    • [MagiskSU] If the kernel supports it, use isolated devpts
    • [MagiskSU] Fix the pts configuration code, now no additional sepolicy rules are needed
    • [MagiskBoot] Support v4 boot image header format
    • [Magisklnit] Support oplus.fstab for some OnePlus and Opal devices
    • [App] Restart and update modules, not allowed to be marked as pending deletion
    • [App] Delete online warehouses
    • [App] Add mounting information to the saved log file
    • [App] Suitable for Android 12 API level
    • [App] Display the waiting pop-up window that is running when hide/restore the original app
    • [Stub] Open source obfuscation function
    • [Script] Check and display the sepolicy rule folder of the module.
    • [App] When the window pops up, hide the screen helmet and add layer. Android 12+ is required.
    • [App] Delete the floating bottom bar and change it to the general bottom operation bar.
    • [General] Support compilation cache
    • [General] Add rejection list function
    • [App] Delete DoH
    • [App] Delete SafetyNet
    • [App] Allow the log page to be opened when Magisk is not installed
    • [App] Display the status of Zygisk, add a reminder that restart is effective
    • [Zygisk] Correctly handle the child zygote
    • [Zygisk] Disabled riru module
    • [Sepolicy] Fix Android 8 terminal cannot get root

    👍 Marvin.
  • 1067
    This is the place for general support and discussion regarding "Public Releases", which includes both stable and beta releases.
    All information, including troubleshoot guides and notes, are in the Announcement Thread
    156
    Hello, I haven't given much support on XDA lately. It can be resulted from
    • University started and I have limited free time. In fact, I mostly develop during midnight
    • I live in Taiwan, which has large time zone differences between my European/American contributors/testers, which usually forces me to stay up late at night to discuss/test stuffs.
    • The new version is about to come, I don't want to spend effort on supporting old releases
    The planned update is delayed again and again, to some point I think I'll shed some light about what has been happening lately, also along with some announcements.

    New Forum!
    As you might have already discovered, Magisk got its own subforum on XDA! Many thanks to all the support you gave me, and much more information/features/support is about to come!
    **For developers supporting all the devices that are not using standard Android boot format, feel free to create threads in this section (actually, PLEASE do so) for your favorite devices after v7 is out. As I currently know, Asus devices require signing the boot image before flashing, and is model dependant; Sony devices seems to use ELF kernel that is unpatchable, or some has two ramdisks (inner + outer), both requires different workarounds; LG bootloader locked devices has to manually "BUMP" the boot image after flashing Magisk..... and there may be lots of other crazy boot image formats that haven't come up to my attention yet.
    It is impossible for me to support all these non-standard boot images, and I hope the community can collaborate to make Magisk running across all the devices. Overall, community collaboration is what XDA about :D

    The Pixel Phone
    Some of you might already know this news, that the next Pixel Phone right around the corner seems like it does not have ramdisk in boot image, which pretty much wrecked Magisk in all ways. However, it pretty much doomed root itself too. Kernel modifications is inevitable IMO, so I'll try to migrate my scripts to C programs that could possibly be included into the kernel itself. Note that I'm not familiar with linux kernel, I'm not even sure if my idea and concept is correct or not. But once the device is available, I think developers will find a way to bypass all the difficulties, and I'll do my best to learn things ;)

    Current Progress
    In the past month, I've spent quite some time learning SELinux, so that I can avoid using SuperSU's sepolicy patches. Thanks to the helps and tips from @phhusson and @Chainfire, I finally have a much clearer understanding of how SELinux works. The Magisk core parts (the scripts, boot image patches, new features, more supports) are actually done some time ago. What is causing all the delays is the Magisk Manager.
    To be completely honest, although I can code in Java without much issues, Magisk Manager is actually my first Android application, I had to reach out for assistance, and fortunately awesome developers like @DVDandroid and @digitalhigh contributed a lot, which makes the current Manager awesome.
    After the repo system and module management is mostly done, I was about to do some adjustments and release, but what we really done is decided to add another feature: auto-unroot with per-app settings. I decided to wait for it to be finished, and then do my adjustments. Due to reasons that'll be mentioned later, this feature will likely not be available for the next release (should come in future updates)

    Safety Net Disaster
    Those who are using Magisk for Safety Net bypass purposes must have known that Google recently updated the detection method of my Systemless Xposed. I still have no idea what Safety Net is detecting, so currently I cannot fix it on my side (also because I'm busy working on the next update). However, suhide developed by @Chainfire is able to hide Xposed and worked fine.
    However, only my Systemless Xposed v86.2, which is based on SuperSU's su.d, is supported using that method. v86.2 and v86.5 (latest, Magisk based) have nearly identical binaries, and the only difference is the path where the binaries are stored.
    I'm still not sure what's the real issue for it not being supported, I just hope it is not done intentionally.

    Conclusion
    Due to the fact that my Safety Net bypass is not 100% perfect now, I do not want to spend any more time waiting for auto-unroot to be polished. What I'm doing now is finishing up all the things I'd like to change in Magisk Manager (it has been a while since I last contributed to Manager, my fellow developers are doing all the heavy job), which might take a little more time, after that, packed with tons of information to be announced in Magisk Section, I'll release the long awaited update.

    Hope this lengthy post gives you the idea of the whole situation, and again thanks for all your support!!
    121
    Ah, some Chainfire bashing, I hope it is not too late for me to exercise additional villainy.

    First, let me make clear I have nothing against @topjohnwu, nor against Magisk. Magisk is an interesting project and it certainly displays @topjohnwu ingenuity and persistence. I don't doubt we will see more interesting things from his hands.

    -------------------------

    What has happened here is not all that dark and complicated, from either end. I returned from holidays, and someone pointed me at Magisk. My first thought: interesting!

    Among other things, the thread lists some issues with SuperSU, which in combination with the phrase The developer also requests users to not bug Chainfire with compatibility requests for SuperSU with Magisk from the portal article, raised my left eyebrow by nigh half an inch. The popular systemless xposed mod is apparently now based on it, and apparently it now no longer works with SuperSU, and apparently I'm not supposed to fix that, nor any of the other found issues. I found that a bit weird. So yes, I have told @topjohnwu that I was a bit surprised he was posting about issues with SuperSU without notifying me about them (I can't fix or help fix issues I'm not aware of, after all).

    He's also spreading a modified version of the SuperSU package, which is not all that uncommon, nor necessarily a problem. I have not looked into what he modified, I only ran a few quick tests on one of my devices, and found some commonly used commands run as root to be broken. I have informed him of this as well.

    It appears the tool of choice for Magisk is phh's Superuser, because of some of the mentioned issues with SuperSU. That's fine by itself, but fixing issues in that superuser by incorporating SuperSU's binaries into it is a somewhat questionable practise. After all, SuperSU is a commercial closed-source package that helps pay for my dinner, and superuser is a direct competitor. I have informed him that I was surprised he did this without asking for permission. I have expressed similar surprise on him spreading a modified version of LiveBoot (which helps pay for a snack now and then).
    @topjohnwu has also stated that Magisk's scripts are largely influenced by mine (I have not checked). Scripts based on mine are used all over the place on XDA, some people have crafted amazing things based on them, I have never made an issue of this (otherwise I would have just made them binaries). But yes, I have also stated to him that I don't think it's very nice to base something on one program, and then using that to (almost exclusively) push something directly competing with that program.

    tl;dr Towards @topjohnwu, I have:
    - expressed surprise he has issues getting Magisk to work with SuperSU, and has chosen not to inform me about those
    - expressed surprise he is using SuperSU binaries in a competing superuser without permission
    - expressed surprise he is posting a modified LiveBoot without permission
    - informed him of issues with the modified SuperSU he has posted
    - let him know I thought it wasn't very nice to be applying my scripts to benefit seemingly exclusively that same competing superuser

    To be crystal clear:
    - I have not asked for an apology
    - I have not asked for Magisk to be abandoned, neither the root hiding nor systemless module parts, and certainly not systemless xposed
    - I have not made an issue of any of this anywhere, until this post
    - I have not even specifically asked for anything to be taken down (though obviously in my opinion the other superuser package mixed with SuperSU's binaries, as well as the LiveBoot package, should go)
    - I have not reported this thread to XDA moderators for copyright violations or otherwise

    While my conversation with @topjohnwu may not win any awards for being friendly (though it may win some for brevity), I think all things considered my response has been rather mild. To be perfectly honest, until the apology post, I thought this was over with already. I think the apology post was triggered because I haven't replied to his last PM for a while - I was in the zone, it happens.

    To emphasize again, I have nothing against @topjohnwu, Magisk, or systemless xposed, and it is certainly not my goal to see any of them go. If it can be made to work together with SuperSU, great.

    I get it though: you think of something, you want to see if you can make it work, you finally get it to work, you publish it, it takes off - enthusiasm gets the better of you. Maybe in the rush some mistakes are made. That doesn't mean you have to just drop it and run. None of my stuff would make it past 0.1 if I stopped at the first big mistake :)

    Aside from said being in the zone coding, I usually regret actually responding to these sort of things the day after, which has made me hesitant to reply. Surprise me.
    76
    Thread temporarily closed so everyone sees this.

    The flood of "SafetyNet isn't working for me either!" posts are not helpful, at all. Please refrain from posting further, it will be looked into. Please do not forget that not passing SafetyNet is 100% NORMAL AND INTENDED when you have an unlocked booloader or running custom firmware. These are workarounds and they will be worked around in turn.

    The Flash
    Forum Moderator

    EDIT: Thread is reopened... I will be cleaning any SafetyNet posts for a while to keep the thread clean for real issues.
    75
    Hello everyone!

    I am aware that Google has updated Safety Net that makes Magisk itself a no go for Android Pay. In fact, I witnessed the change live while I am developing the new magiskhide, which should hide all Magisk modules and Magisk installed root.

    Google is serious about Safety Net now, clearly hunting down all possibility to run Xposed with Safety Net passed. I spend quite some time examining the new security measures last midnight, and fortunately it seems that it is possible to run Magisk and root along with Safety Net if no Xposed is running. I'm glad I removed the old root toggle at the right time lol, that is no longer feasible with the latest detection.

    So stay tuned for the next update, it will come with bug fixes, along with the new magiskhide to bypass that Safety Net.

    Google, how will a few systemless mods do any harm :p:p