Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magisk Hide on ADB #688

Closed
zeromod opened this issue Oct 18, 2018 · 7 comments
Closed

Magisk Hide on ADB #688

zeromod opened this issue Oct 18, 2018 · 7 comments

Comments

@zeromod
Copy link

@zeromod zeromod commented Oct 18, 2018

ADB is failing to detect root due to magisk hide.
Scenario : adb root command from pc doesn't work when magisk hide is activated, when disable it and rebooted, command works.
Magisk version : 17.2
Android : 9.0
Device : mido

@vvb2060

This comment has been minimized.

Copy link
Contributor

@vvb2060 vvb2060 commented Oct 18, 2018

Intended behavior. You can use su after adb shell.

@zeromod

This comment has been minimized.

Copy link
Author

@zeromod zeromod commented Oct 18, 2018

I want to push an apk from pc to /system via adb push by remounting as rw after a adb root command.

@vvb2060

This comment has been minimized.

Copy link
Contributor

@vvb2060 vvb2060 commented Oct 18, 2018

su -mm use global mount namespace

@zeromod zeromod closed this Oct 18, 2018
@nlburgin

This comment has been minimized.

Copy link

@nlburgin nlburgin commented May 5, 2019

If this is intended behavior, then it needs to be documented better, somewhere besides here.

Like in the README.md and/or in here

It may be intended behavior, but unless Magisk warns that this is going to happen, then it is very counter-intuitive for the user. The user doesn't understand why they get a adbd cannot run as root in production builds message, and when they search the internet for answers, usually they find instructions on how to patch the boot img to set the security settings in default.prop (except in this case, they're already set and Magisk is just hiding them).

I spent the whole day assuming it was my ROM that had failed to set up its adbd as root-capable, but it turned out that Magisk Hide was hiding the relevant properties, not just from apps that were specifically enabled for Magisk Hide, but from the whole system (including from adbd which is something that one would intuitively expect to have access to root).

And simply running adb shell and then su is only a partial workaround because it still doesn't give root access to adb push, adb pull, etc. Unless I'm mistaken, running su from adb shell doesn't really give you any more access than you'd have by running su from the terminal app inside the phone; it doesn't give you the full functionality of a rooted Debug Bridge.

If the design of Magisk Hide is inherently incompatible with rooted debug bridge, that's fine, but users should at least be warned of this incompatibility, preventing it from appearing as unexpected and confusing behavior.

EDIT: And the documentation should also note that (at least on Android 9) disabling Hide to get a plain umasked rooted system, doesn't seem to take full effect until after a reboot. That was the only way I could get rooted adb working, was to reboot the phone after disabling Hide.

If turning Hide off is supposed to work without a reboot, then I can file a separate bug report for that. But if it's intended behavior, then once again that should be made more obvious with some sort of documentation somewhere.

EDIT 2: I'm making this it's own issue since I'm not sure it will get noticed here. I don't think that's really redundant/a duplicate issue if it's phrased as a documentation bug rather than a functionality bug.

@edrex

This comment has been minimized.

Copy link

@edrex edrex commented May 12, 2019

I am seeing the message with adb root but disabling Magisk Hide and rebooting doesn't help (Bullhead/stock 8.1.0). Is there some other condition under which this is known to happen?

@jimbo1qaz

This comment has been minimized.

Copy link

@jimbo1qaz jimbo1qaz commented Aug 2, 2019

Same issue, moto g5 plus, potter, stock ROM with ElementalX kernel to fix magisk module loopback mounting, Android 7.0. Disabling Magisk Hide and rebooting still produces adbd cannot run as root in production builds.

@daedroza

This comment has been minimized.

Copy link

@daedroza daedroza commented Aug 31, 2019

@nlburgin : Thanks for explain things clearly. Clearly, A/B is just a waste of time. I have to flash whole ROM for one line of code change and it is getting on my nerves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.