Search code examples
androidapksignaturejks

Get default apk keystore from Android Studio for recompilation on other PCs


I'm getting a big trouble in reinstalling an apk whose signature was generated by default in Android Studio:

I built an apk in debug mode by Android Studio then I deployed it on some of clients' devices a long time ago when I was getting started with Android development (what an amateur!)

Now, the application tends to have evolutions but I always have to recompile it by using the default generated signature of the Android Studio on my PC. That makes my colleagues unable to reinstall the app using their compiling environment.

Question: how can I extract the default signature (debug mode) of Android Studio in order to give it to my colleagues to help them reinstall the app without my recompilation? I mean, the full "jks" file. I didn't provide any password.

Any help would be much appreciated. Many thanks!


Solution

  • Yes, finally I managed to solve the problem. For the ones who are in the same situation with me, search for the file:

    $project_path/gradle/x.y/taskArtifacts/taskArtifacts.bin

    which contains your keystore passwords, for example in Linux: strings taskArtifacts.bin | grep storePassword -A1. In my case, I found that the password is "android".

    Next, the default keystore of Android Studio is located on

    ~/.android/debug.keystore

    With this keystore and its password, I tried to generate my app apk in "release" mode, then the application is able to update itself now!