资源简介
SignApk签名工具,适用于update签名!
1,解压文件
2,将需要签名的rom放置该文件夹,双击SignerScript.bat文件即可
代码片段和文件信息
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License Version 2.0 (the “License“);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing software
* distributed under the License is distributed on an “AS IS“ BASIS
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.signapk;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.RandomAccessFile;
import java.security.DigestOutputStream;
import java.security.GeneralSecurityException;
import java.security.Key;
import java.security.KeyFactory;
import java.security.MessageDigest;
import java.security.PrivateKey;
import java.security.Signature;
import java.security.SignatureException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.KeySpec;
import java.security.spec.PKCS8EncodedKeySpec;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import java.util.jar.Attributes;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.jar.JarOutputStream;
import java.util.jar.Manifest;
import java.util.regex.Pattern;
import javax.crypto.Cipher;
import javax.crypto.EncryptedPrivateKeyInfo;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
import sun.misc.base64Encoder;
import sun.security.pkcs.ContentInfo;
import sun.security.pkcs.PKCS7;
import sun.security.pkcs.SignerInfo;
import sun.security.x509.AlgorithmId;
import sun.security.x509.X500Name;
/**
* Command line tool to sign JAR files (including APKs and OTA updates) in
* a way compatible with the mincrypt verifier using SHA1 and RSA keys.
*/
class SignApk {
private static final String CERT_SF_NAME = “meta-INF/CERT.SF“;
private static final String CERT_RSA_NAME = “meta-INF/CERT.RSA“;
private static boolean VerboseMode = false;
// Files matching this pattern are not copied to the output.
private static Pattern stripPattern =
Pattern.compile(“^meta-INF/(.*)[.](SF|RSA|DSA)$“);
private static X509Certificate readPublicKey(File file)
th
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 23860 2012-12-21 14:13 SignApkv2.java
文件 82 2013-07-09 21:11 Signersc
文件 1217 2008-11-05 15:17 testkey.pk8
文件 1675 2008-11-05 15:17 testkey.x509.pem
文件 9945 2012-12-21 14:21 SignApkv2.jar
- 上一篇:全功能全情况 吃货联盟订餐系统——By msy
- 下一篇:mac系统助手 破解版
相关资源
- 可折叠的日历控件Calendar
-
gsnap.tar.gz linux从fr
amebuffer获取image源 - SlidingMenu的aar文件
- DTMF编码发音、捕获解码的DEMO
- NDK Socket通讯小程序
- 解析apk/ipa图标/名称/包名/版本号等信
- 夜神模拟器tcpdump抓包教程
- 易书app图书有偿交换系统
- 新浪微博tab菜单
- 手机端反编译工具Apktool
- 用zgf实现触屏控制和虚拟按键
- 用zgf框架实现逐帧动画
- 超级简单的安卓文件浏览器源码适合
- 高通功耗调试文档
- 一个仿淘宝和京东商品详情上拉查看
- OV5647_MIPI_RAW for MTK
- 解锁小米system分区.zip
- 扫描全能王破解版apk百度云链接.txt
- 编写推箱子游戏程序第三步——选择
- WIFI串口调试助手APK
- Cygwin中make3.8.1的修正版
- ListView中Spinner的使用
- apk方式更换主题包括多个页面更换
- 万能apk增加弹窗工具
- 360悬浮窗demo
- 删除输入框的文字
- 仿QQ消息列表(ListView)滑动删除效果
- JNI函数字节码
- 仿京东商品活动倒计时
- 小程序拖拽排序,拿来即用
评论
共有 条评论