sonyxperiadev / bug_tracker

Empty repository that is used as a bugtracker for Open Devices project
52 stars 13 forks source link

No Passkeys settings #830

Closed mimi89999 closed 5 months ago

mimi89999 commented 5 months ago

Platform: Device: Sony Xperia 5 V (XQ-DE54) Kernel version: 5.15.137-android13-8-00011-g49e0f767ba2c-ab11666990 Android version: Stock 14 (67.1.A.2.242 release-keys) Software binaries version:

Previously working on Never worked

Description There are no Passkeys settings in the Passwords & accounts screen in the Settings app. Please see the screenshots in https://github.com/bitwarden/mobile/issues/3253#issuecomment-2156686334. The first screenshot shows that screen in the emulator and the second one shows that screen on my device. This in turn makes it impossible to set a Passkey provider.

Symptoms There are no Passkeys settings in the Passwords & accounts screen in the Settings app.

How to reproduce

  1. Open the Settings app
  2. Go to Passwords & accounts

Additional context Please see https://github.com/bitwarden/mobile/issues/3253#issuecomment-2156686334

Maybe Sony forked the Settings app from AOSP and did not update that view?

mimi89999 commented 5 months ago

Hello,

I tried the credential provider sample app (MyVault) and have the same issue:

On the emulator: Screenshot_1718010208

On my device: Screenshot_2024-06-10_111033

mimi89999 commented 5 months ago

Hello,

I investigated this issue further and found that the Settings view is conditional on CredentialManager.isServiceEnabled(): https://cs.android.com/android/platform/superproject/main/+/main:packages/apps/Settings/src/com/android/settings/accounts/AccountDashboardFragment.java;l=143-147

I confirmed that by pulling and disassembling the Settings app from my device:

.method private static getPreferenceLayoutResId(Landroid/content/Context;)I
    .locals 0

    if-eqz p0, :cond_0

    .line 138
    invoke-static {p0}, Landroid/credentials/CredentialManager;->isServiceEnabled(Landroid/content/Context;)Z

    move-result p0

    if-eqz p0, :cond_0

    .line 139
    sget p0, Lcom/android/settings/R$xml;->accounts_dashboard_settings_credman:I

    goto :goto_0

    .line 140
    :cond_0
    sget p0, Lcom/android/settings/R$xml;->accounts_dashboard_settings:I

    :goto_0
    return p0
.end method

So it seems that for some reason it is not enabled.

mimi89999 commented 5 months ago

I dug even deeper and found out that it's a system feature (https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/services/java/com/android/server/SystemServer.java;l=2766-2777). I checked the emulator and my device and found out that the emulator has this feature enabled, but my device doesn't:

Emulator:

michel@debian:~$ adb shell pm has-feature android.software.credentials
true

My device:

michel@debian:~$ adb shell pm has-feature android.software.credentials
false
mimi89999 commented 5 months ago

As for how it is enabled, it seems that either the permissions file is copied in device.mk like in https://cs.android.com/android/platform/superproject/main/+/main:device/google/cuttlefish/shared/device.mk;l=254 or the line is appended to the device feature definition file like in https://cs.android.com/android/platform/superproject/main/+/main:device/generic/goldfish/data/etc/handheld_core_hardware.xml;l=80 as is the case in the emulator:

michel@debian:~$ adb shell grep -r android.software.credentials /vendor/etc/permissions/
/vendor/etc/permissions/handheld_core_hardware.xml:    <feature name="android.software.credentials" />
MarijnS95 commented 5 months ago

Note that this GitHub organisation as a whole is not for stock customer support or bug reports, but for the Open Devices project based on plain AOSP. This issue should be closed here and reported elsewhere.


Sony Open Devices includes this file for a very long time, so this shouldn't be an issue for custom images. 5V for example:

https://github.com/sonyxperiadev/device-sony-pdx237/blob/a62d439e7fe2f51bd68816b3c448fb4e647aa8a3/device.mk#L23

mimi89999 commented 5 months ago

Hello,

Thanks for your reply. Where should I report the issue then?

jerpelea commented 5 months ago

@mimi89999 You should contact customer center to report issues with the stock OS. This bug tracker is for Xperia Open Source bugs.