1、android key
android源码编译使用的默认key:
android\build\target\product\security\ .pk8 .pem 文件
要对Android系统进行签名,需要生成四种类型的key文件。 (build\target\product\security\ 下的README 文件有说明)
1)testkey
2)media
3)shared
4)platform
2、编译生成key
2.1进入android_src/development/tools目录,依次执行以下四个命令:
(1) # ./make_key platform '/C=CN/ST=BeiJing/L=BeiJing/O=ingenic/OU=software/CN=snmu/emailAddress=xxxxxx@qq.com'
(接着会打印如下信息:)
Enter password for ‘platform’ (blank for none; password will be visible): <——- 设置你的密码(设置为空,也就是直接按回车键)
creating platform.pk8 with no password
Generating RSA private key, 2048 bit long modulus
.+++
…….+++
e is 65537 (0x10001)
(2) # ./make_key media ‘/C=CN/ST=BeiJing/L=BeiJing/O=ingenic/OU=software/CN=snmu/emailAddress=xxxxxxx@qq.com’
(接着会打印如下信息)
Enter password for ‘media’ (blank for none; password will be visible):<——- 设置你的密码(设置为空也就是直接按回车键)
creating media.pk8 with no password
Generating RSA private key, 2048 bit long modulus
…………..+++
……..+++
e is 65537 (0x10001)
(3) # ./make_key shared
‘/C=CN/ST=BeiJing/L=BeiJing/O=ingenic/OU=software/CN=snmu/emailAddress=xxxxxxx@qq.com’
(接着会打印如下信息)
Enter password for ‘shared’ (blank for none; password will be visible):<——- 设置你的密码(设置为空也就是直接按回车键)
creating shared.pk8 with no password
Generating RSA private key, 2048 bit long modulus
……………+++
..+++
e is 65537 (0x10001)
(4) # ./make_key testkey
‘/C=CN/ST=BeiJing/L=BeiJing/O=ingenic/OU=software/CN=snmu/emailAddress=xxxxxxx@qq.com’
(会打印如下信息)
Enter password for ‘testkey’ (blank for none; password will be visible):<——- 设置你的密码(设置为空也就是直接按回车键)
creating testkey.pk8 with no password
Generating RSA private key, 2048 bit long modulus
………+++
…………………………………+++
e is 65537 (0x10001)
提示:make_key的参数。第一个参数是要生成key的名字,第二个参数是关于你公司的信息。key的名字就是前面提到的4中类型的key,公司信息的参数比较多,它们的含义如下:
C ---> Country Name (2 letter code)
ST ---> State or Province Name (full name)
L ---> Locality Name (eg, city)
O ---> Organization Name (eg, company)
OU ---> Organizational Unit Name (eg, section)
CN ---> Common Name (eg, your name or your server’s hostname)
emailAddress ---> Contact email address
2.2 进入android_5.1/build/target/product/security/ 目录,执行以下两个命令:
#cp ../../../../development/tools/*.pk8 ./
#cp ../../../../development/tools/*.pem ./
3、重新编译android源码,生成boo.img system.img 烧录即可。