d4rken-org / sdmaid-se

SD Maid 2/SE is Android's most thorough cleaning tool.
https://play.google.com/store/apps/details?id=eu.darken.sdmse
GNU General Public License v3.0
2.73k stars 427 forks source link

Add setting to disable the UpdateCheck #755

Closed d4rken closed 1 year ago

d4rken commented 1 year ago

Add a toggle in "Settings > General" and "Onboarding > Privacy" to disable the update check against 'https://github.com/d4rken-org/sdmaid-se/releases`.

Mention this in the PP too.

Also see #753

safrilhg commented 1 year ago

Add duplicate check 😸

d4rken commented 1 year ago

Add duplicate check 😸

Duplicate check for what? How does this relate to the update check?

d4rken commented 1 year ago

@shuvashish76 @IzzySoft Does F-Droid set the install source? I could make this "opt-in" if SD Maid detects that the app was installed through an app store which then has the responsibility of checking for updates 🤔.

IzzySoft commented 1 year ago

Does F-Droid set the install source?

Positive (I evaluate that for the reports generated by Adebar so I'm sure of this). Though depending on whether the "PrivExt" (privileged extension) was used, the install source differs – and 3rd-party clients might set their own install source (NeoStore does set it to com.machiav3lli.fdroid for example) or not at all.

I could make this "opt-in" if SD Maid detects that the app was installed through an app store which then has the responsibility of checking for updates

Sounds like a good plan! To my understanding, that would meet the inclusion criteria at F-Droid – as they apply to apps in the repo only, and not to their APKs from "other sources". Same for my repo (same rule for in-app updaters; in both cases the reason is that updates from "outside" would bypass the checks in place, and those having the app installed must be aware of that and decide if they are OK with it). The "safe way" would probably be checking if the install source is none or com.android.packageinstaller – and otherwise disable the updater per default (until the user explicitly overrides that).

The TOC from a recent Adebar report (via my TOC userscript capturing headings):

image

(the "vending" one was set by TiBu for its own Addon – I have no GApps on my devices :wink: The "unknown" ones in System are pre-installed apps, the "unknown" in UserSpace were side-loaded via adb install)

shuvashish76 commented 1 year ago

BTW I can manipulate Installer App using ADB/root, AppManager has this feature. But that's a different topic, I just wanted to mention, that's also possible...

IzzySoft commented 1 year ago

@shuvashish76 Different topic, yeah. I'm still curious how you do that. I've needed that a few times and couldn't figure (always got errors like "user 0 is not…").

shuvashish76 commented 1 year ago
AM specific

@IzzySoft AM settings > Installer > Installer App Or AM _alpha_ now has a feature so that you can [directly change](https://t.me/s/AppManagerDebug/3864) it during installation. > always got errors like "user 0 is not..." I guess that's something related to "Installer user" (work profile vs main profile (user 0) issue) issue, IDK‽ Here is a fun one: ![installer_app](https://github.com/d4rken-org/sdmaid-se/assets/48226312/4131d2b6-d91c-4a1e-9844-099442f082d5)

IzzySoft commented 1 year ago

@shuvashish76 thanks – I was rather referring to the proper ADB command. So I might have to ask Muntashir (author of AppManager; I've just sent him a mail) for that.

d4rken commented 1 year ago

The "safe way" would probably be checking if the install source is none or com.android.packageinstaller – and otherwise disable the updater per default (until the user explicitly overrides that).

I think I will opt for the "less safe" way. The issue I see here is that SD Maid is uploaded to random app stores (not by me) and never updated (seen it on a few chinese app stores), then the install source would also be set, but users are for-ever on an on old version without knowing any better.

Something like this:

https://github.com/d4rken-org/sdmaid-se/pull/761/files#diff-7865ad26eff2729ac1c96650570481278bb90f997ee10658b9fd75f13ad704c2R104-R149

IzzySoft commented 1 year ago

The issue I see here is that SD Maid is uploaded to random app stores (not by me) and never updated (seen it on a few chinese app stores), then the install source would also be set, but users are for-ever on an on old version without knowing any better.

Yeah, that makes sense.

Something like this:

That covers the official F-Droid client and its privExt. If you go for an allowList, wouldn't it make sense to extend that to e.g. NeoStore (which also sets itself properly, see above), and maybe others reported/collected in the future? Droid-ify also comes to mind as being quite popular, probably also AuroraStore. And maybe the IzzyOnDroid app which a fan wrote for my repo. The overall list of F-Droid clients is not that long – and if you want I could list up their packageNames for you.

d4rken commented 1 year ago

That covers the official F-Droid client and its privExt. If you go for an allowList, wouldn't it make sense to extend that to e.g. NeoStore (which also sets itself properly, see above), and maybe others reported/collected in the future? Droid-ify also comes to mind as being quite popular, probably also AuroraStore. And maybe the IzzyOnDroid app which a fan wrote for my repo. The overall list of F-Droid clients is not that long – and if you want I could list up their packageNames for you.

That's already in there :wink:

private val FDROIDS = setOf(
            "org.fdroid.fdroid",
            "com.machiav3lli.fdroid",
            "com.looker.droidify",
            "dev.imranr.obtainium",
            "com.aurora.store",
        )

Is in.sunilpaulmathew.izzyondroid the one you mean?

IzzySoft commented 1 year ago

Oh, missed that part :see_no_evil: And yes, that would be the one. Maybe also: eu.bubu1.fdroidclassic and org.gdroid.gdroid? List of available F-Droid clients can btw be found here. By your concept, skip "Nearby" as that's just a one-time "I share my apps with you" installer (so no updates).

IzzySoft commented 1 year ago

Yay, thanks a lot – that's perfect, @d4rken :heart_eyes:

shuvashish76 commented 5 months ago

Hello, I just checked it again since it's available on F-Droid's official repo. Install the app > open > it shows "Welcome" screen But here at the same time it's already connecting to api.github.com. Can we do such that it only works after the user goes through the "Privacy" screen i.e. don't connect to internet during on boarding process?