View Single Post
Old 07-07-2012, 12:54 AM   #4
peter64
Member
peter64 began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jul 2012
Device: PRS-G1
thanks!

Hey meltdown thanks so much for the tools!

I've been trying to test decompress some sample updater made by others like the minimal-root PRS-T1 Updater.

But I keep running into errors. Just so you know I'm running under mingw msys.
I had to make afew small changes to get it running like replace hexdump with xxd and remove the -of parameter from dd. But it looks like it works well (except for this one issue). Perhaps my mmcblk2 is not right? But I think one of the earlier on decryptions should have failed if the keys were bad.

I would really appreciate if you could let me know what do you think might be the cause?

Here is a link to the zip with the file containing the modified source and the updater as well as the mmcblk2.

http://www.4shared.com/archive/JARcB...t-package.html

Thanks!

Quote:
$ ./extract
### Info
ENC_KEY 2c669cd6deaf78d1a94d6d55b3d4618a
MODEL PRS-T1
SKU UC,CEW
output/sigKeyPriv.pem
-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQDNP238xpb7Rmnrgj09PVm0+kBNQzYb37lLBy Lih6bBJpQixjs5
BXQwOMe4rASb54qYc2Q5sx1Xrn3dLgYaAmHYq4P6tlml0nr9pw u0Qnz6/QgE5vEL
RKbvErm3X+Ai2etp5mNzu9b0i7AHkfWC8XeaNsLVQeiGWbCyRc IDTCW9swIDAQAB
AoGAfJN9TKm0xjsM2xcn2F2+byxdjwe2deCq9LEWKWyweBfUXe 73zzpSNVqhTqOK
AJ7e7n1LXgIrUybj2jWvGmZLwEGePQQx5yvxW3lDcME8dAHBqF CvmTbQBJrOj4Gh
B3dcG9Rx4Lvn1dCovulXp+DASP5dsin+1QlzmlXsSVrnRsECQQ D7JL6auOa2OHqS
a/nae9ixPPBQG+TT7alIiNLaYURux0PBRF8VaepjQDC6RMeQd5sF e26Lm3ESChYW
nZF+FrqjAkEA0Td71OS5gyaSaAz7FLShiq9un2fSITjH45QuT+ vU06j2MgHx7KLO
MxqLAONfieDtRXGq6C8zri45lEGg9UyxsQJAZw5r/Le1TL8eZSlTzPkXMZvNDUJ1
AxY6ah5jT+OsHj08q3kv/2yIFxRHKpiAv+KkxXoiIb22h22GJN+hzXjsOwJBAKJT
CiED1WuMYcuZRrWp8CxKMOo9AywDghNwxP39XANc9KeYGrwfFR 1RWsg1ocq4WV+n
8ZJ0DQT3mHUO9nNcLgECQQCoWcnnwzjHe9X99Jg/o413ktl+lc3/qwNg83vhA2x0
8AT3nOLlVMvQ9MsnYT9LXNLg29aXhN766e8qIQWjQRvt
-----END RSA PRIVATE KEY-----

### eMMC D Package info
bad magic number
Package header decrypt error
### SD D Package info
Not exists block device : /dev/mmcblk0
### Package info : ./PRS-T1 Updater.package -> output/SETTING
UPDATE_IV 000102030405060708090a0b0c0d0e0f
SIZE 352
CHECKSUM 4268317339
decrypt CHECKSUM 4268317339
decode MODEL PRS-T1
decode SKU UC,CEW
HEADER_SIZE 1
### UPDATER : ./PRS-T1 Updater.package -> output/package.tmp
LINE UPDATER 0 11K 427810362 10240 000102030405060708090a0b0c0d0e
0f 95ab4fcc3ff4c88b567432392ea361fb7f9a66881aa9aac7cf c51578934d245351432899b2cae
2ef9a8a599f5caa29f08422ae4c05b7879f3b33e61c83a78d2 ed13a7c712de231a0c4944adbf9653
9012b4ef880d20c0e8467c6b1223df2c5a991fcbfff1efd8f1 8fad9f44918fcbe2471a3d6d3fe448
7d0b05ae165943b2ee4
OFFSET 0
BLOCK 11K
CHECKSUM 427810362 10240
SIZE 10256
UPDATE_IV 000102030405060708090a0b0c0d0e0f
SIGNATURE 95ab4fcc3ff4c88b567432392ea361fb7f9a66881aa9aac7cf c51578934d
245351432899b2cae2ef9a8a599f5caa29f08422ae4c05b787 9f3b33e61c83a78d2ed13a7c712de2
31a0c4944adbf96539012b4ef880d20c0e8467c6b1223df2c5 a991fcbfff1efd8f18fad9f44918fc
be2471a3d6d3fe4487d0b05ae165943b2ee4
add Header OFFSET 1
bad decrypt
1619636256:error:0606506D:digital envelope routines:EVP_DecryptFinal_ex:wrong fi
nal block length:evp_enc.c:459:
decrypt CHECKSUM 4294967295 0
Package UPDATER checksum error
UPDATE: I got it working, I needed to remove the ${TIME} from the beginning of the 3 dd commands in this section as they were replacing the data with time stats

Last edited by peter64; 07-08-2012 at 11:28 AM.
peter64 is offline   Reply With Quote