yashsingh1/xdaforums huggingface dataset:
[Xposed Framework Modules] defim:
[MENTION=2040453]pranjal18[/MENTION]

1) I dont know th google-play thing (developer, not games ;) ), but should be like the in-app billing etc. For that the app itself does not need internet permission or acces, it asks a google service which talks to the server. So it should help blocking acces fpr google play, but this blocks all apps using this

2) Linux kernel is written in "C". This runs the "Java" VM (Davlik or ART). Most apps using the Java methods/functions to do things. But some do it by using the lower layer. E.g. if you have installed dropbear (ssh server) the app does start a native (C) binary.

Java runs on all Java VMs, but C has to match CPU archtitecture, so differen binaries are needed.

To develop C on android you need the NDK (https://developer.android.com/tools/sdk/ndk/index.html), for "common" Java apps the SDK (http://developer.android.com/sdk/index.html)

Xposed can only hook Java methods, not C. So some could access internet if only using Lighningwall without iptables enabled in settings.

But as said iptables does not work with every device, and on some if fails sometime.

I used afwall before, but from time to time all apps had internet acces, because iptables completely fails.

3) Yes, if it runs on you device (see 2), i think runing both is better
[Xposed Framework Modules] diggmc:
I recently began playing with LW. By default I deny everything and allow net access on a per app basis. However I'm getting an "android system" warning inthe LW log but I can't figure out what app/service is causing it. Any ideas?

http://m.imgur.com/s3tfG40

Thanks
[Xposed Framework Modules] defim:
The red line is not a warning, in the log are allowed connection shown in green, not allowed in red to read it easier.

"Android System" could be some of the core Android components. But on my device it's called "Android-System", and it has no internet permission?! But before and after that are gapps & play does some access. Maybe you have installed some app which just uses this name?

Btw, if you do a long-touch in LW on some it, it starts it
[Xposed Framework Modules] diggmc:
I discovered the long press trick purely by accident. As for my mysterious " android system" warning.. I know its a system app that's causing it I just don't know which one. It doesn't seem to be affecting anything important, so I'll just turn off logging and forget about it.

Thanks though.
[Xposed Framework Modules] defim:
[MENTION=3675319]diggmc[/MENTION]: I'm not sure i it's an system app, because on my device it does not contain a "-"
[Xposed Framework Modules] choco-bio:
question

After Installing this on xperia z1, all apps on my phone could not connect to Internet.
[Xposed Framework Modules] diggmc:
Interesting, I'm using stock 4.4.4. Like I say it doesn't seem to be affecting anything noticeable so I'll just ignore it. The addresses it's trying to reach belong to Google so it's a pretty good indication that it's an internal app.
[Xposed Framework Modules] defim:
In the settings are options for logging, so you could see what it does

It would be easier, if LW write the package names in the logfile :-/

Is this app in the main list of LW visible? On my device it's not, because it seems not to have requested the internet permission
[Xposed Framework Modules] diggmc:
Yes it would and no the app doesn't appear on the list of apps.
[Xposed Framework Modules] defim:
[MENTION=3675319]diggmc[/MENTION]: Attached a version wich logs also the package name.

Have you other Xposed modules installed? I could be possible that one hooks somewhere into system, and does network requests. But I dont understand why this is possbile without android permissions - but a xposed module could grant this to a package. Very suspect
[Xposed Framework Modules] defim:
Two other people reported this by message,

The cause is, that network changes are not detected, so the state is "invalid" instead of wlan, mobile, roaming, vpn etc and acces is not allowed.

This is because the hooks have to be applied for every Andoid API version. Which does you use? Is it stock or custom build (like CM)? And wich networks does you use?
[Xposed Framework Modules] defim:
[MENTION=3675319]diggmc[/MENTION]: Another new apk attached. It adds Android-System to the app list always, even if the PackageManager does report that it has no internet permission. I dont know why this is so, but you could now configure it.

Can you please attach the file /system/framework/services.jar from your device? Have you other modules enabled related to networking, eg to set 2G/3G?
[Xposed Framework Modules] diggmc:
Hi Defim,

I've disabled all installed xposed modules. The only one that I had installed that played with 2G/3G is GravityBox, though I'm not using that feature and it is/was disabled. The previous test version only added "(system)" to the previous log that I posted. See attached, and as requested, I've included the services.jar.

Sorry for having to zip everything...XDA wouldn't allow me to attach uncompressed files.

In the meantime I'll play with this current test version and get back to you and again, Thank you for the assistance.
[Xposed Framework Modules] defim:
[MENTION=3675319]diggmc[/MENTION]: Sorry, I requested by [MENTION=5759808]choco-bio[/MENTION] the services.jar, this is for another problem :D

After latest update you should have the "Android System" in the app list and could configure it as you like. If not, don't forget to clear cache with menu item.

EDIT: Oh, i forgot. I caught also the "system" connecting to somewhere. This occurs only on system start, but not every time. So it should be mor or less okay...
[Xposed Framework Modules] diggmc:
Hi defim

Question, have you considered implementing additional tasker integration so that contexts could enable and disable rules for each network type.

As an example, I'd like to disable an apps access to Wi-Fi but only if I'm connected to my work's Wi-Fi, but allow access when connected to my home Wi-Fi.

I'm assuming that a reboot isn't needed.

Just for for though.

Oh, and everything is great regarding my mysterious app in the log. Thanks for the assistance.
[Xposed Framework Modules] defim:
[MENTION=3675319]diggmc[/MENTION]: I've just created a similar thing for ProtectedApps, see screenshot. So it should be no problem. Difference would then be that then you set the package name in the extra field and trust/block/template/a caluclated number eg 010... for roaming-0 + mobile-1 + wlan-0 + ...

Is that okay?
[Xposed Framework Modules] diggmc:
That's perfect! Your making me glad I bought the $15 donation key :)
[Xposed Framework Modules] diggmc:
Uh, maybe I spoke too soon? I'm not sure where to put the numerical networks info.

Sorry to be a pest ☺
[Xposed Framework Modules] defim:
[MENTION=3675319]diggmc[/MENTION]: Not yet done for this app! The screenshot is from another app where I added it this week. Coming soon in a similar way
[Xposed Framework Modules] defim:
Please check if attached file works as expected. There is a new tasker menu item & a tasker logging option in settings
[Xposed Framework Modules] diggmc:
Hi defim,

I'm not having any luck, it seems the app that I want to control can't be controlled with LW. But that side, after issuing a intent, when I reload LW and check to if there is any change with the apps access, I'm not seeing any indication that the intent worked. Uh! If an app has all red for no access, sending an intent granting access, I though LW would show a green bar.

Still testing though...
[Xposed Framework Modules] liontari:
Wanted to say thx for your great work... I use more of your moduls with pleasure

Gesendet von meinem GT-P6800 mit Tapatalk
[Xposed Framework Modules] diggmc:
Dopey me, I neglected to capitalize the 'X' in the data field. Now I'm seeing the changes in LW's apps page. Sorry for the confusion.
[Xposed Framework Modules] defim:
The "X" is a name used by tasker to attach extra data to the broadcast, but in the version now published, i check also the small "x" if the "X" is empty. There is now also a message in the log if no data are recognized
[Xposed Framework Modules] defim:
[MENTION=5759808]choco-bio[/MENTION]: Connections detection should work with attached apk. Can you test it? Enable "compat mode" in the settings + reboot
[Xposed Framework Modules] Alahdal:
I'm not sure if this is possible.

Can you make an option for Dual connection.

Example: I am at office and I want certain applications to connect through WiFi while all other applications and system should connect through mobile data.
[Xposed Framework Modules] defim:
No, there is only one network connection at the same time. Even if android connects to mobile+wifi, there is a default gateway set to one connection.

This could be changed (on linux level) by altering routing table, but then you have to know destination ips and route them over another gateway.

If you get this to work, you could try to use the app-ids of android to change with iptables how the connection is established...
[Xposed Framework Modules] Alahdal:
The destination ips are known because they are my work ips. How can I use app-ids of Android.
[Xposed Framework Modules] defim:
Then you only need 2 concurrent network connections...
[Xposed Framework Modules] grotesque02:
I try free version, but I don't understand...

I want block incoming message in whatsapp under wifi and mobile data, but no outcoming.

Is possible?
[Xposed Framework Modules] jaspol92:
Thanks
[Xposed Framework Modules] defim:
No. Typically an app establishes only outgoing connections. Over this data(eg messages) are sent and received. Incoming connecting are acceptd by server apps.
[Xposed Framework Modules] choco-bio:
o

Hi [MENTION=4501300]defim[/MENTION] , I am sorry for the late response. I install this apps + ip tables but do not activate compat mode. they (BBM, Facebook,etc) work now. I dont know why.

---------- Post added at 09:37 PM ---------- Previous post was at 09:22 PM ----------

[/COLOR [MENTION=4501300]defim[/MENTION]: can this firewall work as "two-ways" firewall like comodo firewall in Windows??

do you know how to harden security connections and ports in Android like the ones in Linux ?
[Xposed Framework Modules] defim:
Please define "wont work" = app cant connect to anywhere or app is not blocked even if selected?

In case of problems please enable logging to see what's going on

The "compat" option is only needed if you connection state (mobil/roaming/wlan/etc) is not detected correctly

I'm using COMODO for windows, but what is a two-ways firewall? In and Out discincted? Yes
[Xposed Framework Modules] choco-bio:
[MENTION=4501300]defim[/MENTION]:

When I installed your app from google play --> Facebook, BBM, Path, google play could not connect to internet (even when the blue template was used) . but google chrome browser still worked.

this does not happen when I install your app with compat mode feature.

so, is "the compat mode" better to leave it off or on ?? because I dont experience the issue anymore(Facebook, BBM, Path, google play could not connect to internet. but browser still worked).

let me rephrase my question. does your firewall protect our smartphone rooted android from unwanted access/guest or protect outsider from accessing our smartphone ??

as far that I know AFWall+ does not prevent it either.

one more thing, sometimes the custom setting on some apps (yellow color) disappear by themselves. I do not know whether it is a bug or not.

my device: Xperia Z1 KK 4.4.4 rooted with supersu
[Xposed Framework Modules] defim:
[MENTION=5759808]choco-bio[/MENTION]:

Compat mode is only needed if you get in the log the message "WARNING! Can not receive updates for currently connected network, still unknown."

> could not connect to internet. but browser still worked.

It depends on you config what should happen...

> unwanted access/guest or protect outsider from accessing our smartphone

You could configure incomming and outgoing connections. "incomming" are used by very less (server) apps, this is what you.

Example: https://play.google.com/store/apps/details?id=com.fjsoft.myphoneexplorer.client (even it name contains "client", it is a server software which accepts incomming connections)
[Xposed Framework Modules] defim:
Pease check that the directory "files" in /data/data/de.defim.apk.lightningwall/ does exist and have proper user&permissions set
[Xposed Framework Modules] vipa:
Have been struggling with LightningWall not saving any changes I made to the apps permissions - kept showing the template settings.

Checked as advised above and turns out there was no files folder... Which is strange as it was a fresh installation on a just flashed CM11 ROM.

Any way it seems saving the changes now after creating files folder and giving it the same permissions as the other folders (771).

But another thing I noticed: After showing a notification about newly installed app clicking on this notification does nothing at all. Is this intended behavior (temporarily)? Should not it bring user to LW app showing just installed app highlighted (or being on top of the list)? And actually the same applies to BootManager.

It also seems like some simplification of how to allow/block an app would be great - right now it takes at least 4 taps to allow an app through one of the connections. Compare to AFWall - 1 tap for the same operation.
[Xposed Framework Modules] defim:
[MENTION=230136]vipa[/MENTION]:

Yes, the missing files directory is strange, i had about 5 reports of it for all my apps. Did not find the cause. This directory should be created by android on installing the app. Maybe i should create it within the app if it does not exist

Notification problem is known and should be solved with attached updated file. But as i'm not ready with compat-mode for roms wich never detects the connected network not yet published to avoid to many updates. BM should be fixed since yesterday's update

The cause was a funny thing: You could create 2 intents with different extra data, but android "think" they are equals and reuses it...

I used AFwall before this app, but I did not liked the handling of the UI. My thumb is 5x wider than 1 checkbox of which some are in a single row. So accidentally configuring happend many times for me
[Xposed Framework Modules] Al Arsyadi:
[MENTION=4501300]defim[/MENTION] The templates always reset to default after opening lightning wall. Is this case normal?
[Xposed Framework Modules] defim:
Please check if directories "files" and "shared_preferences" in /data/data/de.defim.apk.lightningwall/ does exist and have correct permissions
[Xposed Framework Modules] Al Arsyadi:
Both of them already exist. Can you tell me what the correct permission?
[Xposed Framework Modules] defim:
The subdirectories of /data/data/de.defim.apk.lightningwall/ (except system) should have the same owner&group like /data/data/de.defim.apk.lightningwall/ itself, the exact name of them is different for each device, eg app_12, app_34. The permissions are 771 or rwxrwx--x for all, for shared_preferences 711 or rwx--x--x
[Xposed Framework Modules] Al Arsyadi:
They are already have that correct permission, but the template always revert back to default when open lightningwall.
[Xposed Framework Modules] defim:
Can you check if the file date of the files in shared_preferences changing after you set some options? Did it work earlier? Maybe a clear of "data" by Android helps
[Xposed Framework Modules] pranjal18:
Hi!

I have installed this app as a system app by placing it in /system/app/

I have ine question.

When google play updates the app, then is there any data leak?
[Xposed Framework Modules] defim:
No, Xposed modules running this way: They will be loaded at system start. You could even uninstall the running modules, they are still wokring until next system restart.

If you update an module, the new version is loaded at next start.

For my modules: If you update, in some cases the new gui (configuring) can not communicate with the old running module (hooks). So you could not configure new options.

If after an PlayStore update a reboot is required, the app gui tells you if you open it.

Btw, the xposed installer telly *always* that a reboot is needed, but this is not true in all cases as it does not know if the gui part or the module part was changed
[Xposed Framework Modules] mnhs1010:
How to block all connection?with one button?
[Xposed Framework Modules] defim:
Doesnt exist :| What about long press power button and go to flight mode?
[Xposed Framework Modules] mnhs1010:
No,thats not my point.I want to block all apps in lightning wall not to consume my internet,this I want with only in one button,its possible?
[Xposed Framework Modules] defim:
If the apps are using the template, you could change the template
[Xposed Framework Modules] killoid:
[MENTION=4501300]defim[/MENTION] this seems to be a bug. on my gingerbread device.
[Xposed Framework Modules] defim:
That the text is "disabled"? You have to select incomming and/or outgoing AND allowed and/or denied. Only 1 of these 4 checkboxes does not log anything
[Xposed Framework Modules] killoid:
ok,now another prb.when i press menu button in log viewer,it crashes.log attached. & another is,i changed templetes for unconfigured apps to allow all. but when i exit the app & re-enter it,it returns to default state. that means the settings are not sticking. also i choose all connections to show in apps configuration but they also doing the same.
[Xposed Framework Modules] defim:
The logfile menu should be fixed with attached file, there was a ActionBar call without api check. But I have no GB installed atm to test.

Which app verison have you installed with template propblem, 250? This should create shared_prefs dir by itself, like the files and cache. And they should all have the same owner + groupd + permissions like 771 (rwxrwx--x)

Can you check if they exist?

adb shell su -c "ls -al /data/data/de.defim.apk.lightningwall/"

While are you are changing the template, you should see the value changing

adb shell su -c "grep tpl /data/data/de.defim.apk.lightningwall/shared_prefs/*"
[Xposed Framework Modules] killoid:
well 'shared_prefs' folder exists & it has 771 permission. but the files inside it have different permissions. screenshots attached. i am using v2.0.1.
[Xposed Framework Modules] defim:
The permissions are find, the "i" file is the Xposed-preferences which have more "r" rights to read them. Can you check if the both "tpl" values in the file chaning if you change the template? Or if even the timestamp of the files are refreshed
[Xposed Framework Modules] RedScotch:
in tandem with afwall

Is there a whitelist mode like in AFwall+ ? (block all, allow selected)
[Xposed Framework Modules] defim:
In the donate version there is a "template" setting page, which applies to all apps not configured. The template looks like the settings page of a single app. Additionally you could trust/block per app at all which is visible on the main page
[Xposed Framework Modules] desertmod1:
How is this different from Android Firewall on the play store?

What is the difference between mobil and network?
[Xposed Framework Modules] defim:
I've not found an app named "Android Firewall", but most firewall apps are iptables only. This app does it with Xposed (and optinal iptables).

"network" is your local network. You have maybe an app to controll you router, TV-receiver or another device in your network, which has no reason to access internet.

"mobile" is internet acces by mobile 2G/3G/LTE "cell" connection (I'm not sure which is the correct translation), means no wlan
[Xposed Framework Modules] desertmod1:
Alright so what is the difference between ip tables and xposed for a firewall?

Is w-lan is wifi then?
[Xposed Framework Modules] defim:
The result should be the same. I started this this app, because iptables need to be reapplied on every connection change, which does not work every time, so the complete access was unrestricted...
[Xposed Framework Modules] BanHammer[YKT]:
templates not saved

hi!

why templates saving not work?

version 2.5.0 donate

ADDED:

tplRX and tplTX values back to defaults on program start

ADDED:

settings__first never set to false)))

temp solve: change "settings__first" to "false" in "*preferences.xml"
[Xposed Framework Modules] defim:
Hey, thanks!

Does you know why it is not saved? The values is by default true, and if, it {sets the template and commits false}. I tested by removing the line from preferences, but it was written sucessfully. Some in logcat?
[Xposed Framework Modules] BanHammer[YKT]:
Because the program commit "true"! Not "false":laugh:

ADDED: Can you add shortcut to quickly disabling\enabling wall?

Market yesterday's version writes true. It's very strange, just now reloaded from market -> writes "false". hmmm
[Xposed Framework Modules] defim:
Impossible!

I use strings variables for the key in the preferences. The "first" is used in 2 place, 1 is to check, to other is to write. And the write has as an argument not a variable, it has a "false"
[Xposed Framework Modules] defim:
I did a quick websearch for cracked versions. I found some and analyzed it...

You are using a BAD CRACKED app and complains here about it??? And request even more features?
[Xposed Framework Modules] defim:
You are using a BAD CRACKED app and complains here about it??? And request even more features?

Oh, the not bad cracked version does as it should, surprising

...
[Xposed Framework Modules] BanHammer[YKT]:
Thanks alot! That version was really cracked. Downloaded from market, it's :good:
[Xposed Framework Modules] banderos101:
Sorry if this has been asked already, but are we able to allow/deny connection on the fly(realtime) when app asks for it, using tasker, or at least only allow connection if that specific app is in the foreground(i.e. app is opened and onscreen), using tasker?

Thanks for giving we the people, you know, ......OPTIONS :good: i.e. thanks for your important work
[Xposed Framework Modules] defim:
[MENTION=3385762]banderos101[/MENTION]: No, not planned. I want to keep it simple as possbile. In the log (if enabled) you could see what the apps do, and if you want to block "bad" hosts (malware, adware, tracker) there are such apps such UnbelovedHosts
[Xposed Framework Modules] :
toggles

It needs a way to toggle on/off for all rules or profiles of specific rules.
[Xposed Framework Modules] defim:
Not sure if I understand correctly what you need, but if you chnage the template is is used for all apps using the template
[Xposed Framework Modules] Looki75:
Feature request

Hi [MENTION=4501300]defim[/MENTION] !

I particularly appreciate your apps! I use many of them on a regular basis and donated several times ;)

I started using lightning wall recently and I have a feature request.

Could you extend Tasker support to the template?

It would be cool to be able, through Tasker, to change/update the template that the blue-dotted apps are using.

This way, we could implement different profiles, eg:

* On screen off, the template could be change to "block all" and so the blue-dotted apps would be prevented accessing the network

* On screen on, the template could be change to "allow all"

* Nearby home, the template could be change to "allow only wifi up/down"

etc...

The possibilities would be endless.

What do you think?

Thanks for considering my request!
[Xposed Framework Modules] defim:
[MENTION=2468642]Looki75[/MENTION]: Added to todo list. Should not take so much time (as it has yet tasker support), so after a PA fix
[Xposed Framework Modules] defim:
[MENTION=2468642]Looki75[/MENTION]: Added in new version 2.5.2. Just use "TEMPLATE" as package argument in Tasker