Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 06-13-2014, 06:41 PM   #31
frafra
Junior Member
frafra began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2014
Device: Kobo Aura HD
Hi all!
I've just bought a Kobo Aura HD and I'm trying to dump internal microsd without using another memory.

This is my script:
Quote:
#!/bin/sh

insmod /drivers/ntx508/wifi/sdio_wifi_pwr.ko
insmod /drivers/ntx508/wifi/dhd.ko sleep 2
ifconfig eth0 up
wlarm_le -i eth0 up
wpa_supplicant -s -i eth0 -c /etc/wpa_supplicant/wpa_supplicant.conf -C /var/run/wpa_supplicant -B sleep 2
udhcpc -S -i eth0 -s /etc/udhcpc.d/default.script -t15 -T10 -A3 -f -q

mount 2>&1 | nc 192.168.1.5 2223

mount -o ro,remount / 2>&1 | nc 192.168.1.5 2223
mount -o ro,remount /mnt/onboard 2>&1 | nc 192.168.1.5 2223

# On the other side: $ nc -l 2222 > dump.img.xz
(dd if=/dev/mmcblk0 bs=8M | xz | nc 192.168.1.5 2222) 2>&1 | nc 192.168.1.5 2223

# restore mounted devices as expected
mount -o rw,remount / 2>&1 | nc 192.168.1.5 2223
mount -o rw,remount /mnt/onboard 2>&1 | nc 192.168.1.5 2223
Obviously 192.168.1.5 is my pc local ip address, and I've two nc processes that are listening for data.

The first part is taken from https://bitbucket.org/david_weese/ko...7261?at=master (I'm not sure if wifi connection works while updating) while the rest is taken from this discussion.

The strange think is that... Nothing happens! It just reboot itself, nothing more. As you can see, I'm using nc in order to try to understand what's happening and to save my dump, but no data is sent. Is there a better way to have some kind of feedback, like text on screen while updating?

Another question for you: why do you copy the code from upgrade-wifi.sh provided with the firmware? It doesn't seem to do anything useful because there's no real upgrade.

Last edited by frafra; 06-13-2014 at 06:42 PM. Reason: Clarification regarding ip and netcat
frafra is offline   Reply With Quote
Old 06-14-2014, 10:19 AM   #32
frafra
Junior Member
frafra began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2014
Device: Kobo Aura HD
Other code work flawlessly. I suppose that during updates network is down and I've not found yet how to bring it up. Any suggestion?

By the way, I also tried to add this test code at the end of rcS:

Quote:
usleep 10000000
echo "wow" | /usr/bin/nc 192.168.1.5 2223
usleep 10000000
/usr/bin/wget http://192.168.1.5:2223/wow -T 1 -t 1 > /dev/null
No network signal from Kobo by the way, even if everything is up, including wifi (note: this code is placed after nickel and dhcpcd, just at the end of rcS).

I also tried to run this code in background before nickel stars, without success. Kobo web browser can access to 192.168.1.5 (my pc local ip), so it's not a network problem.

What it could be?
frafra is offline   Reply With Quote
Old 06-14-2014, 03:04 PM   #33
frafra
Junior Member
frafra began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2014
Device: Kobo Aura HD
Ok! I was able to dump the entire internal microsd without open my Kobo and without using an external microsd

I figured out that my Kobo wasn't connected even if wifi was up, so I changed rcS in order to wait for network and creating a reverse shell.

This is the code I've added at the end of rcS:

Quote:
(code=1;
while [ $code -ne 0 ]; do
usleep 10000000;
echo "# Hello world!" | nc 192.168.1.5 2223;
code=$?;
done;
nc 192.168.1.5 2223 -e /bin/sh
) &
...where 192.168.1.5 is my pc address where I run netcat like this:
Quote:
nc -klp 2223
When Kobo update is finished, you can turn off wifi and start the browser, so the network goes up and I can start send command from my computer (xz is for compression). Keep in mind that I'm using a GNU/Linux box

Quote:
nc -lp 2222 | xz > dump.img.xz
Then, on the previous nc instance (where I have my Kobo reverse shell) I launched:

Quote:
pkill nickel
mount -o ro,remount /mnt/onboard
mount -o ro,remount /
dd if=/dev/mmcblk0 bs=8M | nc 192.168.1.5 2222
mount -o rw,remount /
mount -o rw,remount /mnt/onboard
/usr/local/Kobo/nickel -platform kobo -skipFontLoad &
While dd is running, you can look your dump growing with:

Quote:
watch du -h dump.img.xz
It will take a while, about ~15 minutes. My dump.img.xz for Kobo Aura HD (almost new) is ~800 MB.

Possible improvements:
  • Don't touch rcS, put code under update-wifi.sh (it requires starting network with some commands)
  • Send compressed image, reducing network stress (xz -c maybe)
frafra is offline   Reply With Quote
Old 09-05-2014, 08:36 AM   #34
silver217
Junior Member
silver217 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Aug 2014
Device: kobo aura
Does this work with the Kobo Aura with 3.8.0 ?
I used a micro-SD card 8 gig and FAT32 formatted, but no Dump folder
and back within a minute.
silver217 is offline   Reply With Quote
Old Yesterday, 10:05 PM   #35
swamp thing
Enthusiast
swamp thing began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Nov 2013
Device: Kobo Touch
Quote:
Originally Posted by met67 View Post

....
if [ -e /mnt/sd/KoboDump ]; then
# mount / as readonly and unmount internal FAT
mount -o remount,noatime,nodiratime,ro /dev/mmcblk0p1 /
umount /mnt/onboard
....

[/CODE]
Why do we need to unmount the internal partition here?



Thanks,
ST

Last edited by swamp thing; Yesterday at 11:04 PM.
swamp thing is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kobo ereader firmware SD card MrLynx93 Kobo Reader 3 06-25-2012 03:31 PM
Firmware Update Amazon's Automatic Firmware Updates Aiadi Amazon Kindle 9 09-23-2010 02:50 PM
Automatic sync to a memory card (reader) klikklak Calibre 3 03-26-2010 11:42 PM
Semi Automatic copy of content to Kindle mowbray Amazon Kindle 7 02-03-2010 06:29 PM
How to dump firmware? gwynevans Sony Reader Dev Corner 16 05-10-2009 03:24 PM


All times are GMT -4. The time now is 08:11 PM.


MobileRead.com is a privately owned, operated and funded community.