Xref Aosp (Extended · Overview)

Even experts misuse xref AOSP occasionally. Here are the top mistakes:

Paper: “Understanding Android OS Fragmentation and Its Impact on Updates” (Wei et al., 2017)

Paper: “Towards Modernizing the Android Update System with Project Treble” (Google white paper style, but often discussed in academic venues like ACM MobiCom 2018 workshops) xref aosp

Google continues to invest in cs.android.com. Recent improvements include:

For developers, this means xref AOSP will only become more central to the workflow. Even experts misuse xref AOSP occasionally

When you get hundreds of reference results, use the filter sidebar on the left:

For example, to find all native (C++) callers of android::IBinder::transact, filter the path to *.cpp and *.h. Paper: “Towards Modernizing the Android Update System with

AOSP generates IDE project files natively.

# From your AOSP root
source build/envsetup.sh
lunch aosp_cf_x86_64_phone-userdebug
make idegen && development/tools/idegen/idegen.sh

This creates android.ipr and android.iml. Opening this in Android Studio gives you:

Because AOSP is huge, run xref from the root of your AOSP checkout:

cd ~/aosp
xref -f . --recursive --output ./xref_db

Note: This will take a while (30–60 minutes on a fast machine) and eat ~10–15 GB of disk. You can limit directories:

xref -f frameworks/base system/core --recursive --output ./xref_db