question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possibility of using Blocker as system app and don't require root?

See original GitHub issue

Is it possible to make Blocker as system app and use it without root?

maybe put the blocker apk to /system/priv-app/ and whitelist required permissions to a file under /system/etc/permissions/ ? https://source.android.com/devices/tech/config/perms-whitelist could it call pm, cmd package or read/write to /data/system/ifw/ then?

https://developer.android.com/reference/android/Manifest.permission#CHANGE_COMPONENT_ENABLED_STATE

Allows an application to change whether an application component (other than its own) is enabled or not. Not for use by third-party applications. Constant Value: “android.permission.CHANGE_COMPONENT_ENABLED_STATE”

Is it possible to use this to enable/disable app components?

if this could work, we can package Blocker as a Magisk module, or make it TWRP flashable. Since google seems don’t want this kind of app on Play Store, Magisk repo probably could be a better place if Blocker could works this way. 🤔

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ixearthcommented, May 22, 2020

write your app as a in-system whitelist is not recommended and dangerous

No I don’t think so, I think it’s a good idea to use open source Apps as system-app to make use of Android hidden APIs (such like ifw and appops). Those are just features that custom ROMs are supposed to provide, we just make it a (magisk) module or use TWRP to flash these additional files. This is especially useful for people who don’t want root.

My suggestion is having two apks for the one require root and the one only works as system app, and release the first one on F-Droid, pack the second one into a magisk module or TWRP flashable zip.

1reaction
lihengguicommented, Apr 16, 2019

I could make an extra selection in the controller settings. But recently I’m quite busy, I will add it into my checklist.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Trick Apps Into Thinking Your Android Is Not Rooted
If you find that you can't launch certain apps on your rooted device because they're blocked, then follow these instructions to hide root....
Read more >
App Permissions on Android & How to Control Them - AVG
App permissions give apps control of your device and access to your data. Learn which Android app permissions to avoid and allow and...
Read more >
How to block ads on Android, with root and without root
One of the easiest ways to block ads on Android smartphones is by changing to an ad-blocking service's private DNS provider. This method ......
Read more >
Why You Should (Or Shouldn't) Root Your Android Device
A rooted Android device is more powerful, but it's also more risky. ... Let's say you don't like the system theme on your...
Read more >
Google to remove all VPN ad blockers that don't comply with ...
You need root access to remount the system partition or overlay an image on top of it containing your certificate. This assumes apps...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found