Commit Graph

379 Commits (4345201e0ea70ee8e3adf6c03e906ecf28e1bf75)

Author SHA1 Message Date
Martín Fernández 4345201e0e
[CI] Mac OS app (#6955)
* use 7z instead of dmg
* osx: use always writable paths
3 years ago
Martín Fernández c481c5aa04
move unpackArchive to Device, use native version on android (#6959) 3 years ago
Martín Fernández 89e1c406f2
android: downgrade targetSdk to 28 (#6961)
Fixes #6953
3 years ago
Martín Fdez 9df5d17a6c bump luajit-launcher 3 years ago
Martín Fdez c0b71d0899 bump luajit-launcher and APK to API30 3 years ago
NiLuJe 931f01ef26
Kobo: Warn on restart if the startup script is outdated (#6916)
* Warn on restart if the startup script has been updated, because a restart will not reload it.

* Also warn right after the update if it contained a startup script update...
3 years ago
NiLuJe cb2314d11b
Kobo, Mk.5: Tweak CPU frequency scaling (#6905)
* Run grep against /proc/modules directly instead of forking to lsmod

* Revamp the CPUFreq governor choice logic

I finally figured out why the scaling on the H2O was so wonky:
Because it relies on an obscure i.MX hardware feature called DVFS,
and it gets flipped for mysterious workaround-y reasons depending on
Wi-Fi state...

* Start playing with conservative, because just staying pegged at max
clock is entirely stupid.

And DVFS is extremely conservative, it needs somewhat sustained load to
clock up...

* Take care of the DVFS switcheroo in the Wi-Fi scripts
3 years ago
NiLuJe 510ea5963c
[Kobo] Don't attempt to restart Nickel when asking for a reboot/shutdown (#6880)
* Don't attempt to restart Nickel when asking for a reboot/shutdown

Use a magic exit code to ID those cases.

* Limit this to Kobo, to avoid breaking potentially existing assumptions
with other platform's startup scripts
4 years ago
Martín Fernández 1468646aa5
Android bundle update (#6870)
- adaptative icons
- minify + shrink
- remove unused assets to save a few KBs
- install apk by clicking on notification after download (doesn't apply to F-Droid)
4 years ago
zwim 926e7dd402
coverimage plugin (#6813)
* Plugin for saving the cover image to file. Useful in some e-ink android devices.
4 years ago
Galunid 5ed240077e
OnyxEPDController (#6853)
Includes:

new QualcommOnyxEPDController for Onyx Boox Nova 2 (and possibly others)
refactoring and support for qualcomm epd modes
Includes new eink test, that should work on Qualcomm Onyx devices.
4 years ago
Martín Fernández 91708e25d0
android-luajit-launcher refactor (#6821)
- Lcd devices won't use the SurfaceView, just the good old native content/window (except AndroidTv and ChromeOS)
- All android dialogs will be presented with Material Design on recent devices.
- Added an option to device settings to manage application battery optimization.
- Permissions that require the user to go to a settings page will be presented with a native android dialog.
- bump android-luajit-launcher

- Changes under the hood: koreader/android-luajit-launcher#257
4 years ago
ezdiy ac3c97af49
Pocketbook: Use a single launcher (#6814)
* Pocketbook: Use a single launcher and make the system one a "symlink"
4 years ago
NiLuJe d9b658034d
Ensure the SD card is actually detected in Nickel on exit. (#6800)
* Ensure the SD card is actually detected in Nickel on exit.

Regression since #6522
4 years ago
ezdiy 893909146d
Pocketbook: use raw input I/O (#6791)
This allows for better energy efficiency (no more 50Hz tick poll),
as well as lower input lag / higher precision - touch events are
native linux ones.

In addition, auto off/suspend plugin is used in this mode, as we need
to trigger (timed) sleep / poweroff on our own, since the OS ones
will no longer work whenever koreader has focus.

This is for rooted devices only, and possibly somewhat FW
specific, so enabled only on PB740-2 where it's reasonably tested.
4 years ago
Martín Fdez 4fb59e2253 bump LuaJIT, fix android native orientation logic 4 years ago
NiLuJe d2f533e5b7
A couple of hotfixes for 2020.10.1 (#6781)
* PB Crash Screen:
	* We don't actually support the "tap to restart now" behavior, it's a
	  plain sleep.

* Remove CBB toggling leftovers missed in #6696

Fix #6780
4 years ago
NiLuJe ba927fe4b5
Don't grab input devices on Kobo (#6705)
* Don't grab input devices on Kobo

(... as long as we're started via KFMon/NM.
... and MiniClock is not running ^^).

* Bump base

(https://github.com/koreader/koreader-base/pull/1197)
(https://github.com/koreader/koreader-base/pull/1199)
4 years ago
NiLuJe 9cddd9cf58
[PB] Crash screen & OTA feedback (#6686)
* Add progress feedback to OTA updates
* Also, install OTA updates on restart
* Display the crash screen

* Bump base

https://github.com/koreader/koreader-base/pull/1193
https://github.com/koreader/koreader-base/pull/1192
4 years ago
raisjn 221b71062a
reMarkable: add environment variable to tell koreader.sh to not set bpp (#6685)
* reMarkable: add environment variable to tell koreader.sh to not set bpp
4 years ago
yparitcher eecdf5bb9b
kindle: honor --asap (#6662) 4 years ago
NiLuJe 14e7e270c3
Bump android/luajit-launcher (#6661)
(https://github.com/koreader/android-luajit-launcher/pull/251)
4 years ago
Thomas Spurden 0eaae807ce
remarkable: fix fbdepth use in startup script (#6658)
The reMarkable version of fbdepth doesn't support the -1 rotation so
this was actually not setting the rotation at all. I didn't notice this
as I was always launching koreader from xochitl so the rotation was
already set correctly.
4 years ago
NiLuJe 051c8c0d95
Update KoboUSBMS for CJK support (#6639)
* Making the startup script even more tortuous in the process...

* Bump base

https://github.com/koreader/koreader-base/pull/1179
https://github.com/koreader/koreader-base/pull/1180
4 years ago
ezdiy 91ebe56b20
Pocketbook: launcher script: please shfmt (#6621) 4 years ago
ezdiy 4857e97e30
Pocketbook: Launcher OS integration (#6620)
* Bring in restart koreader & shutdown device exit options
* Existing instance reused for opens via native book explorer
4 years ago
ezdiy c9a339ead0
Pocketbook: File handling OS integration (#6617)
* Show opened file in task manager
* Remember file to open on power-off
* Perform file associations
4 years ago
NiLuJe 12df296b90
Detect early KoboUSBMS returns, and just restart KOReader (#6603)
We know onboard is safe in these cases.
4 years ago
Galunid cc42265a67
Bump luajit-launcher (#6595)
Includes native frontlight for onyx nova 2 (koreader/android-luajit-launcher#248)
4 years ago
NiLuJe e402c9d6f3
More KoboUSBMS related tweaks & cleanups (#6590)
* Be even more defensive around KoboUSBMS handling in the startup script

And add some more logging. To the log before a session, to the syslog
after, because we can't be sure onboard is viable.

* Display a short version string straight in the Version label

* Move system statistics inside the Help menu

* Move Version inside Help


* Bump base

https://github.com/koreader/koreader-base/pull/1173
4 years ago
Martín Fdez 454ed0ebeb enable usage of system fonts 4 years ago
NiLuJe 1919764825
Some more KoboUSBMS tweaks (#6566)
* Enable i18n in KoboUSBMS

* Rejig the "No confirmation" USBMS setting:

In now *only* affects the USB plug in event.
The menu entry will never show the popup (clicking on it should already
be confirmation enough, that, yes, we really would like to do that,
please ;)).

Also, enable said plug in behavior on Cervantes, too ;).

* Add an option to disable USBMS entirely

* Bump base

https://github.com/koreader/koreader-base/pull/1170
4 years ago
zwim 66e8087c66
[android]: fix backlight toggle (#6520)
* check on startup if frontlight can be changed.
* Init fl_min if necessary not to use intensity==0
4 years ago
NiLuJe 6e3a3e8069
[Kobo] Support USBMS exports (#6552)
* \o/

* Make sure the (debug) event log doesn't end up in the fd table of our child processes...
Otherwise, it breaks USBMS.

* Close suspicious fds in the Wi-Fi scripts
To prevent any and all issues w/ USBMS down the road...

* Minor USBMS UI tweaks

* Always ask for confirmation to start on USBMS session on plug

* Bump base

https://github.com/koreader/koreader-base/pull/1161
https://github.com/koreader/koreader-base/pull/1162
https://github.com/koreader/koreader-base/pull/1163
https://github.com/koreader/koreader-base/pull/1165
https://github.com/koreader/koreader-base/pull/1167
4 years ago
Martín Fernández ae19cafe84 check OTA updates on restart 4 years ago
NiLuJe b14cabb6de
[Kobo] Unbreak Wi-Fi on FW >= 4.23 (#6522)
* Unbreak Wi-Fi on Kobo w/ FX >= 4.23+

Stop relying on WIFI_MODULE_PATH, it's no longer exported by the init
script.

Fix #6500

* Resync the nickel restart script w/ upstream

Let udev handle the SD card, and actually allow nickel to see those events by re-creating the FIFO ourselves, to avoid races.
4 years ago
Martín Fdez 9037a1f4f2 bump luajit-launcher and remove frontlightwidget leftovers 4 years ago
Martín Fdez bdbebb9e08 standalone osx application bundle 4 years ago
NiLuJe 4a3d5f3d66
Fix a minor snafu in the Kobo startup script. (#6466)
Oops, too much Python/Lua ^^.
4 years ago
zwim a6763465b4
[Android]: Native light dialog (#6426)
* Adds support for Tolino Epos 2 warmth light
4 years ago
NiLuJe 2ad976387d
More #6424 cleanups (#6442)
* Simplify logic, and more detailed debug logging
* Kill Nickel's FIFO on startup
Avoids udev/udhcpc scripts hanging when trying to open() it.
4 years ago
NiLuJe 37a01100b7
Various Wi-Fi QoL improvements (#6424)
* Revamped most actions that require an internet connection to a new/fixed backend that allows forwarding the initial action and running it automatically once connected. (i.e., it'll allow you to set "Action when Wi-Fi is off" to "turn_on", and whatch stuff connect and do what you wanted automatically without having to re-click anywhere instead of showing you a Wi-Fi prompt and then not doing anything without any other feedback).
* Speaking of, fixed the "turn_on" beforeWifi action to, well, actually work. It's no longer marked as experimental.
* Consistently use "Wi-Fi" everywhere.
* On Kobo/Cervantes/Sony, implemented a "Kill Wi-Fi connection when inactive" system that will automatically disconnect from Wi-Fi after sustained *network* inactivity (i.e., you can keep reading, it'll eventually turn off on its own). This should be smart and flexible enough not to murder Wi-Fi while you need it, while still not keeping it uselessly on and murdering your battery.
(i.e., enable that + turn Wi-Fi on when off and enjoy never having to bother about Wi-Fi ever again).
* Made sending `NetworkConnected` / `NetworkDisconnected` events consistent (they were only being sent... sometimes, which made relying on 'em somewhat problematic).
* restoreWifiAsync is now only run when really needed (i.e., we no longer stomp on an existing working connection just for the hell of it).
* We no longer attempt to kill a bogus non-existent Wi-Fi connection when going to suspend, we only do it when it's actually needed.
* Every method of enabling Wi-Fi will now properly tear down Wi-Fi on failure, instead of leaving it in an undefined state.
* Fixed an issue in the fancy crash screen on Kobo/reMarkable that could sometime lead to the log excerpt being missing.
* Worked-around a number of sneaky issues related to low-level Wi-Fi/DHCP/DNS handling on Kobo (see the lengthy comments [below](https://github.com/koreader/koreader/pull/6424#issuecomment-663881059) for details). Fix #6421 
Incidentally, this should also fix the inconsistencies experienced re: Wi-Fi behavior in Nickel when toggling between KOReader and Nickel (use NM/KFMon, and run a current FW for best results).
* For developers, this involves various cleanups around NetworkMgr and NetworkListener. Documentation is in-line, above the concerned functions.
4 years ago
Martín Fernández fa55152465
Handle all possible Android configuration changes without recreating the activity (#6416) 4 years ago
Martín Fernández 9bee4e495a mac app fixes 4 years ago
Thomas Spurden 201d3d8ad1
remarkable: add more detail to README about launcher (#6397) 4 years ago
Frans de Jonge a0e563858e
Bump base & luajit-launcher for new LuaJIT (#6389)
Also for Nia support, cf. <https://github.com/koreader/koreader-base/pull/1142>.
4 years ago
Martín Fernández 1adea4a497 Add macOS target
Co-authored-by: Jason Benwell <jbenwell@hotmail.com>
4 years ago
Martín Fdez 7094519e1b android: support for native surface rotation 4 years ago
Martín Fdez 8e61a8f285 disable runtime behaviour changes on fdroid 4 years ago
Martín Fernández 699ee3efc1
[Android] Migrate user directories after update (#6287)
I've played a bit with #6275, to make the iterator available for non-power users too.

this PR automate user data migration (which happens once per update). If the folder `koreader/scripts.afterupdate` contains a file `migrate` then files will be copied to internal dir preserving their relative path. Thus user data **needs** to have the same hierarchy as internal directories.

Shell scripts will be find and run if the folder `koreader/scripts.afterupdate` exists and has no `migrate file`.

In the case of `koreader/scripts.always` there's no migration available, just shell scripts.

Digging a bit seems not possible to create new directories on app internal storage (it just crashes on the emulator since API25). So very fancy extensions are not supported, but it is ok to override files and create new files if dir already exists.

Tested with:

```find scripts.afterupdate/                                            
scripts.afterupdate/
scripts.afterupdate/data
scripts.afterupdate/data/hyph
scripts.afterupdate/data/hyph/Roman.pattern
scripts.afterupdate/data/example.css
scripts.afterupdate/migrate
```

Results:

```
06-20 16:16:33.590  3584  3597 I KOReader: after-update: running migration
06-20 16:16:33.596  3584  3597 I KOReader: command cp /storage/emulated/0/koreader/scripts.afterupdate/data/hyph/Roman.pattern /data/user/0/org.koreader.launcher/files/data/hyph/Roman.pattern returned 0
06-20 16:16:33.600  3584  3597 I KOReader: command cp /storage/emulated/0/koreader/scripts.afterupdate/data/example.css /data/user/0/org.koreader.launcher/files/data/example.css returned 0
06-20 16:16:33.604  3584  3597 I KOReader: command rm /data/user/0/org.koreader.launcher/files/afterupdate.marker returned 0
```
4 years ago