Quote:
Originally Posted by cscat
Wish you were my teacher when I grow up and learned to program. Like really... No "thank you" can be enough for your efforts.
And by the way, I didn't want to deviate that thread of yours from main topic by saying this: I admit I panicked but hard resetting was not helpful as I tried it then. Oh and when the screen froze, yes I had SSH for a while but after some moments KT restarted and I had no way of having SSH. So yes, I could do something before it rebooted but not after that. Therefore, I still think you are right. 
|
That is really strange. If you look at the script code, you will see that it does not write to anything except the visible portion of the framebuffer device. The only possible causes for your symptoms that I can see that would make your kindle not work after a hard restart would be SOMETHING ELSE that made changes to your /dev/mmcblk0p1, or perhaps your battery needed to be recharged.
This script (temporarily) pauses (killall -stop) both cvm and Xorg, but if you exit normally (type "exit" on K3 keyboard), it resumes (killall -cont) both of them. They would automatically restart if you restarted your kindle.
There have been no reported bugs in any external programs called by this script (eips, hexdump, dd, waitforkey). On the touch, waitforkey returns keycodes for Home, 1-finger touch, 2-finger touch, left/right/up/down rotations, and headphone-jack insert and removal. The rotation "keys" only return "pressed" status, but the other events also return "released" status. This script normally waits for keypresses in the "waitforkey" program.
Even picking up the kindle is likely to return a "rotate-up" keycode, but none of the touch keycodes are processed so it would just go back and wait for another key. Silently sucking up all the keypress events like this would LOOK like it is bricked, but again, restarting would put everything back to normal (unless SOMETHING ELSE bricked it).
To Do: I am now gathering all my script code snippets into one program that supports all the OLD functionality (including graphical arts demos), plus new features, including onscreen keyboards and other GUI elements (radio buttons, check boxes, sliders, etc.). Then AFTER it all works as a script, I will go through a process of translating it all to C in successive-refinement "baby steps".
The point of starting with scripts is 3-fold:
1) Teach shell scripting (teaching is the best way to learn).
2) Develop kindle-specific code with the most efficient algorithms (required for scripts).
3) Create kindle debricking tools with minimal external dependencies (but good fo general use too).
P.S. One of my K4NTs has a non-functional diags now. The menu comes up as an all-black screen. All I did was testing a fix for somebody where I just did a "dd if=/dev/zero of=/dev/mmcblk0p3" in a RUNME.sh script. It still boots main, so the startup scripts DID rebuild it. At some point, I will try flashing a diags kernel and partition. This is part of the reason I wrote the "getkernels" script. These devices seem to be rather touchy and unpredictable at times.
I think that if your touch really DID brick, it was probably a firmware or startup script bug triggered by an unclean shutdown. But we will not know for sure unless we can predictably duplicate your symptoms, and I do not have time to try that. At least you did not lose your content, and that is a good thing...