您的位置:首页 > 移动开发 > Android开发

Android应用程序获取系统权限

2012-06-07 17:12 246 查看
http://hi.baidu.com/donghaozheng/blog/item/30a00d4f9fca873baec3ab69.html

The only way I know to grant system-level permissions to android apps

(right now) is to install them to /system/app. Suppose you have an

installer program named my-installer.apk that you wish to give the

INSTALL_PACKAGES permission. You need to declare that permission in

the manifest, and then:

adb push my-installer.apk /system/app
http://groups.google.com/group/android-developers/browse_thread/thread/23a94989d964d7fd http://blog.csdn.net/zengyangtech/article/details/5749999
guillaume.leterr...@teleca.com> wrote:

> "A permission that the system is to grant only to packages in the

> Android system image or that are signed with the same certificates."

> Could someone really clarify what is called the "system image". Could

> someone list or clarify what encompasses the term system image for

> this protection? Is it only packages that are located under directory /

> system/ or more?

It's the .apks under /system/app.

> The Framework core package is installed under /System/,

Fwiw, this is irrelevant.

> and /frameworks/base/core/res/AndroidManifest.xml includes API that

> are either protected by signature or SignatureorSystem.

> So, for the framework protected APIs, a Signature and

> SignatureorSystem protection make no protection difference?

Huh? It means what it says: for someone to be granted the permission,
they

must either be signed with the same certificate as the one who declared the

permission (in this case the framework in the path you supply, which is

signed with the core platform certificate), or they must be installed in the

system image.
http://groups.google.com/group/android-security-discuss/browse_thread/thread/acfe52ee02e8cc0b
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: