09-18-2018, 12:23 AM | #16 |
Enthusiast
Posts: 49
Karma: 262
Join Date: Mar 2007
Location: Melbourne Australia
|
Any chance of a cleaner way to implement this?
|
09-19-2018, 03:58 AM | #17 |
Member
Posts: 24
Karma: 21937
Join Date: Aug 2018
Device: Boox Note 10.3
|
I went the KingRoot then SuperSU-Me Pro route as well. I tried two other methods including 'Kingoroot' that did not work.
Now that I have root, can someone recommend a good app to adjust the CPU governor? Thanks, Keith |
Advert | |
|
09-19-2018, 01:04 PM | #18 |
Enthusiast
Posts: 49
Karma: 2002
Join Date: Feb 2018
Device: linux desktop
|
You can use Kernel Adiutor for governor tweaks: on its main screen, tap the top left corner to pull out the menu (I guess there's an icon but it's invisible on boox).
|
09-19-2018, 06:54 PM | #19 |
Member
Posts: 20
Karma: 110
Join Date: Jun 2018
Device: Boox Note 10.3
|
Could anyone who has tried tweaking the kernel settings comment on the results? Has there been a significant improvement in fluidity of the UI in general? Less battery life?
|
09-19-2018, 08:00 PM | #20 |
Member
Posts: 24
Karma: 21937
Join Date: Aug 2018
Device: Boox Note 10.3
|
Edit, with Kernal Adiuator, I tried out changing the minimum CPU frequency to 408hz (from 126hz) and trying Graffiti text input with Evernote.
I did not notice an appreciable change with regard to screen latency (the lag of the stylus as I write in the letters). I tried the CPU Governor settings of 'Interactive' as well as 'Ondemand' With Ondemand setting, the response was a little better with launching programs but thats about it. The screen latency, or updating, still seems to be about 1 second lag. As I mentioned before, if you don't look at your text input, it is not a problem. That is fine for handwriting recognition - but disastrous with an onboard keyboard. As a side note, I also tried writing in A2 mode and the result wasn't any better. I read somewhere that with e-ink a grayscale screen update takes about 750ms to update, while a black/white screen update takes 125 to 250ms. It seems that apps like Evernote, Onenote and Graffiti are forced to 750ms by default which is coincident with my experience. If there was a way to force those apps to only be updating in black/white mode then the latency could be reduced to 1/8 of a second, which would be quite acceptable. Looking for ideas to get the screen latency down now... ~~~~~~~~~~~ Thanks for the advice, will report back on latency and Access Graffiti text input. Last edited by keithwwalker; 09-20-2018 at 08:35 PM. |
Advert | |
|
09-21-2018, 01:58 AM | #21 | |
Wizard
Posts: 1,481
Karma: 9010563
Join Date: Jul 2013
Device: none
|
Quote:
I remember - also out of tests done with video recording - A2 is a pretty constant 125ms. GU (Regal?) is very close to 600ms. Of course, the matter is that A2 severely impacts rendering quality - flattening information to 1/16th of it. |
|
09-21-2018, 09:13 AM | #22 | |
Member
Posts: 20
Karma: 110
Join Date: Jun 2018
Device: Boox Note 10.3
|
Quote:
|
|
09-22-2018, 12:59 AM | #23 | |
Member
Posts: 24
Karma: 21937
Join Date: Aug 2018
Device: Boox Note 10.3
|
That's the funny thing, I tried A2 mode and the screen update was still about 1 second. You think it would be faster....
Quote:
|
|
11-28-2018, 04:14 AM | #24 |
Enthusiast
Posts: 26
Karma: 39999
Join Date: Aug 2018
Device: none
|
Didn't forget about the device, just had little time because of work. I have two new snippets:
I figured out a way to get "clean" root (meaning not using some weird chinese tools that do god-knows-what) on the Max 2. This is possible as of build number 2018-09-05_08-12_1.9.1_575ba83 (included for search engines and refrence) I'll explain the steps I took. This is not a tutorial for novices, nor do I want to supply a one-click tool. It does need some immediate knowledge of Linux. My first observation was that the kernel running on the Boox Max 2 is quite old. Old enough to be vulnerable to the Dirty COW exploit. ( https://en.wikipedia.org/wiki/Dirty_COW ) Dirt COW is a vulnerability in lots of older kernels which basically allows you to write to files/regions you shouldn't be allowed to write to with your permissions. Searching for somebody who already did the legwork, I found this git: https://github.com/timwr/CVE-2016-5195 which replaces the run-as executable on the Max 2 with one that gives you root. The source code is very simple and clean, no funny stuff hidden in it. Just get all the dependencies together and run "make root", with the Max 2 connected in debugging mode and adb running as daemon. Now you can log into the device via "adb shell /system/bin/run-as" which logs you in as root. Now you're still not done here as SELinux disallows access to most stuff -even to root- and having root isn't really interesting yet as you can't change any files. Now embarrassingly, I spent about two hours experimenting how to get past SELinux with dirtycow, by replacing different system files getting from permissions to other permissions. With tons of android devices this is very hard and you often don't get very far. In the case of Max 2, it's a lot easier. Apparently the people at Onyx dislike SELinux as much as I do and left the CONFIG_SECURITY_SELINUX_DEVELOP kernel flag on. As root, you can simply type "setenforce 0" to disable SELinux. Now you have full root with access to everything until next reboot. Don't forget to enable SELinux again after making your changes. I leave it as an exercise to the reader what to do with it. (yes, this also means the device is ludicrously unsafe, Onyx= release your kernel sources plz) My second snippet is a bit smaller and less exciting and not even all that technical, it just makes termux nicer to use. I already mentioned earlier that you can replace the font in termux with an arbitrary font by replacing font.ttf in the ~/.termux directory when you start termux. Now typing on the Boox Max is sometimes kinda annoying because of the inherent lag eink has. A2 mode is a lot faster but as we all know, it looks kinda ugly with most fonts. By installing an old bitmap-based font for example like: http://www.kreativekorp.com/software/fonts/c64.shtml or any font from https://int10h.org/oldschool-pc-fonts/fontlist/ (the "thin" IBM PS/2 fonts work especially well) and setting them to the correct size (you'll notice when you did) you can run the Max2 in faster A2 mode without having to deal with "damaged" fonts, as there is no anti-aliasing and hence no grey levels, the fonts will look perfect. They don't look as fancy as more modern fonts, but are pixel-prefect and also draw ASCII-boxes etc. accurately. As a retro affectionado I also enjoy looking at them. It's a very nice way to live the terminal life in linux. If you need lots of unicode, you could probably also use Unifont. The bold overstriking Termux does works also very well with these fonts. Also, while you're at it with adb running on your main PC the Max 2 is connected to, type "adb shell settings put global policy_control immersive.full=com.termux" to remove the android task bar with clock on top of termux and give you more screen real-estate. You can also set "TERM=vt100" to make ncurses and other programs aware that you don't have any colors, which makes them usually draw properly. You can also hunt down and add "xterm-mono" to your terminal definitions, which keeps your F-keys and mouse working in programs that have support for them. Enjoy! Last edited by elementarythree; 11-28-2018 at 04:19 AM. |
11-28-2018, 12:36 PM | #25 |
Enthusiast
Posts: 49
Karma: 2002
Join Date: Feb 2018
Device: linux desktop
|
This is very cool, thanks! I can confirm it works with build 2018-11-06_10_23_2.0_4b2e02a.
Have you done anything further with your root powers? |
11-28-2018, 03:57 PM | #26 |
Enthusiast
Posts: 26
Karma: 39999
Join Date: Aug 2018
Device: none
|
I used it mainly to run "pm disable" to disable a lot of bloat-y processes I really don't need. Gave me back around 200 MB of RAM, especially the "chatty" google stuff I wanted to turn off. By modifying the code in the CVS example you can also gain access to the system user, which then let's you do things like setting different cpu governors and related stuff. Android is kinda different from bog standard Linux and I gotta admit I don't know much about it, so it takes me some time to understand the differences. It's like Linux but somehow Redmond and awful.
The downside is that the access is not permanent. /system is readonly and becomes inconsistent because of dirtycow, so remounting it is not possible. I also get a lot of "operation not permitted" stuff regarding all kinds of mounting and writing to block devices. My guess is that there's something else going on somewhere, security-wise. Temporary privilege escalation is enough for everything I wanna do, though. There's also an ominous kernel module called "drmboot" loaded I don't seem to be able to do anything about. dirtycow is quite dangerous. I could imagine tons of malware with it, and I don't even know a lot about this stuff. |
11-28-2018, 07:20 PM | #27 | |
Addict
Posts: 209
Karma: 83543
Join Date: Jan 2018
Device: none
|
Great work elementarythree!
Tried the root + alpha stuff -- spelled out more explicitly: Quote:
Last edited by sogaiu; 11-29-2018 at 10:18 AM. Reason: 'setenforce 0' was mistaken(?) so was removed |
|
11-28-2018, 08:36 PM | #28 | |
Addict
Posts: 209
Karma: 83543
Join Date: Jan 2018
Device: none
|
I dug up my notes on what I was thinking to try once root was obtained:
Quote:
|
|
11-29-2018, 01:43 AM | #29 |
Wizard
Posts: 1,481
Karma: 9010563
Join Date: Jul 2013
Device: none
|
|
11-29-2018, 04:33 AM | #30 |
Addict
Posts: 209
Karma: 83543
Join Date: Jan 2018
Device: none
|
lol...indeed
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need Boox Max help | dancameron | Onyx Boox | 3 | 02-16-2018 01:57 AM |
KOReader does not refresh on Boox Max 2 & Boox Note | linshi | KOReader | 0 | 01-21-2018 04:12 AM |
Onyx Boox max VS onyx Boox n96 CML | Jean-V | Onyx Boox | 5 | 01-26-2017 05:42 AM |
Onyx Boox Max | shards_x | Onyx Boox | 11 | 05-21-2016 07:01 PM |