ImranR98 / Obtainium

Get Android app updates straight from the source.
https://obtainium.imranr.dev
GNU General Public License v3.0
5.93k stars 140 forks source link

Apps are not upgraded automatically in background (normal installer) #1550

Open bobdole4prez opened 2 months ago

bobdole4prez commented 2 months ago

Describe the bug Apps are not upgraded automatically in background with the normal installer (in contrast to #1376 which deals with the Shizuku installer), although all the requirements specified in the wiki for automatic background updates are met.

To Reproduce

  1. Install Obtainium
  2. Install some apps via Obtainium
  3. Ensure requirements for background automatic updates are met
  4. Notifications of available updates show up but apps are not updated automatically.

Screenshots and Logs App logs.txt logcat grep obtainium.txt obtainium-export-2024-04-19T20-07-23.495872.json

Please complete the following information:

Additional context Foreground installation/updates works fine. No sign in the logs that a background installation is even being attempted.

ihatemakinganaccount commented 2 months ago

I've had this issue for a week or two on CalyxOS. Strangely, the log says "apps updated" even if... They weren't.

Also I don't even get notifications about updates. I think notifications are only shown on apps where there's just one apk. If there are multiple apks to choose from, e.g. various architectures (Cromite) or fdroid/github releases (like Obtainium itself) etc, I don't even get notified about the update. But it's just an observation and I'm not 100% certain that's the reason.

j0hann3s commented 2 months ago

I've got the same problem but on GrapheneOS (Pixel 8 Pro). Logs just mention that it has checked for updates but never actually tries to update.

2024-04-21 17:20:46.838: info: Cleared 7 logs (before = 2024-04-14 17:20:46.259143, after = null)

2024-04-21 17:20:51.497: info: BG update task: Started (37).

2024-04-21 17:20:59.859: info: BG update task: Done checking for updates.

2024-04-21 17:20:59.859: info: BG update task: Done checking for updates.
ImranR98 commented 2 months ago

When you open the app, do you see the update button immediately for apps that have updates? Or do you need to pull to refresh?

ihatemakinganaccount commented 2 months ago

@ImranR98 I see the update icons for the apps. So pulling the information about updates does occur in the background.

(At least that's my case, I'm not the OP)

ImranR98 commented 2 months ago

Has the notification permission been granted?

ihatemakinganaccount commented 2 months ago

Yes. When I press the update all button and switch to another app, I'll get a notification that installation has been attempted (usually successfully, I may add). So notifications are good.

I see there's a new Obtainium update, I'll see how it behaves. But @ImranR98 I'm curious, how are unattended updates supposed to work if there are multiple apks to choose from? Like x86/Arm64, fdroid/github, beta/release etc. Should Obtainium just pick something that corresponds to what was installed before?

Unattended or background updates are hit or miss as per this issue, but I've never had an app update automatically when it has multiple apks.

ImranR98 commented 2 months ago

Yes, the app must satisfy these requirements: https://github.com/ImranR98/Obtainium/wiki#background-updates But if it doesn't, you should still be notified.

ihatemakinganaccount commented 2 months ago

I see. Ok I added regex filters for apks, I'll see how things go when something gets an update.

bobdole4prez commented 2 months ago

@ImranR98 Thanks for following up. I also see the update icons without having to pull to refresh.

soredake commented 2 months ago

Same problem on my device.

niels-beier commented 2 months ago

Same for me. I get the notifications that there is some update, but I have to trigger it manually in the app. The update then just doesn't need another confirmation like when installing an apk from storage, etc.