imx6q android signapk

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx6q android signapk

Jump to solution
3,586 Views
光荣周
Contributor I

HELLO

In my apk,in order to use <android:sharedUserId="android.uid.system"> .so use signapk tools sign my apk.

in android source code find two files"platform.pk8"and "platform.x509.pem",then use signapk tools,use command "java -jar signapk.jar platform.x509.pem platform.pk8 test.apk testnew.apk" sign my apk,finished copy new apk to my device and install,but occurred error"apk not install"“应用安装未完成”,or use wandoujia tools install my new apk, also occurred the error “共享用户权限不完整”。

if I don't use  <android:sharedUserId="android.uid.system"> in my apk, this apk can install finished and no error.

how to solution this question?

Labels (2)
0 Kudos
Reply
1 Solution
2,475 Views
gary_bisson
Senior Contributor III

Hi,

Yes you can sign an application with the platform keys to get the system uid. I suggest you read my blog post:

http://boundarydevices.com/android-security-part-1-application-signatures-permissions/

Note that Freescale builds are not using the keys from the AOSP but their own (provided under devices/fsl):

$ java -jar out/host/linux-x86/framework/signapk.jar -w \

device/fsl/common/security/platform.x509.pem \

device/fsl/common/security/platform.pk8 app_name.apk app_name-signed.apk

Also note that you need to uninstall the application on the phone first before being able to install the platform-signed one. Otherwise Android package manager will see the change of certificates and doesn't allow it.

Regards,

Gary

View solution in original post

6 Replies
2,475 Views
BiyongSUN
NXP Employee
NXP Employee

The question is for i.MX6q or  android technology?

Is it the same if you want to use this apksign for an android phone?

0 Kudos
Reply
2,475 Views
光荣周
Contributor I

hello ,the question if for imx6q device.system is android4.3.

same to an android phone,but this file platform.x509.pem and platform.pk8 is related with imx6q

0 Kudos
Reply
2,476 Views
gary_bisson
Senior Contributor III

Hi,

Yes you can sign an application with the platform keys to get the system uid. I suggest you read my blog post:

http://boundarydevices.com/android-security-part-1-application-signatures-permissions/

Note that Freescale builds are not using the keys from the AOSP but their own (provided under devices/fsl):

$ java -jar out/host/linux-x86/framework/signapk.jar -w \

device/fsl/common/security/platform.x509.pem \

device/fsl/common/security/platform.pk8 app_name.apk app_name-signed.apk

Also note that you need to uninstall the application on the phone first before being able to install the platform-signed one. Otherwise Android package manager will see the change of certificates and doesn't allow it.

Regards,

Gary

2,475 Views
SergioSolis
NXP Employee
NXP Employee

Thank you for answering this thread Gary, it will greatly improve the knowledgebase!

0 Kudos
Reply
2,475 Views
光荣周
Contributor I

hello,thank you very much! follow your ways,my question have solution.

my ways occurred error the reason is the key file  "platform.pk8"and "platform.x509.pem" was wrong ,I found them from build/target/product/security/.

The correct key file should found them from device/fsl/common/security/.

0 Kudos
Reply
2,475 Views
BiyongSUN
NXP Employee
NXP Employee

Is it the same if you want to use this apksign for an android phone?

It seems a very high application issue. if it is an application issue, we only can give a limited support.

What's the question for i.MX6?

0 Kudos
Reply