9/24/2016 用chroot的在android上跑linux图形应用程序 - By 王奥丞 http://ppt.a1ex.wang/md/android-x86.md?print=1 1/12
http://ppt.a1ex.wang/md/android-x86.md?print=1 1/12 - - PowerPoint PPT Presentation
http://ppt.a1ex.wang/md/android-x86.md?print=1 1/12 - - PowerPoint PPT Presentation
9/24/2016 chroot android linux - By http://ppt.a1ex.wang/md/android-x86.md?print=1 1/12 9/24/2016 chroot android linux
9/24/2016 用chroot的在android上跑linux图形应用程序 - By 王奥丞 http://ppt.a1ex.wang/md/android-x86.md?print=1 2/12
Linux GUI App on Android
9/24/2016 用chroot的在android上跑linux图形应用程序 - By 王奥丞 http://ppt.a1ex.wang/md/android-x86.md?print=1 3/12
目标
将android变成一个生产力工具, 不只是一个手机操作系统 androidstudio, opengl应用程序 Demo
9/24/2016 用chroot的在android上跑linux图形应用程序 - By 王奥丞 http://ppt.a1ex.wang/md/android-x86.md?print=1 4/12
Linux GUI App在桌面Linux上如何运行1
9/24/2016 用chroot的在android上跑linux图形应用程序 - By 王奥丞 http://ppt.a1ex.wang/md/android-x86.md?print=1 5/12
Linux GUI App在桌面Linux上如何运行2
- 1. 动态库问题
- 2. X.org的X Server实现复杂难以复用, 自己实现X11 Protocol?
- 3. 直接操作framebuffer, 或者直接访问driver, 移植性差
9/24/2016 用chroot的在android上跑linux图形应用程序 - By 王奥丞 http://ppt.a1ex.wang/md/android-x86.md?print=1 6/12
Wayland Architecture
放弃XWindow的架构, 用Wayland的架构 用Android提供API来实现显示和input事件处理
9/24/2016 用chroot的在android上跑linux图形应用程序 - By 王奥丞 http://ppt.a1ex.wang/md/android-x86.md?print=1 7/12
chroot + archlinux
修改当前进程和子进程的根目录 在该环境下安装archlinux arch和android共享kernel和/proc, /dev, /sys少数几个目录 解决动态库问题 新的根目录结构
/ -> Original /data/arch/chroot |-- dev -> Original /dev |-- proc -> Original /proc |-- sys -> Original /sys |-- mnt -> Original / |-- data -> Original /data |-- bin |-- etc |-- usr |-- lib ...
9/24/2016 用chroot的在android上跑linux图形应用程序 - By 王奥丞 http://ppt.a1ex.wang/md/android-x86.md?print=1 8/12
Weston + imagebackend
Weston是wayland协议的一个实现, 支持多种后端fb, drm...
9/24/2016 用chroot的在android上跑linux图形应用程序 - By 王奥丞 http://ppt.a1ex.wang/md/android-x86.md?print=1 9/12
App
定时读取/tmp/image.bin内容, 显示到SurfaceView 重写MainActivity的dispatchKeyEvent, dispatchTouchEvent方法, 把消息用protobuf编码发送到unix socket
9/24/2016 用chroot的在android上跑linux图形应用程序 - By 王奥丞 http://ppt.a1ex.wang/md/android-x86.md?print=1 10/12
GPU support
多次拷贝frame buffer, 可以优化
9/24/2016 用chroot的在android上跑linux图形应用程序 - By 王奥丞 http://ppt.a1ex.wang/md/android-x86.md?print=1 11/12
In the future
将一个Linux GUI应用程序对应成为一个Android App 修改Android的SurfaceView, 让weston直接写到SurfaceView的 buffer中, 减少一次内存拷贝
9/24/2016 用chroot的在android上跑linux图形应用程序 - By 王奥丞 http://ppt.a1ex.wang/md/android-x86.md?print=1 12/12