Thanks, 

With that, I've been able to see my /system/etc/passwd file contains the 
generated AID now. That's great.

$ cat /system/etc/passwd
...
*vendor_foobar*::2222:2222::/:/system/bin/sh

Now, I'm trying to use this user. Is there a mapping from this 
vendor_foobar unix user-name to an android:sharedUserId attribute in an 
app/services AndroidManifest.xml? I was hoping to use something like:

<manifest
    android:sharedUserId="android.uid.*vendor_foobar*"
    ...>

or 

<manifest
    android:sharedUserId="android.uid.*foobar*"
    ...>

to connect an application to this user. Those examples above didn't work, 
the application ran as one of the generated users (e.g. u0_a167) which 
seems to be the default behavior if you set android:sharedUserId to some 
unrecognized value. 

Is there an additional configuration needed to establish a binding to 
android:sharedUserId?


On Monday, May 13, 2019 at 12:44:53 PM UTC-7, Tom Cherry wrote:
>
> It should be installed to /vendor/etc/passwd and /vendor/etc/group.
>
> I'd also be careful that TARGET_FS_CONFIG_GEN isn't overwritten anywhere.  
> The BoardConfig.mk's for most of the google products specify this with a 
> string similar to "TARGET_FS_CONFIG_GEN := device/google/wahoo/config.fs" 
> so the := may overwrite what you've used.
>
> On Monday, May 13, 2019 at 12:25:58 PM UTC-7, Eric Crahen wrote:
>>
>> I've been attempting to add some custom user for an application in my 
>> AOSP build, 
>>
>> Following the notes here, I tried to add a custom vendor AID to my AOSP 
>> build
>>   * https://source.android.com/devices/tech/config/filesystem
>>
>> I thought I'd find an /etc/passwd entry somewhere with a mapping of the 
>> uid 2222 -> vendor_foobar (or maybe to just a user named foobar). Maybe I'm 
>> missing something from the notes linked above, but that's not happening. It 
>> seems like the new user isn't getting added to either the system.img or 
>> vendor.img
>>
>>
>> config.fs:
>>   [AID_VENDOR_FOOBAR]
>>   value: 2222
>>
>> additions to BoardConfig.mk:
>>   TARGET_FS_CONFIG_GEN += device/google/muskie/walleye/config.fs
>>   TARGET_ANDROID_FILESYSTEM_CONFIG_H :=
>>
>>
>> Does anyone know how to correctly add a custom vendor AID? Thanks!
>>
>>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/352d6455-9c6c-4375-ba6a-c0c3d3365197%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to