LoginSignup
9
8

More than 5 years have passed since last update.

apkの署名の書き換え方法

Posted at

とりあえずスクリプト

#!/bin/sh
set -x

apk_path=$1
store_path=$2
store_pass=$3
alias_name=$4
alias_pass=$5

# 署名を削除
zip -d $apk_path 'META-INF*'

# 再署名
jarsigner -verbose \
  -keystore $store_path \
  -storepass $store_pass \
  $apk_path \
  $alias_name \
  -keypass $alias_pass \
  -sigalg SHA1withRSA -digestalg SHA1

いつ使うん?

apkをデバッグビルドするとデバッグ用の debug.keystore でビルドされるようになっています。デバッグビルドした上で正規のkeystoreを使ってテストしたい場合(課金機能のテスト等)に使ってます。

9
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
8