工作找到了,没事玩玩android。看到文档里这样写:

Once installed on a device, each Android application lives in its own security sandbox:

  • The Android operating system is a multi-user Linux system in which each application is a different user.
  • By default, the system assigns each application a unique Linux user ID (the ID is used only by the system and is unknown to the application). The system sets permissions for all the files in an application so that only the user ID assigned to that application can access them.
  • Each process has its own virtual machine (VM), so an application's code runs in isolation from other applications.
  • By default, every application runs in its own Linux process. Android starts the process when any of the application's components need to be executed, then shuts down the process when it's no longer needed or when the system must recover memory for other applications.

这段很有意思。讲的是每个安卓app都有权限控制。我记得在安装每个app的时候,的确有一个授权列表。是如何实现的呢?

  • 每个app都有一个唯一的user id
  • 每个user id有自己的权限设置
  • 每个进程都对应一个虚拟机
  • 每个app对应一个进程,也就是一个虚拟机

以上就是app权限的实现方式,全部依赖linux 操作系统的实现。很懒,很好。

更多相关文章

  1. Unknown host ‘XXXX: nodename nor servname provided, or not
  2. 【Android(安卓)修炼手册】Gradle 篇 -- Android(安卓)Gradle Pl
  3. android 接听和挂断实现方式
  4. Android(安卓)中自定义权限
  5. Android动态权限管理:Android(安卓)Runtime Permission.
  6. Android的Root原理
  7. Android(安卓)SDK与API版本的对应关系
  8. Android中读写文件
  9. Android的NDK开发(5)————Android(安卓)JNI层实现文件的read

随机推荐

  1. SharedPreferences 简介
  2. Android(安卓)ramdisk.img system.img us
  3. 使用 Annotation 改善 Android(安卓)代码
  4. Android(安卓)UI Libs之CircleImageView
  5. android avd 键盘上的对应键
  6. android4.2 长按POWER键3秒关机
  7. Android进阶之大话设计模式
  8. Android(安卓)Java 线程池 ThreadPoolExe
  9. Android--Task(stack)的使用
  10. Android(安卓)2018最新验证手机号正则表