android虚拟应用沙箱,Android的SandBox(沙箱)



在研究Android系统时,有时会遇到Sandbox(沙箱)这个概念。沙箱概念本身并不是太新奇,但是一直不是很清楚Android是如何实现它所称的“沙箱”的。网上不少人声称应用使用了虚拟机就是应用了沙箱,一直对这种说法表示怀疑。

最近发现Android的网站上更新了一些文档,其中包括对Sandbox的解释,这才明白Android中Sandbox的含义。

Android的”沙箱“就是在Linux的进程管理基础上对UID的使用做了改进。普通的Linux中启动的应用通常和登陆用户相关联,同一用户的UID相同。但是Android中给不同的应用都赋予了不同的UID,这样不同的应用将不能相互访问资源。对应用而言,这样会更加封闭,安全。虽然这个现象早已了解,但是一直不知道这就是Android所谓的”sandbox“。

有关英文解释见下面:

The Application Sandbox

The Android platform takes advantage of the Linux user-based protection as a means of identifying and isolating application resources. The Android system assigns a unique user ID (UID) to each Android application and runs it as that user in a separate process. This approach is different from other operating systems (including the traditional Linux configuration), where multiple applications run with the same user permissions.

This sets up a kernel-level Application Sandbox. The kernel enforces security between applications and the system at the process level through standard Linux facilities, such as user and group IDs that are assigned to applications. By default, applications cannot interact with each other and applications have limited access to the operating system. If application A tries to do something malicious like read application B's data or dial the phone without permission (which is a separate application), then the operating system protects against this because application A does not have the appropriate user privileges. The sandbox is simple, auditable, and based on decades-old UNIX-style user separation of processes and file permissions.

Since the Application Sandbox is in the kernel, this security model extends to native code and to operating system applications. All of the software above the kernel in Figure 1, including operating system libraries, application framework, application runtime, and all applications run within the Application Sandbox. On some platforms, developers are constrained to a specific development framework, set of APIs, or language in order to enforce security. On Android, there are no restrictions on how an application can be written that are required to enforce security; in this respect, native code is just as secure as interpreted code.

In some operating systems, memory corruption errors generally lead to completely compromising the security of the device. This is not the case in Android due to all applications and their resources being sandboxed at the OS level. A memory corruption error will only allow arbitrary code execution in the context of that particular application, with the permissions established by the operating system.

Like all security features, the Application Sandbox is not unbreakable. However, to break out of



  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要选择哪个更好用,需要根据实际需求和使用场景来进行评估。以下是对360沙箱sandbox的简要比较: 360沙箱是由中国的360公司开发的一款沙箱技术产品。它具有对恶意软件进行快速分析、检测和隔离的能力,可以在虚拟环境中模拟恶意软件的运行环境,以保护计算机系统的安全。360沙箱提供了简单易用的用户界面和功能丰富的工具,适合个人用户和中小型企业使用。 而sandbox则是一种通用术语,指的是隔离和限制程序执行环境的技术。它可以在操作系统层面或虚拟化技术中实现。sandbox可以提供更加灵活和定制化的设置,适用于开发者、研究人员和高级用户等有特殊需求的群体。 所以,要选择哪个更好用,可以从以下几个因素考虑: 1. 功能和用途:如果只需要简单的恶意软件检测和隔离功能,360沙箱足够满足需求。如果需要更高级的定制、更广泛的应用场景或特殊研究目的,则sandbox可能更适合。 2. 用户友好性:360沙箱提供了易于使用的界面和工具,对于普通用户来说更加友好。sandbox则可能需要更高的技术素养和操作技能。 3. 数据隐私:如果有涉及敏感数据或隐私信息的需求,sandbox可能提供更好的安全性和隐私保护,因为它可以完全隔离程序的执行环境。 因此,在选择哪个更好用时,需要根据具体需求和使用场景来综合考虑功能、用户友好性和安全性等因素。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值