android-luajit-launcher
android-luajit-launcher copied to clipboard
Add full refresh function on Xiaomi MiReader
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)
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 https://github.com/koreader/koreader/issues/3517 and https://github.com/koreader/koreader/issues/4595 for some inspiration.
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
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 Brand: Allwinner Model: EPD105 Product: virgo_perf1 Hardware: sun8iw15p1 Platform: virgo run test koreader/koreader#1 -> rk30xx: fail run test koreader/koreader#2 -> rk33xx: fail run test koreader/koreader#3 -> tolino: fail run test koreader/koreader#4 -> qualcomm: fail
getContext().sendBroadcast(new Intent("android.eink.force.refresh"));
is enough to trigger a full-screen refresh on this device. Looking at results on GitHub for android.eink.force.refresh
, it may be generic to all Allwinner devices rather than being Xiaomi-specific.
getContext().sendBroadcast(new Intent("android.eink.force.refresh")); is enough to trigger a full-screen refresh on this device.
That's cool. We can integrate that if there's no other way to trigger a refresh. I still like reflection more because reasons:
- A broadcast event never fails. The report for a potential
run test koreader/koreader#5 -> allwinner
will always be true. - The EPDInterface is already defined. Passing the context as an argument would mean refactor all other classes.
I'm assuming there's some service running on the device that registers the Intent android.eink.force.refresh
. The proper solution would be find all services that declare that intent (it should be just one) and decompile it to see what it does under the hood. Given that the broadcast event is exported and any app can issue a refresh without being a system app or sharing the same signature there's no reason to think that reflection won't work.
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 forceGlobalRefresh
in my unprivileged test application works without a problem.
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 forceGlobalRefresh
is implemented in libgui.so
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.
No apologies needed :).
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 forceGlobalRefresh is implemented in libgui.so
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.
You're right: using that info to Reflect with Window's forceGlobalRefresh in my unprivileged test application works without a problem.
Could you please share the snippet?
Oh, duh, sorry. I created a Hello World app in Android Studio, dragged a button and then put this in:
Button button = (Button) findViewById(R.id.button);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Window win = ((Activity) v.getContext()).getWindow();
try {
Method forceGlobalRefresh = win.getClass().getMethod("forceGlobalRefresh", boolean.class);
forceGlobalRefresh.invoke(win, true /* "rightnow" */);
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
});
This snippet and the one before showing the intent reciever calling forceGlobalRefresh
is the best I can do. I ran ripgrep on the inkPalm 5 with the following results (lots of "Permission denied (os error 13)" in /vendor and /system/bin):
virgo-perf1:/ $ /data/local/tmp/rg -uuu -i 'forceGlobalRefresh' -g '!/proc/*' -g '!/dev/*' -g '!/sys/*' 2>/dev/null
Binary file system/priv-app/SystemUI/oat/arm/SystemUI.vdex matches (found "\u{0}" byte around offset 7)
Binary file system/lib/libgui.so matches (found "\u{0}" byte around offset 7)
Binary file system/lib/libandroid_runtime.so matches (found "\u{0}" byte around offset 7)
Binary file system/framework/oat/arm/services.vdex matches (found "\u{0}" byte around offset 7)
Binary file system/framework/arm/boot-framework.vdex matches (found "\u{0}" byte around offset 7)
Binary file system/app/MgSettings/oat/arm/MgSettings.vdex matches (found "\u{0}" byte around offset 7)
Binary file system/app/FactoryTest/oat/arm/FactoryTest.vdex matches (found "\u{0}" byte around offset 7)
Binary file system/app/MasLauncher/oat/arm/MasLauncher.vdex matches (found "\u{0}" byte around offset 7)
Binary file system/app/BootLoading/oat/arm/BootLoading.vdex matches (found "\u{0}" byte around offset 7)
Binary file system/app/DkReader105/oat/arm/DkReader105.vdex matches (found "\u{0}" byte around offset 7)
Both SystemUI and forceGlobalRefresh just call the method, I discounted the files in /system/app because they probably do the same. In services.vdex, there's a chain that ultimately leads nowhere:
The actual content of the methods are pretty bare - they're just a chain of calls to forceGlobalRefresh
in other classes until we reach SurfaceControlWithBackground
, where it becomes:
public void forceGlobalRefresh(boolean z) {
super.forceGlobalRefresh(z);
}
and JADX cannot navigate any further.
If needed, I can upload any folder this non-rooted device allows me access to.
Is there still interest to add support for this? I have a Xiaomi Reader Pro and would really love to have a fully working reader app, I can provide any files I can pull without root, I will eventually root also but that'll be in like another year or so, when I'm sure there won't be another OTA.
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 Refresh
in
virgo-perf1:/ $ grep -r Refresh /system/app/
Binary file /system/app/AbupdateEpd106/oat/arm/AbupdateEpd106.vdex matches
Binary file /system/app/Bluetooth/lib/arm/libbluetooth_jni.so matches
Binary file /system/app/Bluetooth/oat/arm/Bluetooth.vdex matches
Binary file /system/app/DkReader106/DkReader106.apk matches
Binary file /system/app/DkReader106/oat/arm/DkReader106.vdex matches
Binary file /system/app/DkWps/oat/arm/DkWps.vdex matches
Binary file /system/app/FactoryTest/oat/arm/FactoryTest.vdex matches
Binary file /system/app/FileExplore/oat/arm/FileExplore.vdex matches
Binary file /system/app/MgSettings/MgSettings.apk matches
Binary file /system/app/MgSettings/oat/arm/MgSettings.vdex matches
Binary file /system/app/NfcNci/oat/arm/NfcNci.vdex matches
Binary file /system/app/PrintSpooler/oat/arm/PrintSpooler.vdex matches
Binary file /system/app/webview/oat/arm/webview.vdex matches
Binary file /system/app/webview/webview.apk matches
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).
> exa -T DkReader106/
DkReader106
├── DkReader106.apk
└── oat
└── arm
├── DkReader106.odex
└── DkReader106.vdex
DkReader106.zip
DkReader106.z02.zip (remove the .zip
before extract)
DkReader106.z01.zip (remove the .zip
before extract)
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
07-23 13:37:19.681 1907 1975 W NEW_LOCK: KeyEvent.KEYCODE_POWER.1
07-23 13:37:19.681 1907 1975 W NEW_LOCK: KeyEvent.KEYCODE_POWER.3.down=true
07-23 13:37:19.693 1907 1975 D WindowManager: hungUp=falsemScreenshotChordVolumeDownKeyTriggered=false mA11yShortcutChordVolumeUpKeyTriggered=false gesturedServiceInterceptedfalse
07-23 13:37:19.796 1907 1975 W NEW_LOCK: KeyEvent.KEYCODE_POWER.1
07-23 13:37:19.797 1907 1975 W NEW_LOCK: KeyEvent.KEYCODE_POWER.3.down=false
07-23 13:37:19.797 1907 1975 D zxh_black: goToSleep.reason=4,flags=0
07-23 13:37:19.797 1907 1975 I PowerManagerService: Going to sleep due to power button (uid 1000)...
07-23 13:37:19.797 1907 1975 W PowerManagerService: Go to super standby...
07-23 13:37:19.797 1907 1975 D zxh_black: SuperModeManager.isPowerModeOpen.2=false,reason=4
07-23 13:37:19.800 1907 1932 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:966 com.android.server.power.PowerManagerService.showSuspendLogo:1597 com.android.server.power.PowerManagerService.-wrap39:0 com.android.server.power.PowerManagerService$4.run:1761 android.os.Handler.handleCallback:793
07-23 13:37:19.802 1907 1932 E ActivityManager: Sending non-protected broadcast com.moan.lockscreen from system 1907:system/1000 pkg android
07-23 13:37:19.802 1907 1932 E ActivityManager: java.lang.Throwable
07-23 13:37:19.802 1907 1932 E ActivityManager: at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:19215)
07-23 13:37:19.802 1907 1932 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:19822)
07-23 13:37:19.802 1907 1932 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:19964)
07-23 13:37:19.802 1907 1932 E ActivityManager: at android.app.ContextImpl.sendBroadcast(ContextImpl.java:970)
07-23 13:37:19.802 1907 1932 E ActivityManager: at com.android.server.power.PowerManagerService.showSuspendLogo(PowerManagerService.java:1597)
07-23 13:37:19.802 1907 1932 E ActivityManager: at com.android.server.power.PowerManagerService.-wrap39(Unknown Source:0)
07-23 13:37:19.802 1907 1932 E ActivityManager: at com.android.server.power.PowerManagerService$4.run(PowerManagerService.java:1761)
07-23 13:37:19.802 1907 1932 E ActivityManager: at android.os.Handler.handleCallback(Handler.java:793)
07-23 13:37:19.802 1907 1932 E ActivityManager: at android.os.Handler.dispatchMessage(Handler.java:99)
07-23 13:37:19.802 1907 1932 E ActivityManager: at android.os.Looper.loop(Looper.java:164)
07-23 13:37:19.802 1907 1932 E ActivityManager: at android.os.HandlerThread.run(HandlerThread.java:65)
07-23 13:37:19.802 1907 1932 E ActivityManager: at com.android.server.ServiceThread.run(ServiceThread.java:46)
07-23 13:37:19.824 2022 2332 W KeyguardService: onStartedGoingToSleep
07-23 13:37:19.896 3104 3104 V NativeGlue: WindowFocusChanged: 0xa512a3e0 -- 0
07-23 13:37:19.898 1907 1932 D PowerManagerService: show logo begine
07-23 13:37:19.979 1749 1749 I sunxihwc_eink: layer damage region count:1
07-23 13:37:19.979 1749 1749 V sunxihwc_eink: trSupport=1,isTRlimmit=1
07-23 13:37:19.980 1749 1749 V sunxihwc_eink: layer:-1306365280 top buffer:0x0 i:0 match pipe:0 0xb224200c ui:0 vi:0 ui2vi:0 current:0
07-23 13:37:19.980 1749 1749 V sunxihwc_eink: fencefd = 21,sync_count = 1238
07-23 13:37:19.981 1749 1842 V sunxihwc_eink: normal commit start
07-23 13:37:19.985 1749 1842 V sunxihwc_eink: Layer:b22365ac fd=22 refreshMode is EINK_GU16_MODE
07-23 13:37:19.986 1749 1842 V sunxihwc_eink: RGB
07-23 13:37:19.986 1749 1842 V sunxihwc_eink: setupDisplayInfo: LINE:1489 handle->format=2,bpp0=4
07-23 13:37:19.986 1749 1842 V sunxihwc_eink: de2commitToDisplay: frameCount=1237,w*h=(1024 ,758)refreshMode=EINK_GU16_MODE,rectangleEnabled=0
07-23 13:37:19.986 1749 1842 V sunxihwc_eink: No damage region or client target found,Nothing commit!
07-23 13:37:19.986 1749 1842 V sunxihwc_eink: submit_inc_count = 1238
07-23 13:37:19.986 1749 1842 V sunxihwc_eink: normal commit end
07-23 13:37:19.986 1748 1748 I [Gralloc]: ion_alloc from ion_client:7 via heap type SYSTEM(mask:1) for 3145792 Bytes cached buffer successfully, usage = 0x00000933
07-23 13:37:20.025 1907 1932 D Region : Region surface:queuebuffer (this=0xa3c75ee0, count=1)
07-23 13:37:20.025 1907 1932 D Region : [ 0, 0, 758, 1024]
07-23 13:37:20.044 1749 1749 I sunxihwc_eink: layer damage region count:1
07-23 13:37:20.044 1749 1749 V sunxihwc_eink: trSupport=1,isTRlimmit=1
07-23 13:37:20.044 1749 1749 V sunxihwc_eink: layer:-1306365280 top buffer:0x0 i:0 match pipe:0 0xb224200c ui:0 vi:0 ui2vi:0 current:0
07-23 13:37:20.045 1749 1749 V sunxihwc_eink: fencefd = 20,sync_count = 1239
07-23 13:37:20.046 1749 1842 V sunxihwc_eink: normal commit start
07-23 13:37:20.050 1749 1842 V sunxihwc_eink: Layer:b223664c fd=32 refreshMode is EINK_GU16_MODE
07-23 13:37:20.050 1749 1842 V sunxihwc_eink: RGB
07-23 13:37:20.050 1749 1842 V sunxihwc_eink: setupDisplayInfo: LINE:1489 handle->format=2,bpp0=4
07-23 13:37:20.050 1749 1842 V sunxihwc_eink: de2commitToDisplay: frameCount=1238,w*h=(1024 ,758)refreshMode=EINK_GU16_MODE,rectangleEnabled=0
07-23 13:37:20.050 1749 1842 V sunxihwc_eink: No damage region or client target found,Nothing commit!
07-23 13:37:20.050 1749 1842 V sunxihwc_eink: submit_inc_count = 1239
07-23 13:37:20.050 1749 1842 V sunxihwc_eink: normal commit end
07-23 13:37:20.108 1749 1749 I sunxihwc_eink: layer damage region count:1
07-23 13:37:20.108 1749 1749 D sunxihwc_eink: damage0:0xb227d180 (0,0,758,1024)
07-23 13:37:20.108 1749 1749 D Region : Region hwc_set_layer_surface_damage (this=0xb227d180, count=1)
07-23 13:37:20.108 1749 1749 D Region : [ 0, 0, 758, 1024]
07-23 13:37:20.109 1749 1749 D vndksupport: Loading /vendor/lib/hw/gralloc.virgo.so from current namespace instead of sphal namespace.
07-23 13:37:20.111 1749 1749 V sunxihwc_eink: layer:0xb223628c: 0xb0a2914c:size:758 x 1024 size:3145728
07-23 13:37:20.274 1749 1749 V sunxihwc_eink: trSupport=1,isTRlimmit=1
07-23 13:37:20.274 1749 1749 V sunxihwc_eink: layer:-1306365392 top buffer:0x0 i:0 match pipe:0 0xb224200c ui:0 vi:0 ui2vi:0 current:0
07-23 13:37:20.275 1749 1749 V sunxihwc_eink: fencefd = 21,sync_count = 1240
07-23 13:37:20.276 1749 1749 I sunxihwc_eink: layer damage region count:1
07-23 13:37:20.277 1749 1749 V sunxihwc_eink: trSupport=1,isTRlimmit=1
07-23 13:37:20.277 1749 1749 V sunxihwc_eink: layer:-1306365392 top buffer:0x0 i:0 match pipe:0 0xb224200c ui:0 vi:0 ui2vi:0 current:0
07-23 13:37:20.276 1749 1842 V sunxihwc_eink: normal commit start
07-23 13:37:20.277 1749 1749 V sunxihwc_eink: fencefd = 40,sync_count = 1241
07-23 13:37:20.282 1749 1842 V sunxihwc_eink: Layer:b223646c fd=34 refreshMode is EINK_GC16_MODE
07-23 13:37:20.282 1749 1842 V sunxihwc_eink: RGB
07-23 13:37:20.282 1749 1842 V sunxihwc_eink: setupDisplayInfo: LINE:1489 handle->format=2,bpp0=4
07-23 13:37:20.282 1749 1842 V sunxihwc_eink: de2commitToDisplay: frameCount=1239,w*h=(1024 ,758)refreshMode=EINK_GC16_MODE,rectangleEnabled=0
07-23 13:37:20.282 1749 1842 V sunxihwc_eink: layer number changed,need commit
07-23 13:37:20.282 1749 1842 V sunxihwc_eink: [normal mode] area_info:(0,0,0,0) mode=4 handle= 0xb220b40c
07-23 13:37:20.282 1749 1842 V sunxihwc_eink: displayToScreen: layer_i=0,fd=34,width=1024,height=768,format=0x5
07-23 13:37:20.304 1749 1842 V sunxihwc_eink: displayToScreen: flush framebuffer to eink panel OK
07-23 13:37:20.304 1749 1842 V sunxihwc_eink: submit_inc_count = 1240
07-23 13:37:20.304 1749 1842 V sunxihwc_eink: normal commit end
07-23 13:37:20.305 1749 1842 V sunxihwc_eink: normal commit start
07-23 13:37:20.305 1749 1842 V sunxihwc_eink: Layer:b223650c fd=41 refreshMode is EINK_GC16_MODE
07-23 13:37:20.305 1749 1842 V sunxihwc_eink: RGB
07-23 13:37:20.305 1749 1842 V sunxihwc_eink: setupDisplayInfo: LINE:1489 handle->format=2,bpp0=4
07-23 13:37:20.305 1749 1842 V sunxihwc_eink: de2commitToDisplay: frameCount=1240,w*h=(1024 ,758)refreshMode=EINK_GC16_MODE,rectangleEnabled=0
07-23 13:37:20.305 1749 1842 V sunxihwc_eink: No damage region or client target found,Nothing commit!
07-23 13:37:20.305 1749 1842 V sunxihwc_eink: submit_inc_count = 1241
07-23 13:37:20.305 1749 1842 V sunxihwc_eink: normal commit end
07-23 13:37:21.511 1907 1932 I PowerManagerService: Sleeping (uid 1000)...
07-23 13:37:21.511 1907 1932 I DisplayPowerController: Blocking screen off
07-23 13:37:21.512 1907 1932 I DisplayPowerController: Unblocked screen off after 1 ms
07-23 13:37:21.513 1907 1932 D ysh : screenTurnedOff mStandbyMode = 1
07-23 13:37:21.519 3104 3104 V NativeGlue: Pause: 0xa512a3e0
07-23 13:37:21.521 3104 3104 V Timeout : onPause
07-23 13:37:21.523 1907 1930 I DisplayManagerService: Display device changed state: "内置屏幕", OFF
07-23 13:37:21.523 1758 1758 D SurfaceFlinger: Set power mode=0, type=0 flinger=0xb4c36000
07-23 13:37:21.524 1749 1749 D sunxihwc_eink: set mode 0 0
07-23 13:37:21.539 1907 3143 W LocalDisplayAdapter: Unable to find color mode 0, ignoring request.
07-23 13:37:21.548 3104 3104 V NativeGlue: SaveInstanceState: 0xa512a3e0
07-23 13:37:21.550 1907 1930 D InputManager-JNI: viewportType = 1
07-23 13:37:21.550 1907 1930 D InputManager-JNI: viewportType = 2
07-23 13:37:21.551 1907 1975 I InputReader: Reconfiguring input devices. changes=0x00000004
07-23 13:37:21.555 1739 1876 V audio_hw_primary: adev_set_parameters, screen_state=off
07-23 13:37:21.557 3104 3104 V NativeGlue: Stop: 0xa512a3e0
07-23 13:37:21.560 1907 1907 I POWERHINT: screen OFF
07-23 13:37:21.768 2022 2033 I zygote : Background concurrent copying GC freed 110533(4MB) AllocSpace objects, 0(0B) LOS objects, 50% free, 5MB/11MB, paused 230us total 118.328ms
press power button to on
07-23 13:38:47.519 1907 1975 W NEW_LOCK: KeyEvent.KEYCODE_POWER.1
07-23 13:38:47.519 1907 1975 W NEW_LOCK: KeyEvent.KEYCODE_POWER.3.down=true
07-23 13:38:47.532 1907 1975 D WindowManager: hungUp=falsemScreenshotChordVolumeDownKeyTriggered=false mA11yShortcutChordVolumeUpKeyTriggered=false gesturedServiceInterceptedfalse
07-23 13:38:47.532 1907 1975 I PowerManagerService: Waking up from sleep (uid=1000 reason=android.policy:POWER)...
07-23 13:38:47.546 1907 1975 D PowerManagerService: Wake up rason: android.policy:POWER;standby mode: 1
07-23 13:38:47.547 1907 1932 D PowerManagerService: hide logo begine,isLogoShow =true, mBackGroundImg =android.widget.ImageView{bfa74f2 V.ED..... ......I. 0,0-758,1024}
07-23 13:38:47.551 1907 1932 W AppOps : Finishing op nesting under-run: uid 1000 pkg android code 24 time=0 duration=0 nesting=0
07-23 13:38:47.584 3104 3104 V NativeGlue: WindowFocusChanged: 0xa512a3e0 -- 1
07-23 13:38:47.593 3104 3119 D Region : Region surface:queuebuffer (this=0x96c7d6e0, count=1)
07-23 13:38:47.593 3104 3119 D Region : [ 0, 0, 758, 1024]
07-23 13:38:47.606 1907 1932 I DisplayPowerController: Blocking screen on until initial contents have been drawn.
07-23 13:38:47.606 1907 1932 D ysh : screenTurningOn mStandbyMode = 0
07-23 13:38:47.613 1907 1932 D ActivityStack: isSystemReady
07-23 13:38:47.614 1907 1932 I ActivityStack: powerhint:normal
07-23 13:38:47.614 1752 1752 I AW_PowerHAL: ==NORMAL MODE==
07-23 13:38:47.656 1907 1932 W LocalDisplayAdapter: Unable to find color mode 0, ignoring request.
07-23 13:38:47.670 3104 3104 V NativeGlue: Start: 0xa512a3e0
07-23 13:38:47.673 1739 1876 V audio_hw_primary: adev_set_parameters, screen_state=on
07-23 13:38:47.675 1907 1975 W NEW_LOCK: KeyEvent.KEYCODE_POWER.1
07-23 13:38:47.675 1907 1975 W NEW_LOCK: KeyEvent.KEYCODE_POWER.3.down=false
07-23 13:38:47.676 1907 1930 D InputManager-JNI: viewportType = 1
07-23 13:38:47.676 1907 1930 D InputManager-JNI: viewportType = 2
07-23 13:38:47.677 1907 1975 I InputReader: Reconfiguring input devices. changes=0x00000004
07-23 13:38:47.681 1758 1758 D SurfaceFlinger: Set power mode=2, type=0 flinger=0xb4c36000
07-23 13:38:47.684 1907 1907 I POWERHINT: screen on
07-23 13:38:47.684 3104 3104 V NativeGlue: Resume: 0xa512a3e0
07-23 13:38:47.686 3104 3104 V Timeout : onResume: updating system timeout: 5
07-23 13:38:47.686 3104 3104 V Timeout : onResume
07-23 13:38:47.689 1907 1930 I DisplayManagerService: Display device changed state: "内置屏幕", ON
07-23 13:38:47.695 1907 1961 W LocalDisplayAdapter: Unable to find color mode 0, ignoring request.
07-23 13:38:47.697 1907 1930 D InputManager-JNI: viewportType = 1
07-23 13:38:47.697 1907 1930 D InputManager-JNI: viewportType = 2
07-23 13:38:47.699 1907 1975 I InputReader: Reconfiguring input devices. changes=0x00000004
07-23 13:38:47.709 1749 1749 D sunxihwc_eink: set mode 2 1
07-23 13:38:47.730 1749 1749 I sunxihwc_eink: layer damage region count:1
07-23 13:38:47.730 1749 1749 D sunxihwc_eink: damage0:0xb227d180 (0,0,758,1024)
07-23 13:38:47.730 1749 1749 D Region : Region hwc_set_layer_surface_damage (this=0xb227d180, count=1)
07-23 13:38:47.730 1749 1749 D Region : [ 0, 0, 758, 1024]
07-23 13:38:47.731 1749 1749 D vndksupport: Loading /vendor/lib/hw/gralloc.virgo.so from current namespace instead of sphal namespace.
07-23 13:38:47.732 1749 1749 V sunxihwc_eink: layer:0xb223682c: 0xb0a2900c:size:758 x 1024 size:3145728
07-23 13:38:47.739 1749 1749 V sunxihwc_eink: trSupport=1,isTRlimmit=1
07-23 13:38:47.739 1749 1749 V sunxihwc_eink: layer:-1306365392 top buffer:0x0 i:0 match pipe:0 0xb224200c ui:0 vi:0 ui2vi:0 current:0
07-23 13:38:47.740 1749 1749 V sunxihwc_eink: fencefd = 20,sync_count = 1242
07-23 13:38:47.741 1749 1842 V sunxihwc_eink: normal commit start
07-23 13:38:47.745 1749 1842 V sunxihwc_eink: Layer:b223678c fd=27 refreshMode is EINK_GU16_MODE
07-23 13:38:47.745 1749 1842 V sunxihwc_eink: RGB
07-23 13:38:47.745 1749 1842 V sunxihwc_eink: setupDisplayInfo: LINE:1489 handle->format=2,bpp0=4
07-23 13:38:47.745 1749 1842 V sunxihwc_eink: de2commitToDisplay: frameCount=1241,w*h=(1024 ,758)refreshMode=EINK_GU16_MODE,rectangleEnabled=0
07-23 13:38:47.745 1749 1842 V sunxihwc_eink: layer number changed,need commit
07-23 13:38:47.745 1749 1842 V sunxihwc_eink: [normal mode] area_info:(0,0,0,0) mode=84 handle= 0xb220b38c
07-23 13:38:47.745 1749 1842 V sunxihwc_eink: displayToScreen: layer_i=0,fd=27,width=1024,height=768,format=0x5
07-23 13:38:47.747 3104 3104 V Surface : surface changed {
07-23 13:38:47.747 3104 3104 V Surface : width: 758
07-23 13:38:47.747 3104 3104 V Surface : height: 1024
07-23 13:38:47.747 3104 3104 V Surface : format: OPAQUE
07-23 13:38:47.747 3104 3104 V Surface : }
07-23 13:38:47.748 3104 3104 V NativeGlue: NativeWindowRedrawNeeded: 0xa512a3e0 -- 0x96c7d008
07-23 13:38:47.761 3104 3119 D Region : Region surface:queuebuffer (this=0x96c7d6e0, count=1)
07-23 13:38:47.761 3104 3119 D Region : [ 0, 0, 758, 1024]
07-23 13:38:47.767 1749 1842 V sunxihwc_eink: displayToScreen: flush framebuffer to eink panel OK
07-23 13:38:47.767 1749 1842 V sunxihwc_eink: submit_inc_count = 1242
07-23 13:38:47.767 1749 1842 V sunxihwc_eink: normal commit end
07-23 13:38:47.792 3104 3104 V NativeGlue: NativeWindowRedrawNeeded: 0xa512a3e0 -- 0x96c7d008
07-23 13:38:47.792 1749 1749 I sunxihwc_eink: layer damage region count:1
07-23 13:38:47.792 1749 1749 D sunxihwc_eink: damage0:0xb227d180 (0,0,758,1024)
07-23 13:38:47.792 1749 1749 D Region : Region hwc_set_layer_surface_damage (this=0xb227d180, count=1)
07-23 13:38:47.792 1749 1749 D Region : [ 0, 0, 758, 1024]
07-23 13:38:47.793 1749 1749 D vndksupport: Loading /vendor/lib/hw/gralloc.virgo.so from current namespace instead of sphal namespace.
07-23 13:38:47.794 1749 1749 V sunxihwc_eink: trSupport=1,isTRlimmit=1
07-23 13:38:47.794 1749 1749 V sunxihwc_eink: layer:-1306365280 top buffer:0x0 i:0 match pipe:0 0xb224200c ui:0 vi:0 ui2vi:0 current:0
07-23 13:38:47.794 1749 1749 V sunxihwc_eink: fencefd = 23,sync_count = 1243
07-23 13:38:47.796 1749 1842 V sunxihwc_eink: normal commit start
07-23 13:38:47.801 1749 1842 V sunxihwc_eink: Layer:b22361ec fd=31 refreshMode is EINK_GU16_MODE
07-23 13:38:47.801 1749 1842 V sunxihwc_eink: RGB
07-23 13:38:47.801 1749 1842 V sunxihwc_eink: setupDisplayInfo: LINE:1489 handle->format=2,bpp0=4
07-23 13:38:47.801 1749 1842 V sunxihwc_eink: de2commitToDisplay: frameCount=1242,w*h=(1024 ,758)refreshMode=EINK_GU16_MODE,rectangleEnabled=0
07-23 13:38:47.801 1749 1842 V sunxihwc_eink: [normal mode] area_info:(0,0,0,0) mode=84 handle= 0xb220b40c
07-23 13:38:47.802 1749 1842 V sunxihwc_eink: displayToScreen: layer_i=0,fd=31,width=1024,height=768,format=0x5
07-23 13:38:47.806 3104 3119 D Region : Region surface:queuebuffer (this=0x96c7d6e0, count=1)
07-23 13:38:47.806 3104 3119 D Region : [ 0, 0, 758, 1024]
07-23 13:38:47.817 1907 1930 D ActivityRecord: isSystemReady
07-23 13:38:47.817 1752 1752 I AW_PowerHAL: ==NORMAL MODE==
07-23 13:38:47.819 1907 1932 I DisplayPowerController: Unblocked screen on after 213 ms
07-23 13:38:47.820 1907 1932 W PowerManagerService: Screen on took 302 ms
07-23 13:38:47.823 1749 1842 V sunxihwc_eink: displayToScreen: flush framebuffer to eink panel OK
07-23 13:38:47.823 1749 1842 V sunxihwc_eink: submit_inc_count = 1243
07-23 13:38:47.823 1749 1842 V sunxihwc_eink: normal commit end
07-23 13:38:47.855 1749 1749 I sunxihwc_eink: layer damage region count:1
07-23 13:38:47.855 1749 1749 D sunxihwc_eink: damage0:0xb227d180 (0,0,758,1024)
07-23 13:38:47.855 1749 1749 D Region : Region hwc_set_layer_surface_damage (this=0xb227d180, count=1)
07-23 13:38:47.855 1749 1749 D Region : [ 0, 0, 758, 1024]
07-23 13:38:47.856 1749 1749 D vndksupport: Loading /vendor/lib/hw/gralloc.virgo.so from current namespace instead of sphal namespace.
07-23 13:38:47.857 1749 1749 V sunxihwc_eink: trSupport=1,isTRlimmit=1
07-23 13:38:47.857 1749 1749 V sunxihwc_eink: layer:-1306365056 top buffer:0x0 i:0 match pipe:0 0xb224200c ui:0 vi:0 ui2vi:0 current:0
07-23 13:38:47.858 1749 1749 V sunxihwc_eink: fencefd = 20,sync_count = 1244
07-23 13:38:47.859 1749 1842 V sunxihwc_eink: normal commit start
07-23 13:38:47.864 1749 1842 V sunxihwc_eink: Layer:b22363cc fd=29 refreshMode is EINK_GU16_MODE
07-23 13:38:47.864 1749 1842 V sunxihwc_eink: RGB
07-23 13:38:47.864 1749 1842 V sunxihwc_eink: setupDisplayInfo: LINE:1489 handle->format=2,bpp0=4
07-23 13:38:47.864 1749 1842 V sunxihwc_eink: de2commitToDisplay: frameCount=1243,w*h=(1024 ,758)refreshMode=EINK_GU16_MODE,rectangleEnabled=0
07-23 13:38:47.864 1749 1842 V sunxihwc_eink: [normal mode] area_info:(0,0,0,0) mode=84 handle= 0xb220b38c
07-23 13:38:47.864 1749 1842 V sunxihwc_eink: displayToScreen: layer_i=0,fd=29,width=1024,height=768,format=0x5
07-23 13:38:47.886 1749 1842 V sunxihwc_eink: displayToScreen: flush framebuffer to eink panel OK
07-23 13:38:47.886 1749 1842 V sunxihwc_eink: submit_inc_count = 1244
07-23 13:38:47.886 1749 1842 V sunxihwc_eink: normal commit end
07-23 13:38:47.917 1749 1749 I sunxihwc_eink: layer damage region count:1
07-23 13:38:47.917 1749 1749 V sunxihwc_eink: trSupport=1,isTRlimmit=1
07-23 13:38:47.917 1749 1749 V sunxihwc_eink: layer:-1306365056 top buffer:0x0 i:0 match pipe:0 0xb224200c ui:0 vi:0 ui2vi:0 current:0
07-23 13:38:47.918 1749 1749 V sunxihwc_eink: fencefd = 23,sync_count = 1245
07-23 13:38:47.919 1749 1842 V sunxihwc_eink: normal commit start
07-23 13:38:47.923 1749 1842 V sunxihwc_eink: Layer:b22368cc fd=31 refreshMode is EINK_GU16_MODE
07-23 13:38:47.923 1749 1842 V sunxihwc_eink: RGB
07-23 13:38:47.923 1749 1842 V sunxihwc_eink: setupDisplayInfo: LINE:1489 handle->format=2,bpp0=4
07-23 13:38:47.923 1749 1842 V sunxihwc_eink: de2commitToDisplay: frameCount=1244,w*h=(1024 ,758)refreshMode=EINK_GU16_MODE,rectangleEnabled=0
07-23 13:38:47.923 1749 1842 V sunxihwc_eink: No damage region or client target found,Nothing commit!
07-23 13:38:47.923 1749 1842 V sunxihwc_eink: submit_inc_count = 1245
07-23 13:38:47.923 1749 1842 V sunxihwc_eink: normal commit end
07-23 13:38:49.049 1907 1932 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:966 com.android.server.power.PowerManagerService$PowerManagerHandler.handleMessage:4557 android.os.Handler.dispatchMessage:106 android.os.Looper.loop:164 android.os.HandlerThread.run:65
07-23 13:38:49.051 1907 1932 E ActivityManager: Sending non-protected broadcast android.eink.force.refresh from system 1907:system/1000 pkg android
07-23 13:38:49.051 1907 1932 E ActivityManager: java.lang.Throwable
07-23 13:38:49.051 1907 1932 E ActivityManager: at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:19215)
07-23 13:38:49.051 1907 1932 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:19727)
07-23 13:38:49.051 1907 1932 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:19964)
07-23 13:38:49.051 1907 1932 E ActivityManager: at android.app.ContextImpl.sendBroadcast(ContextImpl.java:970)
07-23 13:38:49.051 1907 1932 E ActivityManager: at com.android.server.power.PowerManagerService$PowerManagerHandler.handleMessage(PowerManagerService.java:4557)
07-23 13:38:49.051 1907 1932 E ActivityManager: at android.os.Handler.dispatchMessage(Handler.java:106)
07-23 13:38:49.051 1907 1932 E ActivityManager: at android.os.Looper.loop(Looper.java:164)
07-23 13:38:49.051 1907 1932 E ActivityManager: at android.os.HandlerThread.run(HandlerThread.java:65)
07-23 13:38:49.051 1907 1932 E ActivityManager: at com.android.server.ServiceThread.run(ServiceThread.java:46)
07-23 13:38:49.064 1907 1932 E ActivityManager: Sending non-protected broadcast android.eink.force.refresh from system 1907:system/1000 pkg android
07-23 13:38:49.064 1907 1932 E ActivityManager: java.lang.Throwable
07-23 13:38:49.064 1907 1932 E ActivityManager: at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:19215)
07-23 13:38:49.064 1907 1932 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:19822)
07-23 13:38:49.064 1907 1932 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:19964)
07-23 13:38:49.064 1907 1932 E ActivityManager: at android.app.ContextImpl.sendBroadcast(ContextImpl.java:970)
07-23 13:38:49.064 1907 1932 E ActivityManager: at com.android.server.power.PowerManagerService$PowerManagerHandler.handleMessage(PowerManagerService.java:4557)
07-23 13:38:49.064 1907 1932 E ActivityManager: at android.os.Handler.dispatchMessage(Handler.java:106)
07-23 13:38:49.064 1907 1932 E ActivityManager: at android.os.Looper.loop(Looper.java:164)
07-23 13:38:49.064 1907 1932 E ActivityManager: at android.os.HandlerThread.run(HandlerThread.java:65)
07-23 13:38:49.064 1907 1932 E ActivityManager: at com.android.server.ServiceThread.run(ServiceThread.java:46)
07-23 13:38:49.099 1749 1749 I sunxihwc_eink: layer damage region count:1
07-23 13:38:49.099 1749 1749 D sunxihwc_eink: damage0:0xb227d180 (0,0,1024,758)
07-23 13:38:49.099 1749 1749 D Region : Region hwc_set_layer_surface_damage (this=0xb227d180, count=1)
07-23 13:38:49.099 1749 1749 D Region : [ 0, 0, 1024, 758]
07-23 13:38:49.099 1749 1749 V sunxihwc_eink: trSupport=1,isTRlimmit=1
07-23 13:38:49.100 1749 1749 V sunxihwc_eink: layer:-1306365056 top buffer:0x0 i:0 match pipe:0 0xb224200c ui:0 vi:0 ui2vi:0 current:0
07-23 13:38:49.101 1749 1749 V sunxihwc_eink: fencefd = 20,sync_count = 1246
07-23 13:38:49.101 1749 1842 V sunxihwc_eink: normal commit start
07-23 13:38:49.110 1749 1842 V sunxihwc_eink: Layer:b22366ec fd=29 refreshMode is EINK_GC16_MODE
07-23 13:38:49.111 1749 1842 V sunxihwc_eink: RGB
07-23 13:38:49.111 1749 1842 V sunxihwc_eink: setupDisplayInfo: LINE:1489 handle->format=2,bpp0=4
07-23 13:38:49.111 1749 1842 V sunxihwc_eink: de2commitToDisplay: frameCount=1245,w*h=(1024 ,758)refreshMode=EINK_GC16_MODE,rectangleEnabled=0
07-23 13:38:49.111 1749 1842 V sunxihwc_eink: [normal mode] area_info:(0,0,1023,757) mode=4 handle= 0xb220b38c
07-23 13:38:49.111 1749 1842 V sunxihwc_eink: displayToScreen: layer_i=0,fd=29,width=1024,height=768,format=0x5
07-23 13:38:49.144 1749 1842 V sunxihwc_eink: displayToScreen: flush framebuffer to eink panel OK
07-23 13:38:49.144 1749 1842 V sunxihwc_eink: submit_inc_count = 1246
07-23 13:38:49.144 1749 1842 V sunxihwc_eink: normal commit end