Skip to content

Instantly share code, notes, and snippets.

View DaniAsh551's full-sized avatar
🏠
Working from home

Dani DaniAsh551

🏠
Working from home
View GitHub Profile
@DaniAsh551
DaniAsh551 / build-n-sign.sh
Created May 18, 2022 05:19
Generate a signed apk from decompiled smali sources (with a tool like apktool)
#!/bin/sh
BUILD_TOOLS=$HOME/Android/Sdk/build-tools/32.1.0-rc1
PATH="$PATH:$BUILD_TOOLS"
KEY="$PWD/key.jks"
if [ ! -f $KEY ]; then
echo "No keystore found in Working Directory. Creating a new one. Please fill the prompts, or cancel and copy your keystore file to $KEY."
keytool -genkey -v -keystore key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias apk
fi