Tag: x86

Ubuntu for Android on XOLO X900

This post is synchronized from (click here for best display effect): https://zohead.com/archives/ubuntu-for-xolo-x900/ Lava XOLO X900 smartphone use Intel Atom Z2460 x86 CPU, so we can try to make some modifications to default Android system, then we can get a tentative Ubuntu for Android system. The important part of this is we can run x86 version Ubuntu, which is much more useful than ARM version Ubuntu (you can do nothing without source code, no proprietary software at all). Let’s see the final Ubuntu for Android effect (on Motorola LapDock 100): For now, I can run some quite useful program like: Skype, Ubuntu One, sopcast in this Ubuntu system on Android. And the most brilliant thing is we can run Ubuntu and Android system simultaneously, Ubuntu is running on another display screen, doesn’t affect Android system at all, we don’t need VNC to remote login to Ubuntu. Click here for introduction about Canonical’s Ubuntu for Android: http://www.ubuntu.com/devices/android Requirements of Canonical’s Ubuntu for Android: Dual-core Android smartphone, at least 512MB RAM; support secondary frame buffer; support USB OTG While sad point is secondary frame buffer is not enabled on XOLO X900, cause stock kernel only register a /dev/graphics/fb0 frame buffer device. But we the powerful USB OTG, so we can use USB external display adapter to provide secondary frame buffer. Devices & accessories we need: Motorola LapDock 100 (for display screen, keyboard and mouse input, quite convenient, of course you can use your own display device) DisplayLink USB display adapter USB OTG cable HDMI cable 1. Prepare x86 Ubuntu system: Cause XOLO X900 only has 16GB ROM space, and consider about speed and expansibility, you’d better use Class 10 microSD card (otherwise your Ubuntu system’s performance may not be good), and install Ubuntu in hidden microSD slot of XOLO X900. You can check […]

构建Lava XOLO X900非官方kernel

本文同步自(最佳显示效果请点击):https://zohead.com/archives/xolo-x900-kernel/ 本文目标为 Lava XOLO X900 这一印度咖喱味手机,同样 Intel Atom Z2460 的芯,移植 kernel 的方法和之前的联想 K800 手机基本一致,具体请移步下面的链接: https://zohead.com/archives/k800-kernel-otg-udisk/ 经过确认 XOLO X900 默认也是 Android 4.0.4 ROM,同样 3.0.8 kernel,当然硬件会有所不同,不过 OTG U盘所需要使用的 usb-storage 模块也是和 K800 一样默认没有开启的。 基于基本相同的 kernel source,先使用 Medfield 默认的配置 i386_mfld_defconfig,发现与现有的 kernel 差距比较多,然后用 Moto 的 i386_mfld_moto_defconfig 编译出的模块加载依然 panic。没办法,硬着头皮与实际运行中 kernel 情况进行对比,发现基于默认配置 i386_mfld_defconfig 进行修改是比较好的方法,而且看得出 XOLO 相对联想还是做了一定的优化,去掉了像 CONFIG_DEBUG_KERNEL 之类的很多调试选项,默认允许了 tun 驱动等。另外声卡相关的配置不同的地方也比较多,经过最终改动和确认,编译之后,先已能成功加载并使用之前在 K800 上编译的那些模块。 XOLO X900 的内核模块和配置文件的下载地址: http://miseal.googlecode.com/files/x900-kernel-config-modules.7z 使用方法和 K800 的基本一致,只是 CIFS 文件系统的使用上有变动: insmod des_generic.ko insmod md4.ko insmod cifs.ko ASIX Electronics 的 USB 以太网卡的驱动 asix.ko 也已经更新到官方最新的版本(kernel 自带的版本无法使用)。 现已基本可以确认我改动之后的 kernel 和 X900 现有 kernel 的相似性已有 90% 或以上了,不过由于 X900 手机悲剧滴将 bootloader 给锁了,无法刷未签名的 kernel,暂时还没有太好的办法来直接替换 kernel 进行测试哦。 另外有一些需要说明的地方: XOLO X900 现有 kernel 中支持 Kineto GAN 虚拟网卡驱动(支持 VOIP 网络电话的),Moto Razr i 公开的 kernel source 中却并没有这个的支持,为此我手工增加了这个的驱动(上面下载的 kernel configuration 中也有的); 目前还有 apwr3_0、pax、sep3_7 这三个非免费开源的内核模块没有源代码,暂时也没有办法在网上找到,不过从现在来看,似乎 X900 实际运行时也未使用这三个模块。 同样我不对任何导致你的手机 panic 挂掉的后果承担责任,有任何问题欢迎提出指正哦 ^_^

Android x86对native ARM的支持

本文同步自(最佳显示效果请点击):https://zohead.com/archives/android-x86-arm-binary/ 之前入手联想 K800 这款使用 Intel x86 CPU 的手机时考虑过一个问题,就是 Android x86 对于已有的 Android 程序的兼容问题问题,特别是对于一些使用了 native ARM 代码的程序(以游戏居多),因为不可能原来所有的程序都可以及时更新来支持 x86 的 Android 手机(本来就很小众)。在我的想法中,Intel x86 环境下应该不可能直接运行 native 的 ARM 二进制代码(虚拟机那种不考虑),不过考虑到平时玩使用 native ARM 代码的游戏也不多,就没有在意。 我们先来看一个典型的使用了 native ARM library 的 Android 程序:《Bejeweled 2》,也就是大家在电脑上很熟悉的《宝石迷阵2》游戏的 Android 版本,查看 apk 安装文件里的内容,可以明显发现其使用了 ARM EABI 的动态库: 但我在 K800 上安装此游戏,完全可以正常运行并使用,只是似乎没有在 ARM Android 手机上运行的那么顺畅。 这就比较疑惑了,接下来那就进一步验证一下,将之前静态编译的一个 ARM 可执行程序拷到手机,在终端中运行,竟然也可以正常运行,我们看看这个 ARM 可执行程序的格式: 经过一番搜寻之后,发现原来 Android x86 4.0 版本之后已经开始支持对 native ARM 的仿真,这对于之前用处似乎一直不是很大的 Android x86 来说绝对可以算是相当大的进步。 联想 K800 使用的 CPU 是 Intel Atom Z2460,基于 Intel Medfield 平台,尽管 Z2460 是一款使用 x86 指令集的 CPU,但可以兼容运行大部分带有 native ARM 代码的应用,关键就是靠 Intel 并未公开发表的技术 ARM binary code translator,而且 binary translator 对于应用程序来说是透明的,一般不需要做任何特殊的改动。 在 Android x86 上 Google 修改了 dalvik 虚拟机的加载 native code 的函数(修改 libdvm,增加 libdvm_houdini.so),通过 Intel ARM to Atom binary translator 实现 JNI 调用。Android x86 中引入了 libhoudini.so 来做这件事情,通过查看 K800 的根文件系统,我们可以看到除了 /system/lib 下的标准的 x86 的动态库文件之外,新增了 /system/lib/libhoudini.so 库,另外 /system/lib/arm 目录下还有很多 ARM 版本的库文件。 下面是我在 K800 上运行一个 native ARM 程序时的进程输出: 上面看到的 /system/bin/houdini 进程即为在 Android x86 上运行的 native ARM 程序的表现形式。 从现在在 K800 手机上实际的测试情况来看,在 K800 上运行使用 native ARM 的 Android 似乎都还比较顺畅,像愤怒的小鸟就可以很顺畅的运行,这和现在 K800 用的 Android 4.0.4 ROM 也有关系,相对于不支持 native ARM 的 Android 2.3.7,游戏的兼容性是有相当大的改善的。另外很有可能 Intel Medfield 平台硬件上就有对 ARM binary translator 的加速功能。 当然这种二进制的转换必然会有性能上的损失,无法和 x86 原生程序相比,因此越来越多的 Android 程序也开始集成了 x86 版本的程序和库文件,来看看最新版本的水果忍者 apk 安装程序中的库文件列表,就可以看到 x86 版本: 有关 Android x86 运行 native ARM 程序的介绍: http://www.anandtech.com/show/5770/lava-xolo-x900-review-the-first-intel-medfield-phone/3 Android x86 下运行环境的搭建: http://www.buildroid.org/blog/?p=198