1. Due to functional requirements, android app needs to be set as a system application;
2. To set it as a system application, I need to add android:shareduserid = "android.uid.system" in AndroidManifest.xml, but JME initialization fails after setting it as a system application; The log is as follows:
com.jme3.app.AndroidHarnessFragment: 严重 Exception thrown in Thread[GLThread 165,5,main]
Hi welcome to jme community, why you want to use the app as a system app ?
Some functions may not work properly when the app is a system app including the android application files reader used by jme, so its not recommended to do so, there would be adverse effects, and doing so in Manifest won’t make the app “a system app”.
That would probably mean that if you have changed the user app ID, then you cannot access the game package resources & files which in turn would violate the use of Assets & AssetManager.
BTW, app can be settled as system app easily through rooted devices, but that also disrupts the behavior of the app, as setting the app as a system app does nothing but copying the package to the system !
How to deal with this :
remove the uid flag.
Better use the Android Intents, Services, ContentProviders & JobSchedulers to communicate with other apps & system apps within your app, w/o changing your user id or setting the app as system app.
AFAIK, you will build a bloatware if this can take place & the app is on Google play, but for custom usages you can achieve this through being a superuser(aka using root permission) & running the command “reboot” through a ProcessBuilder.
Idk from where the problem is, but all I know that google android developer has warned from the instability behavior resulted from setting shared user id as a system app, besides the feature got deprecated since API level 29, for me I use APi 30, so I cannot go back and test a deprecated feature, sorry.