Skip to content

Instantly share code, notes, and snippets.

@dady8889
Created June 28, 2018 12:43
Show Gist options
  • Save dady8889/8cf5138136c95f237bae8a714e5cb5b9 to your computer and use it in GitHub Desktop.
Save dady8889/8cf5138136c95f237bae8a714e5cb5b9 to your computer and use it in GitHub Desktop.
Sign apk with current android build platform key
java -Xmx2048m -Djava.library.path="out/host/linux-x86/lib64" -jar out/host/linux-x86/framework/signapk.jar -w build/target/product/security/platform.x509.pem build/target/product/security/platform.pk8 FileNeedSign.apk FileNeedSign_Signed.apk
@sbr5136014
Copy link

Try adding the following to a .cmd file

    set /P apk="What is the path of the APK?" 
"C:\Users\<your user name>\AppData\Local\Android\Sdk\build-tools\<any folder>\apksigner.bat" sign --key "C:\Users\<your user name>\Documents\platform.pk8" --cert "C:\Users\<your user name>\Documents\platform.x509.pem" %apk%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment