28 November, 2025

AOSP 15 Learning RoadMap

AOSP 15 Learning Roadmap

BEGINNER
  • Android Architecture Overview
    Learn Android layers: Apps, Framework, HAL, Kernel
    Resource: Android Developer Guide
    Difficulty: ⭐ | Est. Time: 2–3 hrs
    💡 Tips & Notes
    • Focus on the role of the Linux kernel in Android.
    • Understand the separation between app and framework layers.
    • Draw architecture diagrams to visualize interactions.
  • Setting Up AOSP Build Environment
    Install Ubuntu 22.04, dependencies, repo tool, and sync source
    Resource: AOSP Setup Guide
    Difficulty: ⭐⭐ | Est. Time: 3–5 hrs
    💡 Tips & Notes
    • Allocate at least 200 GB disk space for source and build output.
    • Set up ccache to speed up rebuilds.
    • Keep a record of all environment variables for reproducibility.
  • Building AOSP for Emulator
    Lunch, build, and run with launch_cvd (Cuttlefish)
    Resource: Cuttlefish Docs
    Difficulty: ⭐⭐ | Est. Time: 3–6 hrs
    💡 Tips & Notes
    • Use `m` for partial builds during iterative testing.
    • Verify `/dev/kvm` for virtualization support.
    • Document build flags and options for consistency.
INTERMEDIATE
  • Understanding System Services
    Explore Binder, HAL, and native services
    Resource: System Architecture Docs
    Difficulty: ⭐⭐⭐ | Est. Time: 4–6 hrs
    💡 Tips & Notes
    • Start with Binder communication basics between processes.
    • Experiment with modifying a simple HAL module.
    • Log service outputs to trace behavior.
  • Modifying Framework Code
    Add a simple feature or tweak system UI
    Resource: Framework Docs
    Difficulty: ⭐⭐⭐ | Est. Time: 6–8 hrs
    💡 Tips & Notes
    • Use `repo sync` carefully to avoid overwriting changes.
    • Build specific modules to save time.
    • Keep a separate branch for experiments.
  • Running and Debugging Emulator
    Use adb, logcat, and device monitor
    Resource: Logcat Guide
    Difficulty: ⭐⭐ | Est. Time: 3–4 hrs
    💡 Tips & Notes
    • Set filters to focus on your module logs.
    • Use `adb shell` for direct device inspection.
    • Monitor CPU, memory, and storage usage for performance tuning.
ADVANCED
  • Custom ROM Modifications
    Change build.prop, system apps, or add new APKs
    Resource: Build Customization Docs
    Difficulty: ⭐⭐⭐⭐ | Est. Time: 5–8 hrs
    💡 Tips & Notes
    • Always back up your AOSP build before making changes.
    • Test on emulator first before real device deployment.
    • Keep track of commit history to revert if needed.
  • Integrating Hardware Drivers
    Add or update HAL for custom device components
    Resource: Hardware Docs
    Difficulty: ⭐⭐⭐⭐ | Est. Time: 6–10 hrs
    💡 Tips & Notes
    • Check kernel compatibility before adding drivers.
    • Compile drivers separately for testing.
    • Use logs to confirm proper hardware initialization.
EXPERT
  • Android Internals & Security
    SELinux policies, system security, and low-level debugging
    Resource: Security Docs
    Difficulty: ⭐⭐⭐⭐⭐ | Est. Time: 8–12 hrs
    💡 Tips & Notes
    • Understand SELinux modes: permissive vs enforcing.
    • Trace system calls for security analysis.
    • Keep a separate test environment for risky experiments.
  • Performance Tuning & Profiling
    Optimize CPU, memory, storage, and app performance
    Resource: Profiling Guide
    Difficulty: ⭐⭐⭐⭐⭐ | Est. Time: 6–10 hrs
    💡 Tips & Notes
    • Use `systrace` and `perfetto` for deep performance metrics.
    • Benchmark before and after changes.
    • Profile both emulator and real devices for comparison.
  • Contributing to AOSP
    Submit patches, participate in code reviews, maintain modules
    Resource: Contributing Guide
    Difficulty: ⭐⭐⭐⭐⭐ | Est. Time: Variable
    💡 Tips & Notes
    • Follow AOSP commit and review guidelines strictly.
    • Start with small bug fixes or documentation improvements.
    • Maintain a clean Git history for your contributions.

13 November, 2025

AOSP 15 Setup on ThinkBook 16p G5 IRX – Part 2

System Update & Essentials

System Refresh Script

#!/bin/bash
echo "============================================="
echo "🕒 System refresh started at: $(date)"
echo "============================================="
sudo apt update
sudo apt upgrade -y
sudo apt autoremove -y
sudo apt autoclean
echo "---------------------------------------------"
echo "✅ Last refresh completed: $(date)"
echo "---------------------------------------------"

AOSP Repository Setup

Emulator Scripts

#!/bin/bash
case "$1" in
  start)
    emulator &
    ;;
  stop)
    pkill -f emulator
    ;;
  status)
    ps aux | grep -E 'emulator|qemu' 
    ;;
  clean)
    rm -rf ~/.android/avd/*
    ;;
  *)
    echo "Usage: $0 {start|stop|status|clean}"
    ;;
esac

Dual Monitor Script

#!/bin/bash
INTERNAL="eDP-1"
EXTERNAL="HDMI-1-0"

if xrandr | grep "^$EXTERNAL connected" >/dev/null; then
    xrandr --output $INTERNAL --auto --primary --output $EXTERNAL --mode 3840x2160 --scale 2x2
    echo "Dual monitor setup applied: $INTERNAL + $EXTERNAL"
else
    xrandr --output $INTERNAL --auto --primary
    echo "External monitor not detected. Using internal display only."
fi

Automated Monitor Detection

#!/bin/bash
EXT_MON=$(xrandr | grep " connected " | grep -v "eDP" | cut -d' ' -f1)
if [ -z "$EXT_MON" ]; then
    xrandr --output eDP-1 --auto --scale 1x1 --primary
else
    xrandr --output eDP-1 --off \
           --output "$EXT_MON" --auto --scale 2x2 --primary
fi

Collapsible Tips & Warnings

29 October, 2025

Building Android from Source (AOSP 15) on Lenovo ThinkBook 16p G5 IRX

🚀 Building Android from Source (AOSP 15) on Lenovo ThinkBook 16p G5 IRX

Author: Porfy Vidal
Platform: Ubuntu 22.04 LTS
Target: AOSP 15 (Vanilla Ice Cream, Cuttlefish Emulator)


🧩 1. System Overview

After multiple rebuilds and optimizations, this guide shows the complete setup for a working AOSP 15 development environment on the Lenovo ThinkBook 16p G5 IRX with Ubuntu 22.04.

Key goals:

  • Compile AOSP 15 from source
  • Run Cuttlefish emulator (x86_64 phone)
  • Enable ADB access and app installation
  • Automate system maintenance tasks

⚙️ 2. Preparing Ubuntu 22.04

Install the essentials and developer tools:

sudo apt update && sudo apt install -y \

  openjdk-17-jdk python3 git-core gnupg flex bison gperf build-essential \

  zip curl zlib1g-dev libc6-dev libncurses5-dev libncurses5 \

  x11proto-core-dev libx11-dev libgl1-mesa-dev libxml2-utils xsltproc unzip \

  fontconfig repo ccache

Optional (but useful) developer tools:

sudo apt install -y htop nvtop iotop baobab gnome-disk-utility gparted \

  vim nano gnome-tweaks filezilla qbittorrent chrome-gnome-shell


🧰 3. Set Up the AOSP Source Tree

mkdir ~/aosp15

cd ~/aosp15

repo init -u https://android.googlesource.com/platform/manifest -b aosp-main

To sync specific components only (faster iteration):

repo sync -j1 --fail-fast external/ComputeLibrary external/apache-harmony \

external/aws-sdk-java-v2 prebuilts/remoteexecution-client prebuilts/tools

Expected output:

repo sync has finished successfully.


🧱 4. Build Configuration

cd ~/aosp15

source build/envsetup.sh

Choose the target build:

lunch aosp_cf_x86_64_phone-trunk_staging-userdebug


🖥️ 5. Installing Cuttlefish Emulator Packages

Download the following from the official AOSP Cuttlefish build server:

cvd-host_package.tar.gz

aosp_cf_x86_64_only_phone-img-14253210.zip

Extract them:

mkdir ~/cuttlefish

tar -xzf ~/Downloads/cvd-host_package.tar.gz -C ~/cuttlefish

unzip ~/Downloads/aosp_cf_x86_64_only_phone-img-14253210.zip -d ~/cuttlefish

Verify images exist:

ls ~/cuttlefish | grep img

You should see:

boot.img

init_boot.img

super.img

userdata.img

vendor_boot.img

...


🧪 6. Launching the Emulator

cd ~/cuttlefish/bin

./launch_cvd

Once launched, check ADB connectivity:

adb devices

Expected:

List of devices attached

0.0.0.0:6520	device

Open an interactive shell:

adb shell


📦 7. Installing Apps via ADB

To install an APK:

adb install MyApp.apk

For .xapk packages:

  1. Unzip the .xapk.
  2. Find the contained .apk file.
  3. Install it:
adb install app.apk


🧼 8. System Maintenance Automation

Create /usr/local/bin/sysrefresh to automate updates and cleanup:

#!/bin/bash

echo "============================================="

echo "🕒 System refresh started at: $(date)"

echo "============================================="



echo "🔄 Checking for package updates..."

UPDATES=$(apt list --upgradable 2>/dev/null | grep -v Listing | wc -l)

if [ "$UPDATES" -eq 0 ]; then

  echo "☑️  No updates were needed. System is already up to date."

else

  echo "🛠️  Installing updates..."

  sudo apt update && sudo apt upgrade -y

fi



echo "🧹 Performing cleanup..."

sudo apt autoremove -y

sudo apt autoclean -y



echo "🧠 Disk space usage summary:"

df -h | grep -E '^/dev/nvme|Filesystem'

echo "---------------------------------------------"

echo "✅ Last refresh completed: $(date)"

echo "---------------------------------------------"

echo "🟢 sysrefresh complete."

Make it executable:

sudo chmod +x /usr/local/bin/sysrefresh

Run it any time:

sysrefresh


🖥️ 9. Display Configuration

Switching to Xorg restored full dual-monitor support.

Current setup:

  • Internal display: eDP-1 (3200×2000)
  • External monitor: HDMI-1-0 (3840×2160)

Dual display:

xrandr --output eDP-1 --primary --mode 3200x2000 --pos 0x0

xrandr --output HDMI-1-0 --mode 3840x2160 --right-of eDP-1 --scale 0.5x0.5

External only:

xrandr --output eDP-1 --off --output HDMI-1-0 --auto

Internal only:

xrandr --output HDMI-1-0 --off --output eDP-1 --auto


🧩 10. Summary of Achievements

  • ✅ AOSP 15 environment successfully built
  • ✅ Cuttlefish emulator running smoothly
  • ✅ ADB functional for app install and testing
  • ✅ Automated maintenance script (sysrefresh)
  • ✅ Dual-display working under Xorg
  • ✅ Optimized Ubuntu 22.04 for development

💡 Final Thoughts

This setup transforms the ThinkBook 16p G5 IRX into a powerful Android development workstation. While the process takes patience, once configured, the environment is stable and production-ready.

“Building Android from source isn’t just about compiling code — it’s about understanding the entire ecosystem.”


Guidance provided with the help of ChatGPT (OpenAI) 

Till then!

11 October, 2025

Visual Studio 2026. Finally!

11-Oct-2025


Visual Studio 2026 is finally here!

I began using Visual Studio since installation disks were using a floppy. So much has evolved since then. And then, Microsoft would always release a new version like every two years.

From Visual Studio 2019, it took a while for Visual Studio 2022 to be released. That was the initial veersion where the IDE was using 64 bit.

But then, it took much longer for the next version after VS 2022 to be released.

But then again, the wait is over!

Visual Studio 2026 is here.

The article that I read which led me to the download site says that you have to be a Visual Studio Insider to be able to download the installer. For sure, I am a Windows Insider, but Visual Studio Insider?

Nonetheless, out of curiosity and having waited for sooooo looooong, I clicked the link.

And lo and behold, I was able to download the Visual Studio 2026 installer. Finally!

I run the installer, tried the IDE, and yes, I like it!

Try it!

Visual Studio 2026 Insider

Enjoy!

Till then.


28 February, 2025

Winhance - Debloat and Enhance Windows!

 Ever thought of ways to debloat and enhance Windows 11?


I have. 


Since I tried Windows 11 and found that it runs faster and better than Windows 10. I like the functions being put into icons where I can just click the task away. That is at least 1 mouse click less, compared to the old way of right mouse way of doing things.


Right out of the box, Windows 11 already rocks. That's at least how I find this latest Windows OS. But...


There's always room for improvement.


There is the File Explorer that remains the same in its performance - slow, clumsy way of copying files. That is why I have never let go of NiceCopier since Windows 7. Yes, since Windows 7. I got fed up with a very bad file management UI, and have tried many external file manager applications, where some actually are sold at a price. From here, you can understand that there is really something lacking about Windows' own set of applications, not to mention Windows itself. It's not perfect, we know, just like other OSes, but at least make it decently super even though imperfect (yet).


Then there is the issue with slowness when doing file search, or, even when it is fast, returns limited result, and more often not finding what you wanted to find. I used Everything for this. It's a free application that I find super-efficient, and very flexible in the options that you can apply when doing file search. It can even search file content.


And so on, and so forth.


Lately, I read about debloating Windows 11 so it runs even faster -- and better.


Winhance!


And of course, as in all new things, there's a caveat emptor attached to it. But don't lose heart. Exercise caution, and you still get a better Windows 11, or at least, less bloatware to deal with.


From BetaNews, this article about Winhance gave me some info that I understand could make Windows 11 lighter and faster, better.


I have a number of laptops. Different brands. Acer. HP. Lenovo. Asus. There is the eMachines, which was an old brand under Acer. And also, Compaq.


Why am I listing down my PC brands? Because part of what Winhance do is to uninstall applications, including Bing, Microsoft Edge and some of its variants, OneDrive, etc.


And if you do choose to remove Edge, then Lenovo PCs will be impacted. I found that Lenovo Vantage is using Edge (API), so it will try to install Edge before it is able to work. And since part of Winhance's logic is to prevent the re-installation of an uninstalled program, that's good as always having to install Edge, then Vantage, every time you boot up. So when that did happen to me, I reinstalled Edge. Yes, Winhance include the option of installing some applications, which, of course, include Edge.


Then there is the 'clean up' part. This is where you really must be very careful, or all of your icons, thumbnails, Taskbar, etc. - will be gone! I'd say it like that, gone. But not really. If you include clean up of Taskbar, it will be wiped clean. Well, this is just unpinning those icons, which is similar to wiping your Taskbar clean. Yes, it happened to me. I reverted that change and put back all those icons into the Taskbar one by one.


Okay, Nuff said. I leave some room for you to try Winhance and see how it works for you. Hope you like it. Really!


Let us know, will ya?


Till then!