[英]Can we have user accounts on aa android mobile phone as we have for user operating systems
I just want to create a program which runs on start up which0 will ask to login with a username and password . 我只想创建一个在启动时运行的程序,它将要求使用用户名和密码登录。
Once he logs in he should be able to access the files only which he is authorised to(for which he is having the permissions) .? 登录后,他应该只能访问被授权的文件(具有权限的文件)。
can any one tell me if its possible on an android phone. 谁能告诉我在Android手机上是否可行。
Short answer: no. 简短的回答:不。
Long answer: It's possible with some extended modifications of the Android OS. 长答案:对Android OS进行一些扩展修改是可能的。 Unfortunately, you will be able to do those modifications to the Android Open Source Project code base, which means you'll lose access to most of the Google Apps and the Market. 不幸的是,您将能够对Android Open Source Project代码库进行这些修改,这意味着您将失去对大多数Google Apps和Market的访问权限。
Explanation: 说明:
While the underlying Linux supports different users with the proper file permissions, Android has chosen to use that support for apps isolation. 虽然底层Linux通过适当的文件权限支持不同的用户,但Android已选择使用该支持来隔离应用程序。 For each application on the phone a separate Linux user is created and assigned, and the files that the application creates are properly permissioned only for that user id. 对于电话上的每个应用程序,将创建并分配一个单独的Linux用户,并且仅对该用户ID授予该应用程序创建的文件的适当权限。
Thus, if you want to introduce real user accounts switching, you will have to either: - change the way the app isolation works - way too much work, and big security risk; 因此,如果要引入真实的用户帐户切换,则必须:-更改应用程序隔离的工作方式-过多的工作以及巨大的安全风险; - have two separate user ids (one for each real user account) created for each application and change the ActivityManager to assign the right one when it starts the application process. -为每个应用程序创建两个单独的用户ID(每个真实用户帐户一个),并更改ActivityManager以在启动应用程序过程时分配正确的用户ID。 Again, way too much work. 再次,太多的工作。
您可以安装一个自定义启动器,要求您输入用户名和密码,但是您不能(在普通的android系统上)创建系统用户名和密码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.