logoalt Hacker News

chrisjjtoday at 10:35 AM2 repliesview on HN

> If two apps from the same developer share a User ID (sharedUserId), they run in the same process and share all permissions

Good grief. What a huge vulnerability. Is there some benefit that justifies this?


Replies

j16sdiztoday at 10:55 AM

First, `sharedUserId` is opt-in.

You need something like that for plugin / extension like system.

Third, it is being deprecated. and people are screaming "bad google" "android is no longer free!"

well_ackshuallytoday at 12:18 PM

Literally there for more protection. Split your app into different apps, each handling a component. Want a banking app, without access to registering your card for NFC payments ? Split the app.

sharedUserIds cannot be applied blindly, they need the app to be signed with the same key, both need to declare their sharedUserId to be the same, etc.