Netguard - no hosts blocking available

@M66B I’m trying some XDA ROMs for an older device, and I usually install Netguard first

But on this latest one tested (Android 14 maybe AOSP based, no GMS) it appears that the Netguard 2.328 (2024022201) from F-Droid always detects that it was installed from “Play” and disables hosts blocking.

Eg. even forced manually:

$ adb push netguard.apk /data/local/tmp && adb shell pm install -i "org.fdroid.fdroid" -r /data/local/tmp/netguard.apk
Success
$ adb shell pm list packages -i | grep netguard
package:eu.faircode.netguard  installer=org.fdroid.fdroid
$ adb shell logcat -v threadtime | grep Play
I NetGuard.Settings: Play store install

How can I check what (else?) exactly triggers this erroneous detection?

install source can show differently depending on requestor

it is possible the system spoofs the response to all apps as if from play

Yeah, surely is a ROM issue, wondered if I can check this somehow.

1 Like

eg.

DivestOS: DivestOS-Build/Patches/LineageOS-20.0/android_frameworks_base/0036-Unprivileged_microG_Handling.patch at master · Divested-Mobile/DivestOS-Build · GitHub

CalyxOS: Set FakeStore as Aurora Store installer package name (6e47be1b) · Commits · CalyxOS / platform_frameworks_base · GitLab

iodeOS:

    public static boolean isPlayStoreInstall(Context context) {
        if (BuildConfig.PLAY_STORE_RELEASE)
            return true;
        try {
            return "com.android.vending".equals(context.getPackageManager().getInstallerPackageName(context.getPackageName()));
        } catch (Throwable ex) {
            Log.e(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex));
            return false;
        }
    }

Either it is a Play Store build as determined by build.gradle or the installer package was the Play Store app.

Either it is a Play Store build as determined by build.gradle

reading metadata/eu.faircode.netguard.yml · master · F-Droid / Data · GitLab and looking at NetGuard/app/build.gradle at 2.328 · M66B/NetGuard · GitHub tells me that’s not the issue (also, hosts blocking is enabled just fine on other ROMs hence a ROM issue)

yeah, this is the issue, the ROM is lying and saying from Play :frowning:

@SkewedZeppelin thanks for the info

now I wonder how this would impact autoupdates and if apps installed by F-Droid would be deemed to be installed ONLY by F-Droid, as the new Android 12-14 settings say.

ref: Maintaining ownership | F-Droid - Free and Open Source Android App Repository

ref: Request update ownership for newly installed apps (!1370) · Merge requests · F-Droid / Client · GitLab

1 Like