UPDATE 4.1: HackProtect Extension (No Permissions Needed) - Better Emulator Detection

There is only one systemuser. it may not be perfect. Just another piece of evidence there is a potential problem.

1 Like

My phone is not rooted, but System user returns true !
But thatā€™s not a problem because I only use isRooted and isEmulator :slight_smile:

3 Likes

I will work on the isSystemUser. I have seen some strange behaviour. I am going to add a spy package component as well, so it will look for a list of packages that are potentially dodgy.

3 Likes

Tested and working as expected! :+1:

And just additional information: Magisk users can simply pass from the root checkers and can hide root from apps. So you may need to check if Magisk is installed or not.

image

2 Likes

You canā€™t detect Magisk, by definition. Otherwise Systemless Root would be pointless. :wink:

6 Likes

Are you pointing out a bug, a development feature or a flaw for the sake of it? Please elaborate.

Itā€™s just that you canā€™t detect Systemless Root. The way Magisk works, it canā€™t be detected.

3 Likes

Are you saying this is useless or are you saying you want to help solve it?

I accept my extension is not perfect. If you would like to give help on how to fix it, I would love to hear it.

Your extension is potentially very useful to developers. :slight_smile:

It works exactly as intended. Your extension does work perfectly, and thereā€™s nothing to fix. It does detect root, but the way Magisk is designed, itā€™s possible to bypass any rootcheck mechanism. Thatā€™s the beauty of Magisk, and I love it. I wouldnā€™t want apps blocking me because I have root or Lucky Patcher.

TL;DR: Your extension works fine. Donā€™t worry.

5 Likes

You could add another check to detect if the package name ā€œcom.android.vending.billing.InAppBillingService.BINNā€ or ā€œcom.android.vending.licensing.ILicensingServiceā€ exists. Lucky Patcher is invisible, but requires these two packages to mess with IAPs and License Verification respectively. :slight_smile:

2 Likes

Sooo How do I get it to track Magisj? Lets figure this out and I can add it. An ideas?

That coincides with my thought of a ā€œnasty pacakgeā€ lookup.

Lets gather them together and I can plug it in.

Thanks mate!

3 Likes

For good or for bad, there is no way. Itā€™s literally impossible.

P.S. Point to be noted, Iā€™m a user of all the ā€œmaliciousā€ things being blocked. This extension will hurt me in a sense. :joy:

3 Likes

Oh yeah, I forgot this feature for a while :sweat_smile:

Thatā€™s why I love Magisk :grin:

3 Likes

What about making a component that checks the app name instead of the package name?

1 Like

Bad idea, since an App Name isnā€™t a unique identifier.

3 Likes

Yeah, but I guess that not so many other apps are called Magiskā€¦
Guess it depends from the kind of app, and after all is the most accurate way to see if itā€™s installed or not (as it is the only way ;___; )

1 Like

I have to admit, youā€™re right. I didnā€™t think of detecting App Name. :joy:

4 Likes

The package name cannot be changed without modifiying the packae and resigning it.

If it is not signed, well then you are root, and we get ya there.

Package name is a far better indicator I think.

4 Likes

@Franck_G28 recently implemented this in his game, and Iā€™m just plain disappointed. If I have a choice between keeping root on all my devices, or using an app, give me SU any day.

3 Likes

Just message me about it. You say in the thread there are issues with Magisk, and I am open to suggestions. If you are disappointed, then you can help me with it. Show me where it does not work for you, and we can fix it together.