-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Figure Out Silent/Background Updates #25
Comments
This, Shizuku, is one thing Droidify uses. But I see in my Droidify settings that it isn't using this, rather session installer and still the updates are unattended. So not sure how he does it. |
The new plugin does work, and updates done while the app is in the foreground will not have a prompt starting from the next version. Unfortunately, trying to update from a background process is causing an error I haven't been able to figure out. I've made a new issue for that on the plugin repo (felipheallef/flutter-app-installer#1), but this is parked until they respond. |
Just leaving a note that this new plugin uses a permission that is not allowed for Play Store apps, which I guess is part of why Droidify, Neo-Store, etc. are not there. Took down the Play Store listing as it's not as important as having silent updates. |
Nice, this is exciting |
Out of curiosity, what's that permission? |
The one mentioned in this thread 👆 UPDATE_PACKAGES_WITHOUT_USER_ACTION |
Apps like Neostore/Droidi-fy/GrapheneOS App Store, support unattended updates really well, if you want to have a look at their implementation. Do those have the same limitations as the flutter plugin method above? |
GraoheneOS probably achieves this by being a system app. The other two have been mentioned in this thread 👍 |
Those Apps are not Flutter-based as far as I know, so they probably just use the relevant Android API (the old one is Either way, the plugin used right now does work, just not in background processes for some reason. Might be a Flutter limitation and not an issue with the plugin itself. |
Ideas for implementation:
and
|
I'm not 100% certain, but I think this issue will be fixed once the changes from flutter/flutter#13937 reach Flutter stable. |
@S7venLights regarding your suggestions:
|
The new plugin mentioned above has a dealbreaker - see #46. Switching back to the old one; this issue is blocked for now.. |
It actually did work for me. With the latest version I got the prompts back but before the update worked just fine as well. |
It worked with 1 or even 2 apps sometimes, but would choke with larger numbers at least for me. May need to eventually look into learning enough to write my own Flutter plugin for this, or waiting for someone else to :( |
I may be mistaken, but I think Protonmail just installed silently. I opened protonmail in Obtanium, clicked download but the android update dialogue never showed. But it has updated 🤔 |
You probably already had the new update installed, so obtainium just skipped installation and incremented the version number. The installer plugin hasn't been updated in over a year so I don't see how it could do that. |
Hey I have a question. Im not sure if it falls under the same category but some apps require a user choice (such as package architecture differences). Would it be possible to have Obtanium remember the selection and therefore not ask the user? |
Updated the links in the comment above - fixed a bug where the update checking task would only run once (instead of every N hours) |
Updated the comment with bugfixes (task scheduling and notification related). |
So excited to test! |
Released: https://github.com/ImranR98/Obtainium/releases/tag/v0.14.0-beta There is still the problem with install results not being sent back, but I'll open a separate issue for that (I really want to see the purple check on #25 🥲). There was discussion about unofficial install methods like root and Shizuku. I don't plan on adding those personally but any PRs are welcome. |
Is there a reason you don't plan to add support for root? |
The idea that started this app was a more secure way to install apps, so I guess root is not a priority for Imrans spare time |
I was just coming to say though that so far 2 of my apps that need updates, did not background install yet. Used on the zip version you shared. I've just installed the latest version. Question, how does background update determine which And pick to use (Architecture wise)? |
Not against it, but it's unlikely I'll know how to do it, given that even using the official Android APIs took so long to figure out (and I don't have rooted devices to test with). Wouldn't be a high priority either way but you could open an issue for it - could always get picked up by someone.
Criteria for an app to be installed silently:
So I'm guessing those apps don't fulfill one or more of these.
Same as in the foreground, by file name (if "Attempt to filter APKs by CPU architecture if possible" is enabled). If there's more than one APK available after applying all filters then it doesn't install silently. |
Android 11? You mean Android 12 (which you even mentioned in the first comment)? |
Okay thanks, any guide you can link to, to use regular expressions to filter APKs? |
@S7venLights I just use |
For Brave browser what regular expression can one use, I've tried a few: Note I also have a regular expression set for releases in Brave: ^Release |
Are there any plans to make silent background update configurable on the individual application level? The reason I'm asking is that while generally I welcome silent background updates for most apps, I would like to still manually update some of my apps, such as Immich, where they sometimes break compatibility on new releases between server and mobile client (they are still in very active development and thus can afford it). |
@zsolt-donca you already can - there's a toggle at the bottom of the app options. |
Just |
You're right. Not sure how I ended up thinking it was SDK 30. Will be corrected soon. |
So happy this feature is here, well done again Imran 🙌 |
@ImranR98 I'm sorry but I can't find it. Can you be more specific? |
|
Thank you, @S7venLights , I swear I went through the same menu but did not find it 😁 |
I'm not why, but I've not been getting BG updates for a while now. Not sure if it's related but I do get a consistent error from Collabora Office (logs shared below). Even though I set it to exempt from background updates and auto-select highest version and No version Detection. With these settings or default settings, it always says: 'No App was found with that ID or Name' additionally the app FFShare always gives an error on install: Cannot install an older version of an App: [com.caydey.ffshare] These may be separate issues but I thought I'd post here first before opening new issues. Logs: 2023-09-14 10:03:16.864: info: BG update task 666: Started (71). 2023-09-14 10:03:20.532: info: BG update task 666: Got error on checking for com.collabora.libreoffice 'No App was found with that ID or Name'. 2023-09-14 10:03:20.533: info: BG update task 666: Will continue in 1 seconds (with com.collabora.libreoffice moved to the end of the line). 2023-09-14 10:10:31.525: info: BG update task 667: Started (71). 2023-09-14 10:22:15.884: info: BG update task 667: Got error on checking for com.collabora.libreoffice 'No App was found with that ID or Name'. 2023-09-14 10:22:15.884: info: BG update task 667: Will continue in 4 seconds (with com.collabora.libreoffice moved to the end of the line). 2023-09-14 10:22:21.225: info: Cleared 7 logs (before = 2023-09-07 10:22:20.956947, after = null) 2023-09-14 10:22:26.007: info: BG update task 668: Started (1). 2023-09-14 10:22:27.832: info: BG update task 668: Got error on checking for com.collabora.libreoffice 'No App was found with that ID or Name'. 2023-09-14 10:22:27.832: info: BG update task 668: Will continue in 9 seconds (with com.collabora.libreoffice moved to the end of the line). 2023-09-14 10:22:41.935: info: BG update task 669: Started (1). 2023-09-14 10:22:45.583: info: BG update task 669: Got error on checking for com.collabora.libreoffice 'No App was found with that ID or Name'. |
@S7venLights could you open another issue |
Root and Shizuku installation is now implemented in #1184 🎉 |
This app is nearly exactly what I was just looking for, except I need unattended/background updates. I'm not an Android dev, what exactly would be required for you to be able to add this feature? I'm almost tempted to hire an Android dev that could build a Flutter plugin that would work for this project, because that would make this the perfect app updater 🤔
At a glance though, it seems like replacing install_plugin_v2 with flutter_install_app would provide the functionality you're looking for, is there a reason this plugin couldn't be used?
https://pub.dev/packages/flutter_install_app
Originally posted by @jonaharagon in #12 (comment)
The text was updated successfully, but these errors were encountered: