Sat 26 May 2018

Filed under GSoC 2018

Tags android gentoo gsoc

Summary

This week was planned as the last week for the first (Preparation) and second (Gaining control of the system) parts in my GSoC 2018 proposal. I'm pleased to announce that I've successfully hit the target as planned: a video demonstration posted on Twitter can be watched here.

Reading and following the instructions in the following articles in order would form a complete, detailed tutorial to reproduce the work up to this point:

Important repositories (excl. experimental ones that do not mean much) created up to this point (the repository names are clickable):

  • android_device_huawei_angler: holds patch to disable the forced Full-Disk Encryption (as described in the "What's Next?" section in this article);
  • preinit_angler: holds the preinit, initramfs structure, and Makefile rules to easily unpack and repack Android boot.img;
  • android-lxc-files: holds patches, LXC config, startup and stop hooks, and helper scripts for the proper functioning of Android in LXC;
  • android_kernel_huawei_angler: holds the modified version of Android kernel source along with config tweaks to build a LXC-ready kernel with Gentoo cross-compile toolchain.

The above repositories still lack proper READMEs, and I put that as the main task for part 4 (Cleaning up) in my GSoC project, whose main goal is to create proper documentation for future pickup.

We still lack some sort of distribution / release method, but I think that belongs to the goals in the third part of the project (Taking Android apart), as we'll have stage3 tarballs and automatic setup scripts available directly at the end of that part of work.

We need to modify Android framework to enable it to inform the host about its states. We also need some sort of interface (e.g. an app) in the Android world to perform actions outside the container (e.g. initialize system updates, switch LXC profiles, etc.) as we proceed further in part 3 of this project. Some other goals yet to achieve are recorded in the "Known Problems" section in Starting Android in LXC.

Plans for the coming weeks

June is drawing near, and it's time for my final-term examinations in the university. Just as planned in the time schedule, I'll pause all activities of GSoC during June, except filling the form for First Evaluation at around June 15, and restoring to full work capacity at the end of June. Looking forward to the third part (Taking Android apart) of the project. Thanks for everyone that devoted time to help me through the second part of the project--it was very fun and I learned a lot in the process.

Happy hacking!

Comment

Sat 26 May 2018

Filed under Android

Tags android lxc gsoc gentoo

Preface

After successfully booting Gentoo on Nexus 6P in the previous article, we can move on to launching Android in LXC, which is the last mission in the first period of my GSoC 2018 project. This article documents the process to bring up Android successfully with most of its functions …

Read More

Sat 26 May 2018

Filed under Android

Tags android linux kernel gentoo

Preface

To run LXC, we need a kernel that has the options required by LXC on. This article shows how to build an Android kernel that has the required options on, built by Gentoo's latest stable cross-compile toolchain built by crossdev.

Install Cross-Compile Toolchain

We'll use crossdev, a set of …

Read More

Fri 25 May 2018

Filed under Gentoo

Tags android gentoo gsoc

Preface

As we now have preinit and the crucial UART console available, we can start bringing up the real GNU/Linux system--Gentoo Linux in this case. This article will focus on the following topics:

  • Filesystem structure and mounting procedure (in details)
  • Launch sequence to bring up OpenRC
  • Crafting a preinit …
Read More

Tue 22 May 2018

Filed under GSoC 2018

Tags hardware gsoc

The story

As described here, Google baked a serial console into the headphone jack of their Nexus and Pixel devices. A serial console would be feasible for debugging problems with init as well as tinkering the device when it has booted into Linux and haven't started Android yet. My journey …

Read More

KireinaHoro (jsteward) 's place © KireinaHoro Powered by Pelican and Twitter Bootstrap. Icons by Font Awesome and Font Awesome More