![]() |
#1 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 64
Karma: 7786
Join Date: Jan 2012
Device: Kobo Touch
|
Kobo Touch Plugin Interface
Hi,
I played around with my Kobo Touch a bit tonight and wonder if the plugin interface (https://github.com/kobolabs/Kobo-Rea...ginInterface.h) is supposed to work with it? I set the development environment up as described on http://blog.ringerc.id.au/ and compiled the poker example, copied the .so to the reader but I can't get it to load. I noticed that the plugins are started depending on their mimetype and you can edit the sqlite-database such that you have a "book" that starts an application, by setting the mimetype of an entry in the content table to e.g. "application/x-games-Sudoku". While this works for sudoku, it doesn't for the poker example. It seems the .so isn't even properly loaded as some debug output I added doesn't appear in the stdout of nickel. Furthermore, I'm not able to restart nickel after killing it (http://blog.ringerc.id.au/2011/01/co...kobo-wifi.html). This causes the reader to lock up and resetting it all the time is rather annoying And, if the plugin interface doesn't work, has anyone investigated other methods to extend the firmware? I guess locally serving webpages might also work for simple stuff. |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,108
Karma: 78857258
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Remember; those instructions you posted were from the Kobo WiFi; NOT the Touch!
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 64
Karma: 7786
Join Date: Jan 2012
Device: Kobo Touch
|
Quote:
In the mean time, here is what I came up with. The old instructions are mostly correct, the only thing really missing was that I had to add --prefix= to the path in QT_EXTRA_ARGS and add -D QT_NO_QWS_CURSOR, in qt.sh. The sources for the hacked examples are attached. PluginInterface.h was missing an extra argument (pointer to PluginStatus, but unfortunately the definition of that class is missing) and I had to change some minor other bits to get it to compile/run. If anyone just wants to test it without installing the whole devenv, the compiled versions are in the archive as well. Just copy them to /usr/local/Kobo, open the KoboReader.sqlite database and duplicate some ebooks entry and change the mimetype to "application/x-games-videopoker". Then reboot the kobo, open the library and "read" that book. This should open either a largely blank page with a small "Hello Kobo Touch" or the poker game, depending on which library you copied. Input doesn't work yet, so there's not a lot more to do with it. Please note that this is highly experimental and might cause your kobo to explode. Last edited by ah-; 01-06-2012 at 10:04 AM. |
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jan 2012
Device: Kobo Touch
|
I tried building the packages in that repository with the latest Sourcery Lite toolchain. BusyBox didn't compile (not that important, later versions does) and Qt had problems with DBus and OpenSSL. Disabling those made it compile though. Which toolchain did you use? Also you probably shouldn't be changing Qt's target prefix, try using -hostprefix instead. No idea how to get Qt or Glibc (from the toolchain) to install on the rootfs.
Also have you tried to access i.MX508's USB recovery mode? The device should appear on USB as a non-mass storage device if the correct signal is sent to the SoC on boot. Hopefully one of Kobo Touch's buttons will send that signal. |
![]() |
![]() |
![]() |
#5 | ||
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 64
Karma: 7786
Join Date: Jan 2012
Device: Kobo Touch
|
Quote:
Quote:
|
||
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jan 2012
Device: Kobo Touch
|
Things do build a bit better with that toolchain (Qt still in progress).
What recovery solutions exists currently? USB recovery mode would be the ultimate since it doesn't require any working code on the device. Also have you tried to boot from the SD card? This would be nice so we can try building our own kernel without messing with NAND. Could you extract the kernel configuration from the device? (I don't have one yet ![]() |
![]() |
![]() |
![]() |
#7 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 64
Karma: 7786
Join Date: Jan 2012
Device: Kobo Touch
|
I agree, having USB recovery would be great, but in the mean time I'd say the default recovery (holding Home during startup) works fine as long as you don't mess with the bootloader and possibly the kernel.
As for the kernel, I haven't yet looked into that as I just accidently restored my kt yesterday and didn't reenable ssh yet. |
![]() |
![]() |
![]() |
#8 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 64
Karma: 7786
Join Date: Jan 2012
Device: Kobo Touch
|
Great news: QtScript is there and fully usable, so this might be a great way to develop plugins. I wrote a plugin that exposes QtScript over the network, so you can just telnet to your Kobo and mess with stuff. This allows access to pretty much everything exposed by Qt introspection.
Source (and some documentation) is at https://github.com/ah-/koboplugins, and attached is a binary version if you don't have the full development environment set up yet. Copy it to /usr/local/Kobo, reboot and open the library once to load the plugin. If you have any issues with it, just delete libqtscript.so and you should be back to normal. Example use: Telnet to your Kobo (port 1337) and execute "aw.findChildren("label")[0].text = "QtScript"" This changes the text of the "START" menu to "QtScript". Without compiling anything and interactive. |
![]() |
![]() |
![]() |
#9 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 64
Karma: 7786
Join Date: Jan 2012
Device: Kobo Touch
|
More news: I managed to get the basics to work and built a simple demo application. All it does at the moment is controlling the LEDs, but I'm planning to add more options like disabling the wifi timeout or hiding annoying UI elements.
As before, the source is at https://github.com/ah-/koboplugins and if you just want to try it, copy the attached library to /usr/local/Kobo. To activate it you have to open the library once, to deinstall it just delete libtweaks.so. |
![]() |
![]() |
![]() |
#10 |
Just me :)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 106
Karma: 1282
Join Date: Jan 2012
Location: Germany
Device: Kobo Touch
|
Would it be easy to add shortcuts to the menu this way like the "tweaks"-entry to existing Kobo-Features like the Browser?
|
![]() |
![]() |
![]() |
#11 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 88
Karma: 39373
Join Date: Apr 2003
Location: Austria
Device: Kobo Touch
|
Quote:
In addition I've added a menu entry to toggle the airplane mode. Attached is a 'KoboRoot.zip'. Just attach the reader to your PC and extract the file to the .kobo directory. Unplug the reader and it should install automatically. As previously mentioned open the library once to start the plugin. @ah-: is there a chance that I could commit my changes to your git repo. Last edited by ikarus9999; 01-23-2012 at 03:01 PM. |
|
![]() |
![]() |
![]() |
#12 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 64
Karma: 7786
Join Date: Jan 2012
Device: Kobo Touch
|
Haha, I just finished the new version with just that feature. It also supports hiding the recommendations from the home screen, since many people wanted this in the future firmware feature request thread.
If you have more ideas of what to add/alter please share them. The installation procedure is the same as above. Quote:
Please feel free to improve everything. Edit: Oh, and before I forget it: I think we should come up with some simple deinstallation procedure if we start to distribute the plugin as easily installable zips. Just deleting it via ssh is easy, but not everyone has that set up. Maybe flashing some other file so the original gets overwritten, or some script that automatically deletes it. I don't want anyone to have problems because of the plugin if the Kobo firmware should ever update itself and change the interfaces. Also checking the firmware version on load might be a good idea. And lastly, the qtscript plugin is potentially dangerous if you're not in a network you trust, since it's only intended for development and uses no authentication. Libtweaks.so works fine without it, so don't install the qtscript plugin if you don't know what it does. Last edited by ah-; 01-23-2012 at 03:40 PM. |
|
![]() |
![]() |
![]() |
#13 |
Just me :)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 106
Karma: 1282
Join Date: Jan 2012
Location: Germany
Device: Kobo Touch
|
That looks great
![]() Then, like for the browser in the menu or in a buttonbar, we would need icons... If you tell me what the ideal format and proportion would be for additional icons, I could create some, maybe as a start for the browser in the menu as seen above and new one for the tweaks... For airplane-mode there is probably already one in the system that could be used ![]() |
![]() |
![]() |
![]() |
#14 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 137
Karma: 207434
Join Date: Dec 2011
Device: Kobo Glo
|
Quote:
|
|
![]() |
![]() |
![]() |
#15 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 88
Karma: 39373
Join Date: Apr 2003
Location: Austria
Device: Kobo Touch
|
I'm currently playing around with the main menu.
So far I've been able to delete all existing menu items and readding them on demand. I've also added a dictionary entry in the menu. My next step is to enhance ah-'s Configuration dialog to incorporate all options. I'm also working on a deinstallation routine as well as a version check. |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
User Interface Plugin Creation/Debug process | ldolse | Development | 15 | 11-04-2011 09:15 AM |
Having problems with Kindle Device Interface/Page # Plugin | bfollowell | Plugins | 1 | 08-10-2011 05:53 PM |
Reset Sony Device Interface plugin? | NLight95 | Devices | 2 | 04-04-2011 06:40 PM |
Writing an interface action plugin | kiwidude | Plugins | 21 | 11-11-2010 04:11 PM |
Device interface plugin - nook | badmadbug | Plugins | 2 | 09-06-2010 11:03 AM |