if the parser found inconsistent certificates on the files in the .apk.104

当静默安装提示104时,是说升级的APK 和本地已经安装的APK 签名不一致,所以无法升级。

经百度,找到知乎同学@陈子腾的回答,找到了问题所在。

可以比对apk签名的fingerprint。

假定安装了JDK,如果想查HelloWorld.apk所使用的签名的fingerprint,可以这样做:

1. 查找apk里的rsa文件

(Windows)
> jar tf HelloWorld.apk |findstr RSA

(Linux)
$ jar tf HelloWorld.apk |grep RSA

META-INF/CERT.RSA

2. 从apk中解压rsa文件

jar xf HelloWorld.apk META-INF/CERT.RSA

3. 获取签名的fingerprints

keytool -printcert -file META-INF/CERT.RSA

...
Certificate fingerprints:
MD5: BC:6D:BD:6E:49:69:2A:57:A8:B8:28:89:04:3B:93:A8
SHA1: 0D:DF:76:F4:85:96:DF:17:C2:68:1D:3D:FF:9B:0F:D2:A1:CF:14:60
Signature algorithm name: SHA1withRSA
Version: 3
...

4. 清理工作,删除rsa文件

(Windows)
rmdir /S /Q META-INF

(Linux)
rm -rf META-INF

如果你想知道两个apk是不是用的同一个签名,那比一下它们签名的MD5码(或SHA1码)是不是一样就行了。

http://www.zhihu.com/question/20749413/answer/16645210

时间: 2024-11-11 17:46:23

if the parser found inconsistent certificates on the files in the .apk.104的相关文章

Creating SSL keys, CSRs, self-signed certificates, and .pem files.

What is the whole darned process? Well that’s a good question. For my purposes, this is what I need to know: Create a Private Key. These usually end in the file extension “key” If you already have one, don’t worry - it’s cool, we’ll be using that one

安装APK的错误码(PackageManager.java)

安装APK的错误码,定义在android源码中的这个文件中:frameworks\base\core\java\android\content\pm\PackageManager.java /** * if the package is already installed. * 程序已经存在 */ public static final int INSTALL_FAILED_ALREADY_EXISTS = -1; /** * if the package archive file is inv

系统apk监听安装返回值说明

1 /** 2 * Installation return code: this is passed to the {@link IPackageInstallObserver} by 3 * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} on success. 4 * @hide 5 */ 6 public static final int INSTALL_SUCCEEDED = 1; 7 8 /*

关于一个普通程序启动另外一个程序的命令pm install

这里会采用两个开源项目的文件 这是对安装程序的简单的测试和demo package com.example.demoinstall; 用于判断是否为系统的运用 import android.app.ActivityManager; import android.app.ActivityManager.RunningTaskInfo; import android.content.Context; import android.content.Intent; import android.cont

Spacewalk server Installation on RHEL6

[[email protected] ~]# rpm -Uvh http://yum.spacewalkproject.org/2.1/RHEL/6/x86_64/spacewalk-repo-2.1-2.el6.noarch.rpmRetrieving http://yum.spacewalkproject.org/2.1/RHEL/6/x86_64/spacewalk-repo-2.1-2.el6.noarch.rpmwarning: /var/tmp/rpm-tmp.hM9mSG: Hea

Haproxy Configure File

---------------------- HAProxy Configuration Manual ---------------------- version 1.5.11 willy tarreau 2015/02/01 This document covers the configuration language as implemented in the versionspecified above. It does not provide any hint, example or

MySQL高可用方案-PXC(Percona XtraDB Cluster)环境部署详解

Percona XtraDB Cluster简称PXC.Percona Xtradb Cluster的实现是在原mysql代码上通过Galera包将不同的mysql实例连接起来,实现了multi-master的集群架构.下图中有三个实例,组成了一个集群,而这三个节点与普通的主从架构不同,它们都可以作为主节点,三个节点是对等的,这种一般称为multi-master架构,当有客户端要写入或者读取数据时,随便连接哪个实例都是一样的,读到的数据是相同的,写入某一个节点之后,集群自己会将新数据同步到其它节

Method and apparatus for verification of coherence for shared cache components in a system verification environment

A method and apparatus for verification of coherence for shared cache components in a system verification environment are provided. With the method and apparatus, stores to the cache are applied to a cache functional simulator in the order that they

脚本编程与系统管理

p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 17.0px Helvetica; color: #29556f } 通过重定向/管道/文件接受输入 问题: 你希望你的脚本接受任何用户认为最简单的输入方式.包括将命令行的输出通过管道传递给该脚本.重定向文件到该脚本,或在命令行中传递一个文件名或文件名列表给该脚本 解决方案: Python 内置的fileinput 模块让这个变得简单.如果你有一个下面这样的脚本: 1 import fileinput 2