Quantcast
Channel: MobileRead Forums - Kindle Developer's Corner
Viewing all articles
Browse latest Browse all 4414

Upgrading the certificates for PW2 using kindletool ?

$
0
0
Hello,

I have a PW2, with the latest firmware 5.12.2.2 but which contains outdated certificates for using the experimental browser.

I'm trying to fix it but I'm stuck in trying to make my PW2 recognize the bin file for upgrading the device.

The way I proceeded :

- I downloaded the update bin file from the amazon website
- I unpacked the files using KindleTool developed by @NiLuJe [URL="https://github.com/NiLuJe/KindleTool"]https://github.com/NiLuJe/KindleTool :

kindletool extract update_kindle_paperwhite_v2_5.12.2.2.bin update_kindle_paperwhite_v2_5.12.2.2

- I then unpacked and mounted the rootfs.img.gz
- I then modified the certificate files in /etc/ssl/certs of the mounted image (by copying the one from my ubuntu install)
- I gunzipped the modified img, overwritting rootfs.img.gz
- I then create the update package with one of the following variants (all failed )

kindletool create recovery2 -d pw2 update_kindle_paperwhite_v2_5.12.2.2 updatepkg.bin
kindletool create recovery2 -d pw2 -p wario update_kindle_paperwhite_v2_5.12.2.2 updatepkg.bin
kindletool create recovery2 -c 2 -d pw2 -p wario update_kindle_paperwhite_v2_5.12.2.2 updatepkg.bin
kindletool create recovery2 -d pw2 update_kindle_paperwhite_v2_5.12.2.2 updatepkg.bin
kindletool create recovery2 -d pw2 update_kindle_paperwhite_v2_5.12.2.2 -1 2048630901 -2 1897089723 -p wario updatepkg.bin

- I copied the file on the root filesystem of the plugged PW2 and then unplug USB.
- The PW2 alerts that there is an invalid update file on the device. The "Update" menu from the PW2 is still in gray ;

If this helps, the info of the original amazon update bin file are :

➜ KindleTool git:(master) ✗ ./KindleTool/Release/kindletool convert -i update_kindle_paperwhite_v2_5.12.2.2.bin
Checking update package 'update_kindle_paperwhite_v2_5.12.2.2.bin'.
Bundle SP01 (Signing Envelope)
Cert number 2
Cert file pubprodkey02.pem (Official 2K)
Bundle FB03 (Fullbin [OTA?, fwo?])
Bundle Type Recovery V2
Target OTA 3791510038
MD5 Hash 14742b29e93d2708c78d45d6e1ffdb7f
Magic 1 2048630901
Magic 2 1897089723
Minor 1
Platform Wario
Header Rev 0
Board Unspecified
Devices 14
Device Kindle PaperWhite 2 (2013) (Unknown Variant 0xF4)
Device Kindle PaperWhite 2 (2013) (Unknown Variant 0xF9)
Device Kindle PaperWhite 2 (2013) WiFi+3G Japan
Device Kindle PaperWhite 2 (2013) WiFi+3G Russia
Device Kindle PaperWhite 2 (2013) WiFi+3G Europe
Device Kindle PaperWhite 2 (2013) WiFi+3G Canada
Device Kindle PaperWhite 2 (2013) WiFi+3G
Device Kindle PaperWhite 2 (2013) WiFi
Device Kindle PaperWhite 2 (2013) WiFi+3G (4GB)
Device Kindle PaperWhite 2 (2013) WiFi+3G (4GB) Brazil
Device Kindle PaperWhite 2 (2013) WiFi+3G (4GB) Europe
Device Kindle PaperWhite 2 (2013) WiFi+3G (4GB) Canada
Device Kindle PaperWhite 2 (2013) WiFi Japan
Device Kindle PaperWhite 2 (2013) WiFi (4GB) International


There are several points I'm not sure about :

- there are some update-payload.dat file that are listing bootloader_bin, main_kernel and update_image_rootfs with some number inside. I'm wondering if the modifications I brought to the rootfs.img.gz file needs some update in this file as well

- there is a rootfs.img.gz.sig ; I do not know how this is generated. Do I need to regenerate that file if I update the rootfs.img.gz file ?

- there is some "magic" that defaults to 0 in kindletool but are not 0's in the original amazon bin file. I tried to set them to the magics of the amazon bin file. But these also failed to install;

- I do not know if we need to sign with the same certificate at the original amazon file . The default kindletool uses cert number 0 but the original amazon bin file has cert number 2. If I do specify "-c 2", and then use "kindletool convert -i" on the generated file, it fails to parse several of the information from the generated file (I actually did not try to install this one for this reason)

If you have any clues helping me, I thank you ;

Best;

Viewing all articles
Browse latest Browse all 4414

Trending Articles