Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Onyx Boox

Notices

Reply
 
Thread Tools Search this Thread
Old 01-05-2022, 09:57 PM   #1
arooni
Addict
arooni began at the beginning.
 
Posts: 315
Karma: 26
Join Date: Jul 2012
Device: Kindle Paperwhite 4 (2018)
[Nova Air] Anyway to remap the magnetic case page from vol up/down => page up/down?

Was able to remap the bluetooth remote buttons to page up/down via some helpful advice here from the tasker subreddit...

But I'd love to do the same thing on the volume up/down buttons on the magnetic case. However even after trying to capture all key down presses it seems like the page turn buttons on the case are hardwired to the volume up/down for some reason. Is there anyway around this?

BOOX Engineers: Can you PLEASE allow us to remap these buttons to our choosing like page up/down?

It would be SO MUCH BETTER when reading NyTimes, web pages, blogs, etc than having it hardwired to volume up/down.

Last edited by arooni; 01-05-2022 at 10:15 PM.
arooni is offline   Reply With Quote
Old 01-06-2022, 05:58 AM   #2
Renate
Wizard
Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.
 
Posts: 2,279
Karma: 9391749
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
Yes.
The best way to do that is natively (not with Tasker).
/system/usr/keylayout/Vendor_????_Product_????.kl is the keylayout specific for your device.
You need to find out the VID/PID of your device (either Bluetooth or USB).
Code:
$ logcat|grep bt_btif (for Bluetooth)
$ lsusb -v            (for wired USB)
Then you write your own keylayout and either put it in your Magisk module (best) or in the /system/usr/layout directly.
Renate is offline   Reply With Quote
Advert
Old 01-06-2022, 07:56 PM   #3
arooni
Addict
arooni began at the beginning.
 
Posts: 315
Karma: 26
Join Date: Jul 2012
Device: Kindle Paperwhite 4 (2018)
I'm loathe to do that as it might break/brick the device could it not?
arooni is offline   Reply With Quote
Old 01-06-2022, 08:40 PM   #4
Renate
Wizard
Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.
 
Posts: 2,279
Karma: 9391749
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
Magisk is helpful to allow you to modify everything without modifying the /system partition.
If you can find the boot.img, allow Magisk to modify it and not flash have it, you have the safest way. You will need to fastboot boot the image everytime you come up from a power off. But the advantage is, if you let it boot normally (without fastboot) you will have 100% stock system.

An entirely separate way to do things would be to make a full backup of the system partition. Then you could do what you want with it (if dm verity were off?). When it came time to do another update you restore the partition backup and then do the update, then redo your mods.

Please clear up something for me:
Does the Nova Air itself have buttons corresponding to the case?
Does the case work on contacts to the Nova? I was presuming that it was Bluetooth. How many contacts? Photos?
Renate is offline   Reply With Quote
Old 01-09-2022, 01:01 PM   #5
llinfeng
Enthusiast
llinfeng is on a distinguished road
 
Posts: 38
Karma: 58
Join Date: Jan 2019
Device: Kobo, Kindles, Sony DPTs, QQ-Read
I have a Nova Air and here are a few clarifications:
1. Nova Air only has one button.
2. The case does need to make a contact with the Nova Air unit. There are three metal pins on the cover, making contacts directly with the left margin of Nova Air.

Photos: Pins on the cover, and receiving ends on the Nova Air

RE: BOOX Engineers - I did ask them when they can let us remap the physical buttons on the magnetic cover. And, they went silent as always.
llinfeng is offline   Reply With Quote
Advert
Old 01-09-2022, 02:47 PM   #6
Renate
Wizard
Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.
 
Posts: 2,279
Karma: 9391749
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
So, download UsbMode.apk from my sig.
Hit the buttons and write down what the "Linux" code and the "Android" codes are.
Renate is offline   Reply With Quote
Old 01-14-2022, 08:52 AM   #7
llinfeng
Enthusiast
llinfeng is on a distinguished road
 
Posts: 38
Karma: 58
Join Date: Jan 2019
Device: Kobo, Kindles, Sony DPTs, QQ-Read
Both buttons do not seem to have a Linux code.

For the button on the top, its Android code is "0x18 24". And, for the button on the bottom, the Android code is "0x19 25".
llinfeng is offline   Reply With Quote
Old 01-14-2022, 09:58 AM   #8
Renate
Wizard
Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.
 
Posts: 2,279
Karma: 9391749
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
Well, that's VolUp, VolDn.
That nothing appears in the Linux code means that it's not part of the Linux input system.
What was "Source id" at the top, was it -1?

Apparently, some Java code is taking in the switches and injecting the keycodes in on the Java level.
That makes life a bit more difficult. You'd have to modify some code (instead of just changing a keylayout file).

It probably starts out as a GPIO. I do have a scanner for that, but sometimes even querying a GPIO causes things to crash. What do you do when you have the correct GPIO anyway? You still have to slog through smali code and ELF libs to find out how it's doing all this.

Have you checked your various config files to see if there are settings for this in one of the settings in /data/systems/users/0
Renate is offline   Reply With Quote
Old 01-17-2022, 10:26 PM   #9
llinfeng
Enthusiast
llinfeng is on a distinguished road
 
Posts: 38
Karma: 58
Join Date: Jan 2019
Device: Kobo, Kindles, Sony DPTs, QQ-Read
The "Source id" for both keys on the cover is 17185.

I am totally blank when you started to talk about GPIO and other codes ... And, since I haven't been tinkering with Android devices too much, I don't even know how to directly access the directory: `/data/systems/users/0`.

And, apologize for the delay in reply. I have now set the Thread Subscription to notify me with "Instant email notification". My replies should be more timely if there is something else that I can help with.
llinfeng is offline   Reply With Quote
Old 01-18-2022, 05:31 AM   #10
Renate
Wizard
Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.
 
Posts: 2,279
Karma: 9391749
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
You know what's interesting about 17,185? It's 0x4321 in hexadecimal! So we know that it's a fictitious source. When I hit a physical button on a B&N Glow21, I get 2 as source id. Normally that's what you'd do with GPIO buttons. And they'd use a keylayout.

Try this just to double check, you don't have to be rooted.
Code:
$ cd /system/usr/keylayout
$ grep VOLUME_UP *
Do you see anything that doesn't say 115? No? I didn't think so.

A lot of Onyx software is kept consistent across models, but I'm guessing that you've got something on your Nova Air that isn't on my Poke3.
Renate is offline   Reply With Quote
Old 01-18-2022, 07:44 AM   #11
llinfeng
Enthusiast
llinfeng is on a distinguished road
 
Posts: 38
Karma: 58
Join Date: Jan 2019
Device: Kobo, Kindles, Sony DPTs, QQ-Read
Indeed, it looks like all entries are labeled with 115.

Code:
NovaAir:/system/usr/keylayout $ grep VOLUME_UP *
Generic.kl:key 115   VOLUME_UP
Vendor_046d_Product_b501.kl:key 115 VOLUME_UP
Vendor_046d_Product_c532.kl:key 115   VOLUME_UP
Vendor_05ac_Product_0239.kl:key 115   VOLUME_UP
Vendor_22b8_Product_093d.kl:key 115   VOLUME_UP
gpio-keys.kl:key 115   VOLUME_UP
qwerty.kl:key 115   VOLUME_UP
NovaAir:/system/usr/keylayout $
(To answer my earlier question, all "code" oughts to run under abd shell, where abd should be an executable to be downloaded from: https://developer.android.com/studio...platform-tools)
llinfeng is offline   Reply With Quote
Old 01-18-2022, 08:15 AM   #12
Renate
Wizard
Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.
 
Posts: 2,279
Karma: 9391749
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
Yes, of course, ADB. I spend half my life there so I get presumptious.

It's hard to tell where the code is and whether it uses any configuration or settings.
If you can pull this file for me and park it somewhere I can take a look in the most obvious places.
Code:
C:\>adb pull /system/framework/framework.jar
Renate is offline   Reply With Quote
Old 01-18-2022, 08:44 AM   #13
llinfeng
Enthusiast
llinfeng is on a distinguished road
 
Posts: 38
Karma: 58
Join Date: Jan 2019
Device: Kobo, Kindles, Sony DPTs, QQ-Read
Hi Renate,

Please find the framework.jar file here, on Dropbox - https://www.dropbox.com/s/e3oo6k7we4...ework.jar?dl=0

With that framework.jar file (or some other local files I am happy to post as well), is it possible to pin down how system settings can be toggled without dealing with the Drop-down panel? Specifically, I would like to enable/disable "Finger Touch" with a key on a Bluetooth clicker. More details of this ask is posted here. On Boox devices, when I toggle such setting, the text under the icon will switch between "Finger touch disabled" and "Finger touch enabled".

Glad to learn a bit more about adb this morning. (I kept mistaking it as abd, and have rebooted my computer multiple times after adding the full path to the system Path.)
llinfeng is offline   Reply With Quote
Old 01-18-2022, 11:33 AM   #14
Renate
Wizard
Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.
 
Posts: 2,279
Karma: 9391749
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
Yeah, I see a bit of a smoking gun there, but it's not being used.
Code:
.field public static final blacklist INJECTOR_DEVICE_ID:I = 0x77654321
They stick a lot of UI stuff in KCB. I don't see anything in my KCB. Can you get me a copy. It might not be named exactly the same, but it will be an .apk
Code:
C:\>adb pull /system/priv-app/kcb-release/kcb-release.apk
Renate is offline   Reply With Quote
Old 01-18-2022, 11:48 AM   #15
llinfeng
Enthusiast
llinfeng is on a distinguished road
 
Posts: 38
Karma: 58
Join Date: Jan 2019
Device: Kobo, Kindles, Sony DPTs, QQ-Read
Please find the kcb-release.apk file in this zip file on Dropbox: https://www.dropbox.com/s/dnj88i5mof...lease.zip?dl=0

For no clear reasons, Dropbox does not allow me to share the apk file directly.

Additionally, here is another copy for the kcb-release.apk file from Boox Lumi 2:
https://www.dropbox.com/s/uv0sozfgdz...Lumi2.zip?dl=0

At the end of the day, I plan to toggle such "Finger touch" setting on Lumi 2, where icons are harder to reach due to the larger screen size.
llinfeng is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to remap nova air's "volume buttons" to page up / down arooni Onyx Boox 5 01-06-2022 07:56 PM
How is the new page scrolling mode of Nova 2? ilyasson Onyx Boox 2 10-05-2020 02:11 AM
How to bookmark a page w Nova Pro? bsabiston Onyx Boox 0 02-04-2020 12:04 AM
REMAP previous page button to next page rathaniel Kindle Developer's Corner 17 03-25-2013 03:02 AM
Feature request: Remap spacebar to turn page forward steve3 Kindle Developer's Corner 11 01-03-2011 01:13 PM


All times are GMT -4. The time now is 06:22 AM.


MobileRead.com is a privately owned, operated and funded community.