Jiyong Park | 86c9b08 | 2021-06-04 19:03:48 +0900 | [diff] [blame] | 1 | The test data is generated as follows: |
| 2 | |
| 3 | $ keytool -keystore keystore -genkey -alias mykey |
| 4 | The password for the keystore and the key is 123456. |
| 5 | |
| 6 | The signer information is set as follows: |
| 7 | |
| 8 | CN=Android, OU=Android, O=Android, L=Mountain View, ST=CA, C=US |
| 9 | |
| 10 | Build a random apk (Bluetooth.apk is chosen arbitrary) |
| 11 | |
| 12 | $ m Bluetooth |
| 13 | $ cp $ANDROID_PRODUCT_OUT/system/app/Bluetooth.apk ./test.apk |
| 14 | |
| 15 | Sign it using the apksigner. |
| 16 | |
| 17 | $ m apksigner |
| 18 | $ apksigner sign --ks keystore ./test.apk |
| 19 | |
| 20 | Check that the idsig file is created. |
| 21 | |
| 22 | $ ls -l test.apk* |
| 23 | -rw-r----- 1 jiyong primarygroup 3888734 Jun 4 01:08 test.apk |
| 24 | -rw-r----- 1 jiyong primarygroup 39115 Jun 4 01:08 test.apk.idsig |