Thread: Kobo Bug thread
View Single Post
Old 12-14-2014, 08:45 AM   #570
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by frostschutz View Post
Not sure if this is the right place, but anyway...

The Kobo firmware accepts incomplete KoboRoot.tgz (cancelled download, lost connection, ...) and corrupts itself when extracting them. This is because it uses zcat to verify the KoboRoot.tgz, which fails to raise any error for incomplete files, and tar subsequently extracts half an update and even leaves outright corrupted files (like half a library). Worst case the device is bricked. Using tar instead of zcat to verify the tar file would catch most of such errors.

(in /etc/init.d/rcS)

Code:
zcat /mnt/onboard/.kobo/KoboRoot.tgz > /dev/null && tar zxf /mnt/onboard/.kobo/KoboRoot.tgz -C /
should be

Code:
tar tzf /mnt/onboard/.kobo/KoboRoot.tgz > /dev/null && tar zxf /mnt/onboard/.kobo/KoboRoot.tgz -C /
# or alternatively
tar Ozf /mnt/onboard/.kobo/KoboRoot.tgz > /dev/null && tar zxf /mnt/onboard/.kobo/KoboRoot.tgz -C /
(same for Kobo.tgz)
Could you please explain this a little more. zcat will throw an error as soon as a single byte of KoboRoot.tgz is missing. Won't it?
tshering is offline   Reply With Quote