How to detect a Trusted Web Activity (TWA) in Android Apps

Viewed 40

I'm working on a script that analyzes the AndroidManifest.xml of decompiled apps and detects if they contain a TWA or not.

Is there a better approach for detecting a TWA than analyzing the AndroidManifest? I'm currently checking if the below activity is defined in the manifest or not, but almost all the apps from my dataset gave negative results;

<activity android:name="com.google.androidbrowserhelper.trusted.LauncherActivity">
1 Answers

Apps generated by Bubblewrap (via the CLI, PWA Builder, etc) will have a twa_generator meta-tag. Checking com.google.androidbrowserhelper.trusted.LauncherActivity won't work for current Bubblewrap generated apps since each application will have its own LauncherActivity implementation.

Checking for com.google.androidbrowserhelper.trusted.LauncherActivity or if the twa-generator may work better.

Related