Need some keystore help. - Android Software Development

My pc crashed the other day. I've rebuilt a new one and installed all my software, but the keystore directory to my android app was not backed up. I know the password, alias and directory it was all in, but after re-creating that directory, it still wants me to create a new keystore. What should I do? If I create a new keystore using the previous keystore's password/alias, will the market let me upload a new version of my app?

No. You're pretty much screwed. If you lose you private key, there is no way to recover it.

So what does that mean for my app in the market. What do I do the next time I have an update to upload?

I'm not sure. You'll have to ask them.

removed

Wow, so I lose my download count, comments, ratings, and confuse everyone that already has my app and has to download one with a different name. It seems like there should be a more efficient way to resolve this type of problem.

Read up on Public-key cryptography. There really is no other way. You must keep your private key and must keep it private for the system to work. Make a copy and burn it to a CD (maybe 2 CDs), then store it someplace safe.

So what's normally done here... do I delete my existing app and then publish a similarly named one with my new key, or do people just leave both the old and the new apps up?

...backed up my keystore just in case after reading this.

I do have a copy of my signed apk. If I re-create the directory that was my keystore (I do know the passwords and alias names) and put the signed apk in that directory...will that then let me build a properly signed apk using my existing key?

You didn't read the link I posted I see.
The answer is no. If your private key is gone, it's gone. You could try and brute-force it from your public key if you've got nothing better to do with a super computer for a few centuries.

So for the future, if I want to back up my keystore, what specifically do I need to back up? Is it the directory that I told Eclipse to put the signed apk in? I can't remember anything other than the apk being in the directory.

removed

Related

Portable Webserver for APK files

Hi guys,
I have just been playing around with the idea of hosting a webserver on my machine that my phone could connect to to download apk files after performing a wipe.
Iv been thinking about this as everytime i wipe my phone i connect back to the market and download appmanager to install apps direct from sd. So instead of having to do that im looking at having them all in a directory on my PC/Flashdrive (as this will be portable) using XAMPP.
Before any gets any wrong ideas this is not intended for any illegal doings. Its just to make my life easier. I thought i would share what i have started to see if this will help out anyone else.
So far i have it working (very rough). But i dont know any coding so this is a bit of a hack job.
I am using XAMPP as stated aswell as a PHP script that will automaticly populate the page will all files within a particular folder.
I have attached the index file i am using.
if you wish to use this please make sure you do a few things.
Install XAMPP
From where you installed XAMPP. In the HTDOCS folder create a "APK" Folder
Place the index.php in the HTDOCS folder
Edit the index.php file to change the path of the APK folder (currently set to D:\\Dream\\xampp\\htdocs\\APK) keep the double slashes "\\"
Start the Apache webserver from the XAMPP control panel
Now connect to Localhost, any files you place in that folder should now appear
Anyone wishing to use this, edit this, whatever you feel like. Go ahead
If you would like to help and change the look and feel of the page it would be greatly appreciated. If you do post the files back up here for all to use
Hope you guys like
Can I ask why you wouldn't just backup your apps to your sdcard (use something like MyBackup) and be done with it?
You can always copy them from your sdcard to your flash drive (and back from flash drive to sdcard temporarily if you need to re-install).
I'm all for experimenting, learning and even playing around a lot. But this seems like overkill. First off, your apps will surely get outdated quickly, and you'll end up upgrading lots of apps. You'll end up spending an enormous amount of time managing your own local library.
Personally, I think you're wasting your time unless your trying to learn how to do something in the process. Maybe you are, and in that case, go for it. Otherwise, enjoy your phone and let the Market do the management for you.
Or you can just have all your .apk's in a folder and use adb to install all of em at once. But like the above post you might have to get updates for alot of em.

Pay Attention: How do we backup DATA in Apps. NOT just APPS

Title says it all. I've seen this question asked but too many times I see people saying. "Use Search Function"
The search function has been scoured and I see plenty of great apps that restore and backup apps, contacts, etc.. none restore data WITHIN the apps.
Is there an app that backs up DATA within the apps not just the apps.
Thank you,
come again.
Titanium backup backs up my apps plus all system data
I'd like to know this too, with possible Rom coming in September I'm desperate to make the change over as smooth as possible.
post in general section
Mooved
Good question. I use MyBackup (online) for saving my data - but only sms-contacts..
If you find an app that save all you need, please post its name here ^^
thx
The process is quite complex (at least the way I do it) but it can be done!
Note: YOU NEED LINUX FOR THIS (or if you're brave you can mess with the tools on this site: http://www.chrysocome.net/download. success is not guaranteed. Still post about your experiences though )
Note: Steps 1 to 3 are not always necessary, it depends on which Android build you are using.
1) Give Root Explorer (or a similar file explorer app - must be able to access system/data files) root access
2) Locate the folders containing the user data you want to backup, this is usually somewhere near /data/data. The folders have various naming conventions and dont always contain the name of the app (i'll check and edit this post if i have time)
3) Change the folder's permission settings - I usually just permit everything
4) Shut down Android and in one way or another, mount your sd card on your Linux machine, and locate your data.img or userdata.img file.
5) Open a command line window, enter the following:
Code:
sudo mount -o loop data.img /mnt/data
Note: you might need to create the folder you are mounting too
Note: sudo not always neccesary
Note: change data.img to userdata.img, you'll know if this applies to you
6) Browse to the folder containing the data you want to backup and copy it onto your computer. DONE!
You can restore these backups on a different build by using the same method, just in reverse. Also, don't forget to check if the same folder already exists, if yes, it can be extremely annoying to find you dont have permission to change/overwrite it!
I used this to copy all of my saved games, i especially didn't want to loose my Asphalt 5 progress
P.S. if this solves your problem, please change the title of this thread to simplify things for other users
Thanks Kev007, I'll try this
filou75 said:
Thanks Kev007, I'll try this
Click to expand...
Click to collapse
While it is good to know how to do this stuff, just download Titanium from the market. It backs up all apps plus data in about a minute. You can restore individually or in batches using filters. Search around there is lots of info on this app.
It is great to learn some basic Linux stuff. It will help when you are trying to do things in Android. If you have no intention of learning Linux, Titanium is the way to go.
that be good actually - on my last android reinstall I lost my paper toss high score (allbeit only 3 pmsl) but still seems like a good thought considerin the games etc with save data.
Seconded - Titanium Backup preserves all my app data.
This is one of the reasons I love Android over WinMo - backing up app data is practically a nobrainer when you have the right tool.
+1 on Titanium Backup.
Works great on all builds. Just don't try to restore native HTC apps/data from sense to vanilla Froyo.
Kev007 said:
The process is quite complex (at least the way I do it) but it can be done!
Note: YOU NEED LINUX FOR THIS (or if you're brave you can mess with the tools on this site: http://www.chrysocome.net/download. success is not guaranteed. Still post about your experiences though )
Note: Steps 1 to 3 are not always necessary, it depends on which Android build you are using.
1) Give Root Explorer (or a similar file explorer app - must be able to access system/data files) root access
2) Locate the folders containing the user data you want to backup, this is usually somewhere near /data/data. The folders have various naming conventions and dont always contain the name of the app (i'll check and edit this post if i have time)
3) Change the folder's permission settings - I usually just permit everything
4) Shut down Android and in one way or another, mount your sd card on your Linux machine, and locate your data.img or userdata.img file.
5) Open a command line window, enter the following:
Code:
sudo mount -o loop data.img /mnt/data
Note: you might need to create the folder you are mounting too
Note: sudo not always neccesary
Note: change data.img to userdata.img, you'll know if this applies to you
6) Browse to the folder containing the data you want to backup and copy it onto your computer. DONE!
You can restore these backups on a different build by using the same method, just in reverse. Also, don't forget to check if the same folder already exists, if yes, it can be extremely annoying to find you dont have permission to change/overwrite it!
I used this to copy all of my saved games, i especially didn't want to loose my Asphalt 5 progress
P.S. if this solves your problem, please change the title of this thread to simplify things for other users
Click to expand...
Click to collapse
Now THIS is an answer. I knew I wasnt the only one trying to do this. I dont need to backup the APPS because I already have them backed up oin my PC.
My buddy has a linux box ill try this with. Thanks.
PS. To the titanium suggestions. I've tried that. Doesnt seem to save game states or 3rd party app preferences...

Rename an apk so you can install it twice

I've been looking for a way to do this for the past couple days with no luck. Just to get any suspicions out of the way, I am not using this to steal someone else's work, it's for a workaround for a game that I'm trying to accomplish using two save files. I've tried going into the android manifest, editing the package name, and then resigning the apk with no luck (i just get parsing errors when I try to install). Is there any way that this can be done? or am I missing something?
It is not a simple matter.
APKs are managed by package name, not by file name, but you can't simply change the package name in the manifest of a compiled APK.
Even assuming you manage to do it without messing up the file, which is not a simple task, there will still be code referring to the package name, so the app will crash.
To put it simply, you would be better off getting your device rooted (if you don't already have root) and playing with the application data files if you want to cheat at some game.

Needing an .PK8 and .PEM for SignAPK

Im trying to upload a app to the market and when signing my APK`s im using signapk and I CANT do it. It says
Google Play does not accept apks signed with certificates issued by Android team. Create a new certificate that is valid for at least 50 years.
But I`m able to upload it without signing it, But then it DOESNT work it wont install.
Im able to sign it and get it to install on my phone but market place wont take it!
Can anyone Create me a key.pk8 and a certificite.pem? Cause I cant ive tried the past 5 hours. The only thing ive been able to do is make some keyfile using cmd. Can someone atleast create me one or PM me to create me one? using the Name Hunter under it.
Ive tried all guides with no luck
You should really make your own... instead of trusting strangers to handle your private key. I make my keystores using keytool, and sign using the Ant-based build process.
Incidentally: did you change the name of your package? I believe the Play store does not accept conflicting keys for the same package, for security reasons. Or maybe you need to remove the app completely and start over.
Hopefully this helps you out
http://developer.android.com/guide/publishing/app-signing.html
regaw_leinad said:
Hopefully this helps you out
http://developer.android.com/guide/publishing/app-signing.html
Click to expand...
Click to collapse
Nope. Already read. Goes right over my head
Sent from my SGH-I717R using xda premium
hyelton said:
Nope. Already read. Goes right over my head
Sent from my SGH-I717R using xda premium
Click to expand...
Click to collapse
Weel you said you already made your key w/ the keytool, so follow steps 3 & 4 EXACTLY. The JarSigner is part of the Java JDK, so you should already have that.
http://developer.android.com/guide/publishing/app-signing.html#signapp
regaw_leinad said:
Weel you said you already made your key w/ the keytool, so follow steps 3 & 4 EXACTLY. The JarSigner is part of the Java JDK, so you should already have that.
http://developer.android.com/guide/publishing/app-signing.html#signapp
Click to expand...
Click to collapse
can someone just make me one?
I`m about to give up. I was gonna use eclipse but NO couldn't down the add on had to do it manually. And now I gotta update a few other things which I cant cause the location im at is painfully slow at the moment
hyelton said:
can someone just make me one?
I`m about to give up. I was gonna use eclipse but NO couldn't down the add on had to do it manually. And now I gotta update a few other things which I cant cause the location im at is painfully slow at the moment
Click to expand...
Click to collapse
Well, it's your private key, and you don't want anyone else to get a hold of it, because if they do, they can release applications under your id. Without releasing that key to someone, there is no other way to have someone sign your apk with your private key.
regaw_leinad said:
Well, it's your private key, and you don't want anyone else to get a hold of it, because if they do, they can release applications under your id. Without releasing that key to someone, there is no other way to have someone sign your apk with your private key.
Click to expand...
Click to collapse
I know this. Thats why I would want to see if someone would make me one and Just PM me.
Hi
I am also try to create .pk8 and .pem file using my keystore .jks file.
I have created my .jks keystore file through android studio. But when i create .pem and .pk8 file using keystore tool and openssl tool, files created has some certification issue because when i try to sign the apk using these generated certificates got some signature exception.
Please help how can i create my private .pem and .pk8 file using generated .jks keystore file.
I am also try to create .pk8 and .pem file using my keystore .jks file.
I have created my .jks keystore file through android studio. But when i create .pem and .pk8 file using keystore tool and openssl tool, files created has some certification issue because when i try to sign the apk using these generated certificates got some signature exception.
Please help how can i create my private .pem and .pk8 file using generated .jks keystore file.
How can you guys know enough to develop an app, but can't figure out how to sign it??
Like he's trying to tell you oh, it would be like giving somebody your credit card number and CCV code. The purpose of a private key is just that, it's private.
Fire Hound 8.1
compile the below source and use according to usage.
I know that I am answering a 2012 thread, but it would be useful for others too.

invalid keystore format in Eclipse when exporting

Hello,
I have created an app in Eclipse and never had problem updating it and exporting it to apk. Suddenly, I am getting the "invalid keystore format" when I try to export. I can create a new keystore, but it will not allow subsequent updates to the same APK. Here is my situation:
1. I use the latest Eclipse version as of today.
2. My app is free with no ads or in app purchases, so no special key from google was uses.
3. I have not forgotten the password to the keystore.
4. I get this message when I try to export app update to the same apk: "Key alias selection: Invalid keystore format" and the Alias droop down menu is empty.
Again, I have never had problem with this before and it suddenly came out of nowhere. I have even created new test apps and gone through the process above with the same results.
I have not found anything on the Internet that address my problem. Most have to do with entering the wrong password and not putting in the correct keystore which is not the case here.
Any help would be appreciated.
Thanks,
Kachal
I believe I have figured it out after two days of knocking my head: Being a novice, I believe when I first created the keystore file, I used the exact same name for the apk file and the keystore and Eclipse simply overwrote the file and thus destroyed my keystore file. It was dumb of me to do that but I wish Eclipse was smart enough to catch or prevent that by forcing a file extension for the keystore.
Kachal said:
Hello,
I have created an app in Eclipse and never had problem updating it and exporting it to apk. Suddenly, I am getting the "invalid keystore format" when I try to export. I can create a new keystore, but it will not allow subsequent updates to the same APK. Here is my situation:
1. I use the latest Eclipse version as of today.
2. My app is free with no ads or in app purchases, so no special key from google was uses.
3. I have not forgotten the password to the keystore.
4. I get this message when I try to export app update to the same apk: "Key alias selection: Invalid keystore format" and the Alias droop down menu is empty.
Again, I have never had problem with this before and it suddenly came out of nowhere. I have even created new test apps and gone through the process above with the same results.
I have not found anything on the Internet that address my problem. Most have to do with entering the wrong password and not putting in the correct keystore which is not the case here.
Any help would be appreciated.
Thanks,
Kachal
Click to expand...
Click to collapse
160
Kachal said:
I believe I have figured it out after two days of knocking my head: Being a novice, I believe when I first created the keystore file, I used the exact same name for the apk file and the keystore and Eclipse simply overwrote the file and thus destroyed my keystore file. It was dumb of me to do that but I wish Eclipse was smart enough to catch or prevent that by forcing a file extension for the keystore.
Click to expand...
Click to collapse
i have maybe the same problem now. i also used the same name for keystore and for my first apk file. i realized that when i wanted to do my first update, but when i choosed this file in eclipse, it worked and i did more than 15 updates this way. BUT then i updated my android SDK to higher version and my keystore file (with dumb name) is no longer working => Invalid keystore format
now i am really confused what to do... any idea? :-/
Keystore files are really a hassle, if you loose it youre in big trouble.

Categories

Resources