Tech Potpourri

2022

Step Debugging Android Native Framework in VS Code

4 minute read

Published:

Tracing the execution flow of Android Framework and debugging your own system components are significantly more convenient with the step debugging capability. It saves the trouble of frequently instrumenting the Android sources. This post will show how to enable this capability using LLDB and VS Code.

Building A Sideload Shell Program in Android

4 minute read

Published:

A normal Android app almost always comes with graphics interfaces (except for services) and limited privileges. In this post I’ll show how to write a program (in Java or C/C++) that runs in headless mode and possesses system-level privileges, which can be used to perform various tasks in practice such as system service monitoring, debugging and performance profiling.

Enable VoLTE/ViLTE on Pixel in Unlisted Regions

4 minute read

Published:

In this post I’ll document the steps to enable VoLTE/ViLTE (or their counterparts in 5G such as VoNR) on Google Pixel devices in unlisted regions, e.g., China. For Chinese operators (e.g., China Unicom), Pixel devices are already shipped with the corresponding Qualcomm modem mbn files, which are placed under /system/vendor/rfs/msm/mpss/readonly/vendor/mbn/mcfg_sw/generic/China/. However, such files are not enabled by default, which renders VoLTE/ViLTE unusable in China.

Include Intel Houdini in Android-x86

1 minute read

Published:

In this post I’ll document the necessary steps for incorporating Intel Houdini in Android-x86 9. Note that this does not work on Android 10+.

2021

Modify Board and CPU Info in Android-x86

less than 1 minute read

Published:

In this post I’ll introduce how to make your Android-x86 more like a real device by changing its board and CPU configurations. I’ll use the configurations of Samsung Galaxy S20 Ultra as example.

Incorporate OpenGApps into Android-x86

1 minute read

Published:

In this post I’ll show the configurations required to build Android-x86 source with OpenGApps, which provides Google Play and GMS so that your customized Android-x86 can enjoy apps from Google Play.

Linux Graphics Stack

6 minute read

Published:

Due to heavy historical burden, the Linux graphics stack is extremely complex with fragmented and intricate software components. As a result, it’s quite exhausting to fully grasp its core idea and principles. This has posed significant challenges to my recent work on graphics virtualization of Android. Fortunately, after days of struggling with its sources and prior technical posts, I may have obtained some levels of understandings regarding the framework of the Linux graphics stack. SO, before I completely lose track of the story and to benefit other unfortunate comrades, I decide to document everything here in this post.

2020

Importing Linux Kernel Code to VS Code

1 minute read

Published:

In this post I’ll take you to import kernel code to VS Code for a nice code viewing and developing experience. You can say goodbye to CLion which eats your memory without mercy. This tutorial will be based on the Android-x86 source tree which contains Linux kernel almost identical to the upstream kernel.

VIRTIO-GPU Work Flow

1 minute read

Published:

virtio-gpu属于virtio系列I/O虚拟化方案,采用类虚拟化设计,Guest端需要内置virtio驱动(>Linux 4.4均已配置,Android x86源码kernel/drivers/virtio中可查看)。virtio驱动的基本结构为前后端设计,前端为Guest OS驱动,后端为模拟器端逻辑,前后端通过virtqueue队列(由环形缓冲区vring实现)进行数据交换。