how to add a user to boundary built android lollipop5.0.0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to add a user to boundary built android lollipop5.0.0

961 Views
damienhuang
Contributor IV

Hi

Anyone knows how to

1) create/add more users to the boundary built android lollipop 5.0.0 image?

   I know the answer for this is with the pm and am commands.

  • Create new user: pm create-user User_Name.
  • To switch between users: am switch-user User_ID.
  • To get the list of all the users: pm list users.
  • To delete a user: pm remove-user User_ID.

   but, I was expecting the root user command prompt will be changed from # to $, when I switch from root to a newly

   created user, say 'newuser', however, this was not happened, it was still with # prompt. Am I really switched?

2) there is a service called 'su_daemon' running on that image, what is this 'su_daemon' do?

3) since the 'su' and the 'busybox' command were both existed in the image, how can I assign some apks with superuser right while others are still with normal user right - Just the same as a rooted tablet.

thanks in advance.

Cheers,

Damien

Labels (2)
0 Kudos
4 Replies

839 Views
gary_bisson
Senior Contributor III

Hi Damien,

1) The Android User has nothing to do with the Linux shell user. Android user just creates another area in the /data partition to store applications/settings of each user in their own location. The shell user however is decided by the init.rc at bootup, it doesn't care about which Android user is then used.

2) su_daemon is the service that allows Android applications to request a root access (su). The daemon is in charge of catching the event and have a UI popup that ask the user if the app should be authorized to execute su.

3) Sorry I don't understand the question. Busybox and su are two different tools, what do you mean by "they were both existed"? Yes they both exist in the image, but I'm not sure what is your implication of that statement.

Asking for root permission from app is the same as a rooted tablet.

Regards,

Gary

0 Kudos

839 Views
damienhuang
Contributor IV

Hi Gary,

I am sorry to confuse you with question 3, I was referring to the manual

process of rooting a mobile phone from link

"http://androidforums.com/threads/how-to-root-any-android-device-manually.586982/"

where three files "busybox", "su" and "Superuser.apk" were used. As your

answer at point 2 had given exactly what the rooting process trying to

do, so no need to worry about question 3 now.

Does the lollipop image be tested with any VNC application? - I am far

away from a machine that has an error with it. I can not fix it since I

can not see the monitor nor clicking any on screen button, so I need a

VNC application for this, any suggestion?

Cheers,

Damien

0 Kudos

839 Views
damienhuang
Contributor IV

Ok, I tested this image with webkey version 3.2.11. It works fine with the lollipop 5.0.0 image.

New questions:

1) for the "su_daemon", how can I give default settings to allow a particular apk granting root at compilation time?

2) Can I install an apk at compilation time and granting it root?

Cheers,

Damien

0 Kudos

839 Views
gary_bisson
Senior Contributor III

Hi Damien,

1) Don't know. This su package is from Koush (Cyanogenmod) so I suggest you ask that question to them directly.

2) Yes you can have the apk installed to your image by default, see any of the applications present in the AOSP source code to create your own Android.mk:

Cross Reference: /development/apps/WidgetPreview/Android.mk 

As for the root access permissions, see 1).

Regards,

Gary

0 Kudos