Skip to content

Instantly share code, notes, and snippets.

@trantronghien
Last active October 18, 2019 02:40
Show Gist options
  • Save trantronghien/978694775acf136b042b474152cdac93 to your computer and use it in GitHub Desktop.
Save trantronghien/978694775acf136b042b474152cdac93 to your computer and use it in GitHub Desktop.
Decoding and Building apk
bước 1: Decoding
bước 2: Edit
bước 3: Building
bước 4: Sign App with keytool
b1:
apktool d <apk_file>.apk -o <dir_name>
b2:
edit
b3:
<dir_name>: dir Decoded
apktool b <dir_name> -o <apk_file>.apk
bước 4: Sign App with keytool
1: Generate the Key => tạo ra file keystore my-release-key.keystore
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
2: sign
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore apk_file>.apk alias_name
sau đó nhập password keystore khi đã nhập để Generate Key (1)
or
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore apk_file>.apk alias_name -storepass [Your Password keystore (1)]
* lưu ý: keytool và jarsigner phải cần cài đặt biến môi trường
C:\Program Files\Android\Android Studio\jre\jre\bin\keytool
C:\Program Files\Java\jdk-12.0.1\bin\jarsigner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment