如何install/uninstall android 后台应用?

How to install/uninstall android app in background?

我想 install/uninstall 应用程序在没有用户确认对话框的情况下静默运行。我尝试了两种解决方案,root 设备和在系统目录中安装应用程序,但发现 site.

中提到的更好的解决方案

To achieve that first you have to obtain the certificates that were used to sign the Android OS installed on the device – a pair of certificates (.pk8 + x509.pem) – to generate a java certificate.

The certificates pair (platform.pk8 + platform.x509.pem) can be found under {Android Source}/build/target/product/security.`

我从 source code for 4.1.2 android version 下载了证书对并用它们来签署我的应用程序,但它不适用于

先生

任何人都可以解释一下我如何从我的设备的 ROM 中获取这些证书,或者有其他解决方案吗?

To achieve that first you have to obtain the certificates that were used to sign the Android OS installed on the device – a pair of certificates (.pk8 + x509.pem) – to generate a java certificate.

The certificates pair (platform.pk8 + platform.x509.pem) can be found under {Android Source}/build/target/product/security.`

我从 4.1.2 的源代码下载了证书对 android 版本并使用它们来签署我的应用程序,但它不适用于 先生

我无法回答这个问题,但我想我知道为什么失败了...

Android 来源有 3 或 4 个默认代码和平台签名密钥。您获取了一个默认签名密钥,但 OEM 在分叉 Android 时更改了它们。密钥不再有效。 (OEM 应该更改密钥)。

另请参阅 Nikolay Elenkov 的 Android Security Internals: An In-Depth Guide to Android’s Security Architecture。您或许可以在线找到它的 PDF 格式。