ubports / ubuntu-touch

Ubuntu Touch's issue inbox is now migrated to GitLab.
https://gitlab.com/ubports/ubuntu-touch
1.29k stars 109 forks source link

Trust Prompts: not able to give permission to Apps anymore #1814

Closed Flohack74 closed 3 years ago

Flohack74 commented 3 years ago

Steps to reproduce

  1. Revoke all loction and camera access in security settings
  2. Enable location if disabled
  3. Open any app with location or camera e.g. uNav or Tagger
  4. Trust prompt will appear, confirm it

Expected behavior

Actual behavior

Logfiles and additional information

I have no idea when this was introduced, but probably late in the OTA 19 cycle. Looking for confirmations for this!

nfsprodriver commented 3 years ago

Cannot confirm this for E4.5 and OP5.

cibersheep commented 3 years ago

Tested on E5 RC I can't do step 4, confirm the trust prompt. I get no prompt after disabling access to position and camera. Apps cannot access GPS or camera. Tried reboot. Same behaviour.

Enabling permissions in System Settings is possible. Enabling permissions again makes app work normally.

cibersheep commented 3 years ago

Same behaviour on Arale RC. Installed apps doesn't prompt for permissions if they are disabled. Disabling, rebooting, opening app an enabling permissions, work. Apps keeps using camera / GPS after re-enabling them

mariogrip commented 3 years ago

Not sure if this is a bug? Since in system-settings you are "disabling" permission for the app, you're not revoking it. This is to be expected as you as a user specifically disabled its permission.

Flohack74 commented 3 years ago

It is definitely happening for a fresh / factory reset device, too. Nothing is being disabled first, its just not saving the users choice at all.

mariogrip commented 3 years ago

Should be fixed by: https://gitlab.com/ubports/core/qtubuntu/-/merge_requests/23

please try that @Flohack74

Flohack74 commented 3 years ago

@mariogrip for some reason ubports-qa install xenial_-_trustpromptcrash did install only 1 package from that build, can this be? Strange...

Flohack74 commented 3 years ago

Basically it only updated qtubuntu-appmenutheme:arm64

mariogrip commented 3 years ago

This should be fixed in devel, please give it a test :)

https://gitlab.com/ubports/core/qtubuntu/-/merge_requests/23

Flohack74 commented 3 years ago

Yeah looks good, we will test with the general RC test schedule however.

dadandalive commented 3 years ago

As for Arale and E5, as mentioned above by @cibersheep, also on Nexus 5 the trust prompt of reproduction step 4 does not appear (RC, build 2021-W36/2).

Jan-ops79 commented 3 years ago

screenshot20210914_082344347 Camera permissions greyed out. Unlimited access without prompts for apps requiring access. Xperia x on latest RC version (QA).

mardy commented 3 years ago

Same here (RC 2021 W36/2 on Redmi Note 7): location access requests work as expected, but apps are granted camera location without any prompt.

lduboeuf commented 3 years ago

Tested on N5 last RC, no way to have audio permission on camera, it ask each time, but can't record audio. App permissions report nothing for camera

Flohack74 commented 3 years ago

Ok we move it to OTA-20... test failed, sorry to say...

mariogrip commented 3 years ago

It's in the right branch now

lduboeuf commented 3 years ago

confirmed it works now ( N5 devel )

Danfro commented 3 years ago

I have to say this is NOT fixed on Xperia X devel 30-10-2021 yet.

I installed authenticatorNG (has not been installed before). I entered the scan qr code page. Expected: camera permissions are asked for Actual behaviour: the camere just worked, no permissions where asked for

I also revoked permissions for microphone for camera and recorder app. When recording a video with camera, no sound is recorded. There is no prompt asking for permissions. When trying to record an audio with recorder app no prompt asks for mic permissions. Instead the app does give me an error and suggests resetting all settings to default. That does not solve the problem within the app.

I also did uninstall recorder app, purging all settings and data with UTTT, done a reboot. Then I reinstalled recorder app. Same error as before. No mic permissions where asked for.

Flohack74 commented 3 years ago

Yes but that's a different issue: Trust prompt for Apps using camera was broken already since ever in Halium 9 since it relies on changes in the Android side. The issue is here: https://github.com/ubports/ubuntu-touch/issues/1821

Danfro commented 3 years ago

:thinking: but further up camera access was discussed and is also named in your issue description (step no. 3). Also sound permissions (recorder app) did not work either. Hmm, reading again: do I need to factory reset to test the sound? I only turned it off.

Flohack74 commented 3 years ago

I have no idea tbh how to get it reproduced fully :)

Danfro commented 3 years ago

Hmmmm. Is that expected? Looks like getting rid of permissions is not as easy as one would expect.

I did (again) deinstall Recorder app with clearing all settings via UTTT. I also cleared the settings for system-settings. Then I rebooted the phone. After the reboot I reinstalled Recorder app without starting the app.

The mic permissions in system-settings are still there! I would have expected to somehow have deleted them. Should permissions be cleared when an app is uninstalled? Maybe not since sometimes a reinstall is needed. But shouldn't there be an option somewhere for a user to entirely remove the permissions for an app? Maybe this is just me wanting to test without factory reset and not a real usecase?

Flohack74 commented 3 years ago

Yes thats also a bug, permissions are not cleared properly.

cibersheep commented 3 years ago

Device: Arale Channel: RC 2021-W45 Result: When disabled, opening an app doesn't ask for permition if installed. Camera will show a popup asking to edit permisions. If reenabled, apps needing access works

Flohack74 commented 3 years ago

@cibersheep so you mean when you manually revoke permissions after they have been granted?

cibersheep commented 3 years ago

@Flohack74: Yes. For example: -I have installed Tagger -I revoke all permissions in System Settings -Open Tagger -> it shows blank screen -Close Tagger -Grant camera permissions to Tagger -Open Tagger -> it shows image

cibersheep commented 3 years ago

If I follow the same procedure with Camera app, it will show a popup (in app) to ask for permissions

Danfro commented 3 years ago

Interesting. I have camera permissions greyed out and showing a zero as number. So I can neither revoke camera permissions nor give them. And I don't get asked to give camera permissions either.

Flohack74 commented 3 years ago

@cibersheep thats a different bug then @Danfro thats a different bug too, on devices >= Halium 9 camera permissions are entirely broken. They need a change in the Android container part, and that was never carried over. See https://github.com/ubports/ubuntu-touch/issues/1821 that I already mentioned above ^^

Flohack74 commented 3 years ago

The test for this bug should only involve that after a clean install initially permissions can be given. Because that was the problem here. And again, do not test with camera app if you are on Halium >= 9

ivoxavier commented 2 years ago

Tested on FP2: After clean install and revoke permission. Both working as expected, trust prompts is showning.

devel channel: image from (2021-11-12)