08-21-2024, 06:08 AM | #1 |
Zealot
Posts: 136
Karma: 98
Join Date: Dec 2018
Device: Onyx Leaf 2 (White)
|
'Button rotation patch' makes KoReader crash
Does anyone use KoReader with the 2-disable-hw-button-rotation.lua patch?
Since updating to version my Leaf 2 to 3.5.3 (7f5c78ff3), I've been experiencing crashes whenever I apply the patch and then press the volume up or down button, or swipe to go back. I tried various versions of KoReader, but it might be a ROM issue, not a KoReader problem. I also tried factory resetting the device. I expect it to be the case for other Onyx or Android devices too. Interesting lines in crash.log Code:
07-25 17:13:57.213 V/dlopen ( 2818): sys_dlopen - loading library /data/user/0/org.koreader.launcher/files/common/ssl.so (in local namespace) 07-25 17:13:57.214 W/linker ( 2818): Warning: "/data/user/0/org.koreader.launcher/files/common/ssl.so" unused DT entry: DT_RPATH (type 0xf arg 0x129b) (ignoring) 07-25 17:13:57.354 I/KOReader( 2818): Loading plugins from directory: /storage/emulated/0/koreader/plugins/ 07-25 17:13:58.613 E/NativeThread( 2818): Failed to run script: frontend/device/input.lua:704: attempt to index field 'rotation_map' (a nil value) Code:
Unable to open libbeluga.so: dlopen failed: library "libbeluga.so" not found.' Github: Koreader page turn buttons do not switch with rotation |
08-21-2024, 02:26 PM | #2 |
Onyx-maniac
Posts: 3,199
Karma: 12537601
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5, Go6
|
I know nothing about KOReader or Lua.
Does the KOReader.apk have any libs in it? Or does it presume your device is "Lua-ready"? The easiest would be to add the libbeluga.so (I presume some pun on "Lua") to the KOReader.apk. Of, course, if this is the only thing that uses Lua maybe it would be more useful to just patch the code that it doesn't need a foreign language to rotate the screen. Unless KOReader is all Lua??? |
08-21-2024, 06:08 PM | #3 |
Onyx-maniac
Posts: 3,199
Karma: 12537601
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5, Go6
|
I still don't have a clue what libbeluga is.
It appears that it is an optional lib used/not used by libandroid_runtime.so So it's not like it's not finding a required lib. |
08-24-2024, 12:29 PM | #4 | |
Zealot
Posts: 136
Karma: 98
Join Date: Dec 2018
Device: Onyx Leaf 2 (White)
|
Quote:
Initially, I thought I might have removed too many apps, but even after restoring all uninstalled and disabled apps, and performing a factory reset, the crash persists. This issue started after Onyx's latest update, I’ve decided not to update anymore. It seems more stuff breaks than it adds benefits for me. I'm even considering restoring a backup to the version the device shipped with. Maybe I should post this in the KoReader MobileRead Forums? |
|
08-24-2024, 12:46 PM | #5 |
Onyx-maniac
Posts: 3,199
Karma: 12537601
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5, Go6
|
Curse you! You're making me learn this Lua stuff.
Change your mod as so: Code:
local logger = require("logger") local Device = require("device") Device.input.rotation_map = map() logger.info("Hardware button rotation disabled by user patch") |
08-24-2024, 01:20 PM | #6 |
Zealot
Posts: 136
Karma: 98
Join Date: Dec 2018
Device: Onyx Leaf 2 (White)
|
Oh no, the Lua curse is spreading! But seriously, thanks for diving into this. Appreciate you taking the time!
That patch doesn't load. Code:
Error applying patch: /storage/emulated/0/koreader/patches/2-disable-hw-button-rotation.lua |
08-24-2024, 02:15 PM | #7 |
Onyx-maniac
Posts: 3,199
Karma: 12537601
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5, Go6
|
I can't believe I made an error. Me, an experienced (10 minutes) Lua programmer.
Code:
Device.input.rotation_map = {[0]={}, [1]={}, [2]={}, [3]={}} |
08-24-2024, 03:42 PM | #8 |
Zealot
Posts: 136
Karma: 98
Join Date: Dec 2018
Device: Onyx Leaf 2 (White)
|
Code:
local logger = require("logger") local Device = require("device") Device.input.rotation_map = {[0]={}, [1]={}, [2]={}, [3]={}} logger.info("Hardware button rotation disabled by user patch") Thanks again Renate! |
Tags |
android, android 11, koreader, onyx |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
koreader crash | kevinkingk | Kindle Developer's Corner | 6 | 04-26-2023 02:13 PM |
Auto-rotation for KOReader on Android? | drawson1 | KOReader | 5 | 11-29-2021 05:23 PM |
Calibre makes my whole system freeze/crash | scarlettruin | Calibre | 2 | 10-30-2018 08:31 PM |
Beware : Calibre 2.66 makes Mac OS X crash | tahitibub | Calibre | 8 | 11-12-2016 12:11 PM |
Touch Home button causes crash | kirschschreib | Kobo Reader | 4 | 09-06-2011 07:14 AM |