签署Android系统应用程序(研究项目)
我正在为内部研究项目开发概念验证工具。
我们有特定的需求,只能通过将我们的应用程序作为系统应用程序运行来满足,例如“设置”或“电话”应用程序。
我是否正确地认为在系统用户(uid = 1000)下运行应用程序的唯一方法是在清单中设置以下内容:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.frogdesign.desktop"
android:sharedUserId="android.uid.system" >
并使用平台证书签署我的应用程序?
如果是这样,对于给定的手机,例如 Galaxy S,这将要求我们使用三星的证书进行签名。不会发生,对吧。
那么如果我们root手机并贴上cyanogenmod之类的东西,所需的证书是cyanogenmod的平台证书吗?
这个一般都可以用吗?
I am developing a proof-of-concept tool for an internal research project.
We have specific needs which can only be met by running our application as a system app, like the Settings or Phone app.
Am I right in thinking that the only way to run an application under the system user (uid=1000) is by setting the following in the manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.frogdesign.desktop"
android:sharedUserId="android.uid.system" >
and signing my application with the platform certificate?
If so, for a given phone, e.g. Galaxy S, this would require us to sign using Samsung's certificate. Not going to happen, right.
So if we root the phone and stick something like cyanogenmod on it, would the required certificate be cyanogenmod's platform certificate?
Is this generally made available?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相当有信心您不会使用制造商的密钥。在我的 Galaxy S 上,Gmail 应用程序是一个系统应用程序,您可以从 Android 市场更新它(即,如果有的话,它是由 Google 而不是三星签署的)。
如果手机已deodexed,您应该能够将应用程序移动到
/system/app/
(或在较新的操作系统版本上移动到/system/priv-app/
)。这需要root手机,以便您可以将系统分区挂载为可写分区。当然,这与您的清单设置相关。我不确定这是否足够,因为我自己还没有这样做过,但这是值得尝试的事情。I am fairly confident that you would not be using the manufacturer's key. On my Galaxy S, the Gmail app is a system app, and you can update it from the Android Market (i.e. it's signed, if it is at all, by Google and not by Samsung).
If the phone is deodexed, you should be able to just move the app to
/system/app/
(or/system/priv-app/
on newer OS versions). This requires a rooted phone, so that you can mount the system partition as writeable. This is in conjunction with your manifest settings, of course. I'm not sure if that's sufficient, since I haven't done this myself, but it's something to try.