Tommytomatoe - For walking me through the setup/process/commands.
What you'll need to sign an APK.
SDK found here>> Java SDK
*For most users the java_ee_sdk-6u3-jdk7-windows.exe will be the one selected.
*After Install, restart your PC.
Next, open your command prompt
Type: cd C:\Program Files\Java\jre1.6.0_07\bin
*It highly likely, the jre1.6.... will be different. If it's close, then select it. I prefer to type cd c:\pro(pressing tab will automatically complete/find the remaining part of the directory)
If you're on Windows 7, the correct path is
Make sure you're in the directory stated above. We will now create a signed key. Below is an example of what we're going to do. I'll break it down in noob terms after.
keytool -genkey -v -keystore $KEYSTORE -alias $ALIAS -keyalg RSA -keysize 2048 -validity 10000
The part of the command that contains your information will be skin.keystore and 12215. The "skin" part of skin.keystore is your release key name. I named my skin because this key will be for all the Skins I upload to the market.
[Q] Do I need to have .keystore after my key name?
[A] Yes. It must look like: skin.keystore otherwise the command will not be complete.
This is like a second password. Remember this, because it will be referenced when signing an APK. I used 12215. You can use johnsmith or anything else.
keytool -genkey -v -keystore skin.keystore -alias 12215 -keyalg RSA -keysize 2048 -validity 10000
keytool -genkey -v -keystore SAMPLE.keystore -alias SAMPLE -keyalg RSA -keysize 2048 -validity 10000
In the above my key is called "SAMPLE.keystore". Its alias (kind of like an additional password) is "SAMPLE". After you hit enter it will prompt for password. When you type it won't show up on screen (to protect your password)
Here is an example of the above:
Keep in mind, if you don't remember your alias you won't be able to use your key
After you press enter to create the key, it will prompt you for a password. The program mask your password so others won't see it. So when you type it will appear as if no password is being entered.
Your key is stored in the directory you created it in. You won't need to find the file when signing an APK, because it's stored for you already. I'll go into detail of how to access your password in the next step.
How to sign an APK with the Private Key you created.
Anytime you sign an APK, you'll need to open command prompt then type:
cd c:\Program Files\Java\jdk1.6.0_26\bin
The following is an example of what you'll copy and paste into command prompt.
jarsigner -verbose -keystore skin.keystore -signedjar DRAG-DROP-RENAME-APK-NAME DRAG-DROP alias
You can see below my command prompt after I dragged and dropped my apk into cmd. I also deleted "DRAG-DROP alias" from the command line to make it easier to see the changes I'm doing.
After you drag and drop, rename your apk to "New-NOVSKIN1.apk", shown below.
Below you'll see, after I renamed the apk, I dragged and dropped the same apk from above into the command directory again. This time, we're not going to rename it. Instead, after you drop it a second time into command prompt, we're going to type our alias at the end. Pictured below:
The reason we drag and drop is to SAVE TIME. Tommytomatoe showed me this shortcut and it saves a ton of time from having to type everything out.
After entering this command, and executing it, the apk will now be signed. Congrats!