Forgot Password
Pentax Camera Forums Home
 

Reply
Show Printable Version Search this Thread
04-08-2017, 09:13 AM   #676
Veteran Member




Join Date: Dec 2016
Posts: 532
QuoteOriginally posted by ABel Quote
Firmware validation logic used in K-30/50/500 is added to PHDK Wiki here.
bookmarking!

04-08-2017, 11:07 PM   #677
Veteran Member




Join Date: Jul 2009
Location: Russia
Posts: 343
Hi!

Let me know if you need any help from the guy who started all this Pentax hacking :-)

I have K-01, so can have some personal interest.

So, for now it is only model id change and reencryption?[COLOR="Silver"]
04-09-2017, 05:28 AM   #678
Senior Member




Join Date: Mar 2013
Location: Middle of Siberia
Photos: Gallery
Posts: 204
QuoteOriginally posted by tr13 Quote
Hi!

Let me know if you need any help from the guy who started all this Pentax hacking :-)

I have K-01, so can have some personal interest.
If you are ready to sacrifice your K-01 for sake of progress, I can prepare a K-50 adapted for your camera
It's about 50/50 - either the camera will become quasi-K50, or it will be broken beyond the repair.

QuoteOriginally posted by tr13 Quote
So, for now it is only model id change and reencryption?
Yes. Nothing that could be called a breakthrough
04-09-2017, 11:59 AM - 1 Like   #679
Pentaxian
ZombieArmy's Avatar

Join Date: Jun 2014
Location: Florida
Posts: 1,453
QuoteOriginally posted by ABel Quote
It's about 50/50 - either the camera will become quasi-K50, or it will be broken beyond the repair.
Or the third possibility which is it doesn't do certain functions and has to be reverted.

04-09-2017, 02:08 PM   #680
Veteran Member




Join Date: Dec 2016
Posts: 532
QuoteOriginally posted by ZombieArmy Quote
Or the third possibility which is it doesn't do certain functions and has to be reverted.
I think this will mostly happen..if the K01 and the K50 share the same PRIME processor, then I dont see any problem, the would have the same registers. a mirror is not related to the exposure commands, like a shutter and aperture does. Probably it will hang if you select Bulb or mirror up for cleaning and I really doubt it, it most probably will return an Error as there is no way to provide feedback to the Prime..

Abel, could you provide a K30 firmware to mod a K01? it has less functions and probably will fit to the K01 DRAM
04-09-2017, 02:48 PM   #681
Veteran Member




Join Date: Jul 2009
Location: Russia
Posts: 343
I am not big fan sacrificing K-01 at this stage as I love this yellow buddy :-)

One strange thing I see is 12MB xor decryption key.

As I understand it is obtained by xoring dumped firmware with encrypted one.

As far as I remember Pentax did not change algorithm for ages. So it can be good idea to add K30/K50 to my tool (as K-01 is present)
04-09-2017, 07:20 PM   #682
Senior Member




Join Date: Mar 2013
Location: Middle of Siberia
Photos: Gallery
Posts: 204
QuoteOriginally posted by Jeff Lopez Quote
I think this will mostly happen..if the K01 and the K50 share the same PRIME processor, then I dont see any problem, the would have the same registers. a mirror is not related to the exposure commands, like a shutter and aperture does. Probably it will hang if you select Bulb or mirror up for cleaning and I really doubt it, it most probably will return an Error as there is no way to provide feedback to the Prime..

Abel, could you provide a K30 firmware to mod a K01? it has less functions and probably will fit to the K01 DRAM
I surely can make that firmware.

The problem is K-01 firmware is 0x40000 bytes less than for K-30. And existing K-01 cameras simply don't know and don't expect there's something more to flash into their memory. Which means the K-30/50 firmware will most likely be installed incompletely.

If this additional block doesn't contain any logic necessary for routine camera functioning, the camera would work (most of the time).
And we can possibly install the whole K-30/50 firmware by firstly installing, say, version 1.05, and then the latest one - in this case 1.05 from K-30 will already know about full size of its update, and will install the next version completely. But it would be hardly possible to revert the camera to the original firmware.

And in case the additional block contains some initialization code, or some functions used during normal camera operation, that K-01 will simply hang right after starting.

To summarize:
It can be possible to install K-30/50 into K-01, but already broken camera should be necessarily be used for the experiments.
If someone has such camera, or can obtain one for a bargain price, I can provide the necessary firmware(s) for the testing.

---------- Post added 04-10-17 at 10:04 AM ----------

QuoteOriginally posted by tr13 Quote
One strange thing I see is 12MB xor decryption key.
Yes. Bearing in mind the decryption algorithm is rather simple, and even the XOR-key "seeds" are stored in the firmware file itself.

QuoteOriginally posted by tr13 Quote
As I understand it is obtained by xoring dumped firmware with encrypted one.
It was obtained by decompiling the decryption routine with Hex-Rays decompiler, then compiled and run.

QuoteOriginally posted by tr13 Quote
As far as I remember Pentax did not change algorithm for ages. So it can be good idea to add K30/K50 to my tool (as K-01 is present)
You are partially correct, the algorithm itself hasn't changed.

But there are two radical differences:
1. In older models the firmware file started with a non-encrypted header. And decryption started from the offset 0x100.
But in K-01/30/50/500, there's also a first block 0x000-0xF00, which should be decrypted using the same algorithm, then comes the same 0x100-bytes of plain header, which is started with the same XOR "seed" (HOKKTKIYHTNTMU) as in previous models.

2. In K-30/50/500, there is also a second block, with its own XOR key. The block starts at 0xC00000, and its header (well, it should be called a trailer) resides at 0xC3FF80 - it also starts with key "seed" (different one - SWaaTKouHI).

frmcrypt.exe version 3.00 you've posted on P-V.com correctly processes the main part of the K-01/30/50/500 firmwares, but leaves the starting portion intact, and it also incorrectly decrypts the second block of K-30/50/500 firmwares.
As far as I understand, it's a matter of slight changes to make your tool compatible with these firmwares.
And it would be just great if you can modify it and release an updated version, because all the community has right now is a firmware decoder/encoder which requires .Net 4.0+ for running, whereas your tool is made in Delphi(?) and runs even on my ancient Win XP

Last edited by ABel; 04-09-2017 at 09:36 PM.
04-09-2017, 09:30 PM   #683
Senior Member




Join Date: Mar 2013
Location: Middle of Siberia
Photos: Gallery
Posts: 204
Firmware 1.10 for K-500 is also available.
If anyone is willing to test it, please send me a PM

04-10-2017, 03:07 AM - 1 Like   #684
Pentaxian
PiDicus Rex's Avatar

Join Date: May 2013
Location: Melbourne, Australia
Posts: 1,196
QuoteOriginally posted by ZombieArmy Quote
Honestly if I did have money to spare and an extra k-01 I'm pretty sure I'd test it.
If I get a third, cheap, I'd try it.

QuoteOriginally posted by ABel Quote
The most significant difference is the firmware files for K-30/50/500 are slightly larger than for K-01.
That would be the different functions in stills, Some of the functions of the K-30 are not present in the K-01, nor is any need to have a display in the viewfinder.
04-12-2017, 10:36 AM   #685
Senior Member




Join Date: Mar 2013
Location: Middle of Siberia
Photos: Gallery
Posts: 204
Firmwares 1.10 for K-30 and K-500 are "released" here.
05-11-2017, 06:06 AM - 1 Like   #686
New Member




Join Date: May 2017
Posts: 3
QuoteOriginally posted by ABel Quote
Firmwares 1.10 for K-30 and K-500 are "released" here.
Hey there. New to the forum, I was looking for something similar for the K-X model. If I wanted to actually build that new firmware (I've got more than enough knowledge...), where do I start? You think what you've done could be ported to the K-X?
My main issues with my K-X is battery status, focus (I found that other site talking about adjusting the focus in debug mode) and under exposure for no specific reason when there is plenty of light.
05-11-2017, 07:19 AM   #687
mee
Pentaxian




Join Date: May 2010
Posts: 6,697
QuoteOriginally posted by frankl Quote
Hey there. New to the forum, I was looking for something similar for the K-X model. If I wanted to actually build that new firmware (I've got more than enough knowledge...), where do I start? You think what you've done could be ported to the K-X?
My main issues with my K-X is battery status, focus (I found that other site talking about adjusting the focus in debug mode) and under exposure for no specific reason when there is plenty of light.
It won't work. The K-30/K-50 used entirely different hardware from the K-x. Even if you could somehow force the K-50 firmware onto the K-x it would likely destroy the camera.
05-11-2017, 07:48 AM   #688
New Member




Join Date: May 2017
Posts: 3
So it'd be an effort from scratch to decompile the firmware & all then? too bad...
07-18-2017, 11:43 PM   #689
New Member




Join Date: Nov 2009
Posts: 1
Is it possible to implant PEF support in K-50 firmware?
08-17-2017, 03:50 AM   #690
Pentaxian
PiDicus Rex's Avatar

Join Date: May 2013
Location: Melbourne, Australia
Posts: 1,196
QuoteOriginally posted by frankl Quote
(I've got more than enough knowledge...)
I'm beginning to think, it'd be easier to have a team start from scratch, with the SDK's for the chipsets, and build custom firmware from the ground up.
'least that way, we'd get features people want.
Reply

Bookmarks
  • Submit Thread to Facebook Facebook
  • Submit Thread to Twitter Twitter
  • Submit Thread to Digg Digg
Tags - Make this thread easier to find by adding keywords to it!
bit, camera, card, chdk, code, data, debug, dslr, file, firmware, flash, fp, gps, instruction, k-30, k-50, k30, love, magic, module, notes, pentax, photography, pin, pins, sd, text
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
NY area SDM Hacking dappercorpmonkey Troubleshooting and Beginner Help 11 07-26-2013 04:15 PM
Nature Resurrecting some old images - Angry Birds! Julie Post Your Photos! 4 03-07-2013 10:41 AM
k-5 firmware hacking anyone? secateurs Pentax K-5 33 10-05-2012 03:05 PM
Hacking lens' memory plis Visitors' Center 6 11-28-2011 10:58 PM
Resurrecting a MX and Super ME LiMPiNg Pentax Film SLR Discussion 4 09-27-2011 02:55 PM



All times are GMT -7. The time now is 01:09 PM. | See also: NikonForums.com, CanonForums.com part of our network of photo forums!
  • Red (Default)
  • Green
  • Gray
  • Dark
  • Dark Yellow
  • Dark Blue
  • Old Red
  • Old Green
  • Old Gray
  • Dial-Up Style
Hello! It's great to see you back on the forum! Have you considered joining the community?
register
Creating a FREE ACCOUNT takes under a minute, removes ads, and lets you post! [Dismiss]
Top