shermp / Kobo-UNCaGED

UNCaGED, for Kobo devices
GNU Affero General Public License v3.0
95 stars 7 forks source link

Feature request: allow loading apps wirelessly with Kobo UNCaGED #39

Open cpick opened 3 years ago

cpick commented 3 years ago

I was wondering if it would be possible to use Kobo UNCaGED's wireless connection to load/update apps on my Kobo?

If mu (superficial) understanding is correct, Kobo UNCaGED creates a (simulated) USB connection to the Kobo and then ferries files over by finding and connecting to Calibre? Would that mean that it would be possible to have Calibre (possibly with a new plugin) send over application files?

I personally have NickelMenu, KOReader, Plato, and Kobo UNCaGED (and thus NickelDBus) installed. For most of those it seems like updates have comprised of unzipping their releases into their .adds/ directory (and the on-time setup of their configuration file in .adds/nm), but perhaps NickelMenu is more complex with its use of a KoboRoot.tgz?

I have a decent amount of Linux development experience (albeit none on Kobo) and would be interested in helping out if this seems reasonable?

I would love to never have to find my USB cables and adapters again!

shermp commented 3 years ago

This is a feature I would be interested in, but it's not something that's suitable for Kobo-UNCaGED.

KU does not really work like you are thinking. It does not simulate a USB session (it used to, so I could do stuff behind Nickel's back, but that was a bit fragile). What it does is use the same protocol/driver used by the Calibre Companion applications to communicate with Calibre. This is a very custom, specific to Calibre protocol. Thinking about it further, it probably could COULD be done, but I don't think it SHOULD be done.

Note, it is already possible to transfer stuff wirelessly to a Kobo using telnet/SSH/ftp/wget (I do it all the time when developing).

One option is to run a web server on the Kobo that allows uploading files, and optional restart.

Another, more ambitious option is to create some sort of formal 'package management' solution that would allow browsing and installing mods directly on the Kobo.

All the building blocks now exist to create something now, mainly NickelMenu and NickelDBus.

CC @NiLuJe and @pgaskin for their thoughts on the matter.

NiLuJe commented 3 years ago

I already kind of reinvented the wheel to handle updates to KoboStuff, because the reboot is most often unnecessary (or not right now at least), and zstd allows for much, much, much faster decompression speed (which is non-negligible for stuff like Python). And never actually touching the storage until decompression was kind of a plus, too ;).

c.f., here.


This isn't the first time I reinvented the wheel like that, there was a bit of a precendent on Kindle ;p.


But that works because it's not really a package management system, it's just a cute hack to install/update my own stuff ;).

NiLuJe commented 3 years ago

That's essentially a lot of faffing about just to run curl --location --fail "${URL}" | bsdtar -xf - -C / ^^.