如何使用系统权限编译Android应用程序 [英] How to compile Android Application with system permissions

查看:23
本文介绍了如何使用系统权限编译Android应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要编译具有系统权限的应用程序才能使用目标应用程序 com.android.settings.现在,当我尝试运行我的 apk 时,我收到错误消息

I need to compile an application with system permissions in order to use target application com.android.settings. For now while I try to run my apk I get the error message

测试运行失败:权限拒绝:启动仪表组件信息{com.jayway.test/android.test.InstrumentationTestRunner}从 pid=354, uid=354 不允许因为包 com.jayway.test 确实没有匹配的签名目标 com.android.settings

Test run failed: Permission Denial: starting instrumentation ComponentInfo{com.jayway.test/android.test.InstrumentationTestRunner} from pid=354, uid=354 not allowed because package com.jayway.test does not have a signature matching the target com.android.settings

如何使用系统权限编译我的应用程序?

How can I compile my application with system permissions?

推荐答案

经过一番搜索,我发现了如何使用系统(平台)密钥对我的应用程序进行签名.系统签名位于 /build/target/product/security 目录中.您可以使用它们以系统权限对您的应用程序进行签名.

After having some search I found how to sign my application with system (platform) key. System signatures are located in directory <root-of-android-source-tree>/build/target/product/security. You can use them to sign your application with system privileges.

这篇关于如何使用系统权限编译Android应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆