I am working on custom Android build, where prebuilt should be included as a system app. Simply, this app adds VPN profile and open links after it.
I've done the following with no result. I left no stones unturned.
- First, I add the APK to
packages/apps/<app name>, and include its module name inbuild/make/target/product/base_system.mkto be include in the/system. It successfully included in/system/priv-apps/. Reference - Following these steps, I re-signed the APK as a system apps & added
android:sharedUserId="android.uid.system"to application. Successfully done and checked it withadb shell ps -Z | grep system_app. - Selinux policy denied most of operation used
audit2allowand added the allow statements tosystem/sepolicy/public/init.te.
Result: the app installed but seems the OS blocked some of its services/processes or something and cannot operate properly, I also found this I/system_server: oneway function results will be dropped but finished with status OK and parcel size 4.
AFAIK, System apps gain access to an extremely high level of system. But this is not what is happening.
Why does Sepolicy denies a system_app request?
Is there any wrong with these steps? What should I do in order to make the app work properly?
Update.
the app include prebuilt .so files and now the error is that the app cannot run these files.
Cannot run program "/system/priv-app/****/lib/arm64/libovpnexec.so": error=2, No such file or directory