Quantcast
Channel: MobileRead Forums - Kobo Developer's Corner
Viewing all articles
Browse latest Browse all 1563

Usb Debug

$
0
0
When the reader is connected to the computer, this hack will

- display a happy face if the Kobo umounted the filesystems properly.
- display a sad face if it's still mounted even though it should not be.

If you see a sad face, you might have filesystem corruption and/or still running processes doing the wrong thing.

While the USB is connected it will keep checking state for about 5 minutes, so if some process is slow to free resources you will see a sad face first and it turns into a happy face. (But if the filesystem was mounted/used while it was still a sad face, there might still be corruption).

A possible cause for the sad face will be stored in /tmp/UsbDebug.log

After making this I found a bug in one of my own mods :smack:

This is mainly to debug other mods that may behave incorrectly during a USB connection. It's not recommended for regular users, without telnet access you can't get at the log, and there is no uninstall routine. I might add such things later, not sure.

I should also point out that this is by no means a complete check. It only considers obvious mounts; processes with open files or PWD; and libraries linked in by running programs. It does not cover loop devices, bind mounts, and more obscure ways to keep the filesystem busy.

Attached Files
File Type: zip KoboRoot-UsbDebug.zip (21.5 KB)

Viewing all articles
Browse latest Browse all 1563

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>