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

Network traffic indicator not working #79

Closed
Divyansh-2903 opened this issue Nov 29, 2024 · 45 comments
Closed

Network traffic indicator not working #79

Divyansh-2903 opened this issue Nov 29, 2024 · 45 comments
Assignees
Labels
bug Something isn't working

Comments

@Divyansh-2903
Copy link

Is just shows 0 kb/s on the status bad and the data usage option is also broken , plus Im facing lags on this build while gaming , the UI is smooth but fps are quite unstable on this build , in my opinion A13 provide better performance than A14 , why is this so?
Also my processor is Mediatek dimensity 800U

@mytja
Copy link
Owner

mytja commented Nov 29, 2024

Is just shows 0 kb/s on the status bad and the data usage option is also broken

Is this on Android 15? Because it works for me on A14.

in my opinion A13 provide better performance than A14 , why is this so?

You've answered yourself. Android is not becoming much more optimized over the years.

@Tanvir1337x
Copy link

Doesn't work for me either. Tried 9.6 and 9.5 Beta.

@Technical06

This comment was marked as outdated.

@Technical06

This comment was marked as outdated.

@mytja
Copy link
Owner

mytja commented Dec 25, 2024

Okay, thanks to everybody for feedback and sorry for the delay. It'd be of great help if anybody with a broken network traffic indicator would execute the following in the command prompt/appropriate OS shell and send me the output (make sure you have either mobile data or WiFi turned on & connected):

adb shell cat /sys/class/net/wlan0/statistics/rx_bytes
adb shell ifconfig
adb shell uname -a

Make sure you are on 2024-12-26 build or later, otherwise these commands won't work.

There should be nothing sensitive in those logs, so you can send them here on GitHub. If you still wish to keep things private, send them over to [email protected].

Thanks and have a nice day.


NOTE FOR FUTURE DEVELOPERS

I've already tried switching to another API for obtaining the traffic data, however it only listed wrong traffic data (also reported by others). My implementation as a reference is available below in case anybody in the future would like to go ahead and improve on it (just rename it from .txt to .patch, as unfortunately GitHub does not allow for .patch files to be uploaded).

0001-Alternative-broken-way-of-detecting-network-traffic.txt

@mytja mytja pinned this issue Dec 25, 2024
@Technical06

This comment was marked as outdated.

@mytja

This comment was marked as outdated.

@mytja

This comment was marked as outdated.

@SMOLKEYS
Copy link

Got this issue myself on Andy's LOS 21 with a Helio G95 chipset. Gonna test this.

@mdsyfulislam3249
Copy link

mdsyfulislam3249 commented Dec 26, 2024

Now I'm facing only the Network Traffic Indicator issue. Because of that Data Usage is also not working. Here is the SS. MediaTek G85 | Kernel: 4.14. I flashed the latest build of Evo v9.7 - 25 Dec on a MediaTek G88 device. Everything works fine.

image

@mytja
Copy link
Owner

mytja commented Dec 26, 2024

Thanks, but you've cut off the last command. Any chance of sending that one, as it's the most important one?

@mdsyfulislam3249
Copy link

mdsyfulislam3249 commented Dec 26, 2024

image
image

@mytja
Copy link
Owner

mytja commented Dec 26, 2024

Uhh, you have the latest build and it doesn't work?

Would you mind executing the following command and sending the output?

adb logcat | findstr -i NetworkTraffic

@mdsyfulislam3249
Copy link

image

Just Looping

@mytja

This comment was marked as outdated.

@mdsyfulislam3249

This comment was marked as outdated.

@mytja
Copy link
Owner

mytja commented Dec 26, 2024

I've decided to build both versions, as I've included additional fixes for some other issues. I've tested the fix for this issue myself, and it seems to be working properly (it should work for WiFi, I'm unsure for mobile data). Let me know if it works for you.

I'll take a break from building now, so you can't expect fixes anytime soon. As said, it should work properly. If it doesn't, please comment and I'll reopen the issue.

https://github.com/mytja/treble_evo/releases/tag/20241226

@mytja mytja closed this as completed Dec 26, 2024
@mdsyfulislam3249
Copy link

mdsyfulislam3249 commented Dec 26, 2024 via email

@SMOLKEYS
Copy link

Currently having the same issue here. I went and tested the latest Dec 26 build and it didn't fix the issue the original reporter had.

@mytja
Copy link
Owner

mytja commented Dec 26, 2024

Currently having the same issue here. I went and tested the latest Dec 26 build and it didn't fix the issue the original reporter had.

Could you send the output of these commands?

adb shell cat /sys/class/net/wlan0/statistics/rx_bytes
adb shell ifconfig
adb shell uname -a

I've hidden some comments in order to increase the visibility while scrolling this comment thread. Don't mind the "outdated" tag, I couldn't find a better option.

@mytja mytja self-assigned this Dec 26, 2024
@mytja mytja added the bug Something isn't working label Dec 26, 2024
@SMOLKEYS
Copy link

RX output: 843894
TX output: 309484
uname output: Linux localhost 4.14.186-gfc8c20b58a12-dirty #1 SMP PREEMPT Tue Oct 19 13:35:50 CST 2021 aarch64 Android

ifconfig output:

ccmni1: flags=193<UP,RUNNING,NOARP>  mtu 1500
        inet 10.124.0.82  netmask 255.0.0.0
        unspec 12-27-7C-4A-8E-E3-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
        RX packets 68611  bytes 74968590 (71.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 45392  bytes 6621057 (6.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

dummy0: flags=195<UP,BROADCAST,RUNNING,NOARP>  mtu 1500
        inet6 fe80::38f5:2fff:feaf:893a  prefixlen 64  scopeid 0x20<link>
        ether 3a:f5:2f:af:89:3a  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4648  bytes 775618 (757.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 4094  bytes 774070 (755.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4094  bytes 774070 (755.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether be:d7:ad:53:fe:55  txqueuelen 3000  (Ethernet)
        RX packets 1333  bytes 843894 (824.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1597  bytes 309484 (302.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

@Technical06
Copy link

Currently having the same issue here. I went and tested the latest Dec 26 build and it didn't fix the issue the original reporter had.

Could you send the output of these commands?

adb shell cat /sys/class/net/wlan0/statistics/rx_bytes
adb shell ifconfig
adb shell uname -a

I've hidden some comments in order to increase the visibility while scrolling this comment thread. Don't mind the "outdated" tag, I couldn't find a better option.

image
image

the bluetooth issue and network traffic issue is still not fixed for me

@mytja
Copy link
Owner

mytja commented Dec 27, 2024

Ughh. Can you please send the output of adb logcat | findstr -i NetworkTraffic? I'm completely lost, as I've tested this thing myself.

@SMOLKEYS
Copy link

Ughh. Can you please send the output of adb logcat | findstr -i NetworkTraffic? I'm completely lost, as I've tested this thing myself.

10s.txt

Also, probably irrelevant to here, but I also have an issue related with Bluetooth. You can go here for the issue report. It's actually fixed, but the patch wasn't backported to A14.

@mytja
Copy link
Owner

mytja commented Dec 27, 2024

Thanks. What about adb logcat | findstr -i denied?

Will do the Bluetooth backporting in the January build, thanks.

@Technical06
Copy link

Technical06 commented Dec 27, 2024

Thanks. What about adb logcat | findstr -i denied?

Will do the Bluetooth backporting in the January build, thanks.

ill send it , just wait 5 minutes
ill attach it here
networktraffic.txt
adb-logcat-findstr-i-denied.txt

@Technical06
Copy link

Ughh. Can you please send the output of adb logcat | findstr -i NetworkTraffic? I'm completely lost, as I've tested this thing myself.

10s.txt

Also, probably irrelevant to here, but I also have an issue related with Bluetooth. You can go here for the issue report. It's actually fixed, but the patch wasn't backported to A14.

Thats the same issue with me , i also have mediatek Chipset and this is the same issue ive been facing

@mytja
Copy link
Owner

mytja commented Dec 27, 2024

@Technical06, thank you so much for your logs. This should give me enough information to fix it. SELinux is hell.

Despite me saying that I'll take break, I'm so invested into this issue that you'll receive a test image in a couple of hours.

@mytja
Copy link
Owner

mytja commented Dec 27, 2024

Please test this new image (it should also contain the backported Bluetooth fix):

https://git.severkar.eu/mytja/treble_evo_test/releases/tag/20241227-test1-traffic-bt

@Technical06
Copy link

Please test this new image (it should also contain the backported Bluetooth fix):

https://git.severkar.eu/mytja/treble_evo_test/releases/tag/20241227-test1-traffic-bt

okay sure

@SMOLKEYS
Copy link

Please test this new image (it should also contain the backported Bluetooth fix):

https://git.severkar.eu/mytja/treble_evo_test/releases/tag/20241227-test1-traffic-bt

Tested the build. The network traffic indicator now works (except for mobile data, for some reason), but the aforementioned Bluetooth issue still persists.

@Technical06
Copy link

Please test this new image (it should also contain the backported Bluetooth fix):
https://git.severkar.eu/mytja/treble_evo_test/releases/tag/20241227-test1-traffic-bt

Tested the build. The network traffic indicator now works (except for mobile data, for some reason), but the aforementioned Bluetooth issue still persists.

Nice , the download speed was exceptionally Slow for me though

@mytja
Copy link
Owner

mytja commented Dec 27, 2024

That's great hearing that the network indicator now works. As mentioned somewhere in the thread before, only WiFi should be monitored. I'll provide another test build with fixed mobile data monitoring, should be easy now. Apart from that, thanks for your responsiveness & quick testing.

Regarding the Bluetooth patches, I'll do a deeper dive in the January build.

@SMOLKEYS
Copy link

Nice. One of the primary reasons for my responsiveness was because of the egregious amount of suffering I had to go through because of Bluetooth.

In my year of using GSIs on three devices, Bluetooth was always the one part of them that just had one issue or another that would make it tedious to use or outright impossible.

@Technical06
Copy link

Technical06 commented Dec 27, 2024

That's great hearing that the network indicator now works. As mentioned somewhere in the thread before, only WiFi should be monitored. I'll provide another test build with fixed mobile data monitoring, should be easy now. Apart from that, thanks for your responsiveness & quick testing.

Regarding the Bluetooth patches, I'll do a deeper dive in the January build.

actually just for your knowledge , bluetooth works on all A13 builds as i told you , and old A14 builds which are now legacy
maybe it may not be possible for you to use those patches because they're old , but you can try

@SMOLKEYS
Copy link

Oh, and might just be me, but data/wifi usage tracking doesn't seem to be working too.

@SMOLKEYS
Copy link

SMOLKEYS commented Dec 27, 2024

Screenshot_20241228-020021_Settings

(this lil fella in the quick settings)

addr:

Oh, and another more minor but inconvenient issue: DSU doesn't work with an unencrypted data partition. PHH provided me a test build which fixes that, but I couldn't test it and I'm also not sure what patches he applied to get that.

@Technical06
Copy link

Screenshot_20241228-020021_Settings

(this lil fella in the quick settings)

addr:

Oh, and another more minor but inconvenient issue: DSU doesn't work with an unencrypted data partition. PHH provided me a test build which fixes that, but I couldn't test it and I'm also not sure what patches he applied to get that.

Same goes for me , even i cant use the Usage settings and also DSU doesnt work for me , though my device is encrypted

@mytja
Copy link
Owner

mytja commented Dec 27, 2024

@SMOLKEYS: Nice. One of the primary reasons for my responsiveness was because of the egregious amount of suffering I had to go through because of Bluetooth.

In my year of using GSIs on three devices, Bluetooth was always the one part of them that just had one issue or another that would make it tedious to use or outright impossible.

Yeah, I get you. Bluetooth on Android is a mess... well, everything is a mess. I & most other builders most frequently get reports of FOD & Bluetooth not working. It's especially annoying, as most experience their issue on ALL GSIs, but don't report it on TrebleDroid. I can't offer knowledgeable support on Bluetooth and FOD. I tried fixing FOD on A15 for my device, but ultimately failed.

@mytja: Regarding the Bluetooth patches, I'll do a deeper dive in the January build.

I've decided to redo the patches right now. I don't know if it'll do much, as TrebleDroid Bluetooth patches apply more or less cleanly, meaning that Lineage hasn't changed much.

@SMOLKEYS: Oh, and might just be me, but data/wifi usage tracking doesn't seem to be working too.

Yeah, under the hood Android is using a very different API. Your old kernel doesn't offer support for these functionalities, therefore nothing is reported. Unfortunately, my fixes are great for the traffic indicator, but not measuring traffic over time.

I've disabled this as a temporary measure, so you won't see it in the next build. I have an idea on how to fix it however.

Note to self: save traffic indicator data to SystemProperties in frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/NetworkTraffic.java & read it from frameworks/base/packages/SystemUI/src/com/android/systemui/qs/QSFooterView.java. Figure out how to save this even when traffic indicator is disabled.

@SMOLKEYS: Oh, and another more minor but inconvenient issue: DSU doesn't work with an unencrypted data partition. PHH provided me a test build which fixes that, but I couldn't test it and I'm also not sure what patches he applied to get that.

I'll sure implement it if phh decides to include it in TrebleDroid's A15 patchset. For now I can't do much. I have encrypted data and wouldn't like to decrypt it just to test this.

@Technical06: DSU doesnt work for me , though my device is encrypted

This likely means that your vendor doesn't properly support DSU. That's unfortunate & I can't do much about it even if you open an issue.


Anyhow, this issue has turned into such a mess with (now) 39 comments. I'll post a new test build here (I'll leave it building overnight, so expect it tomorrow), but for other issues I moving to #104 for the Bluetooth issue and creating a new issue for that "data usage over the entire day" issue.

Thanks to everyone in this thread for testing & reporting. Have nice holidays.

@Technical06
Copy link

Technical06 commented Dec 27, 2024

Sorry i think my explanation wasn't enough , DSU works for me in A13 builds but it shows some error failed to create partition on A14 builds . this only happens now on the Recent builds .

@mytja
Copy link
Owner

mytja commented Dec 28, 2024

Sorry i think my explanation wasn't enough , DSU works for me in A13 builds but it shows some error failed to create partition on A14 builds . this only happens now on the Recent builds .

That's an interesting bug, and I don't know why it would fail...


New build, which should fix traffic indicator on mobile networks & maybe Bluetooth:

https://git.severkar.eu/mytja/treble_evo_test/releases/tag/20241228-test1-traffic-bt OR
https://github.com/mytja/treble_evo_test/releases/tag/20241228-test1-traffic-bt

@SMOLKEYS
Copy link

Noted, testing will now begin.

@mdsyfulislam3249
Copy link

Sorry i think my explanation wasn't enough , DSU works for me in A13 builds but it shows some error failed to create partition on A14 builds . this only happens now on the Recent builds .

That's an interesting bug, and I don't know why it would fail...

New build, which should fix traffic indicator on mobile networks & maybe Bluetooth:

https://git.severkar.eu/mytja/treble_evo_test/releases/tag/20241228-test1-traffic-bt OR https://github.com/mytja/treble_evo_test/releases/tag/20241228-test1-traffic-bt

image
Traffic Indicator on Mobile Network is still not working. Wifi is working fine. Everything else so smooth. Thanks for your effort dear.

@mytja
Copy link
Owner

mytja commented Jan 5, 2025

Download this image:

https://github.com/mytja/treble_evo_test/releases/tag/20241230-test3-bt-charger

It fixes the issue you're having.

@mdsyfulislam3249
Copy link

Download this image:

https://github.com/mytja/treble_evo_test/releases/tag/20241230-test3-bt-charger

It fixes the issue you're having.

Thanks a lot, dear, it's working fine.

@mytja mytja unpinned this issue Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants