I have a slightly embarrassing problem:
I have an Android app on the store for which I'd like to push an update. My problem is that I've changed computers and now I can't find the keystore used to sign the App.
I most certainly have the file (and private key) as I have a full backup, but my problem is that I can't find the file in it (and cannot remember what I've named it in the first place).
What I would like to know is how I can track this file, either through some fulltext search for headers or by checking the (old) eclipse and/or android configuration files for a path to the file (since it Eclipse had already the path to the keystore everytime i built, it must be saved somewhere...)
I'm using Mac OS X (at the time, Snow Leopard)...
Thank you all for you time
EDIT:
I've partially answered my own question: Couldn't find the config file where Eclipse ADT caches the keystore path, but found out the Eclipse ADT on Mac OS X saves keystores by default in Eclipse.app/Contents/Mac OS (yes, inside the .app package) ... probably a oversight regarding "current directory", but silly nonetheless...
its may in
C:\Users\nainit\.android
Related
I am working for a React-Native project and using MAC.
I have accidentally deleted .android folder. Then I completely deleted Android Studio and installed once again. Now, .android folder is created automatically, But still some content seems missing like keystore files. Due to to this I am unable to create Signed Bundles.
Is there any way to have keystore files inside .android folder?
By the way I have a copy of keystore files inside <root>/android/app/ location.
.android folder is auto-generated. That means that you should not store anything that is not autogenerated in it(especially keystore files). It should not be subjected to version control also.
The official and correct way to have it as you want - is to have a separate not autogenerated android folder that can be put under version control. I can see that you have it like that already which is good.
To build your signed bundles and apk files you should set up a correct path to your keystore(from /android/app/) in your build.gradle file in the signing config section - here is the official info about how to do it.
About how to restore .android content - if you had no version control there or any other snapshot - you cannot restore it. You can tweak its content a bit via the general project/ide settings but that is it.
I'm no expert but.
It seems that it didn't uninstall the software entirely.
Try
Updating the Android Studio
Or Reinstall it again
Or Install the Nightly Build/Developer Release I reckon that there is no builds for mac.
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
I'm running Android Studio 0.5.8 and using the "Debug App" functionality to send my work in progress to my phone to test. I've done this dozens, maybe hundreds of times. I'm concerned that Android Studio may not be overwriting the old apk files. It appears that my useable space keeps dropping.
Where does Android Studio save apks when installing debug runs?
Is it a destructive or cumulative process? Do I need to clean out the folder manually?
Within your module directory should be a folder called build, then another directory called APK. The APK should be in there. Perhaps check the file size and compare it to your "drop in space"
On your device Chris Stratton's comment is correct, it will overwrite the old APK when installing.
Check Settings->Apps and select your app. The see what readings it gives you for Data and cache.
It is stored in /data/local/tmp. It should overwrite the old apks stored there.
I'm creating a software that will guide the user through a few steps, to publish an android application (APK file).
The way I am doing this, is that the APK file is already compiled, and all I need to do is replace an XML file in the package, and that will change the behaviour of the application. My big problem now, is that unpacking the apk file, and doing any tiny text edit, and then packing it again, breaks the signature and prevents the application from running on any device, giving a message that the signature is incorrect.
How can I solve this? I want to safely open the APK, write something in a text file, and close it again. Note that this operation will be done on the user's computer (after he purchases our application) so we're look for a command-line tool with no special requirements like JDK.
Any help?
Ok I reached the best "tested" solution - I'm posting it here to save other developers hours of googling. The only downside is that I will require the customer to install JDK on his machine, unfortunately. The reason is because I did not find any apk-signing tool that works purely on windows, without relying on JDK.
I have my android application created using Air, so this makes things easy for me - all of the air files are treated as resource assets. So have your APK archive file ready.
Once you have your modifications ready, put them inside a temporary folder named "assets". You will use the 7-zip command line tool (free: http://sourceforge.net/projects/sevenzip/) to update the contents of your apk. To have it working with your apk you will have to rename your apk's extension to zip - don't worry, you'll change it back later.
Now from a .bat file (or directly in the command prompt) from the location containing both your apk file (zip extensioned) and your assets folder, you'll call: 7za u APK-file.zip assets
Now your apk file is updated. Rename it back to .apk extension
Now you'll use the signAPK tool from here https://code.google.com/p/signapk/ and note that this is the only step requiring JDK installed. It also assumes that you have your key files ready (replace the dummy ones included in the package). Extract the file contents and call: java -jar signapk.jar key.x509.pem key.pk8 [android_app].apk [signed_android_app].apk
At the very end, you may find your signed apk file size drammatically increased. So you need to use the android's zipAlign tool: (darn, can't post the link since new users can only post a maximum of two hyperlinks)
you will be calling the command: zipAlign -c 4 [signed_android_app].apk
And voila! That's the route I'm taking.
If someone finds a way to do the signing process without relying on JDK (assuming the key files are ready) please share.
How can I solve this?
You don't. If you modify an APK file, by any means, it must be re-signed.
Android apk files must be signed. That signature proves that the contents of the apk have NOT BEEN MODIFIED from what was initially published. (Which is exactly what you are doing.) The signature at the same time, also proves who the author is.
So in a normal signed apk file:
You know who the author is. (Even if it's not something you as a human can understand.)
You know the contents were put there by the author, and not modified since.
This is a key security measure built into Android, is there for very good reason, and cannot be overcome. It prevents things like viruses from being embedded inside innocent apk files.
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.