View Single Post
Old 09-20-2013, 09:46 PM   #24
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736094
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
This?

Yeah, that'll work. The downside is that the filename is unpredictable.

You could create a slightly patched "screenshot" executable like this:
Code:
sed -e 's/\/mnt\/us\/screenshot_%Y_%m_%dT%H_%M_%S%z.png/\/tmp\/screenshot_for_kual_and_eips_hack.png/' /usr/sbin/screenshot > screenshot.hacked
... and then use screenshot.hacked instead. It will always create the screenshot as /tmp/screenshot_for_kual_and_eips_hack.png.

Just make sure that the file "name" is exactly the same length as the original one in the binary, i.e., that the screenshot.hack and screenshot files end up with the exact same file size again.*

(No, I don't attach the patched file for copyright reasons, and I suggest that you don't ship it either. You could just create it on the fly within the script, if it doesn't exist).

(*) I didn't find a way to tell sed to insert a zero byte, that would be cleaner. But for some reason \x00 doesn't work.

PS: Tested on Paperwhite only. I'm pretty confident that this would work on the Touch too, but I'm not sure about other devices (e.g. K3/K4).
ixtab is offline   Reply With Quote