将我的 android 应用程序签名为系统应用程序 [英] Signing my android application as system app

查看:47
本文介绍了将我的 android 应用程序签名为系统应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的公司,我们希望在现场完全控制电池消耗,仅使用 2g 和 GPS 会非常快地耗尽电池电量.我们决定的是我们需要对手机进行root访问,这样当手机空闲时,我们就会关闭那些不必要的电池消耗.并且我们也不允许用户卸载它并清除数据.

In my company, we would want total control for battery consumption in the field, using only 2g and gps could drain the battery awfully fast. What we decided is that we need to have root access to the mobile phone, So that when phone is idle, we would turn off those needless battery consumption. And also we would not allow users to uninstall it and clear data to it.

我的问题是:

  1. 我从哪里获得这些签名密钥?
  2. 如果我成功地做到了,它会喜欢 root 访问吗?签了吗?
  3. Root 和 Signed with key 有什么区别?

推荐答案

下面就是你的答案,

  1. 您可以从以下位置找到平台密钥此处.签署apk的命令(对于linux)是:

  1. You can find platform keys from HERE. The command to sign apk (for linux) is:

java -jar signapk.jar -w platform.x509.pem platform.pk8 APPLICATION.apk APPLICATION_sign.apk

需要提供Android 10以后的lib64库路径,生成成功后可以在android/out/host/linux-x86找到,可以复制文件夹或者简单地提供其生成签名APK的路径

onward Android 10 lib64 library path need to provided which can be found at android/out/host/linux-x86 after generating a successful build, one can copy folder or simply provide its path to generate sign APK

java -Djava.library.path="";-jar signapk.jar -w platform.x509.pem platform.pk8

如果您使用平台密钥签署您的 apk,您将不需要 root 访问权限,您只需从adb install"安装它即可.命令,是的,在某种程度上它就像 root '因为它可以访问所有内部 api 但请记住,如果您的应用程序是系统签名的,那么您将无法写入外部存储.

If you sign your apk with platform keys you won't required root access you can simply install it from "adb install" command, and yes in someway it is like root 'cos it can access all internal api but keep in mind if your app is system signed then you can't write external storage.

首先,不要将 root 用户与系统应用程序的应用程序类型相结合,这与以下链接中的普通应用程序不同可能会消除您对此的困惑.

First of all don't combine both root is user where system app is application type which distinguish from normal application below link might clear your confusion regarding it.

什么是差异-android-user-app-with-root-access-and-a-system-ap

这篇关于将我的 android 应用程序签名为系统应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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