Skip to content

Instantly share code, notes, and snippets.

@simonkuang
Created March 12, 2020 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonkuang/34c4162ee3033129aa268c3bc647dc1e to your computer and use it in GitHub Desktop.
Save simonkuang/34c4162ee3033129aa268c3bc647dc1e to your computer and use it in GitHub Desktop.
给 android apk 做签名的步骤
#!/bin/bash
ANDROID_VERSION=29.0.2
[ "x$ANDROID_HOME" = "x" ] && ANDROID_HOME=/data/android/sdk
APKSIGNER=$ANDROID_HOME/build-tools/$ANDROID_VERSION/bin/apksigner
keytool -genkeypair -keystore debug.keystore -alias debug -validity 36500 -keyalg RSA -keysize 2048
#keytool -list -v -keystore debug.keystore
$APKSIGNER sign --v2-signing-enabled false --ks debug.store xxx.apk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment