• Android

    Android Build System OverView

    Status: Draft (as of May 18, 2006) Contents This article comes from the build/core/build-system.html file in the Android source code. Since I couldn’t find an online version of the build/core/build-system.html file, I’ve formatted it and put it here for your viewing. 1 Objective The primary goals of reworking the build system are (1) to make dependencies work more reliably, so that when files need to rebuilt, they are, and (2) to improve performance of the build system so that unnecessary modules are not rebuilt, and so doing a top-level build when little or nothing needs to be done for a build takes as little time as possible. 2 Principles and…

  • Tetragon ebpf
    Ebpf,  kubernetes,  Linux

    eBPF Tetragon Compilation and Debugging Guide

    This article provides a introduction to compiling and debugging with the eBPF-based Tetragon tool. It covers configuring Vagrant and VirtualBox, methods for capturing and analyzing eBPF events using Tetragon and Tetra, as well as compiling Tetragon in Docker and debugging in Kubernetes clusters. Debugging Dependencies The Tetragon GitHub documentation specifies that debugging is conducted within VirtualBox. Therefore, before starting debugging, you need to install Vagrant and VirtualBox. The Tetragon source code provides a Vagrant configuration. When starting VirtualBox via Vagrant, it will automatically install all dependencies and tools. For details, refer to the Tetragon source code. Starting the Virtual Machine Start and log in to the VirtualBox virtual machine with…

  • Setup Android 12 Build Environment
    Android,  未分类

    Setup Android 12 Build Environment

    This is the first article in the Android series, introducing the process of setting up and debugging the Android development environment. The following demonstrates the process of setting up the environment on Ubuntu 20.04. Installing Android 12 Environment Dependencies Reference documentation for environment dependencies: Setting Up the Build Environment sudo apt-get install git-core gnupg flex bison build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 libncurses5 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig Downloading Android 12 Source Code Downloading the Repo Tool Downloading the Repo Tool AOSP code is managed via git, and multiple git repositories are managed using the repo tool. Before downloading the code, you need to download…

  • Kubernetes Plugin Development and Security Monitoring
    Cloud-Native,  Docker,  kubernetes

    Kubernetes Plugin Development and Security Monitoring

    This article explores Kubernetes plugin development, security measures for Kubernetes and Docker, and network monitoring. It covers Kubernetes plugin management tool Krew, common commercial solutions, open-source Docker security tools, eBPF network monitoring, as well as related books and resources, serving as a comprehensive and practical technical guide. 1. Forms of Kubernetes Plugin Development Kubernetes (K8s) is an open-source container orchestration platform widely used for managing and deploying containerized applications. To address diverse user needs, K8s supports various forms of plugin development. 1.1 Krew Krew is a tool for managing, publishing, and searching kubectl plugins. With Krew, users can conveniently install and manage various plugins to enhance kubectl’s functionality. Features: Krew…

  • Guide to Developing Vim Plugins with Python
    Tools,  vim

    Guide to Developing Vim Plugins with Python

    Vim, being a highly customizable text editor, allows users to extend its functionality by writing plugins. This guide will detail how to develop custom plugins using Vim script and Python, and demonstrate how to install, manage, and utilize these plugins effectively. What are Vim Plugins? Vim plugins are scripts or programs designed to enhance and customize the functionality of the Vim editor. They can perform various tasks such as syntax highlighting, auto-completion, file operations, and integration with external tools. Basic Steps to Develop Vim Plugins 1. Define the Plugin’s Goals and Features Before starting, it’s essential to define the goals and expected features of your plugin. This helps in effectively…

  • Adding a Custom System Service in Android
    Android

    Adding a Custom System Service in Android

    In the Android operating system, System Services are core components that provide system-level services such as power management, window management, package management, and more. Creating and registering a custom System Service can extend the functionality of Android and provide new system services to applications. This article will detail how to add a custom System Service in Android. Prerequisites Before starting, ensure you have the following: Basic knowledge of Android development. Familiarity with building and debugging Android source code. Access to modify the Android source code. Android System Service Architecture Before diving into the code, it’s important to understand the architecture of Android System Services. Android System Services use the Binder…

  • Android,  English,  Selinux

    Understand Android Vendor SELinux Policy Build

    Since the introduction of the Treble framework in Android 8, Android has divided the system into System and Vendor parts, allowing independent upgrades of system and vendor. Subsequently, Product, ODM, and other partitions were introduced. In this context, SELinux policies are also divided into several parts: platform (system), system_ext, product, vendor, and odm. This article uses the Vendor partition as an example to analyze in detail how to include sepolicy files in the Android build system, how Android.mk variables are passed to the Soong build system, and finally how they correspond to modules and variables in Android.bp. 1. Including SELinux Policy Files in Android Makefile First, the SELinux policy files…