Android Forums

Go Back   Android Forums > Android Market, Media And Reviews > Android Market/Reviews
Connect with Facebook

Click Here To Register!
Reply
 
LinkBack Thread Tools Display Modes
Old 02-22-2009, 07:52 AM   #1
Junior Member
 
Join Date: Feb 2009
Posts: 8
Friends: 0
View Destroythenseek's Profile   View Destroythenseek's Photo Album   View Destroythenseek's Blog   View Social Groups
Hey Guys,
I had a really really really hard time figuring this out so here is exactly how to do it for those of you who need/want it.

First of all,
jarsigner and keytool are .exe files that help create your "signed" application for release to the market to prevent fraud.

1.
Make a folder somewhere called "keytools" and make a folder in that called "keys"

2.
If you're using Eclipse, in Package Exp window... right click on your project -> Android Tools -> Exports Unsigned Application Package ... Save in keytools
"filename.apk" or something.

3. Check
"C:\Program Files\Java\jdk1.6.0_12\bin" for jarsigner and keytools..
... or whatever jdk version you have

If you DONT have it install the following .. https://cds.sun.com/is-bin/INTERSHOP...-CDS_Developer

4. open cmd.exe,

5. cd your way to where you have your keytools folder...
I had to do.. cd desktop, cd g1, cd keytools to get to C:\Users\Anton\Desktop\G1\keytools\

In this directory is you apk file which we will manipulate.

type the following now (or something similar to my example)...
C:\"Program Files"\Java\jdk1.6.0_12\bin\keytool -genkey -alias donate.keystore -keyalg RSA -validity 20000 -keystore keys/donate.keystore

Then you will have be presented with:
Enter keystore password: (type in a password you will use)
Re-enter new password: (type in same password here)
What is your first and last name? Anton
What is the name of your Organization unit? (You dont have to type anything really)
What is the name of your city or locality?
What is the name of your state or providence?
what is the two-letter country code for this unit? US
is CN=Anton C=US correct?
[no]: yes (type yes there)
Enter key password for <donate.keystore>
<RETURN if same as keystore password>: (push enter)

6.

type the following now (or something similar to my example)...
C:\"Program Files"\Java\jdk1.6.0_12\bin\jarsigner -verbose -keystore key/donate.keystore -signedjar Donate_signed.apk Donate.apk donate.keystore

Enter Passphase for keystore: (your password you made earlier)
adding: META-INF/MINFEST.MF ....
.......
.....
...Signing: classes.dex

and you're all set! you signed your Doante_signed.apk file or whatever you wanted to create!
Congratulations.
NOW STOP BEING FRUSTRATED LIKE I WAS FOR HOURS!
Destroythenseek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Reply With Quote
Old 03-02-2009, 02:19 PM   #2
Junior Member
 
Join Date: Mar 2009
Posts: 3
Friends: 0
View Olivia's Profile   View Olivia's Photo Album   View Olivia's Blog   View Social Groups
Thanks a lot!
Great info!
This is exectly what I am looking for.
Do you have such a great topic regarding application updating?
Olivia is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Reply With Quote
Old 06-01-2010, 08:02 AM   #3
New Member
 
Join Date: Jun 2010
Posts: 2
Friends: 0
View dackyD's Profile   View dackyD's Photo Album   View dackyD's Blog   View Social Groups
Sorry for resurecting this post, but does signing get rid of the "Install Blocked" message when you are installing your signed application?

I thought it does, so how do we get rid of this message?

Thanks
dackyD is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Reply With Quote
Old 06-22-2010, 02:42 PM   #4
New Member
 
Join Date: Jun 2010
Posts: 1
Friends: 0
View britishgoose's Profile   View britishgoose's Photo Album   View britishgoose's Blog   View Social Groups
This dont work for me
I have 2 sets of java folders, and tried all with this but it doesnt work


C:\android\keytools>C:\Program Files (x86)\Java\jdk1.6.0_17\bin\keytool -genkey
-v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -validity 100
00
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

C:\android\keytools>

and this

C:\android\keytools\keys>C:\Program Files\Java\jre6\bin\keytool -genkey -alias d
onate.keystore -keyalg RSA -validity 20000 -keystore keys/donate.keystore
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

am new to android but my java setup is fine...a little help
britishgoose is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Reply With Quote
Old 08-23-2010, 09:49 PM   #5
New Member
 
Join Date: Aug 2010
Posts: 1
Friends: 0
View LeeWoo's Profile   View LeeWoo's Photo Album   View LeeWoo's Blog   View Social Groups
britishgoose - I haven't successfully completed this via these instructions yet but the problem you are getting originates from the space character in your command. In your command you need to add quotations around Program Files. C:\Program Files (x86)\Java should be C:\"Program Files (x86)"\Java

Hope this solves your problem.
LeeWoo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Reply With Quote
Old 09-29-2010, 08:08 AM   #6
New Member
 
Join Date: Sep 2010
Posts: 17
Friends: 0
View diastro's Profile   View diastro's Photo Album   View diastro's Blog   View Social Groups
Quote:
Originally Posted by Destroythenseek View Post
Hey Guys,
I had a really really really hard time figuring this out so here is exactly how to do it for those of you who need/want it.

First of all,
jarsigner and keytool are .exe files that help create your "signed" application for release to the market to prevent fraud.
Good info, thanks. Maybe you have more info regarding application updating as well?
diastro is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Reply With Quote
Old 06-28-2011, 06:46 AM   #7
New Member
 
Join Date: Jun 2011
Posts: 1
Friends: 0
View manishbansal's Profile   View manishbansal's Photo Album   View manishbansal's Blog   View Social Groups
Great info......... thanks a lot.......... successfully signed the application..........
manishbansal is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Reply With Quote
Old 07-07-2011, 07:47 AM   #8
New Member
 
Join Date: Jun 2011
Posts: 5
Friends: 0
View gibibyte's Profile   View gibibyte's Photo Album   View gibibyte's Blog   View Social Groups
Very good info. I just went through this a few weeks ago..
gibibyte is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Reply With Quote
Old 11-25-2011, 03:37 PM   #9
New Member
 
Join Date: Nov 2011
Posts: 1
Friends: 0
View hamidreza_zm's Profile   View hamidreza_zm's Photo Album   View hamidreza_zm's Blog   View Social Groups
i have problem in the last part...
jarsigner: unable to open jar file: donate.apk
plz help me
hamidreza_zm is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Reply With Quote
Old 12-01-2011, 09:00 AM   #10
New Member
 
Join Date: Oct 2011
Posts: 10
Friends: 0
View AnDroid1221's Profile   View AnDroid1221's Photo Album   View AnDroid1221's Blog   View Social Groups
Thanks!!
AnDroid1221 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Reply With Quote
Reply

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing and signing? chaoz1336 Android Development, Answers, Tutorials, and Code Snippets 2 03-09-2009 07:37 PM
Signing APK file issues.... arcarocket Android Development, Answers, Tutorials, and Code Snippets 5 02-22-2009 05:41 PM
Android Images Tutorial dr0ne Android Development, Answers, Tutorials, and Code Snippets 1 12-08-2008 11:15 PM


Unlocked G1 Phones | Buy T-Mobile G1 | Google Phone

All times are GMT -6. The time now is 09:47 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Copyright (c) 2008 TalkAndroid.com. All rights reserved.