If I have an apk can I remove the current signing and some how re-sign it with a different .keystore file and still have the application install?
Update: I managed to get it to work with Jorgesys' solution and where I messed up before was that I unzipped the .apk then rezipped it after removing the META-INF folder and changed the file extension back into .apk. What I should have done is simply opened it with winzip and delete the folder inside of winzip.
To sign your app using Android Studio, and export an existing app signing key, follow these steps: If you don't currently have the Generate Signed Bundle or APK dialog open, click Build > Generate Signed Bundle/APK. In the Generate Signed Bundle or APK dialog, select either Android App Bundle or APK and click Next.
Go to Console => Select an app. Go to Setup => App Integrity. Somewhere in the middle of the page you will see 'Upgrade your app signing key for new installs' and the link.
Sign the APK with jarsignerDevelopers are encouraged to use apksigner to sign the APK. This technique involves signing the APK file using the jarsigner command from the Java SDK. The jarsigner tool is provided by the Java SDK. When using jarsigner, it is important to sign the APK first, and then to use zipalign.
Sign an apk/app bundle with jarsigner This command does not generate any new file but the unsigned apk will become signed without any visible external changes (file name and file size). With an app bundle, the command is exactly the same, we only have to change the path of apk file to app bundle file.
try this
1) Change the extension of your .apk to .zip
2) Open and remove the folder META-INF
3) Change the extension to .apk
4) Use the jarsigner and zipalign with your new keystore.
hope it helps
If you are looking for a quick simple solution, you can use Google's apksigner
command line tool which is available in revision 24.0.3 and higher.
apksigner sign --ks release.jks application.apk
You can find more information about apksigner tool, at the developer Android site.
https://developer.android.com/studio/command-line/apksigner.html
Or, alternatively, you may use an open-source apk-resigner script
Open Source apk-resigner script https://github.com/onbiron/apk-resigner
All you have to do is, download the script and just type:
./signapk.sh application.apk keystore key-pass alias
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With