2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

445 Commits

Author SHA1 Message Date
NiLuJe
879b593455 Refresh the UI properly on exit on more Kindle FW
This broadens the fix applied to FW >= 5.6.5 to the whole range of FW
5.x, because it appears to be needed on some FW 5.3.7.x versions...

Fix #1924
2016-04-12 16:17:17 +02:00
chrox
f3e0d44cc4 disable jit on some modules on android
to make koreader on Android  more stable

and with these opt params:
```
require("jit.opt").start("sizemcode=64","maxmcode=64", "hotloop=10000")
```

The strategy here is that we only use precious mcode memory (jitting)
on deep loops like the several blitting methods in blitbuffer.lua and
the pixel-copying methods in mupdf.lua. So that a small amount of mcode
memory (64KB) allocated when koreader is launched in the android.lua
is enough for the program and it won't need to jit other parts of lua
code and thus won't allocate mcode memory any more which by our
observation will be harder and harder as we run koreader.
2016-04-07 23:43:58 +08:00
Qingping Hou
ff273158af bump luajit-launcher 2016-03-21 01:11:55 -07:00
Qingping Hou
dceaa01250 minor: redirect all output to crash.log 2016-03-17 21:55:46 -07:00
Qingping Hou
8621720d19 bump base and luajitlauncher 2016-03-16 22:57:17 -07:00
Frans de Jonge
b8b0684e30 Add a comment with 'from_nickel', fixes #1889 2016-03-15 18:12:01 +01:00
Qingping Hou
55fa046d49 android: set android log tag to KOReader 2016-03-13 19:49:13 -07:00
chrox
3a9cb659d1 add OTA update on Android 2016-03-13 23:43:05 +08:00
NiLuJe
770625d756 Tweak the 'IR down on resume' workaround...
Only apply it when started from nickel, because I'm guessing we'd have
seen a number of reports of this if it happened more widely...
2016-03-02 18:24:14 +01:00
NiLuJe
ea382aea86 Tweak the sd is ro check a bit
Inspired from MRPI, but without a strict check of the device name,
because I'm not sure it'll be the same across the whole range of
Kobos...
2016-03-02 18:24:13 +01:00
NiLuJe
150aac1630 More comment tweaks re: Kobo suspend 2016-03-02 18:24:13 +01:00
NiLuJe
06e1bd4ed2 Slightly more accurate comments re: Kobo suspend 2016-03-02 18:24:10 +01:00
NiLuJe
fe13af9d7e More Kobo suspend tweaks...
Basically more loging to debug suspend issues...
AFAICT, having anything plugged in over USB will screw things up, for
instance.
2016-03-02 18:09:38 +01:00
NiLuJe
6c8bbfd470 Unbreak Kobo frontlight -> off when suspending.
If no-one touches anything, flState stays false...
And anyway, we should unconditionally disable the fl on sleep.
2016-03-02 18:09:38 +01:00
NiLuJe
b0c2821ed8 More accurate comment.
I think better on a full stomach ;p.
2016-02-29 18:09:24 +01:00
NiLuJe
278f060c2a Disable the Kindle passcode while we're running
Because we cannot deal with it properly...
We'd need to be able to stop eating all input, and have a lot of luck
with refresh timings to actually have the popup visible at the right
time.

TL;DR: it's a mess, kill it with fire.

Fix #1811
2016-02-29 17:09:44 +01:00
NiLuJe
4510625d37 Unbreak native screensavers on Kindle >= 5.7.2
Which I broke the last time I touched this.
NOTE: I'm not quire sure why the bbsave/bbrestore on stop/resume did a
double check (screensaver & charging), because that effectiely disabled
it when charging, which I don't quite understand...

Also makes sure the needsScreenRefreshAfterResume flag is honored on
Kindles, because we need it on FW >= 5.7.2

Note that this *breaks* the behavior with passcode enabled, which was
unwittingly fixed in said previous changes...

re #1811
2016-02-29 16:59:15 +01:00
Qingping Hou
427abd1cf6 bump base for android fix 2016-02-28 12:17:13 -08:00
zijiehe
e7b8bdcde2 Check whether sd card is presenting and mounting as RO, before do the real remount 2016-02-23 20:46:57 +08:00
zijiehe
38553b5ef8 Mount SD card as RW on kobo, but ignore errors, since we may not have sd
card installed.
2016-02-22 17:23:43 +08:00
NiLuJe
693e732a71 Fix exit when running from KUAL on FW >= 5.6.5
Properly refresh the screen with useful stuff, instead of leaving
us hanging with an unusable mix of framework and our own crap.
2016-02-21 16:36:05 +01:00
NiLuJe
af743d106e When started from KUAL on FW >= 5.6.5...
try to refresh the screen with more useful stuff on exit.

And because I forgot in my last commit, the issue was reported here:
http://www.mobileread.com/forums/showpost.php?p=3258045&postcount=903
2016-02-21 16:27:07 +01:00
NiLuJe
d3333fe81d Prevent the status bar clock from peeking out...
When launched from KUAL on FW >= 5.7.2
2016-02-21 16:18:05 +01:00
NiLuJe
6413390490 Make Amazon's additional CJK fonts available to us
Should be a no-op on systems which don't have any.
Fix #1802
2016-02-21 16:07:26 +01:00
Qingping Hou
65455cee23 bump luajit-launcher 2016-02-12 21:25:05 -08:00
Qingping Hou
cc8e079548 doc: update description for KUAL 2016-01-09 15:51:24 -08:00
Cosmin Gorgovan
856ec6d075 Mark suspend.sh for Kobo as executable
Otherwise suspend fails to work when running koreader from a FS
which supports execute permissions.
2016-01-03 00:32:10 +00:00
chrox
f3dbf9ce2e move mmap workaround to android-luajit-launcher 2015-10-25 12:34:20 +08:00
chrox
3df4832265 fix mcode allocation failure on Android
This workaround makes a reservation of mmap slots that are hopefully
near the address of `mcode_alloc_at`. Then it unmaps those slots and
lets luajit allocate a large slot for mcode.
2015-10-24 23:35:21 +08:00
NiLuJe
f9925a8c82 Play with the Kobo suspend script...
Because apparently it's not behaving as it should? IDK...
2015-10-22 14:16:05 +02:00
NiLuJe
29f14491e1 Forgot this bit in a previous commit. 2015-10-16 02:54:07 +02:00
NiLuJe
5979f9f855 Better and more complete status bar handling.
When runnning from KUAL on FW >= 5.6.5
2015-10-16 02:40:03 +02:00
NiLuJe
55fa3db6a1 Minor tweak to handle FW 5.6.5 better...
When launching KOReader with the framework up from KUAL...
Our gentle hide/unhide method doesn't work anymore, which leads to
various issues, the most obvious being not getting a refresh to the
default UI on exit...
2015-10-16 02:32:32 +02:00
chrox
5bab00ff9b add apparmor.openstore file for openstore submission 2015-10-06 22:15:38 +08:00
chrox
a60544b1ad Koreader Ubuntu-touch port
Currently only tested on Ubuntu-touch emulator with framework
ubuntu-sdk-14.10 for armhf.
The ubuntu-touch port is binary compatible with the Kobo port
major changes in this PR are:
1. rename the emulator device to sdl device since both the emulator
and the ubuntu-touch target use libsdl to handle input/output.
2. ubuntu-touch app has no write access to the installation dir so
all write-outs should be in a seperate dir definded in `datastorage`.
2015-10-03 14:48:51 +08:00
chrox
cf56f6a6e5 update luajit repo url 2015-09-13 13:21:14 +08:00
chrox
b65b70fec6 update base and luajit-launcher 2015-09-13 04:08:17 +08:00
NiLuJe
d6ab3b5224 Fix previous commit
So it actually works as intended ;p.
2015-09-06 17:00:31 +02:00
NiLuJe
2058209aa8 More Kindle startup tweaks on legacy devices
Don't try to setup iptables if it's not there (K2/DX/DXG).
Note that we'll do it on the K3, but it'll be useless there (no wifi).
2015-09-06 16:53:24 +02:00
NiLuJe
f85c10e3b9 Minor tweak to exit behavior on legacy devices.
Properly refresh the screen when exiting with the framework running.
The lua code to handle that is called while cvm is SIGSTOPP'ed, so it
doesn't help.
2015-09-06 16:23:46 +02:00
NiLuJe
a19954a201 Restart Kindle framework from an unpolluted env 2015-09-06 16:11:24 +02:00
NiLuJe
a4ebfee83b Handle the PW3
(Dry-coded, assume it's basically a PW2 w/ the KV screen ;p)
2015-09-05 03:33:11 +02:00
NiLuJe
687aba796d Fix networkmgr on Kobo
To avoid potential issues with USBMS.
Namely, make sure CWD doesn't point to the userstore for persitent
processes.
Make sure wpa_supplicant doesn't try to use our own OpenSSL lib, which,
again, is in the userstore area.
Properly kill our dhcp client invocation on when killing WiFi

Also, some related fixes to the startup script:
Properly kill wpa_supplicant & the dhcp client when we kill
wifi before rebooting to nickel.
2015-09-04 23:14:17 +02:00
arasyi
d3bc8ecb5f Fix nickel doesn't recognize sdcard after exiting
After exiting koreader, nickel will not recognize that sdcard is present.
This patch fixes that
2015-08-23 18:33:34 +07:00
Huang Xin
0b45394a7f Merge pull request #1564 from Frenzie/koreader.sh
Fix KOReader exit
2015-06-20 10:48:36 +08:00
Frans de Jonge
475ee28173 Fix KOReader exit
Should reboot less unnecessarily for older versions of KSM, and hopefully this would also be more forward-compatible.
2015-06-19 19:54:41 +02:00
chrox
34ea9ac574 add datastorage module to handle data directory on various platform
On kindle, kobo and pocketbook the data directory is the current
running directory but on Android the app is installed in system
defined location and users may have no access to that location.
The same circumstances should be true for the upcoming Koreader for
Ubuntu touch, so the data directory (in which tessdata, dictionaries,
global settings, persistant defaults and probably history data are
stored) could be stored in another place.
2015-06-15 16:56:27 +08:00
chrox
99af63c545 add koreader app icon for android finally 2015-06-15 13:49:46 +08:00
chrox
e9d19965eb fix a bug in android-luajit-launcher that may prevent some devices launching
this should fix #1553 and fix #1551.
2015-06-15 11:02:06 +08:00
NiLuJe
34cb799818 Fix nickel restart with WiFi up.
By killing the WiFi first, since apparently,
nickel really doesn't like that, and causes a deadlock.

re #1503, re #1504, fix #1520
2015-05-06 16:53:17 +02:00
NiLuJe
02fcb9037b Fix startup scripts.
Thanks to @Markismus's questions, I realized that some of what i thought
was true, wasn't.

First, pkill is a terrible idea to check for interpreted scripts.
Second, pidof is also potentially not that great for interpreted
scripts, because it'll only work with a shebang, and one that is
following the Linux syntax.
We don't have the full version with the -x to paper over that,
so use pgrep -f instead.

cf.
a736a571d2 (commitcomment-10948910)
for the gory details.
2015-04-28 21:07:25 +02:00
NiLuJe
8703a043c7 Fix the eips prints on a KT2 2015-04-28 18:26:10 +02:00
NiLuJe
9f89fc8e47 Fix Kobo startup script w/ KSM
pkill probably only checks the actual name of the binary.
We were checking a shell script, which I'm guessing is not launched
via a shebang, so that name was actually an arg to sh, or something like
that.

Use pidof instead, which matches the full command line.
2015-04-27 22:37:54 +02:00
NiLuJe
85445b12f1 Guess what? More comments ^^. 2015-04-27 13:04:52 +02:00
NiLuJe
da891ca335 And comment that, because I'm likely to forget. 2015-04-27 02:40:17 +02:00
NiLuJe
a99359fa44 Add a comment to explicit the KSM check 2015-04-27 02:33:31 +02:00
NiLuJe
8661194b79 Nice typo bro! 2015-04-27 02:21:28 +02:00
NiLuJe
2d07ec8a9d Handle snapshot tarballs w/ KUAL manual update
It only handled release zips so far.
2015-04-27 02:19:04 +02:00
NiLuJe
7fd45c6cd3 And even more Kobo startup script tweaks.
Good news: restarting nickel doesn't deadlock anymore. Yay.
2015-04-27 01:59:50 +02:00
NiLuJe
218d8b3e54 More comments... 2015-04-27 01:24:24 +02:00
NiLuJe
f259ec4259 Wipe dead code 2015-04-27 01:22:10 +02:00
NiLuJe
7db252a27e More Kobo startup scripts tweaks... 2015-04-27 01:21:54 +02:00
NiLuJe
d4f80209d9 Minor comment tweak 2015-04-27 00:01:44 +02:00
NiLuJe
476ae3322c sync before killing nickel
Hopefully good enough to avoid trashing the DB
2015-04-26 23:42:59 +02:00
NiLuJe
97ad4afa92 Minor comment tweak 2015-04-26 22:54:44 +02:00
NiLuJe
6c1681b595 Well, go for the lesser evil.
For some unknowable reason, restarting nickel on exit deadlocks on my
H2O, so, do a full reboot instead, at least *that* works.
I'm probably one of the only people running KO manually anyway...
2015-04-26 22:46:16 +02:00
NiLuJe
c2bd85bba4 More Kobo scripts tweak...
Trying to figure out why nickel deadlocks on restart...
2015-04-26 22:09:14 +02:00
NiLuJe
1945873682 Tweak the comment a bit 2015-04-26 20:51:35 +02:00
NiLuJe
a736a571d2 Same pkill trick as the Kobo scripts
Only here to satisfy my OCD ;p
2015-04-26 20:48:40 +02:00
NiLuJe
6f815e2bdf Minor pass of cleanup of the Kobo scripts.
re #1503
2015-04-26 20:46:30 +02:00
NiLuJe
2fe8dc40d7 Fix eips centering on the KV
For some strange reason, eips relies on the virtual xres on FW 5.x
2015-04-26 19:14:14 +02:00
HW
de9f1a281d Merge pull request #1499 from Markismus/master
Update koreader.sh
2015-04-22 12:28:52 +02:00
Markismus
1e9996f475 Update koreader.sh
Compatibility with KSM is resolved. Koreader will now work from any directory it is installed in.

KSM7 tweaks `koreader.sh` line 5 from a hardcoded path to the line used above. I've added the change in line 12 to allow OTA updating.
2015-04-22 12:17:17 +02:00
chrox
d345f21c39 Fix sdcv on Android cannot handle morphological changes 2015-04-22 14:27:33 +08:00
chrox
402806d32b Dictionary on Android
Stardict dictionary files should be copied to
/sdcard/koreader/data/dict/ directory.
2015-04-15 20:30:27 +08:00
chrox
68623854fe Add Kindle Voyage support on libkohelper 2015-04-15 13:41:00 +08:00
chrox
bb164c1deb Load our own shared libraries if possible
This should fix #1482.
2015-04-13 10:54:32 +08:00
chrox
33614a3a24 Fix #1457 2015-04-01 18:24:01 +08:00
chrox
a38d851a15 mcode force allocation on Android is now optional
Anyone who encounters random freeze of koreader for Android
is encouraged to enable this by adding a file at
"/sdcard/koreader/patch.lua" with the content of:
```
require("jit.opt").start("sizemcode=256","maxmcode=256")
for i=1,100 do end  -- Force allocation of one large segment
```
The sizemcode and maxmcode could be adjusted from 196 to 512 to
make koreader best fit on your Android device.
2015-03-20 10:15:41 +08:00
chrox
c7d4df806a fix loading shared library on Android
This should fix #1447 and maybe also #1416.
2015-03-11 17:36:09 +08:00
chrox
3cc722e368 fix #1416 2015-02-10 23:59:53 +08:00
Huang Xin
b56c01c382 Merge pull request #1423 from Markismus/master
Update networkmgr.lua
2015-02-10 23:13:00 +08:00
Markismus
6e95673d80 Update koreader.sh
Forgot the export PLATFORM
2015-02-09 16:19:27 +01:00
Markismus
40202fbc6b Update koreader.sh
The commands in networkmgr.lua rely on an assigned value of PLATFORM. As discussed in #1423 this is only the case for child processes of rcS. This seems to be a fine place to check the value of PLATFORM.
2015-02-09 16:13:07 +01:00
chrox
327624e4fa fix no match libglib, libssl and libcrypto in some old pocketbook firmware 2015-02-07 12:40:51 +08:00
chrox
a40c172c47 fix mupdf rendering caused by FONTDIR env var
It turns out that one of our mupdf patch reads the FONTDIR env var
and uses it in a totally different way so we will use another env var
EXT_FONT_DIR to define external font directory for different platforms.
2015-01-28 02:20:45 +08:00
chrox
077517be0b add FONTDIR env variable
to support custom font directory for EPUB documents

Now Koreader could find fonts in the "fonts" directory in the USB root
directory of kindle, Kobo and PocketBook devices, thus no need to copy
fonts to "koreader/fonts" directory.
2015-01-25 16:52:04 +08:00
chrox
5c4651a3d9 auto launch koreader when opening PDF/DJVU/EPUB/FB2 files in pocketbook 2015-01-17 09:09:36 +08:00
chrox
1cba495fe0 add PocketBook port of Koreader 2015-01-13 00:15:18 +08:00
chrox
2cde181f51 fix koreader not shown in recent app list
when started by view intent.
2014-10-29 15:47:58 +08:00
chrox
f2f2833b6a fix #1048 2014-10-29 02:27:29 +08:00
chrox
64b102ebc9 fix #992 by creating fake command line arguments 2014-10-16 09:24:59 +08:00
chrox
46963df0bb don't need to rebuild ota installed package if it's detected 2014-10-14 21:34:56 +08:00
chrox
3554bdd2c4 fix firewall block of calibre companion on Kindle 2014-10-14 21:34:56 +08:00
chrox
2d3c502948 move platform dependent files into 'platform' directory 2014-10-03 18:02:50 +08:00