0

I'm building an Android Automotive system application that doesn't include any UI.

This service acts as a local backend/proxy on the device waiting for requests from other applications, making the desired action and return the needed data as a response.

Must of the interaction between the service and the other applications are handled using AIDL.

Two questions:

  1. Because our system is multiple users aware there are two process created, one for each user - system user (user#0) and a regular user (user#12). Is there any way to notify the system to create only the process for the system user? I tried to mark the receiver as singleUser=true, but it didn't help, two process are still created for each user.
  2. Another approach that I used was to identify on the boot completed receiver which user is currently running and in case this a regular user disabled the app using PackageManager.setApplicationEnabledSetting(), like Google suggested here. The problem is that when other application is trying to communicate using an AIDL service I'm getting the error below. Worth to mention that each service is marked with android:exported="true" and android:singleUser="true". From what I know marking the service as singleUser=true should make all the calls to be routed to the service running on the system user. Am I missing something with the current implementation?

ActivityManager: Unable to start service Intent { act=com.companyName.appName.services.serviceName pkg=com.companyName.appName } U=12: not found

Ofir A.
  • 3,112
  • 11
  • 57
  • 83

0 Answers0