Reputation: 91
I am dealing with an app that has android:sharedUserId value in Manifest,
and there was an issue regarding permission triggered by this android:sharedUserId value.
While trying to solve the problem, I checked out that anderoid:sharedUserId was deprecated in API level 29 (Android 10).
So now I would really like to remove this sharedUserId from the application. (permission problem in API 29 + deprecated in API 29)
As I tested in debug mode, it seems that complete uninstall and reinstall is required after removal of sharedUserId... and It "seems" that there is not much problem else than that.
But I cannot assure that it is really safe to delete this property and release an update on market.
This IssueTracker Thread created in June, 2019 is about this issue, but does not give detailed instruction on how to remove sharedUserId safely from an application.
Would deleting android:sharedUserId without any other modification end up with a critical problem?
If so, does anyone know an appropriate way to remove sharedUserId from Manifest file and safely release an update version?
Upvotes: 5
Views: 2866
Reputation: 1026
This wasn't possible, but Android introduced a solution for this in sdk 33. It's called the android:sharedUserMaxSdkVersion attribute. It's only available in android 13. The documentation says:
The maximum device SDK version for which the application will remain in the user ID defined in sharedUserId. Used when the application wants to migrate out of using shared user ID, but has to maintain backwards compatibility with the API level specified and before.
So I think you should define: android:sharedUserMaxSdkVersion="29"
. But I'm not completely sure yet how this option should be interpreted.
Upvotes: 1
Reputation: 91
OK, I just checked out the documentation again in original English version... and found out this sentence was omitted in Korean translation.
Note that existing apps cannot remove this value, as migrating off a shared user ID is not supported.
So sharedUserId drives out problems in Android 10 (obviously in my case), and there is no way to remove it. Did I get it right?
If so... well... I find this very surprising... and disappointing...
Upvotes: 1