#Designing a Reliable, Lightweight System for Blocking Unknown Apps and Websites on Android

26 messages · Page 1 of 1 (latest)

uncut rapids
#

I’m building a personal Android device-owner app that blocks distracting apps and websites. It already works for apps using a hardcoded blocklist of package names, enforced deterministically.
For websites, I’m using a lightweight DNS filter via VpnService to block known domains. This works for stable sites but fails for constantly changing ones (e.g., mirror/anime sites).
The issue is handling unknown apps or domains. I need a simple, reliable BLOCK/ALLOW decision using minimal input (name, package, domain, or basic metadata). I tried using Gemini, but it’s too inconsistent for enforcement.
I want a lightweight, practical solution without building a full ML system.

Constraints:

highly reliable / deterministic behavior
low latency
minimal data inspection
no user bypass or settings
hardcoded allow/block lists remain primary
feasible for a solo developer

Question:
What is the most practical way to handle classification of unknown apps/domains in this setup?

calm sailBOT
#

This post has been reserved for your question.

Hey @uncut rapids! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 720 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

ruby pasture
#

For apps, Google Play categories could be useful

#

For websites, you can't do it effectively/you can't block anything without a whitelist making the device unusable. Maybe Google provides an API that can be used to categorize websites

calm sailBOT
#

💤 Post marked as dormant

This post has been inactive for over 720 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.

uncut rapids
ruby pasture
uncut rapids
#

that seems interesting ill check it out

ruby pasture
#

idk what you can do with it though

#

maybe there's also some way of getting metadata about installed applications

#

But in general, you cannot reliably block things like that. You need some level of trust.

ruby pasture
#

Also maybe another app store has a useful API. For example, you could only allow installing apps present in F-Droid and check the metadata there

uncut rapids
#

the installed packages already contain some data though, but i might use the api with considerating to scape some data to train a light ml model llater

ruby pasture
uncut rapids
#

i do have models, but i will be frank depending on just the model or regex or evaluation methods isnt working so i did a scoring algorithm using all three when the score crosses threshold and it is more than confident to get rid of it, it removes it

#

the reason i was hoping to avoid training lightweight models is because it is really tough to get good quality data for my use case, apps can be categorised, but another feature which which uses vpn service and catch dns queries to filter domain names, the data is okayish if i web scrape, but the confidence is very low in these due to data quality, i trained them on 2k rows for domain names and 2k for apps 2 seperate models

ruby pasture
#

there are also some big lists of websites for certain topics

uncut rapids
#

the thing is if i were training i am basically doing a ml classifier, so either yes or not simplistic enough but its a pain to get these data sets marked

#

i was considering fine tuning a light model like qwen 2.5b

ruby pasture
uncut rapids
#

feature extraction? (idk much ml)

ruby pasture
uncut rapids
#

nvm i got some ideas thanks

calm sailBOT
# uncut rapids nvm i got some ideas thanks

If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.