Keystore password Android 1.6 HTC Dev version

575 views
Skip to first unread message

a2ronus

unread,
Mar 1, 2010, 5:49:27 AM3/1/10
to Android-DevPhone-Updating
Hello all,

I would like to sign my app with the Android 1.6 Dev certificates/keys
for the ADP1. Can I do this? If so, what is the keystore password?

I need this to test an app that needs more permissions than a normal
app. It needs system/system (group/user) permission in order to be
able to read from / write to the UNIX domain socket control interface
of wpa_supplicant.

The other option is building my own Android, but I would like to try
this first.

Thanks in advance for any help or pointers on where more information
can be found.

Kind regards,

a2ronus

lbcoder

unread,
Mar 26, 2010, 1:55:30 PM3/26/10
to Android-DevPhone-Updating
.... or you could just resign the ADP1 system image....

a2ronus

unread,
Mar 29, 2010, 6:34:36 AM3/29/10
to Android-DevPhone-Updating
Thanks for the reply, but in the meantime I've tried the other
approach anyway (building my own Android). Your solution will take
less time though.

I've tried rebuilding Android and it seems to work. Maybe also
relevant for other people trying this: The certificates used for
signing the ADP1 images are located here: <root-of-android-source-
tree>/build/target/product/security. You can use the mkkey.sh script
there to generate new keys. You might also want to replace the
certificates with ones that have password protection (this will also
require you to enter these passwords several times will building
Android). In order to do this (create certificates with paswords) you
can replace the mkkey.sh script with the example provided here:
http://pdk.android.com/online-pdk/guide/release_keys.html.

a2ronus

unread,
Apr 8, 2010, 5:29:35 AM4/8/10
to Android-DevPhone-Updating
On top of signing Android 1.6 for Dream with certificates generated by
myself, I've also managed to sign my app with the platform certificate
and run it with the system sharedUserId. These are the steps I took:

- Build and flash to your Dream your own Android using
http://source.android.com/documentation/building-for-dream. Use the
mkkey.sh script on http://pdk.android.com/online-pdk/guide/release_keys.html
to create new certificates, including x509 certificates before you do
'make'.
- In the AndroidManifest.xml of your application: under the <manifest>
element add the attribute android:sharedUserId="android.uid.system".
- Export an unsigned version of your Android application using
Eclipse: right-click on the project >> Android Tools >> Export
Unsigned Application Package.
- Use <root-of-android-source-tree>/out/host/<your-host>/framework/
signapk.jar to sign your app using platform.x509.pem and platform.pk8
in <root-of-android-source-tree>/build/target/product/security
generated earlier: java -jar signapk.jar platform.x509.pem
platform.pk8 YourApp-unsigned.apk YourApp-signed.apk.
- Install the app to your device: adb install YourApp-signed.apk
- Run your app
- Use "adb shell ps" to confirm that your app is running as system.

However, I have not managed yet to talk to wpa_supplicant with my app
with more permissions however. Help on this issue would be
appreciated.

On 29 mrt, 12:34, a2ronus <aaron.jan...@gmail.com> wrote:
> Thanks for the reply, but in the meantime I've tried the other
> approach anyway (building my own Android). Your solution will take
> less time though.
>
> I've tried rebuilding Android and it seems to work. Maybe also
> relevant for other people trying this: The certificates used for
> signing the ADP1 images are located here: <root-of-android-source-
> tree>/build/target/product/security. You can use the mkkey.sh script
> there to generate new keys. You might also want to replace the
> certificates with ones that have password protection (this will also
> require you to enter these passwords several times will building
> Android). In order to do this (create certificates with paswords) you
> can replace the mkkey.sh script with the example provided here:http://pdk.android.com/online-pdk/guide/release_keys.html.
>
> On 26 mrt, 19:55, lbcoder <lbco...@gmail.com> wrote:
>
>
>
> > .... or you could just resign the ADP1 system image....
>

Reply all
Reply to author
Forward
0 new messages