Search code examples
androidadbvpnlogcat

How to filter android logcat only for VPN


I've got a general logcat successfully;But my particular problem is connecting to the VPN (on any 4+ android ROM) so I want to do a logcat related to VPN only and see what's going on.

Tried 'LegacyVpnRunner' in this way :

adb logcat LegacyVpnRunner:E *:S -v long > name of problem.txt

But the final txt was this:

adb server is out of date.  killing...
* daemon started successfully *
--------- beginning of /dev/log/system

--------- beginning of /dev/log/main

What's the problem? did I use a wrong alias for VPN service? (LegacyVpnRunner) if so, Where is the referernce to find related aliases for any android service?

Thanks


Solution

  • Do not limit your filter to capturing just Error priority messages. As for using proper tag com.android.server.connectivity.Vpn.java uses 2 tags for logging - "Vpn" and "LegacyVpnRunner". So I would suggest trying both:

    adb logcat -s Vpn:*
    adb logcat -s LegacyVpnRunner:*