We're hiring!
*

Quick hack: Precompiling APK files during Android AOSP build

Robert Foss avatar

Robert Foss
February 23, 2017

Share this post:

Reading time:

By precompiling APK files during AOSP build a few minutes can be shaved off of the development iteration time on most commonly found Android hardware.

Enable precompilation

cd /opt/aosp_checkout/

find . -name BoardConfig.mk
./device/huawei/angler/BoardConfig.mk
./device/generic/mini-emulator-x86/BoardConfig.mk
./device/generic/arm64/BoardConfig.mk
./device/generic/mini-emulator-x86_64/BoardConfig.mk
./device/generic/mini-emulator-armv7-a-neon/BoardConfig.mk
./device/generic/mips/BoardConfig.mk
./device/generic/mips64/BoardConfig.mk
./device/generic/x86_64/BoardConfig.mk
./device/generic/mini-emulator-arm64/BoardConfig.mk
./device/generic/mini-emulator-mips/BoardConfig.mk
./device/generic/x86/BoardConfig.mk
./device/generic/armv7-a-neon/BoardConfig.mk
./device/generic/mini-emulator-mips64/BoardConfig.mk
./device/lge/bullhead/BoardConfig.mk
./device/linaro/generic/linaro_x86_64_only/BoardConfig.mk
./device/linaro/generic/linaro_arm64/BoardConfig.mk
./device/linaro/generic/linaro_arm64_only/BoardConfig.mk
./device/linaro/generic/linaro_x86_64/BoardConfig.mk
./device/linaro/generic/BoardConfig.mk
./device/linaro/generic/linaro_arm/BoardConfig.mk
./device/linaro/hikey/hikey/BoardConfig.mk

# Edit the BoardConfig.mk that you are using for your build
cd device/linaro/generic/
nano BoardConfig.mk

# Add the config option
WITH_DEXPREOPT := true

# Propagate the new settings
make defconfig
make all

 

Increase system partition size

Depending on the previous system partition size and how many APKs that are built, you may need to increase the system partition size.

nano configs/defconfig

# Change the below variable to something big enough to house all of you binaries
CONFIG_BOARD_SYSTEMIMAGE_PARTITION_SIZE=1100000000

# Propagate the new settings
make defconfig
make all

 

Thanks!

This post has been a part of work undertaken by my employer Collabora.

Original post

Comments (0)


Add a Comment






Allowed tags: <b><i><br>Add a new comment:


Search the newsroom

Latest Blog Posts

Mesa CI and the power of pre-merge testing

08/10/2024

Having multiple developers work on pre-merge testing distributes the process and ensures that every contribution is rigorously tested before…

A shifty tale about unit testing with Maxwell, NVK's backend compiler

15/08/2024

After rigorous debugging, a new unit testing framework was added to the backend compiler for NVK. This is a walkthrough of the steps taken…

A journey towards reliable testing in the Linux Kernel

01/08/2024

We're reflecting on the steps taken as we continually seek to improve Linux kernel integration. This will include more detail about the…

Building a Board Farm for Embedded World

27/06/2024

With each board running a mainline-first Linux software stack and tested in a CI loop with the LAVA test framework, the Farm showcased Collabora's…

Smart audio filters with WirePlumber 0.5

26/06/2024

WirePlumber 0.5 arrived recently with many new and essential features including the Smart Filter Policy, enabling audio filters to automatically…

The latest on cmtp-responder, a permissively-licensed MTP responder implementation

12/06/2024

Part 3 of the cmtp-responder series with a focus on USB gadgets explores several new elements including a unified build environment with…

Open Since 2005 logo

Our website only uses a strictly necessary session cookie provided by our CMS system. To find out more please follow this link.

Collabora Limited © 2005-2024. All rights reserved. Privacy Notice. Sitemap.