Where does Eclipse hide the keystore? - android

I'm surprisingly frustrated by this, and I suspect the answer is simple.
I have compiled and signed my android app using the Export Wizard, as described here in the section 'Compile and sign with Eclipse ADT'.
I would like to backup the keystore and have it handy for future app updates, but I can't figure out for the life of me where the keystore is saved. I of course can use Eclipse to go through the process, but if something happens to my computer I'll be pretty screwed.
Does anyone know where it is stored?

I just spent a lot of time on this very annoying problem. On Windows, if you do not specify a full path when you create the keystore, Eclipse will hide it in its own directory. So in my case it was C:\eclipse\mykeystore

It doesn't hide it. One of the first steps of the export (where you create or use existing keystore) asks you where you want to save it. You might want to go through the export steps again to see which path it is currently defaulted to and then check there.
It is typically saved with the name key (no extension).

it is very easy to creat the KeyStore, just follow the steps in your java environment, for exemplemine is java EDT
in your workspace (at the left), you have your project under(Package Explorer, Navigator), click on Navigator right clik on the top of your name project and you will have a list of items, at the last ones choose click on Android Tools ==> it will show another list, this one will display exporte unsigned package, export signed package ... and so on.
choose signed package and follow the steps where the system will put your key store(it's you ho decide will it should be)
choose any location you went, and give a pwd for that
good luck
RachidM

So, here is how it is,
When you first export the project you will see the name of the keystore is the same as .apk
Change this! make it projectname.keystore for example
It was bit misleading but when you save the apk then it will replace the keystore and you cant really find it again.
Then everytime you export the project select the .keystore file

I too was not paying attention when creating the keystore. I am using the Motodev-wrapped Eclipse installation. The default location for the keystore there is $HOME\motodevstudio\tools.

The Android plugin hides its keystores in either %HOMEPATH%\.android or ~/.android

Related

How do I check if the signing of an app is correct?

I'm developing some changes for an app. It worked properly and compile fine before I configured a VPN (I think this may be related to the problem). Since that the aplication compiles fine but I can't update from previous versions to the new one (let's say from 1.0.0 to 1.0.1), an error message says "The package appears to be corrupt". The version number and code are updated.
I've found this, but it doesn't fix my problem: I've compiled in release and debbug.
It's documentated that the problem is related with the signing of an app in Xamarin because I can install the apk from scracth without updating, I've loaded the keystore again, check the path %AppLocalData%, configure again the path manually... nothing. Besides, the 'debbug.keystore' file doesn't open when the app is compiled, nevertheless it's open when I use the command in the document to load it again. I don't know if it should open, just saying. The key file is the same, nothing else changed.
Thank you for your help!
The debug.keystore is as the name suggests, only for debugging. It will differ between different machines you install Visual Studio.
Make your own keystore and save it somewhere secure. Especially if you plan to release the App in Play Store. If you misplace it, you will have a bunch of issues.
Creating your own keystore will also ensure the same and correct signature every time, and you can configure your project to use your own keystore instead of the debug.keystore that Xamarin.Android defaults to.
I made everything above again and it worked, not sure what was wrong. For those of you that may have a similar problem that's what I tried:
Check your keystore (it must be the same for different compilations) and store in a safe place as Cheesebaron says.
Check you have well configured the path for your keystore.
You may have a wrong enviroment variable if the step above fails (i.e. %AppLocalData% pointing to other location).
Check your version number. The number for a version must be higher than previous versions, you may use YYMMddXX (XX for differnet compilations in the same day)
If you altern to compile in release/debug, make sure your code doesn't affect the path to the keystore

How to move android project to another pc?

i want to move my android studio project to another pc but when im moving files from pc one to pc two and i'm trying to run the same app it's not launching and asking to remove old(the same package) app, but i want to save app signature how can i do it? for example i want to work at home, after i'm going to work and continue my project at work is it possible and how? and yes, sorry for my bad english...
image
but i want to save app signature how can i do it?
Each Android Studio installation will generate its own debug keystore for signing a debug apk. Quoting from the documentation on app signing:
"The first time you run or debug your project in Android Studio, the IDE automatically creates the debug keystore and certificate in $HOME/.android/debug.keystore, and sets the keystore and key passwords."
Apps signed with a different debug key are perceived to be different apps. So you need to copy one of the debug keystores to the $HOME/.android/ folder on the other development machine.
Download GitHub desktop and sign up. Then create repository and push project in repository. At the work in Android Studio go to File -> New -> Import Project and past a link to created repository.
https://desktop.github.com/
To see how to transfer the debug.keystore that is required so you don't get the message "The device already has an application with the same application but a different signature. In order to proceed you will have to uninstall the existing application." (and lose your data). See Update the app in another machine with same debug.keystore in android

Where can I find the default location for keystores created by Xamarin Android in Visual Studio?

When I archive an Android app, then distribute it, I'm given the option to create a keystore. Once I create it, where does it go by default?
In Visual Studio, Xamarin lets you create the keystore when distributing. However, it doesn't make it clear where exactly it puts it.
I found it in:
C:\Users\yourusername\AppData\Local\Xamarin\Mono for Android\Keystore\
There are many folders in there, generally matching the names of the distribution profiles you seen when archiving Android packages in Visual Studio.
I found my keystore files in those folders.
You can also do a search in that folder for the keystore name and find it relatively quickly.
Good luck!
You can find them in C:\Users\yourusername\AppData\Local\Xamarin\Mono for Android\Keystore
You can simply click on Open Folder Below Distribute while Archive the Apk.
From there you can simply found Mono for Android in above Folders From there Go to Key store and you can find Respective Project Key store files

I have forgotten my keystore password and I want to install my apk on Google Play. What do I do?

I have made an application and I signed its apk one month ago. Now I have forgotten its password and when I am using a new key for this and installing it on Google Play, it's giving me the fingerprint error. What can I do?
The application link is here.
The error occurs:
you can find your lost key password in below path
Project\.gradle\2.14.1\taskArtifacts\taskArtifacts.bin
open the file and search with the part of the password that you remember. You will find it definitely. Else, try searching with this string "signingConfig.storePassword".
Note: I have experienced the same and i am able to find it. In case if you didn't find may be you cleared all the cache and temp files.
Try to find your password here if you are using Gradle 4.0 and above.
Switch to project mode.
Open your project name folder.
Open .gradle folder.
Open gradle version folder (here in my case it's 4.4).
Open taskHistory folder.
Double click on "taskHistory.bin", select open in text editor option.
press ctrl+f to open search box and try to find your key (guesswork).
UPDATE:
In gradle 5.4 version the file path has been changed as below: <project>\.gradle\5.4\executionHistory\executionHistory.bin
You have to use the same certificate when you update your apk or Google Play won't recognize it as the same app.
If you can't remember your password at all, I don't think there is any other choice but to start with a new app (new package name).
From Google documentation
Application upgrade – As you release updates to your application, you must continue to sign the updates with the same certificate or set of certificates, if you want users to be able to upgrade seamlessly to the new version. When the system is installing an update to an application, it compares the certificate(s) in the new version with those in the existing version. If the certificates match exactly, including both the certificate data and order, then the system allows the update. If you sign the new version without using matching certificates, you must also assign a different package name to the application — in this case, the user installs the new version as a completely new application.
Source: http://developer.android.com/tools/publishing/app-signing.html
Similar info also here in Android developer blog: http://android-developers.blogspot.com.au/2011/06/things-that-cannot-change.html
Just as important as the manifest package name is the certificate that application is signed with. The signing certificate represents the author of the application. If you change the certificate an application is signed with, it is now a different application because it comes from a different author. This different application can’t be uploaded to Market as an update to the original application, nor can it be installed onto a device as an update.
[...]
In conclusion: There are some parts of your application that can not change. Please be careful.
The keystore password can be broken, but you'll still need the alias password later on.
Download the two files from here
https://gist.github.com/zach-klippenstein/4631307
Build with:
javac ChangePassword.java
Run:
java ChangePassword <keystore filename> <new keystore filename>
The lost key password can be found under the .gradle folder, the path be something like this:
.gradle\3.3\taskArtifacts\taskArtifacts.bin
I think 3.3 is the number of the gradle version, it may change in some cases. If the version is greater than 4.0 the path is actually different:
.gradle\4.1\taskHistory\taskHistory.bin
In any case, this are binary files, so they're full of unreadable data, but if you search for the string "signingConfig.storePassword" you'll find a lot of text, mine looked like:
<97>signingConfig.keyAlias^C<8a>MY_KEY_ALIAS<9c>signingConfig.storePassword^C<92>MY_STORE_PASSWORD<98>signingConfig.storeType^C<84>jks<9f>
Switch to project mode.
Open your project name folder.
Open .gradle folder.
Open gradle version folder (here in my case it's 5.4.1).
Open executionHistory folder.
Double click on "executionHistory.bin", select open in text editor
option.
press ctrl+f to open search box and try to find your key
(write storepassword).

Keystore Eclipse ADT file location

I have developed and released an app on the Android Market.
I compiled the release, signed and zipaligned with Eclipse ADT export.
This process created a Keystore for me in the wizard.
The steps i took are detailed in the Android dev guide.
I want to know, Where does the newly created keystore reside? I want to take it and reuse on another project but i am not sure where i can find it.
I thought it would be named something like my-release-key.keystore but i cant find it.
Sorry if this comes out as a dumb question but i am quite new to this and is a wearied thing to get stuck on.
Edit:
I used the Eclipse ADT Wizard and in there i entered the location as follows...
I am developing on a Mac and a very new mac user. I just dont know where this file has been placed. It i not in the project folder or the "cd /" location.
Thanks
OK, I found out the Eclipse ADT on Mac OS X saves keystores by default in Eclipse.app/Contents/Mac OS :-(
When using eclipse wizard you can explicitly set keystore destination folder. But if you didn't do it (in your case), eclipse will save new key in your home directory.
You should manually create it with keytool. This step described in Obtain a suitable private key part of the guide.
Basically in windows(Checked in Window 7) the release_kestore stores by default in C:\Users\xyz\release_keystore. Then we have to move it to our comfortable place.

Categories

Resources