Skip to content
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.

After updating to Android Q, i am not able to retrieve the data from the Secure preferences? #98

Open
i-m-aman opened this issue Jul 15, 2019 · 10 comments
Assignees

Comments

@i-m-aman
Copy link

I upgraded my device to Android Q and now I am not able to retrieve the data stored in the SecurePreferences. Android Q release mode is around the corner and now it will be a disaster for my users if they are not able to see their data which is empty.

Please tell me if there is any way to tackle this bug.

@samratshaw
Copy link

@Deathstroke007 Android Q does not allow developers to retrieve Device Serial number anymore.
Thus you need to migrate your existing application data to the new version of the library, where you will need to pass your own data.

I will be creating a PR explaining how we can migrate to the new version of the library & your existing data (if we can still access Serial Number).

Will tag in once completed.

@i-m-aman
Copy link
Author

is there a new version of the library? I am afraid there isn't any new release for this project. I have been using v0.1.7 which I think is the latest one. Anyways I am using another library which is working fine as of now. And you cannot get the Serial Number from Android Q. Google won't let you since it is a non-resettable identifier. Looking forward to the new release with the fix. Instead of Serial Number, you can use the Device ID which I think is the safest way to get the unique identifier (unique for every Application from Android 8.0.0).

Appreciate your reply though.

@scottyab
Copy link
Owner

new version 0.1.8 incoming to fix the crash on Android Q/10 (thanks for reporting). However If you are using the default Salt (which is Device Serial) I don't see that there's any way to add a migration option to decrypt previousily encrypted values as once the device upgraded to Android Q, they'll be no way to decrypt the values encrypted. Only suggestion is to migrate now to a Salt you provide yourself via contructor. I'll see if I can create a gist of how to, unless someone else beats me to in.

@scottyab scottyab self-assigned this Aug 30, 2019
@kkazakov
Copy link

@scottyab we really need the migration guide ... more and more users are upgrading to Android Q and we're losing them.

@dzungpv
Copy link

dzungpv commented Sep 20, 2019

@kkazakov since Android Q not possible to get serial and you use it to store user data, so before user update to Q,, release and update and store the serial in normal preference, after update to 10 you use it as salt and you read serial not from user device but preference.

@kkazakov
Copy link

@scottyab I know that ... I had to do a workaround and did "migration" pre- Android 10 and it works when they update, with 1.0.7 now. I just had to dig deeper to find out how it works, but managed it :)

@umeshNova
Copy link

hello, @scottyab its a really nice library and I really appreciate your efforts.

I see that you have given the fix to this and this has been updated in the list of changes as 0.1.8. But it was never released. Can you please release it over maven, if this is stable. Again, I appreciate your help.

@codemonk03
Copy link

Hey, @scottyab !
Appreciate this awesome library.. I see that v0.1.8, which has the Android 10 fix, is marked released but not yet pushed to maven central. Could you also give an update there if all good??

Thanks :)

@kartik1225
Copy link

Any update on this?

@shahnawazahmed88
Copy link

@scottyab is not released yet v0.1.8?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants