RK3288 RK3399 ARM Chromebook

I acquired a RK3288 ARM Cortex A17 (arm hard float) based Chromebook: the Asus C201 (or the shiny metal twin Asus Flip C100PA) and I love it: long battery life, light and easy to carry around and has suspend and wifi working (yes I mean working).

This wiki describes the software customizations I did on this ultrabook. I recently transitioned to the RK3399 based Asus C100PA second generation (USBC) to which most of the below notes still applies.

You can refer to chromebook codenames here, C201 RK3288 is speedy based on veyron board and C101PA RK3399 is bob based on gru board.

ChromeOS tips

open a crosh terminal: CTRL-ALT-t and then launch a shell with shell command under crosh (more crosh options there)

In order to switch to the "debian desktop" you need to hold jointly CTRL+ALT+SHIFT+FORWARD keys (FORWARD is the key next to REFRESH on the top) when using the xorg XMETHOD otherwise the fullscreen key will do just fine.

For some reasons adb, fastboot etc. are not available on stretch: you need to install manually via dpkg -i the sid packages or prioritize the repositories to view sid packages. It is available here: adbfastbootfsutils. I tried to recompile the package manually but there are some issues not trivial to fix.

WARNING DO NOT DO THIS SINCE IT INTERFERES WITH CROUTON UPDATES!!! Another way to proceed is to add unstable debian packages into the apt source list with proper apt-pinning via

Intel based installation

Some stuff you would need to run properly Android SDK command line tools on Intel based platforms (yes I know this is an ARM chromebook thus not relevant here):

apt install lib32z1

Attempt to build Android SDK on ARM (WIP)

In order to compile Android applications on the chromebook, I started to build the Android SDK following the instructions detailed here and cloning the files there. Note that currently Android build system does not yet support arm host compilation. Here are the steps I followed:

Get Android AOSP source following these instructions and get shallow git restricting pull to be of depth 1 to gain space on non infinite storage host

as a user launch exagear desktop (uname -a will tell you that you are i686 arch):

exagearsudo apt install wine32

then install office 2007

after this in order not to crash office applications launch winecfg and go in Applications -> Wine -> Configure Wine -> Libraries, search for riched20 then click add and then modify it to choose "native Windows"

Note that exagear is a bit overkill because it installs another i386 chroot inside the crouton arm chroot, there might be a way to use the original debian arm chroot with the i386 architecture added. It would result in a tremendous saving in disk space which matters on chromebooks. Question has been asked to exagear developper and the answer is negative :-(.

Printing

Only way I found is to install a cups server (http://localhost:631 to configure) and export as pdf and the print the resulting page through crouton with lp -o position=top,fit-to-page,scaling=100,media=a4 file.pdf

Flip xorg discussions At this point there is a remaining issue that xorg complains about "unable to load driver: rockchip_dri.so".

You can go back and forth from xorg to chrome through <CTRL>+<ALT>+<SHIFT>+<->> and for avoiding the white screen you can still get to the console with <CTRL>+<ALT>++<<-> from chromeos.

video driver: the freon way

Following flip xorg crouton discussions https://github.com/dnschneid/crouton/issues/2426 it seems that modesetting driver should be used instead of fbdev and there is already some arm acceleration in freon, to enable it using xorg XMETHOD just use the following xorg.conf:

Tuning of the driver various options can be achieved through xinput --list-props 7

Conclusion

I would stick with xorg XMETHOD with modesetting driver since it does have less strange susped/resume issues and chromeos<->xorg switch glitches and cmt driver for the Elan touchpad driver.

But I have issues after switching back from suspend to have xorg not freezing.

I thus now use xiwi because it simply works...

Accelerated video decoding

Disclaimer: please note that this section is still WIP and nothing works so far...

The best result I have so far to play videos is through xorg XMETHOD with modesetting driver and mplayer using x11 video output (not hardware accelerated) that is good enough for H264 1080p lite decoding.

vlc under chromeos is unstable.

I am eagerly waiting for Google Play support on the deivces to switch to Archos Video Player...

Misc issues

Xiwi not launching because of undefined symbol

I ran into the issue of xiwi not launching because of undefined symbol in xorg dummy_drv.so (ChangeWindowProperty). It was fixed in mergeboat branch and instead of waiting I just did:

sudo CROUTON_BRANCH=mergeboat sh $HOME/Downloads/crouton -u ...

but it did not help.

In order to solve the issue I had to download xf86-server-dummy source from debian stretch, apply the diff and then extract from crouton targets/xiwi script in mergeboat branch the patch and rebuild manually after applying the deb package.

Loss of sdcard after suspend

The utmost annoying problem with chromebooks and crouton is that there is no real solution for already more than 3 years to the problem of loss of sdcard/usb stick after suspend preventing running crouton from external storage. This is really a shame because of the limited storage size of the current chromebooks and lack of ssd upgrade on recent models.

In order to learn more about this problem you can refer to these long threads:

For x86 architecture it will work on devices that are using a non USB based mmc sdcard reader (e.g. Acer R11) and will not with USB based mmc sdcard readers (e.g. Toshiba chromebook 2).

I believe that this suspend_umount_manager.cc should not be a generic code but more architecture or device dependent since many SoC having a direct mmc interface (e.g. ARM) can manage suspend by their own without force unmount.

Note to self: if a chromebook is to be bought check i) to have eMMC solution not soldered on the board (all new chromebooks do not fulfill this requirement unfortunately) to upgrade the internal storage capacity and, ii) if an intel is to be chosen make sure that the mmc controller is not on usb.

Get google play on your C201 (and others) before it is released

Yes this is possible (if there is a mention of ARC in chromeos settings/about version), you just need to fiddle with the chrome dev options and enable ARC:

Approach is to use a "Frankenstein" hybrid setup faking x86_64 architecture using qemu-x86_64 at the rescue but using ARM based Oracle JDK.

Note that exagear cannot be used since it only supports 32bits and Android SDK is only x86_64 (64bits) (but exagear is working on 64b support but this will be anticipated to be much slower than what is proposed here since what is proposed it to used an hybrid ARM/x86_64-qemued).

Compilation of "simple" java only apps (Android studio and gradle)

You thus need to rely on qemu-x86_64 and properly register x86_64 magic to binfmt for seamless detection and execution:

After this just download and run android studio for linux x86_64 architecture.

Note that android-studio/jre/bin/java fails to execute. In order to solve this issue and boost things up download Oracle ARM jdk, install it in /opt/jdk and point android-studio/jre to this directory /opt/jdk:/opt/android-studio/jre/bin/java.

Go in chromebook settings->search for android->GooglePlay settings->android preferences->about->click 5 times on build to be a developer and then switch on adb under developer settings.Connect to Android under chroot via (not using localhost:22 as advised https://developer.android.com/topic/arc/studio):

adb connect 100.115.92.2:5555

Afterwards you can install any application via adb that you have locally compiled and run it without an emulator: sweet!

If you experience issues and you cannot see any devices after connecting with adb devices try through Android settings to revoke all adb authentication tokens and cycle off/on adb.