Sign release zips with release-key.jks

Close #408
This commit is contained in:
topjohnwu
2018-08-05 02:29:40 +08:00
parent 9f05b182a2
commit 32809e56d0
9 changed files with 92 additions and 128 deletions
@@ -11,11 +11,11 @@ import com.topjohnwu.magisk.MagiskManager;
import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.utils.RootUtils;
import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.magisk.utils.ZipUtils;
import com.topjohnwu.superuser.ShellUtils;
import com.topjohnwu.superuser.io.SuFile;
import com.topjohnwu.superuser.io.SuFileOutputStream;
import com.topjohnwu.utils.JarMap;
import com.topjohnwu.utils.SignAPK;
import java.security.SecureRandom;
import java.util.jar.JarEntry;
@@ -99,7 +99,7 @@ public class PatchAPK {
JarMap apk = new JarMap(mm.getPackageCodePath());
if (!patchPackageID(apk, Const.ORIG_PKG_NAME, pkg))
return false;
ZipUtils.signZip(apk, new SuFileOutputStream(repack));
SignAPK.sign(apk, new SuFileOutputStream(repack));
} catch (Exception e) {
return false;
}