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

Mobile data connection icon dissappears unless a particular item containing many subcomponents is allowed. #441

Closed
irontechmonkey opened this issue Oct 5, 2015 · 25 comments

Comments

@irontechmonkey
Copy link

Mobile data connection icon dissappears unless a particular item containing many subcomponents is allowed.. That item is

"Setup Wizard, Android System, CyanogenMod System, MotoDoze, Settings Storage, Input Devices, Phone, Key Chain, CM Settings Storage, Settings, FM Radio, Fused Location, Dev Tools"

screenshot_2015-10-05-02-00-33

NOTE: CANNOT ATTACH TEXT FILES - HAD TO RENAME LOG FILES WITH PNG EXTENSION. RENAME ATTACHED LOG FILES WITH TXT EXTENSION

Log files LOG AFWallX01-2015-10-05-01-50-37 and LOG AFWallX01-iptables are from a mobile data connection made under whitelist mode with all items un-checked. Mobile data connection icon briefly appears then disappears.

log afwallx01-2015-10-05-01-50-37

log afwallx01-iptables

Log file AFWallX02-2015-10-05-01-57-48 is from a a mobile data connection under whitelist with only the aforementioned mega-item checked. In this case the mobile data icon displays properly.

log afwallx02-2015-10-05-01-57-48

RENAME ATTATCHED LOG FILES WITH TXT EXTENTION

@an0n981
Copy link
Contributor

an0n981 commented Oct 5, 2015

Try entering the following command in terminal emulator

su -c "settings put global captive_portal_detection_enabled 0"

@irontechmonkey irontechmonkey changed the title Cannot establish mobile data connection unless a particular item containing many subcomponents is allowed. Mobile data connection icon dissappears unless a particular item containing many subcomponents is allowed. Oct 5, 2015
@irontechmonkey
Copy link
Author

When this issue was first created in github it was accidentally described as a failure to connect to mobile data when a certain item was not enabled in AFwall. That was incorrect. The issue is actually that the Mobile data icon is not visible when that item is not enabled.

@irontechmonkey
Copy link
Author

@CHEF-KOCH, Thanks. You speak from a more informed development point of view than I, however from a logical point of view; As to Google Play Services controlling that icon, The icon work properly in lean ROM without Gapps so I don't know if that holds true. Also If I remember correctly, pre-beta Afwall did not have this issue on same ROM. One fact remains clear - That something that hides an icon that indicates connectivity state, undermines safety provided by Firewall.

@irontechmonkey
Copy link
Author

@an0n981 Thanks. Is this suggestion to address the issue as I first misstated it [cannot establish mobile data connection] or to address the issue as it actually is [mobile data icon not visible]?

@irontechmonkey
Copy link
Author

@CHEF-KOCH Thanks again. CM does not come with Gapps [was that a trick question?;)] although it certainly contains Google components. Perhaps you meant google services instead of entire Gapps package? Also, I'm not sure if my report is being properly understood. This seems to be a GUI issue and not an issue of what it being allowed through firewall.

When a certain item in Firewall is not selected for whitelist the status bar icon which indicates mobile data connection is hidden even though mobile data is connected. If that certain item is selected in Firewall the icon is visible [circled in red in attached picture].

afwallstatusbar

Clearly Afwall is capable of not causing the mobile data connection icon to disappear, as is the case most of the time, and as should be the case all the time. Simply put a Firewall undermines it's self if it obscures the data connection state from the user. As there are other issues with Afwall in re the GUI [using tasker to change profiles not reflecting in notification shade items] I'm hoping that it is an addressable GUI issue.

@irontechmonkey
Copy link
Author

@ CHEF-KOCH. All good points and thanks for the clarification. As I retested I realized you were referencing the exclamation point (which is present whether or not mobile data is connected and, afik, is an indication of background data status*).

I am active in multiple related ROM threads at XDA and elsewhere and the Afwall thread at XDA. I've seen nothing about this but will keep looking. Unfortunately the thread and Dev for my [low end and last in line] device is young and has not attracted much Dev. We've got official CM nighlys but have not reached first snapshot so cannot file jira bugs. If and when we get our OTA from L5.0.x to L5.1.x things should start moving.

As a general observation: Data and wifi toggling has gotten more cumbersome in general and particularly so in CM. Perhaps that is part of the problem. If you can think of any other helpful details I could provide do tell.

Thanks again!

  • [EDIT] Correction. That exclamation point indicates [as you seemed to already know] status of connections to Google services, which does make it an incidental but not absolute indicator of background data state as it is not visible in Mobile data connection if background data is not enabled [because there is no connection to Google services?].

@cb474
Copy link

cb474 commented Nov 4, 2015

I am also having this problem. If I don't whitelist "Setup Wizard, Android System, Settings Storage, Input Devices, Phone, Key Chain, Settings, Fused Location, Dev Tools" I see the exclamation point on the cell signal icon instead of "H" or "LTE." This is with CM 12.1 (most recent snapshot) on a Nexus 4 and OpenGapps. But mobile data is working fine.

@irontechmonkey
Copy link
Author

I think we might be focusing too much on the exclamation point icon and ignoring some factual details and top-down logic that indicate that this is indeed an Afwall issue:

  • Only occurs with AFwall's newer 2.xversion.
  • Did not occur in the older version of Afwall across multiple ROMs and devices.
  • Occurs in CM AND stock Motorola (Moto E) ROMS.
  • It is only the network type sub-icon that is affected. The exclamation point icon is not affected.
  • The catchall item in the Afwall list that is blocking the icon seems almost redundant and there seem to be other individual items in the Afwall list that handle the same things.
  • Having no network indicator is not an option and works directly against the idea of firewall protection.

I have a workaround by enabling mobile data programatically and creating a notification icon for it with tasker but this sort of thing is a deal-breaker for a firewall app and it is clearly not CM specific.

@SafwatHalaby
Copy link

Can anyone provide some info about that app? What does it do? Unblocking it resolves the icon issues. Is it safe to unblock it?

@SafwatHalaby
Copy link

By the way, I don't have Google Apps or Google Services or any open source Gapps alternative, and I'm also seeing this. Whitelisting the app mentioned above resolves it.

@irontechmonkey
Copy link
Author

@SafwatHalaby, It is not an app but rather a bunch of system components (visible in the image attached to OP in this thread). Many people use firewalls to block things just those sorts of system components, and it undermines the use of firewall to open up all those things just to restore the icon.

@SafwatHalaby
Copy link

@irontechmonkey In practice, do any of these system components access the internet or accept incoming connections?

@irontechmonkey
Copy link
Author

@SafwatHalaby Good question. I'm not sure but I'm not leaving the door unlocked to find out. IMO no items should have to be blocked or unblocked just to control a graphic indicator.

@lusagad
Copy link

lusagad commented May 8, 2016

Hi! Another one w/same issue using a H-850 LG. Have to deactivate when I boot up the phone or change mobile data connecc. When AF+ is off, and the icon's back, restart the firewall. That's my "solution"

@irontechmonkey
Copy link
Author

irontechmonkey commented May 8, 2016

@lusagad ,[EDIT] I mis-stated earlier about this being fixed by an update. It was fixed by this command or a variation thereof:

su -c settings put global captive_portal_detection_enabled 0

Shared here: http://forum.xda-developers.com/showpost.php?p=65652627&postcount=2973

@ilf
Copy link

ilf commented Jun 13, 2017

I have this again on Android 7.1.2, but even with "captive_portal_detection_enabled 0" it does not go away. Is there a new workaround?

@Micha-Btz
Copy link

please try settings put global captive_portal_mode 0 this has changed in framework for nougat

@ukanth
Copy link
Owner

ukanth commented Jun 14, 2017

@Micha-Btz Thanks for the details. I can confirm that it's changed in 7.x

https://android.googlesource.com/platform/frameworks/base/+/android-7.1.2_r5/core/java/android/provider/Settings.java#8027

for Nougat
su -c settings put global captive_portal_mode 0

for other versions
su -c settings put global captive_portal_detection_enabled 0

@ilf
Copy link

ilf commented Jun 27, 2017

@Micha-Btz Thanks, that did it.

Since afwall has root, couldn't this be an afwall setting?

@Micha-Btz
Copy link

@ilf maybe @ukanth can implement this but you can also create a custom script for afwall
with:

settings put global captive_portal_detection_enabled 0
settings put global captive_portal_server localhost
settings put global captive_portal_mode 0

@ukanth ukanth removed the Review label Mar 7, 2021
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

9 participants