yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] mermade:
I just wanted to highlight few points to all the forum members regarding blocking ads/trackers/analytics on mobile. Like many, I too hate ads/privacy trackers, etc. and so I have decided to start a Domain group that can block all the mobile ads/trackers using Netpatch. I have had some experience with this for sometime and here are my findings:

Connections to ad/tracking domains are triggered by two ways:

a. Browsing internet using browser -> Generic ads/trackers to target mostly desktop users. However, it also targets mobile users on mobile sites. Here a generic hosts file is best used along with other mobile subscriptions if needed.

b. Running other third party apps -> Where ads/trackers specifically target mobile data (contacts, sms and other analytics, etc.). Here a mobile filter subscription is best used. From what I have noticed, regular filters like Adblock, Steve Black, etc. will not be of much use here.

If you are mostly going to just browse the net on your phone and not use many apps, then you can create subscriptions using a host like Steve Black host which itself includes 15 other hosts like MVPS, AdAway, Dan Pollock, etc. Be careful as the bigger the host file and the more you add them, more memory will be used.

However, if you are a regular mobile user running third party apps, then I would suggest using a mobile specific filter subscription like the one I have created (attached with this post) after watching the connections from various apps over several days. I wouldn't say that this list is complete but should be fairly sufficient for most of them.

The best approach is to watch the connections immediately after installing and running the app and blocking them after doing some research on Google. Hope this helps you guys.
[Android Apps and Games] mermade:
OP: I have created an issue on Github to add some mobile filters.

https://github.com/netpatch/groups_for_netpatch_firewall/issues/1
[Android Apps and Games] netpatch:
Hi, Thank you very much for your feedback and suggestions.

1, About priority, 100 has no special meaning. You can create a group and set it's priority to 200, then it will be matched first.

For example, if you have two groups,

gourp A's rule is block with priority 10, group B's rule is direct with priority 11.

if you accecss www.domain.com, NF will first lookup it in group B(because it has the highest priority), if group B contains www.domain.com, then fiter process stop, the group B's rule is applied.

if group B dosen't contain www.domain.com, then NF will second lookup it in group A, if group A contains www.domain.com, then filter process stop, the group A's rule is applied.

if all groups don't contain www.domain.com, the default rule will be applied.

2, "show country in network logs" and "edit item in group", I have collected them to NF's requested features list, they are maybe added in the future version or not.
[Android Apps and Games] netpatch:
Thank you for your feedback and information.

I'm reviewing the code and trying to fix these two bugs. It maybe need some time.
[Android Apps and Games] netpatch:
Hi mermade, greate job. Thank you share the Mobile Ads/Trackers/Analytics list, I'm browsing and testing them.
[Android Apps and Games] kouaoua:
Hi, Your explanation is clear but I have one query. In Rules Settings we have Default Block and Ad Malware Tracking. Irrespective of the priority value that I set and irrespective whether Default Block and Ad Malware Tracking have the same priority value or not, items on the Default Block list and Ad Malware Tracking list will be blocked. Is that correct?

Then why can't the Default Block list and Ad Malware Tracking list be merged together into one list? Is that the Default Block list is more like a hosts file where you put websites that one doesn't want to access and thus it would be more appropriate to keep this Default Block list separate from the Ad Malware Tracking list which focus on adwares?

Another query: Another member here Mermade has put up a useful list for Default Block which perhaps you would include by default in a later verion of NP. What if today I am using my own list for Default Block and then you include a default list in an updated version of NP. Would my own list be erased/overwritten when I'll upgrade to a newer version of NP that might contain a Default Block list? Will there be a possibility to append the to-be Default Block list to my already existing list?

Thanks.
[Android Apps and Games] netpatch:
1, You are right if the two groups both set rule "block"

2, All domain groups are the same except their content. Creating multiple groups just that I think more clear, of course you can build only one group, and put all the content inside.

3, feel free to upgrade to the newest version, All your rules and settings remain in NetPatch Firewall.

4, In default_block group, you can use "Import group" to import one exit group file.
[Android Apps and Games] mermade:
Hello OP: I am just wondering if the Priority feature is really needed? This is causing some confusion amongst most of us. I am sure most of us use this app for blocking ads/trackers. Even if multiple groups are used with different priorities, the app would anyway have to check through all the groups for the IP/domains (provided, the groups are set to "direct") so why does it matter if group 1 is checked first or group 3. All these happen in the span of milliseconds and all the user wants is either the domain is allowed or blocked.

What is your opinion on this? Will it make much difference in terms of speed of connection if the priority is removed?
[Android Apps and Games] netpatch:
Hi, you are right, I agree that in most cases the priority does not matter for most of users. It does not affect the speed of connection.

Its only use is when multiple groups with different rules and they contain the same domain name or ip, the group with the highest priority override the others.

for example, if amt.txt contains one domain a.com, but you don't want block it, you can create one group with higher priority and set rule "direct" to unblock the domain a.com

I am looking for a way to make it clear and understandable. Any suggestions is welcome.
[Android Apps and Games] mermade:
Ok, thanks for the explanation. Makes sense to me. If there is a domain a.com in 2 domain groups and both the groups have the same priority, but one group is set to allow and the other is set to block, will the domain a.com be allowed or blocked?

Can NF be intelligent enough to warn the user that the domain already exists in some other group. I know that currently NF can warn if a duplicate domain is being added to the default group but can this be extended to other groups?
[Android Apps and Games] kouaoua:
Thank you. If I have a Default Block list at present with some items on it and then in the future you include a Default Block list (perhaps with User Mermade items), then on upgrading NP, will my Default Block list be overwitten with the new default list? Or will the items on my Default block list be appended to the new one. If I am today using a Priority 100 for my Default Block list, I guess that it will not be mixed with a new Default Block list that has a different Priority value.

Another query: In Rules settings > IP Group > Local, we have Rule: direct, Priority 10, Items: 4. What does "direct" mean?

Thank you for your patience in answering my queries.
[Android Apps and Games] lancelotly:
I'm concern that maybe nobody here read the documents and Q&A on your website. The picture at there https://firewall.netpatch.co/rules/ explains most of the questions above. lol
[Android Apps and Games] kouaoua:
Hi OP, I have a feature request:

In the Network logs, it would be convennient to know which apps have been connecting to the internet say during the last 24 hours, 48 hours or during the last week. Right now I get a very long log list when my internet browser connects to the web for only that one browser app. I would want that an app is listed only ONCE in the log and perhaps on clicking its icon, we would see how much data it has consumed: uploaded and downloaded. So if I have 5 apps that connect to the internet during the last 24 hours, in the Network log I would want to see the name of these 5 apps and the amount of bytes that they have each handled.

Thank you.
[Android Apps and Games] umeshxda:
Yeah... Thats good option... Network log is messy now
[Android Apps and Games] lancelotly:
:good:
[Android Apps and Games] netpatch:
NetPatch Firewall v0.11.2 available.

=============================

bug fix and improvement (thanks to [MENTION=7835752]mermade[/MENTION] [MENTION=8073333]lancelotly[/MENTION])

https://play.google.com/store/apps/details?id=co.netpatch.firewall
[Android Apps and Games] netpatch:
Good idea, I have recorded it in my list.
[Android Apps and Games] netpatch:
Hi kouaoua, the "Default Block" group will always empty by default, I will not add some items in it.

Mermade items will be added to amt.txt instead of "Default Block" group.

"direct" means the domains or ips in the group don't been blocked and don't use proxy, they will access to network just like no NetPatch Firewall.
[Android Apps and Games] netpatch:
Thank you for your feedback.

1, This can not be determined, depending on how the system's sorting algorithm is implemented, so don't do this.

2, Good, I have added it in my plan.
[Android Apps and Games] netpatch:
Hi mermade, sorry I have not figured out why the bug happened until now.

On the version v0.11.1, the change in apps settings is that NF lists all apps, before v0.11.1 NF just list the apps those have internet permission.

I guess that maybe on one previous version NF incorrectly marked the two apps rules as block. I will continue to observe this bug and feedback.

Thank you for your feedback.
[Android Apps and Games] kouaoua:
Hi OP,

Thank you for answering my previous queries. I have another feature request which perhaps though is not an additional feature in itself. In Apps Settings, we have the apps names listed. However there are many apps with long names. I have a 5.5 inch screen with an average screen resolution of 720 x 1280 and I sometimes cannot read the apps names that are too long. We usually know which apps we have installed but in System Apps, it would be good to be able to scroll or get an overlay when we press the name of a long app so as to get its full name. We can always click on the app icon to open it but not all system apps behave in this way.

A question: Is it today possible in NP to block internet activity to and from a specific country?

Thank you as always!
[Android Apps and Games] mermade:
Hi OP, I have couple of feature requests which I wanted to share after playing with this app for a few days. I have few IP & domain groups setup under Rules Settings.

1. On the page "Summary of App Logs", at times I do not see domain name displayed for certain IP addresses (example screenshot attached). Is this a limitation of the app/can this be fixed to show the domain name for all the IPs?

2. If point 1 above is not possible to achieve, then when you tap on the IP address in the "Summary of App Logs page" page, we do not see the "Add IP to Default_block" pop-up window just like we see after tapping on a domain name. Can you extend the functionality of adding IP addresses to default IP groups too?

3. After tapping on a domain name in "Summary of App Logs page", we get the "Add Domain to Default_block" pop-up window. Is it possible to include the list of user created domain groups in a small drop-down list on that window so that the user can actually select the group that he wants to add the domain abc.com to and not just the default block group. Currently, all the domain are added only to the default block group. If point 2 above is achievable, can this functionality also be included for IP groups?

4. Currently, long tapping on a domain name/IP address in a domain group/IP group only shows 2 options Cancel and Delete. Can you also include an "Edit" option where one can edit the saved domain name/IP address.

Thanks!
[Android Apps and Games] netpatch:
1, good, I will fix the app name display problem on future version.

2, NF support it. You can block the accesses to a country by adding a ip group. In the adding ip group page, check the "subscribe from network", then click the icon right in the url inputbox and select the country you want to block. Try it.
[Android Apps and Games] netpatch:
Hi mermade, Thank you for your suggestions.

NF always knows which ip app connect to, but not the domain. Actually an app to access the network using ip instead of domain name.

When Android system queries domain name, NF cache the DNS result. If there is not domains for the ip in NF's DNS cache , NF can't know the domain name the app connects to.

Addition, ip to domain name is many-many relation, an ip can be associated with multiple domain names. Blocking a ip may also block multiple domain names, it may break someting.

Most users are only familiar with the domain name. Adding action to block ip in "Summary of App Logs page", It will make most users difficult to understand to when to use it.

I have added 3 and 4 to my plan list, they may be added to In later versions, but I'm not sure about that. Making NF easy to use and understand is very important, I need to carefully consider adding new features.
[Android Apps and Games] kouaoua:
Hi OP,

Thank you. I have tried blocking connection with China. I have Rule: block, Priority: 100, Items: 7728 from https://firewall.netpatch.co/ips/CN.txt. Why does the blocking only work by loading items from https://firewall.netpatch.co/ips/CN.txt ? Earlier with LostNet that I used, it was just a matter of selecting China from a list and refusing connectivity to it. But you will perhaps say that then you will have to load all countries in memory for NP which as you mentioned earlier can be inefficient.

Now does this blocked connection to China implies both uploads and downloads?

Thank you. I am enjoying your app!

---------- Post added at 03:23 PM ---------- Previous post was at 03:18 PM ----------

Hi OP,

Regarding mermade suggestion:

-----

4. Currently, long tapping on a domain name/IP address in a domain group/IP group only shows 2 options Cancel and Delete. Can you also include an "Edit" option where one can edit the saved domain name/IP address.

-----

I also pointed this out earlier. What I wanted then is that instead of getting only "Cancel" and "Delete" options, we get three options: "Cancel", "Delete" and "Rename". Mermade's "Edit" would be equivalent. This will help us when we make mistake in an entry.

Thanks as always!
[Android Apps and Games] netpatch:
NF app doesn't include coutries ip database, when you select a country from list, NF download the ips of the country. It can remain NF size small and the ips is up to date.

If display the country in network logs, NF have to load the ips of all countries in memory. It need to take up more memory, but does not affect the efficiency, NF can work well with very large groups.

About "edit item in group", I have added it in my plan, maybe appear in the next version.

About "uploads and download", yes, if you block a ip, it will block all about it.
[Android Apps and Games] kouaoua:
Thank you very much indeed for bringing these clarifications. I wish you getting lots of users and success.

A small query: In Apps Settings, under each app we have a code e.g. 10150(N) under Holo Compass and 10143(N) under QuickPic on my phone. What do these reference numbers mean?

Thank you
[Android Apps and Games] netpatch:
It is process uid associated with an app in android system, multiple apps can share the same uid, NetPatch Firewall filter app's access to network based it.

(N) indicates that the application has no permission to access to the network.
[Android Apps and Games] mermade:
OP, in App Settings > System Apps, I see few entries which cannot be set to any filter (Allow wifi, mobile, etc.). Take a look at the screenshot. Any reason why?
[Android Apps and Games] mermade:
Op, I just observed an entry in the Network Logs for an "unknown app". Not sure why NF was unable to identify that. Can you check? Looking at the screenshot, you will see that the network was WIFi / mobile as I was in an unstable wifi connection zone. Could this be the problem?
[Android Apps and Games] kouaoua:
Thank you. So an app with an (N) means that the user of NetPatch has deliberately prevented its connectivity in "Screen On" and "Screen Off" settings for Wifi and mobile. Is that correct?

I have a few apps such as Adobe acrobat reader in Apps (Installed), YouTube, Polaris Office, Chrome in System Apps for which there are no (N) by the apps names despite that I have disable all connectivity for them. Why is the (N) not present for these apps?

---------- Post added at 03:17 PM ---------- Previous post was at 03:16 PM ----------

I have the same issue as you do.
[Android Apps and Games] netpatch:
In Android system, some apps may share the same uid(number below app name), or you can say one application splits to multi-parts.

e.g. google play service, it is composed of four parts(4 apps).

Android allows NF control app's access to internet by uid.

Nf can filter all apps , but the apps with the same uid can only set filter rules together.

That can't be fixed. Sometimes the connection is closed too fast or the network is disconnected or switched, NF can not get information about the connection.
[Android Apps and Games] netpatch:
You can simply ignore the N on this information, it has nothing to do with the user's operation.

It just means that the app in the android system does not apply for network permissions.
[Android Apps and Games] mermade:
Thanks for clarifying.
[Android Apps and Games] mermade:
Hi OP, unfortunately the bug that was present in the earlier version has once again surfaced today. I installed and opened a news app (Dailyhunt) and observed that the connections were from a game app (Marina Military) which is incorrect. Take a look at the screenshots.
[Android Apps and Games] kouaoua:
Thank you. I have a feature request though perhaps you won't agree with :). In the network logs, it would be useful to see to which country or countries an app has or have been connecting to say during the last 24 hours, 48 hours or during the past week that has gone by. And then clicking the name of any country that would be listed from the above operation would work in "reverse" and would show you which app or apps has or have been connecting to that country. This was available in LostNet. Of course I am not asking you to copy that feature but it's a feature that I find useful and perhaps you can consider to implement something similar.

Cheers
[Android Apps and Games] netpatch:
Thank you for your feedback. Really a sad news, I will carefully investigate this bug.
[Android Apps and Games] netpatch:
Hi kouaoua,

Why do you think this feature is useful to you?
[Android Apps and Games] netpatch:
Update : Groups for Netpatch Firewall project:

1, amt2.txt will be removed, the content has been integrated into amt.txt

2, Add more sources from adblock list

Please renew the amt.txt group in NetPatch Firewall.
[Android Apps and Games] lancelotly:
Interesting! ?? This application was original from the developer's needs. I am supporting him that he could reject all new features request. If someone wants to use LostNet to block a specific country, who cares?
[Android Apps and Games] mermade:
Hi OP, have you completed reviewing the custom block list that I created and posted as a issue on Github? How about including those in amt.txt as I do not think that amt will be sufficient to block ads/trackers in apps. It will however be useful when browsing the web.
[Android Apps and Games] netpatch:
Many good features of NF came from users.

I am very grateful to these users for their help and feedback. Of course NF can't implement all the requested features because there is not enough time, and I also want to make the App simple enough to use.

The NF has supported to block a specific country, just create a ip group and select the country that you want to block.
[Android Apps and Games] kouaoua:
Hi OP,

This is Android with many apps calling home. It is convenient to see which app is connecting to which country. As I said in my original post, perhaps this would be a feature request that you won't agree with. As a user, I am just putting out requests but of course you are the developer and you are the one who decides what is appropriate or not, and I genuinely respect this. And as I said before, I am enjoying your app. That said, wise user lancelotly is not adding any constructive input by his comment.

Cheers
[Android Apps and Games] netpatch:
Sorry for the late reply, I have reviewed the list you created.

I found that some items are normal web pages, e.g. .appbrain.com .taobao.com .bugly.qq.com .appsflyer.com

Maybe they offer advertising services, but blocking these domain names will affect the normal use of some users.

In fact, I have not found a good way to identify a dedicated ad server domain names. Welcome to any suggestions.
[Android Apps and Games] netpatch:
Thank you very much for your support and understanding.

When I have more time, I will think about this feature.
[Zenfone 5 Q&A, Help & Troubleshooting] DroidNoob123:
Going through this whole log isn't possible without you being specific about what is actually wrong with your phone.

Please provide an overview of the issue that you are facing.

Also i would recommend that you flash the Latest TWRP for your phone, several bugs originate due to improper methods invoked by older versions of TWRP.
[Zenfone 5 Q&A, Help & Troubleshooting] smnshuvo:
I tried flashing different ROM, kernel and recoveries. The recoveries work fine but the phone is always looping in the boot. I have messed up with dev/block
[Zenfone 5 Q&A, Help & Troubleshooting] DroidNoob123:
Did you try going back to Stock Firmware ??

The problem might be with different kernels, were the kernels that you flashed supported for that particular ROM ?If not then this is your problem.Recommend that you reflash your particular ROM with a supported kernel.

What did you do with dev/block ??
[Zenfone 5 Q&A, Help & Troubleshooting] smnshuvo:
Check this video [YOUTUBE]xuD39TjQJGo[/YOUTUBE]

I deleted few images (can't say which) of dev/block
[Zenfone 5 Q&A, Help & Troubleshooting] DroidNoob123:
Sorry, but I cant help you if you cant specify.