Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to compile/build android aapt on new platform?

I'd like to recompile android aapt for debian amd64 platform. We can have the source code on git but I don't understand how to compile it. There is a simili makefile (Android.mk) which seems not to be complete and dependant to others.

There is a Makefile in build.git/core. Do i need to get all the android source code to recompile only aapt ? I'd prefer to only recompile this tool but if I need to compile complete sdk, tell me. Any help would be appreciate.

Thanks

like image 526
Jerome VDL Avatar asked May 13 '11 09:05

Jerome VDL


1 Answers

Step 1: Get android source following instructions here: https://source.android.com/setup/build/downloading

Step 2: Setup environment: source build/envsetup.sh

This adds a number of useful commands to your env.

Read more here: https://source.android.com/setup/build/building

Step 3: Run mmm /frameworks/base/tools

This will selectively build all the tools, including aapt as well as it's dependencies. This is much faster than building everything in android.

Aapt has been replaced by aapt2 since this question was asked. The binary will be located in out/soong/host/linux-x86/bin/aapt2 when building on Linux. Replace linux-x86 with your os.

like image 101
fizzybear Avatar answered Oct 08 '22 06:10

fizzybear