yuliskov / SmartTube

SmartTube - an advanced player for set-top boxes and tvs running Android OS
https://www.patreon.com/smarttube
Other
18.9k stars 1.05k forks source link

Unable to update app on Chromecast with Google TV #793

Open theschism opened 3 years ago

theschism commented 3 years ago

I really love this app, and it works fine on my fire stick and I can install the APK find on a Chromecast Android TV v10 with Apr 5 2021 security patch. The issue is the built in upgrade feature will not let me update the application. I have set the application up in the OS to allow unknown sources but the update process seems to get caught up in a loop, no matter if I allow the app to install unknown sources or not. The OS will not let SmartTubeNext install a new APK. This may be an issue with Android TV v10 Apr 5 2021 update but I could not find a bug to validate it. AFTVnews Downlonloader works to install apps from their app on the same device with the same process. I am a huge fan and only trying to alert you that this is happening. Thank you!

dseven commented 3 years ago

I have the same issue with self-update on my CCwGTV. I've been using adb to load the new APKs as they come out. It'd be more convenient if self-update could work. I'm not sure if the issue is with the OS or the app.

theschism commented 3 years ago

Cool workaround. I can't seem to find anything past 11 r22 (in the github release section). I was going to look through the code to find the update sites but haven't had time, I have just been using it with firetv (the only reason I use fire tv at this point) :-P

dseven commented 3 years ago

Latest builds are available via Telegram: https://t.me/SmartTubeNext_en

dseven commented 2 years ago

I've found that NordVPN has the same issue on my CCwGTV (same error when it tries to update itself). It appears to be an operating system issue, not an issue with the app(s)

panosru commented 2 years ago

For those who run into that issue, check if you have (or had) a work account linked with your device.

You can identify if an application is linked to a work account by the small briefcase icon next to the application icon, for example: photo_2021-10-05 12 14 42

I noticed a strange behaviour in Google TV that does not seem to exist in other android devices that I own (smartphones and tablets). On a fresh device, when you enable developer mode and enable USB debugging if you enter the shell (adb shell) and run pm list users before running adb install to that device, then you will have only one user, like this: image

The problem now is that in Google TV, when you run adb install and install an app, a new user is created, and now you have two users, that behaviour isn't happening on my other android devices. pm list users after running adb install: image

The Owner is your main account, the _newuser appears when you first install an app via adb, which isn't normal.

After a few system reset in Google TV, I'm not facing the above-described issue anymore, but I'm not sure how and why it appeared in the first place.

If you end up having that extra user and you don't want to reset your device, you can uninstall the app that has the work account icon on it and then install the Downloader app, then instead of running adb install, run adb push your.apk /sdcard/Downloader and then from within the Downloader app, go to Files and select the app you want to install from the list, it will be attached to your account properly.

If I'll have any new info on the matter, I will update my post.

yolking commented 2 years ago

I've had same problem and well I tried obvious solution based on @panosru reply - I just ran pm remove-user ID, where ID is first number after parenthesis for new user (10 in previous reply and it was same number in my case). This new_user gone, no more briefcases. Had to give permissions again, but update immediately worked like a charm even without restart. Thank you @panosru for the info.

nitram777 commented 2 years ago

Thanks! It was hard to find this thread, but finally I can confirm removing user 10 did solve the update issue on my CCwGTV.

I would guess, it´s OS related as I installed same version of SmartTubeNext on the same day with the same process on my CCwGTV and my Sony TV (Android TV 9 based). And the updating on Sony works without issues.

But thanks to your findings it´s now also updating on the Google dongle 👍

Tommystus commented 2 years ago

Yup, lucky I found this thread. Issue just as described by panosru and removing the user ID 10 fixed it.

cybrnook commented 1 year ago

Saved my bacon on a Sony TV running Google TV os. ID was also 10.

Lightning-5 commented 1 year ago

I the same problem. I tried turning on developer options and after that I was able to update STN through inbuilt autoupdate.