Running adb install app-debug.apk only to be blocked by Failure [INSTALL_FAILED_TEST_ONLY] occurs because Android Studio automatically adds android:testOnly="true" to the AndroidManifest.xml of debug builds to prevent test APKs from being installed on production devices.

Method 1: Allow Test Packages in ADB (adb install -t)

Pass the -t (allow test packages) flag to adb install:

ADB Terminal Commandbash
# Install test-only APK using -t flag
adb install -t app-debug.apk
# Output: Success

Method 2: Disable testOnly Flag in gradle.properties

gradle.propertiesproperties
# Prevent Android Studio from injecting android:testOnly into debug APKs
android.injected.testOnly=false