![]() |
#16 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@frostschultz:
Indeed, thanks for the pointer ![]() Code:
┌─(ROOT@(none):pts/0)──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(/mnt/onboard/.adds)─┐ └─(0.00:54%:16:46:100%:#)── strings /usr/local/Kobo/libnickel.so.1.0.0 | ag /dev/input ──(Fri, May 20)─┘ /dev/input/event1 /dev/input/event2 /dev/input/event0:keymap=keys/device.qmap:grab=1:repeat-rate=0:repeat-delay=0 As for sickel, I just SIGSTOP'ed the lot of 'em ;D. That might in turn mess wifi up, either for KOReader or Nickel, but, meh, good enough for quickly testing stuff. |
![]() |
![]() |
![]() |
#17 |
Pain in the arse
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
|
What if you trigger a fake power button event?
|
![]() |
![]() |
Advert | |
|
![]() |
#18 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@Lucas Malor: Meaning what, exactly? I'm not aware of such a built-in possibility on Kobos (unlike on Kindles).
And in any case, we'd still need a way to actually trigger that. Since we're out of physical input devices, that means an extra UI element somewhere. Last edited by NiLuJe; 05-20-2016 at 07:23 PM. |
![]() |
![]() |
![]() |
#19 |
Pain in the arse
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
|
Read it here: https://www.mobileread.com/forums/sho...0&postcount=94 I think there's a way to simulate a long power slide too.
I suppose then nickel will fire a busybox shutdown -h now. If you'll disable it, you can shutdown nickel safely. |
![]() |
![]() |
![]() |
#20 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@Lucas Malor: That's a long-press over here, which means a shutdown (of the *system*).
|
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Pain in the arse
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
|
Yes, but I suppose it's nickel itself that fires a `busybox poweroff` when the power slice is long-pressed. If you move the `poweroff` executable, wait for nickel death and restore it, nickel will be terminated as intended without OS shutdown.
|
![]() |
![]() |
![]() |
#22 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@Lucas Malor: It wouldn't appear so.
Code:
┌─(ROOT@(none):pts/0)───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(/)─┐ └─(0.33:31%:19:33:96%:#)── strings /usr/local/Kobo/libnickel.so.1.0.0 | grep -e halt -e shutdown -e poweroff ──(Sat, May 21)─┘ _ZN11EventEngine8shutdownEv _ZN11EventEngine12shutdownSlotEv shutdownSlot shutdownSlot |
![]() |
![]() |
![]() |
#23 | |
cosiñeiro
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,390
Karma: 2200169
Join Date: Apr 2014
Device: BQ Cervantes 4
|
Quote:
![]() SDL is broken on kobos because fbcon video driver relies on VT switching, so the binary can't be called directly (it waits forever on VT_WAITACTIVE). Code:
[root@kobo ~]# zcat /proc/config.gz | grep CONFIG_VT CONFIG_VT=y # CONFIG_VT_CONSOLE is not set # CONFIG_VT_HW_CONSOLE_BINDING is not set The only solution I found is run the binary in bg and send a SIGTERM just after that. Code:
#!/bin/sh SDL_NOMOUSE=1 ./fbprint $@ & pid=$! sleep 0.3 kill -15 $pid I wonder if this does the trick for you. Last edited by pazos; 05-21-2016 at 04:47 PM. Reason: more info |
|
![]() |
![]() |
![]() |
#24 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@pazos: That's better than nothing, yeah ;p. I'm all for it, if you're willing to open the code
![]() |
![]() |
![]() |
![]() |
#25 |
cosiñeiro
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,390
Karma: 2200169
Join Date: Apr 2014
Device: BQ Cervantes 4
|
Of course !!!
Don't expect good code, BTW this depends on freetype, SDL & SDL_ttf I use VeraMono.ttf, but any monospace font will work Last edited by pazos; 05-21-2016 at 04:59 PM. |
![]() |
![]() |
![]() |
#26 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@pazos: Thanks
![]() Don't worry, at the very least that's good motivation and a working example ![]() |
![]() |
![]() |
![]() |
#27 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
It hasn't been mentioned, but have you enabled the nickel logging? I have the following in my config file: Code:
[DeveloperSettings] EnableDebugServices=true EnablePacketDump=true DebugPM=true EnableInspector=true Edit: I should just add for anyone who sees this and thinks it's a good idea to add these lines. The debug services also enables a telnet service. This tends to block the WiFi from turning off and the device from automatically sleeping. And that runs the battery down a lot faster. I only use these options when I am debugging something. Last edited by davidfor; 05-21-2016 at 09:18 PM. |
|
![]() |
![]() |
![]() |
#28 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@davidfor: Now that's interesting, thanks! And might also come in handy to dig into the suspend crap for KOReader...
|
![]() |
![]() |
![]() |
#29 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 65
Karma: 200153
Join Date: Apr 2016
Device: Kobo Glo Hd
|
Cute tool NiLuJe!
I was looking a way to execute a custom .sh script from Nickel, and I see this can be done with kfmon and a png file. Nice ;-) So I can download a zip file with patches from Kobo browser, and later press on a .png to process it in a bash script. But going further, could it be possible to use kfmon to watch for a non-png file ? In this case I want to monitorize if a zip file exists, to process it. For example, something like this: [watch] filename = /mnt/onboard/download.php ; Zip file downloaded from pip.cat/khd/kobo action = /mnt/onboard/.adds/autopatch/process.sh skip_db_checks = 1 process.sh should unzip file, delete, generate a KoboRoot.tgz in .kobo and restart nickel to process KoboRoot. As if we copied it via usb and disconnect. Are there other ways to execute a script by request, not at boot time ? Maybe we can change an unused game to execute a .sh instead of his code ? |
![]() |
![]() |
![]() |
#30 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@pipcat: Right now, nothing prevents you from watching something other than a PNG file, it's just that we know PNGs create a tile, making them easily user-facing (and the amount of stray OPEN/CLOSE events on those is limited)
![]() As for your specific idea, you cannot watch for a non-existent file with inotify (and, in kfmon's case, trying to setup a watch for a non-existent file is a fatal error that will cause the daemon to shutdown). In this case, a simple workaround would be a wrapper script: watch for an always-there tile (i.e., a PNG), which will trigger a script which will then check for the existence of your zip file and process it if need be. That means user-interaction, though, it won't automagically run when the zip file appears (if that was what you were trying to achieve). |
![]() |
![]() |
![]() |
Tags |
fmon, kfmon, kobo, launcher |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help converting file from HTML>EPub. File is divided in several pages I want to merge | leito360 | Conversion | 6 | 02-19-2016 12:31 PM |
table of content file link not add in toc.ncx file | bhambhu | Conversion | 0 | 01-14-2016 01:40 AM |
FILE. Program to identify a file's format by scanning binary data for known patterns. | twobob | Kindle Developer's Corner | 3 | 05-13-2013 12:59 PM |
AZW2 based launcher for K3 | jmseight | Kindle Developer's Corner | 4 | 04-02-2012 07:53 AM |
Opus Updating EPUB file won't change publisher data on file listing | spaze | Bookeen | 1 | 03-08-2011 01:34 AM |