emanuele-f / PCAPdroid

No-root network monitor, firewall and PCAP dumper for Android
https://emanuele-f.github.io/PCAPdroid
GNU General Public License v3.0
2.43k stars 286 forks source link

Start on boot doesn't seem to work #432

Closed kevin0t closed 6 months ago

kevin0t commented 6 months ago

The capture won't start automatically after a reboot even if Start on boot is turned on. . Also this behaviour happens only if i do not turn on "always on vpn" for pcapdroid in android settings. I don't know how to provide any logs for this . But still wanted to report this behavior here. There is also a possibility of this bug being specific to my OS. Alternatively users could be advised use the always on vpn feature to capture traffic at boot as a universal failsafe solution and later they could turn it off.

Here is the Build info

Build type: fdroid
Build version: 1.7.2
Build date: 2024-04-22 08:09:55
Current date: 2024-05-01 21:47:07
Device: motorola moto g 5G
OS version: Android 13 (SDK 33)

DumpMode: NONE
FullPayload: false
TLSDecryption: false
TLSSetupOk: false
CAInstallSkipped: false
BlockQuic: NEVER
RootCapture: false
Socks5: false
BlockPrivateDns: false
CaptureInterface: @inet
MalwareDetection: true
Firewall: true
PCAPNG: true
BlockNewApps: true
TargetApps: []
IpMode: IPV4_ONLY
Trailer: false
StartAtBoot: true
PrivateDnsMode: disabled
MitmBatteryOptimized: false
emanuele-f commented 6 months ago

@kevin0t it works for me, this seems something specific of your rom. Please provide the logcat output of the system, filtered by the PCAPdroid package name (e.g. adb logcat | grep remote_capture > logcat.txt)

kevin0t commented 6 months ago

So , i tried to reproduce the issue and it seemed like pcapdroid did start on its own , though it took around 30 seconds-1 minute to start after reboot. I don't think 30 secs is a major issue to worry about. Still i am attaching logs after reboot for your reference. You may close if no error found. logcatpcap3.txt

emanuele-f commented 6 months ago

This is the expected behavior, as different apps start on boot and it's up to Android to prioritize them. See https://stackoverflow.com/a/43988744 . As you pointed out, using the always-on VPN is a better approach. Closing this