-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add full refresh function on Xiaomi MiReader #344
Comments
In theory you could reverse engineer it, but if it fails all the tests the simple answer is probably that it can't be done easily. How to turn on ADB for those interested (basically regular Android) https://github.com/epodegrid/epd106-ADB |
It probably can be done, but it's a huge PITA and none of the developers have this device so unlikely. I did it for onyx, this can hopefully give someone idea where to start. |
Well im not too familiar with coding/reverse engineering myself but im willing to help since no other devs have this device. Thank you anyway, overall still really a great app |
@huronhorn basically you need to decompile the apk and search the metods to find an epd update using reflection. There are plenty of tickets with info about the tools and the kind of info we need. I'm afraid you need to do that yourself. Once you get a routine that refreshes the screen you can paste it here and we can integrate it |
@pazos You mean the default reader apk? Or full firmware? I already extract default reader apk and out of curiosity try to installed it on my phone (but couldn't be installed). What tool can i be used to decompile an apk? I will try to figure it out. Thanks! |
@huronhorn: see past tickets koreader/koreader#3517 and koreader/koreader#4595 for some inspiration. |
I have a Xiaomi/Moaan inkPalm 5 which is almost identical to huronhorn's MiReader (only the screen resolution + DPI and storage space differs; the processor is the same): Manufacturer: Allwinner
|
That's cool. We can integrate that if there's no other way to trigger a refresh. I still like reflection more because reasons:
I'm assuming there's some service running on the device that registers the Intent |
Yeah, that's understandable. I found the receiver in the boot-framework: // android.app.activity:
private Window mWindow;
public void onReceive(Context context, Intent intent) {
if ("android.eink.force.refresh".equals(intent.getAction())) {
int intExtra = intent.getIntExtra("rightnow", 1);
if (Activity.this.mWindow != null) {
if (intExtra > 0) {
Activity.this.mWindow.forceGlobalRefresh(true);
} else {
Activity.this.mWindow.forceGlobalRefresh(false);
}
}
}
} You're right: using that info to Reflect with Window's EDIT: Apologies, but the only reason I'm not writing a PR myself is because I probably wouldn't be able to write something robust enough, even for this. I couldn't find any sort of specific EPD control methods in the framework (although I wasn't looking too hard) - I'm pretty sure |
No apologies needed :).
That's the beauty of reflection. It works for native methods too. Everything low level on android is expected to be coded in c/c++ and packaged as a shared library with some JNI wrapper. One of the classes of the framework loads the shared library and declares that native method. We just need to know the name of the class that implements the method and the kind of arguments the method accepts. In most frameworks epd routines are part of "android.view.View" class. That makes sense as it makes possible to update view hierarchies without any specific call, so any Android app would drive the EPD screen without any specific coding needed.
Could you please share the snippet? |
Is there still interest to add support for this? |
The ticket already covers how to call system methods. Only thing left to do is to write a driver using those methods. We are going to rely on device owners for all those things: document behaviour, write drivers, test drivers. All we can do is to provide help and/or help refactoring. |
I am not familiar with android so not quite sure how to start. I found
I tried decompiling the DkReader106 apk (since that is the default reader app with refresh) with jadx, vdexExtractor, apktool. The output does not seemed useful to me, at least it doesn't seemed to work well with vdex and odex files. In case anyone is interested, here is the full directory for DkReader106 and separated file upload (files too big).
DkReader106.zip Not sure if the logs are useful since I do see something about refresh when I turn off and on the screen, it shows a panda and do a refresh press power button to off
press power button to on
|
Hi
I wonder if there is a way to implement full refresh for Xiaomi MiReader 6" (non pro), sadly, MiReader fail all eink/gpd test from koreader
i have already installed latest development version of koreader. And if not can black page shown to "trick" the device to refresh instead of real full refresh, thank you, really appreciate all the effort to make this awesome app
MiReader spec:
PROCESSOR: Allwinner B300 (quad-core, 1.8 GHz)
Storageb16 GB
Android 8.1 Oreo
1GB RAM and 16GB ROM
SCREEN: 6", 1024 x 768 212 DPI,
PROCESSOR: Allwinner B300 (quad-core, 1.8 GHz)
The text was updated successfully, but these errors were encountered: