Thread: DPT-S1 recovery
View Single Post
Old 03-01-2015, 11:04 PM   #2
etn40ff
Member
etn40ff began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Feb 2015
Device: DPT-S1
So I took the plunge and gave it a spin myself. Here is the, somewhat long and boring, report on what happened. TL;DR: nothing.

This is the content of rupor-rescue.7z:
Code:
OS Firmware/
OS Firmware/files/
OS Firmware/files/update.img
gserial.inf
gserial.inf is needed to let Windows recognize the e-reader as a serial port when in rescue mode.
update.img is an ancient linux filesystem:
Code:
# file OS\ Firmware/files/update.img
OS Firmware/files/update.img: Linux rev 1.0 ext2 filesystem data, UUID=ddaa282f-f831-4e1e-a80e-04c2a71d3cbf
You can easily mount it with a loop device and poke around
Code:
# mount  -o loop OS\ Firmware/files/update.img /mnt
It turns out that it is based on a Freescale rescue image with some extra bits pulled in by Sony:
Code:
# cat /mnt/etc/issue
arm-none-linux-gnueabi-gcc (GCC) 4.1.2
root filesystem built on Thu, 09 Dec 2010 16:54:36 +0900
Freescale Semiconductor, Inc.
meant to run on a 2.6.35.3 kernel. The kernel is nowere to be found. I can't read Russian but from what I could gather from google translate this rescue image requires the device to be in an almost working state. In particular the boot partition should be there. I assume this is meant to boot using the kernel already on the device. This is nonsensical unless you put things in prospective: this was meant as an update tool and was hacked into a recovery system (I assume by rupor).

Which lead us to the bits added by Sony. There is a dir called /diag with several scripts and commands that look like the backhand of the TestApp. Then there is another dir /usr/local/sony with a script performing the update. This script is launched by /etc/rc.d/rc.drbd which was launched by etc/rc.d/rcS. Whoever created this rescue commented out the relevant part to prevent rc.drbd from loading.
To be extra safe I removed both dirs. The rest of the image looked fine so I put it in the device and rebooted into recovery-mode. It booted once, the led blinked some then rebooted into standard mode. I had a computer hooked up on the usb the whole time and looked at kernel messages. Nothing until the system is back up in normal mode. In particular no serial port.

Among the many things that could be going wrong my favourite is the following: the kernel onboard is not 2.6.35.3 (which is definitely old) and does not load the modules.
I think the usb to serial port is provided by g_multi.ko and arcotg_udc.ko. One could try to force load the modules...maybe some other day.

One other insight one can gather from the examination of the scripts in /usr/local/sony is that to extract any update file we need a dump of part of the mmc. I have no idea on how to get one at the moment.

Should any of you have other ideas please chime in.
etn40ff is offline   Reply With Quote