In case you run into a similar problem that I ran into on getting apks off DPRK phones and not being able to run them on other devices. Here’s the steps for re-signing
apktool d -r -s application.apk
cd ./application/original/META-INF
rm -f *
cp ./application/dist/application.apk
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore application.apk alias_name
zipalign -v 4 application.apk application_aligned.apk
If needed to generate the cert for signing:
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
Obviously you’ll need to install apktool, jarsigner, zipalign. replace application.apk with the name of the apk that you’re working with.