Magisk-Modules-Repo / MagiskHidePropsConf

This tool is now dead...
MIT License
2.01k stars 278 forks source link

Can this be used to hide that USB debugging is enabled? #116

Closed nl255 closed 3 years ago

nl255 commented 3 years ago

I have noticed quite a few apps are now checking if USB debugging is enabled and refusing to run if it is. Someone said this could be used to hide that and allow them to run without having to disable USB the debugging setting but I couldn't find any instructions on how to do so.

Didgeridoohan commented 3 years ago

They're probably talking about changing the props related to ADB/USB Debugging. If USB debugging is enabled, the following three props are set to adb: persist.sys.usb.config sys.usb.config sys.usb.state

But if USB debugging is disabled they are all removed, which suggest that if you use the module to delete those props you'll remove the possibility for apps to detect if USB debugging is enabled. But, you'll also effectively disable USB debugging... It's exactly the same thing as if you'd go into Developer options and disable the toggle. You could of course change them to some other value than adb, but it would have the same effect.

To keep the option enabled but hidden from apps you'd have to use more advanced stuff (Riru/Xposed/EdXposed/LSPosed).

Once the next Magisk release is here I've been playing with the idea to maybe lookig into zygisk and implement this kind of stuff into the module, but that's not going to happen anytime soon.

nl255 commented 3 years ago

Unfortunately I can and have done all that with tasker (by running the command "settings put global adb_enabled 0" as root, then setting it back when the app is not running) but I was hoping there was a way to hide it without disabling it as the only xposed module I found for doing so doesn't work with the app in question.

Didgeridoohan commented 3 years ago

@nl255 To me, the Tasker way of doing it sounds like the simplest way... Is it that important to keep USB debugging enabled?

ysc3839 commented 3 years ago

You can use riru_location_report_enabler to fake property for specific app.