AssetNotFoundException in android system app

Hello i’m using jme3 on android,my demo is working fine until i try to chang my project AndroidManifest.xml for run as a system app.

<manifest android:sharedUserId="android.uid.system">

then throw exception
com.jme3.asset.AssetNotFoundExcetpion:Interface/Fonts/Default.fnt

can anybody help me?

1 Like

Hi @zhangzoey welcome to jme community,

From Android developers saying :

android:sharedUserId

This constant was deprecated in API level 29.
Shared user IDs cause non-deterministic behavior within the package manager. As such, its use is strongly discouraged and may be removed in a future version of Android. Instead, apps should use proper communication mechanisms, such as services and content providers, to facilitate interoperability between shared components. Note that existing apps cannot remove this value, as migrating off a shared user ID is not supported.

If you need a full communication with system apps & services, use Intents, BroadCastRecievers for foreground services, JobSchedular & its builder for background services…

1 Like

Have you found a solution to the problem?

The solution involves root permission, if you would like, I will send it here.

1 Like

I need it , Can you provide a solution for using jme3 in system app

No.
My solution is using root permissions (superuser) to achieve what you want to do through the adb commands or shell commands and you must run the code on a rooted device.