Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I re-sign an .apk with a different certificate than what it came with?

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.

like image 767
Anton Avatar asked Jul 16 '10 16:07

Anton


People also ask

How do I sign an existing APK?

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.

How do I change my signing key certificate app?

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.

Can we manually sign a APK?

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.

Can you sign an unsigned APK?

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.


2 Answers

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

like image 66
Jorgesys Avatar answered Sep 18 '22 14:09

Jorgesys


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 
like image 35
Aksel Fatih Avatar answered Sep 21 '22 14:09

Aksel Fatih