Build Android Source Code 8.1.0 on Ubuntu 18.04 LTS
Sep 9, 2018 · 1 min read
Step 1: Get the source code
Follow Android’s official guide to setup environment, and download the source code.
I use the branch:
OPM6.171019.030.K1 | android-8.1.0_r46 | Oreo |Nexus 5X and Nexus 6P
Step 2: Build
make -j4
Problems
- Failed on lexer
[ 1% 943/68307] Lex: applypatch <= bootable/recovery/edify/lexer.llFAILED: out/target/product/generic/obj/STATIC_LIBRARIES/libedify_intermediates/lexer.cpp/bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -oout/target/product/generic/obj/STATIC_LIBRARIES/libedify_intermediates/lexer.cpp bootable/recovery/edify/lexer.ll"flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.Aborted (core dumped)[ 1% 950/68307] target thumb C++: libapplypatch <= bootable/recovery/applypatch/applypatch.cppninja: build stopped: subcommand failed.23:35:52 ninja failed with: exit status 1
Run export LC_ALL=C in the command line before run make