This is an automated archive.
The original was posted on /r/wireguard by /u/mmmzon on 2024-01-02 15:05:55+00:00.
Welcome, Redditors!
I have been trying to get Wireguard on Android 14 on Pixel 7 to bring up a pre-defined VPN tunnel using Automate app. What the app does, it calls com.wireguard.android.model.TunnelManager$IntentReceiver with com.wireguard.android.action.SET_TUNNEL_UP and I pass tunnel name to the app. When Wireguard is not working (app is shut down), the call does not seem to be received at all, even though logs from Wireguard show that it did receive the command and was processing it, but the tunnel was never brought up. All permissions seem to be set to allowed.
The log from Wireguard follows, starting from the tunnel trigger sent (tunnel name is "HOME", for reference) to me starting the app GUI and downloading the log. Automate does seem to send the trigger correctly, but the tunnel never comes up for whatever reason. Any thoughts / pointers would be really welcome.
Just BTW, the same behavior is observed on Pixel 5 as well. It used to work reasonably well on Android 12, so I suspect something changed in the way Android permits interaction between closed apps.
--------- beginning of main
01-02 05:58:49.618 3688 3751 I WireGuard/GoBackend: Bringing tunnel HOME UP
01-02 05:58:49.620 3688 3751 D WireGuard/GoBackend: Requesting to start VpnService
01-02 05:58:55.021 3688 4288 D vulkan : searching for layers in '/data/app/~~_FG_hkDlBHAsM4yr3ui3CQ==/com.wireguard.android-pj2cjQJ5CWM9-wD7ILIVqA==/lib/arm64'
01-02 05:58:55.022 3688 4288 D vulkan : searching for layers in '/data/app/~~_FG_hkDlBHAsM4yr3ui3CQ==/com.wireguard.android-pj2cjQJ5CWM9-wD7ILIVqA==/base.apk!/lib/arm64-v8a'
01-02 05:58:55.022 3688 4288 D vulkan : searching for layers in '/data/app/~~_FG_hkDlBHAsM4yr3ui3CQ==/com.wireguard.android-pj2cjQJ5CWM9-wD7ILIVqA==/split_config.arm64_v8a.apk!/lib/arm64-v8a'
01-02 05:58:55.022 3688 4288 D vulkan : searching for layers in '/data/app/~~_FG_hkDlBHAsM4yr3ui3CQ==/com.wireguard.android-pj2cjQJ5CWM9-wD7ILIVqA==/split_config.en.apk!/lib/arm64-v8a'
01-02 05:58:55.022 3688 4288 D vulkan : searching for layers in '/data/app/~~_FG_hkDlBHAsM4yr3ui3CQ==/com.wireguard.android-pj2cjQJ5CWM9-wD7ILIVqA==/split_config.xxxhdpi.apk!/lib/arm64-v8a'
01-02 05:58:55.034 3688 3688 W reguard.android: Accessing hidden field Ljava/util/Collections$SynchronizedCollection;->mutex:Ljava/lang/Object; (max-target-o, reflection, denied)
01-02 05:58:55.035 3688 3688 W reguard.android: Accessing hidden method Ljava/util/Collections$SynchronizedSet;->(Ljava/util/Set;Ljava/lang/Object;)V (max-target-o, reflection, denied)
01-02 05:58:55.035 3688 3688 W reguard.android: Accessing hidden method Ljava/util/Collections$SynchronizedCollection;->(Ljava/util/Collection;Ljava/lang/Object;)V (max-target-o, reflection, denied)
01-02 05:58:55.038 3688 3688 D AppCompatDelegate: Checking for metadata for AppLocalesMetadataHolderService : Service not found
01-02 05:58:55.057 3688 3688 D CompatibilityChangeReporter: Compat change id reported: 210923482; UID 10421; state: ENABLED
01-02 05:58:55.059 3688 3688 I wm_on_create_called: [89125350,com.wireguard.android.activity.MainActivity,performCreate,13]
01-02 05:58:55.067 3688 3688 I wm_on_start_called: [89125350,com.wireguard.android.activity.MainActivity,handleStartActivity,8]
01-02 05:58:55.069 3688 3688 I wm_on_resume_called: [89125350,com.wireguard.android.activity.MainActivity,RESUME_ACTIVITY,0]
01-02 05:58:55.072 3688 3688 D CompatibilityChangeReporter: Compat change id reported: 237531167; UID 10421; state: DISABLED
01-02 05:58:55.079 3688 3688 I wm_on_top_resumed_gained_called: [89125350,com.wireguard.android.activity.MainActivity,topStateChangedWhenResumed]
01-02 05:58:56.812 3688 3688 I menu_item_selected: [0,Settings]
01-02 05:58:56.825 3688 3688 I wm_on_top_resumed_lost_called: [89125350,com.wireguard.android.activity.MainActivity,topStateChangedWhenResumed]
01-02 05:58:56.827 3688 3688 I wm_on_paused_called: [89125350,com.wireguard.android.activity.MainActivity,performPause,0]
01-02 05:58:56.840 3688 3688 I wm_on_create_called: [49795311,com.wireguard.android.activity.SettingsActivity,performCreate,3]
01-02 05:58:56.864 3688 3688 I wm_on_start_called: [49795311,com.wireguard.android.activity.SettingsActivity,handleStartActivity,19]
01-02 05:58:56.865 3688 3688 I wm_on_resume_called: [49795311,com.wireguard.android.activity.SettingsActivity,RESUME_ACTIVITY,0]
01-02 05:58:56.876 3688 3688 I wm_on_top_resumed_gained_called: [49795311,com.wireguard.android.activity.SettingsActivity,topStateChangedWhenResumed]
01-02 05:58:57.441 3688 4288 D OpenGLRenderer: endAllActiveAnimators on 0xb400007ce9da4c80 (RippleDrawable) with handle 0xb400007e69dbac30
01-02 05:58:57.453 3688 3688 I wm_on_stop_called: [89125350,com.wireguard.android.activity.MainActivity,STOP_ACTIVITY_ITEM,1]
01-02 05:58:58.210 3688 3688 I wm_on_top_resumed_lost_called: [49795311,com.wireguard.android.activity.SettingsActivity,topStateChangedWhenResumed]
01-02 05:58:58.211 3688 3688 I wm_on_paused_called: [49795311,com.wireguard.android.activity.SettingsActivity,performPause,0]
01-02 05:58:58.230 3688 3688 I wm_on_create_called: [218086317,com.wireguard.android.activity.LogViewerActivity,performCreate,9]
01-02 05:58:58.231 3688 3688 I wm_on_start_called: [218086317,com.wireguard.android.activity.LogViewerActivity,handleStartActivity,0]
01-02 05:58:58.232 3688 3688 I wm_on_resume_called: [218086317,com.wireguard.android.activity.LogViewerActivity,RESUME_ACTIVITY,0]
01-02 05:58:58.240 3688 3688 I wm_on_top_resumed_gained_called: [218086317,com.wireguard.android.activity.LogViewerActivity,topStateChangedWhenResumed]
01-02 05:58:58.775 3688 3688 I wm_on_stop_called: [49795311,com.wireguard.android.activity.SettingsActivity,STOP_ACTIVITY_ITEM,0]
01-02 05:58:58.787 3688 4288 D OpenGLRenderer: endAllActiveAnimators on 0xb400007ce9dcd040 (RippleDrawable) with handle 0xb400007e69dab330
01-02 05:58:59.931 3688 3688 I wm_on_top_resumed_lost_called: [218086317,com.wireguard.android.activity.LogViewerActivity,topStateChangedWhenResumed]
01-02 05:58:59.932 3688 3688 I wm_on_paused_called: [218086317,com.wireguard.android.activity.LogViewerActivity,performPause,0]
01-02 05:59:02.867 3688 3688 I wm_on_stop_called: [218086317,com.wireguard.android.activity.LogViewerActivity,STOP_ACTIVITY_ITEM,0]
01-02 05:59:06.135 3688 3688 D CompatibilityChangeReporter: Compat change id reported: 78294732; UID 10421; state: ENABLED
01-02 05:59:06.136 3688 3688 I wm_on_restart_called: [218086317,com.wireguard.android.activity.LogViewerActivity,performRestart,0]
01-02 05:59:06.136 3688 3688 I wm_on_start_called: [218086317,com.wireguard.android.activity.LogViewerActivity,handleStartActivity,1]
01-02 05:59:06.138 3688 3688 I wm_on_activity_result_called: [218086317,com.wireguard.android.activity.LogViewerActivity,ACTIVITY_RESULT]
01-02 05:59:06.138 3688 3688 I wm_on_resume_called: [218086317,com.wireguard.android.activity.LogViewerActivity,RESUME_ACTIVITY,0]
01-02 05:59:06.138 3688 3688 I wm_on_top_resumed_gained_called: [218086317,com.wireguard.android.activity.LogViewerActivity,topWhenResuming]
01-02 05:59:08.583 3688 3688 I wm_on_top_resumed_lost_called: [218086317,com.wireguard.android.activity.LogViewerActivity,topStateChangedWhenResumed]
01-02 05:59:08.583 3688 3688 I wm_on_paused_called: [218086317,com.wireguard.android.activity.LogViewerActivity,performPause,0]
01-02 05:59:08.600 3688 3688 I wm_on_restart_called: [49795311,com.wireguard.android.activity.SettingsActivity,performRestart,0]
01-02 05:59:08.600 3688 3688 I wm_on_start_called: [49795311,com.wireguard.android.activity.SettingsActivity,handleStartActivity,1]
01-02 05:59:08.601 3688 3688 I wm_on_resume_called: [49795311,com.wireguard.android.activity.SettingsActivity,RESUME_ACTIVITY,0]
01-02 05:59:08.601 3688 3688 I wm_on_top_resumed_gained_called: [49795311,com.wireguard.android.activity.SettingsActivity,topWhenResuming]
01-02 05:59:09.146 3688 4288 D OpenGLRenderer: endAllActiveAnimators on 0xb400007ce9de65d0 (RippleDrawable) with handle 0xb400007e69dcc7b0
01-02 05:59:09.151 3688 3688 I wm_on_stop_called: [218086317,com.wireguard.android.activity.LogViewerActivity,LIFECYCLER_STOP_ACTIVITY,0]
01-02 05:59:09.152 3688 3688 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=falsecallback=android.app.Activity$$ExternalSyntheticLambda0@6fc0e28
01-02 05:59:09.152 3688 3688 I wm_on_destroy_called: [218086317,com.wireguard.android.activity.LogViewerActivity,performDestroy,1]
01-02 05:59:09.827 3688 3688 I view_enqueue_input_event: [Motion - Cancel,com.wireguard.android/com.wireguard.android.activity.SettingsActivity]
01-02 05:59:09.830 3688 3688 I wm_on_top_resumed_lost_called: [49795311,com.wireguard.android.activity.SettingsActivity,topStateChangedWhenResumed]
01-02 05:59:09.884 3688 3688 I wm_on_paused_called: [49795311,com.wireguard.android.activity.SettingsActivity,performPause,0]
01-02 05:59:10.384 3688 3688 I wm_on_stop_called: [49795311,com.wireguard.android.activity.SettingsActivity,STOP_ACTIVITY_ITEM,1]
01-02 05:59:34.152 3688 3688 I wm_on_restart_called: [49795311,com.wireguard.android.activity.SettingsActivity,performRestart,0]
01-02 05:59:34.153 3688 3688 I wm_on_start_called: [49795311,com.wireguard.android.activity.SettingsActivity,handleStartActivity,1]
01-02 05:59:34.155 3688 3688 I wm_on_resume_called: [49795311,com.wireguard.androi...
***
Content cut off. Read original on https://www.reddit.com/r/WireGuard/comments/18wrhpr/toggling_vpn_tunnel_on_android_14/