Certificate password prompt in build

1,426 views
Skip to first unread message

Marc Lester Tan

unread,
Apr 19, 2011, 5:41:32 AM4/19/11
to android-...@googlegroups.com
Hi all,

I'm trying to build the framework using my own private keys. I created my keys using the development/tools/make_key and followed the instructions on build/target/product/security/README file. Then after generating my own shared, media, platform and test pk8 and pems, I put them into build/target/product/security/ to replace the old ones.

Now the problem is when building the framework using the make -j4 command, it always tries to prompt for the certificate password and then after some time it will just throw a nullpointer exception.  

Enter password for build/target/product/security/testkey.pk8 (password will not be hidden): java.lang.NullPointerException
at com.android.signapk.SignApk.decryptPrivateKey(SignApk.java:130)
at com.android.signapk.SignApk.readPrivateKey(SignApk.java:154)
at com.android.signapk.SignApk.main(SignApk.java:436)

Without actually waiting for me to input any value. Is there a way to store this credentials as part of the build process or am I missing something here?

Thanks in advance.

--
Cheers,

Marc Lester Tan 


aparajitha rajapur

unread,
Apr 19, 2011, 1:12:45 PM4/19/11
to android-...@googlegroups.com, mai...@gmail.com
Yeah its actually running using 4 processes, so before we give input some other process writes. The possible solution is to give only "make (without -j4 option)", then it will ask for password during build.

--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

Marc Lester Tan

unread,
Apr 19, 2011, 7:40:53 PM4/19/11
to android-...@googlegroups.com
Thanks! Is there a way to specify the password as part of the build? it will be troublesome to type in the password for automated build. I'm wondering why is it that if we use the test certificates, the build doesn't ask for password. Any pointers will be of great help.

Thanks

aparajitha rajapur

unread,
Apr 20, 2011, 9:46:27 PM4/20/11
to android-...@googlegroups.com, mai...@gmail.com
We can hard code the password as string in SignApk.java in /source/build/tools/signapk/SignApk.java file. But this is not advisable.
Regards,
Aparajitha.

Marc Lester Tan

unread,
Apr 20, 2011, 10:45:32 PM4/20/11
to android-...@googlegroups.com
Thanks. Yeah saw that one. I modified it a bit so that it will check an environment variable that points to a text file that contains the password. Similar to what they've done in common.py

Reply all
Reply to author
Forward
0 new messages