Thread: Kobo Bug thread
View Single Post
Old 12-13-2014, 07:42 PM   #568
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,282
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
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)

Last edited by frostschutz; 12-13-2014 at 08:31 PM.
frostschutz is offline   Reply With Quote