~petercxy/shelter

1

Re: Allow connected apps

Victor Bessonov <unb0rnster@gmail.com>
Details
Message ID
<CAM7HGfCgApAt_WfNc9e-0WbtXz7QPjXcDdE4WeVg6+amR=G44A@mail.gmail.com>
DKIM signature
missing
Download raw message
Got really excited about this - wanted to add cross profile
interaction for Android Auto.
First of all, it looks like setCrossProfileCalendarPackages with null
argument gives unlimited app access only to cross-profile Calendar
APIs and according to the docs it will be deprecated in A14.
But there is a setCrossProfilePackages method which seems to give full
cross-profile access, however it accepts only arguments with type
Set<String> reflecting packagenames of apps allowed to make such a
request and null as a wildcard for all is not allowed.

So I made something like
manager.setCrossProfilePackages(adminComponent,
Set.of("com.google.android.projection.gearhead"));

And it seems to work. Now my Android Auto successfully created this
"link" between profiles. But there is another problem, this "Set.of"
thing requires at least Java 9 so I just bumped it during build
experiments)
So i think we can query pm for all packages (do we need
QUERY_ALL_PACKAGES permission?), build a set with apps supporting
INTERACT_ACROSS_PROFILES (or some other permission?), give this set to
user to select which apps have to be allowed and then feed this set to
setCrossProfilePackages.
If anyone needs it, I left this PoC in my fork
https://github.com/Unb0rn/Shelter in the CrossProfile branch. It also
has this cert install feature from GitHub PR by tfels. (It would be
great if you merged it too)
It Would be really nice to have this feature implemented. And thank
you for your work!

BTW Does anyone have any list of apps supporting this feature? I can't
think of anything beyond AA and Gboard...

Re: Allow connected apps

Details
Message ID
<08728e53-e97b-9ab9-1ad7-b19b6a65422d@typeblog.net>
In-Reply-To
<CAM7HGfCgApAt_WfNc9e-0WbtXz7QPjXcDdE4WeVg6+amR=G44A@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
Thank you. Eventually I'll add both of these features -- hopefully 
before A14 is actually released.

On 5/18/23 13:00, Victor Bessonov wrote:
> Got really excited about this - wanted to add cross profile
> interaction for Android Auto.
> First of all, it looks like setCrossProfileCalendarPackages with null
> argument gives unlimited app access only to cross-profile Calendar
> APIs and according to the docs it will be deprecated in A14.
> But there is a setCrossProfilePackages method which seems to give full
> cross-profile access, however it accepts only arguments with type
> Set<String> reflecting packagenames of apps allowed to make such a
> request and null as a wildcard for all is not allowed.
> 
> So I made something like
> manager.setCrossProfilePackages(adminComponent,
> Set.of("com.google.android.projection.gearhead"));
> 
> And it seems to work. Now my Android Auto successfully created this
> "link" between profiles. But there is another problem, this "Set.of"
> thing requires at least Java 9 so I just bumped it during build
> experiments)
> So i think we can query pm for all packages (do we need
> QUERY_ALL_PACKAGES permission?), build a set with apps supporting
> INTERACT_ACROSS_PROFILES (or some other permission?), give this set to
> user to select which apps have to be allowed and then feed this set to
> setCrossProfilePackages.
> If anyone needs it, I left this PoC in my fork
> https://github.com/Unb0rn/Shelter in the CrossProfile branch. It also
> has this cert install feature from GitHub PR by tfels. (It would be
> great if you merged it too)
> It Would be really nice to have this feature implemented. And thank
> you for your work!
> 
> BTW Does anyone have any list of apps supporting this feature? I can't
> think of anything beyond AA and Gboard...
Reply to thread Export thread (mbox)