Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AFWall fork/extension #1269

Open
adonnini opened this issue Mar 1, 2022 · 0 comments
Open

AFWall fork/extension #1269

adonnini opened this issue Mar 1, 2022 · 0 comments

Comments

@adonnini
Copy link

adonnini commented Mar 1, 2022

Hi, I would like to implement a gatekeeper function to control (not prevent) application access to the Internet, meter it, and monetize it for the device's owner/user.

AFWall, more than other firewall type applications, seems to be the "best" candidate for me to potentially use use as a starting point.

I downloaded the source code, imported it into Android Studio (Bumblebee) and built the app. The only change I had to make in order for the buld to complete successfully was to add the
android.useAndroidX=true
rule to gradle.properties

My initial goal is to understand how AFWall lets a user control an application's access to the Internet.

If I understand the code correctly, the PackageInfoData class contains all the information regarding applications installed on a device.

api.java seems to be the module where all the more important actions take place. It is not clear to me where in the source code the method to allow/disallow an application's access to the Internet is located. Would that happen through iptables rules which would be defined through CustomRule and CustomRuleOld?

Is setDefaultPermission, called in PackageBroadcast also used to control applications' access to the Internet?

Any guidance in navigating the source code to understand how AFWall lets users control applications' access to the Internet would be greatly appreciated.

Thanks,

Ale Donnini

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant