Add support for rootless per-app mode as system app#42
Conversation
This allow per-app mode without root when app is preinstalled as system priv mode, either as rom inbuilt or using magisk like. Plan: Google Gemini 3.5 Flash
… installing as normal user app
|
I tried both A12 and A16 AVDs, A16 works fine but A12 not, the session id on A12 always 0. |
Hmmm this is weird since system api are not changed between the versions and neither permission definition changes. Are you sure you have uncommented the permission and installed to /system/priv-app or /system_ext/priv-app? Pls note that adb grant is not enough during test, must be in system partition. |
| for (config in configs) { | ||
| if (isActiveMethod.invoke(config) as? Boolean != true) continue | ||
|
|
||
| val sid = getAudioSessionIdMethod.invoke(config) as? Int |
There was a problem hiding this comment.
I added logging here, the sid always be 0 on A12 AVD (rooted and installed under priv-app using magisk), on A16 AVD everything works fine.
|
But I don't think it'll be a major issue since Android 12 usage is fairly low at this point. Unless you have any additional commits you'd like to add, I'll go ahead and merge this. |
|
Yes you can merge it as there are no more changes needed anyway. Since you said getting sid won't work on A12 either way, you probably need to update readme for this.
I checked the framework code of A12 and it is almost 95% same with A16,so it should behave same...
Maybe there are more things that I'm missing,anyway it is a myth now and I don't want to waste time here.
|
This add a (faster?)method to obtain session data directly from system, when apk is intergrated as system privileged app(when building rom,via magisk,etc...).
The required permission is comment out by default.
If anybody want this method, you need to self build the apk with the permission on.
Or maintainer can add a flavor that build it.
make sure it is installed to priv-app not app as the permission is highly sensitive and restricted in modern android version(6.0 and up)