Skip to content
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

SurfaceView override. #143

Merged
merged 2 commits into from
Apr 26, 2019
Merged

SurfaceView override. #143

merged 2 commits into from
Apr 26, 2019

Conversation

pazos
Copy link
Member

@pazos pazos commented Apr 22, 2019

in order to interact with the epd driver indirectly, via the View class framework, where the epd driver is hooked.

This is part of the solution proposed in koreader/koreader#3517 (comment) to add support for tolinos, but should be compatible with other devices based on the freescale platform.

All credits to @char11, thanks pal!

Things are working fine on the emulator/phone, but I lack a eink device to test.

Please @hugleo, @carlinux, @Cellaris (or anybody with a currently supported eink device) , could you test https://www.dropbox.com/s/froawrgv4jt6h1p/koreader-android-arm-linux-androideabi-debug-v2019.04-52-g7d742e15_2019-04-22.apk?dl=0 and report if eink updates still work?. Also extra points for the output of adb logcat -c && adb logcat KOReader:D *:S

Waiting for feedback before requesting reviews, and so on. If this build still works on Rockchip devices it will be wonderful 👍

to be able to interact with the epd driver via known android view methods, like invalidate() or postInvalidate()
@Frenzie
Copy link
Member

Frenzie commented Apr 23, 2019

Waiting for feedback before requesting reviews

Looks fine to me in any case. ;-)

@carlinux
Copy link

carlinux commented Apr 23, 2019

It works as intended
plus logcat

koreader.log

Edit: UUoops... i didn't check the install (failed). So it's the 386 build indeed.

I'll do it again with the ARM apk

@pazos
Copy link
Member Author

pazos commented Apr 23, 2019

Updated the apk for the right arch. Thanks for your help @carlinux, @hugleo.

To install this package you'll need to uninstall the one you have installed. It won't delete your settings, which are stored in /sdcard/koreader.

@hugleo
Copy link
Contributor

hugleo commented Apr 23, 2019

Stuck in the update settings screen forever, clicked in the circle ball and crashed.

Can't open now, crash immediately.

Installing logcat in a minute...

20190423_185215

@hugleo
Copy link
Contributor

hugleo commented Apr 23, 2019

log.txt

@pazos
Copy link
Member Author

pazos commented Apr 23, 2019

Thanks for the log. It throws an error that seems unrelated to the changes in this PR, but I'm not sure. Pinging @Frenzie @NiLuJe

E KOReader: [main thread]: failed to run script: /data/user/0/org.koreader.launcher/files/reader.lua:178: attempt to call method 'setupDithering' (a nil value)
E KOReader: [main thread]: Stopping KOReader due to previous errors

@NiLuJe
Copy link
Member

NiLuJe commented Apr 24, 2019

That's in ffi/framebuffer.lua, and ran from reader.lua behind a Device:hasEinkScreen() check. I have no idea why that would cause an issue on Android, but then again, I'm not familiar with how it's initalized there ;).

@NiLuJe
Copy link
Member

NiLuJe commented Apr 24, 2019

Ah, the koreader asset package in the APK is not up-to-date, for some reason? (Well, it has a recent tag, and recent timestamps, but the content isn't up to date).

Is you base branch properly rebased, @pazos?

@pazos
Copy link
Member Author

pazos commented Apr 24, 2019

Is you base branch properly rebased, @pazos?

@NiLuJe nope, now I rebased and find a new build error

pazos@bowie:~/Escritorio/koreader$ ./kodev release --ignore-translation --debug android
v2019.04-58-gc0ba6ae4
Using NDK: /home/pazos/Escritorio/koreader/base/toolchain/android-ndk-r15c...
************ CMAKE_MAKE_PROGRAM: "make" **********
/bin/bash: arm-linux-androideabi-gcc: orden no encontrada
/bin/bash: arm-linux-androideabi-gcc: orden no encontrada
/bin/bash: arm-linux-androideabi-gcc: orden no encontrada

Until now I worked w/ the sdk/ndk downloaded by KOReader but now it seems that I need to export the toolchain binpath. Is that intended?

@NiLuJe
Copy link
Member

NiLuJe commented Apr 24, 2019

That's a warning we've caught on the CIs, too, it's apparently mostly harmless, though, but I'm not sure exactly where it's coming from.

The obvious guess would be shell CC calls in the makefile, but they should all be enforcing PATH now...

It more or less matches stupid warnings from CCache on other platforms, FWIW.

I can't reproduce any of it, but then I don't use ccache, and the compilers are always in my $PATH ;).

@pazos
Copy link
Member Author

pazos commented Apr 26, 2019

@NiLuJe: I finally got rid of the build error building on a clean tree.

@hugleo @carlinux: second round of tests!

https://www.dropbox.com/s/5x8rb9dlcwzjwiz/koreader-android-arm-linux-androideabi-debug-v2019.04-64-g65d72d02_2019-04-26.apk?dl=0

@hugleo
Copy link
Contributor

hugleo commented Apr 26, 2019

@NiLuJe: I finally got rid of the build error building on a clean tree.

@hugleo @carlinux: second round of tests!

https://www.dropbox.com/s/5x8rb9dlcwzjwiz/koreader-android-arm-linux-androideabi-debug-v2019.04-64-g65d72d02_2019-04-26.apk?dl=0

Looks ok now.
Opened a book, followed some pages, refresh is working.

log.txt

@pazos
Copy link
Member Author

pazos commented Apr 26, 2019

thanks for the feedback @hugleo.

@pazos pazos requested a review from Frenzie April 26, 2019 18:13
@pazos pazos changed the title [wip]: SurfaceView override. SurfaceView override. Apr 26, 2019
Copy link
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like I said, lgtm :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants