I am trying to build an SDK for iMX8MQ EVK. Below are my step:
1. source build/envsetup.sh
2. lunch evk_8mq-userdebug
3. make -j 8 (This step build android image => success)
4. make -j 8 sdk (This step build SDK => Failed)
I got these error
development/build/sdk-linux-x86.atree:36: couldn't locate source file: lib64/libaapt2_jni.so
development/build/sdk.atree:50: couldn't locate source file: bin/dmtracedump
development/build/sdk.atree:51: couldn't locate source file: bin/etc1tool
development/build/sdk.atree:81: couldn't locate source file: bin/split-select
development/build/sdk.atree:86: couldn't locate source file: bin/bcc_compat
development/build/sdk.atree:134: couldn't locate source file: bin/apksigner
development/build/sdk.atree:135: couldn't locate source file: framework/apksigner.jar
development/build/sdk.atree:138: couldn't locate source file: bin/dx
development/build/sdk.atree:139: couldn't locate source file: framework/dx.jar
development/build/sdk.atree:212: couldn't locate source file: framework/layoutlib-legacy.jar
development/build/sdk.atree:238: couldn't locate source file: system-qemu.img
development/build/sdk.atree:239: couldn't locate source file: vendor-qemu.img
development/build/sdk.atree:241: couldn't locate source file: userdata.img
development/build/sdk.atree:456: couldn't locate source file: system/app/EmulatorSmokeTests/EmulatorSmokeTests.apk
ninja: build stopped: subcommand failed.
10:51:16 ninja failed with: exit status 1#### failed to build some targets (10:07 (mm:ss)) ####
Can someone have any solution or hint? Many thanks for replying me.
Solved! Go to Solution.
Hi Thinh Nguyen,
I think I have this working now, it appears to generate an sdk, although I have not tried it yet.
I think the full steps are:
1. Do the standard build
lunch sabresd_6dq-eng
make
2. Build the missing tools
make dmtracedump
make etc1tool
make split-select
make bcc_compat
make apksigner
make dxmake libaapt2_jni
make layoutlib-legacy
3. a) Edit the file development/build/sdk.atree to comment out the reference to userdata.img
##############################################################################
# System image Component
############################################################################### System images + Kernel
system.img system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/system.img
ramdisk.img system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/ramdisk.img
#userdata.img system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/userdata.img
system/build.prop system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/build.prop# Note: the kernel image is handled by sdk-android-<abi>.atree now.
3. b) Alternatively, it appears that you can enable the creation of userdata.img (I have not tried this): https://community.nxp.com/docs/DOC-105198
4. Edit the file development/build/sdk.atree (again) to comment out the reference to EmulatorSmokeTests.apk
##############################################################################
# Tests Component
##############################################################################
#system/app/EmulatorSmokeTests/EmulatorSmokeTests.apk tests/emulator-test-apps/EmulatorSmokeTests.apk
5. Build the sdk
make sdk
Hi Thinh Nguyen,
I think I have this working now, it appears to generate an sdk, although I have not tried it yet.
I think the full steps are:
1. Do the standard build
lunch sabresd_6dq-eng
make
2. Build the missing tools
make dmtracedump
make etc1tool
make split-select
make bcc_compat
make apksigner
make dxmake libaapt2_jni
make layoutlib-legacy
3. a) Edit the file development/build/sdk.atree to comment out the reference to userdata.img
##############################################################################
# System image Component
############################################################################### System images + Kernel
system.img system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/system.img
ramdisk.img system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/ramdisk.img
#userdata.img system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/userdata.img
system/build.prop system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/build.prop# Note: the kernel image is handled by sdk-android-<abi>.atree now.
3. b) Alternatively, it appears that you can enable the creation of userdata.img (I have not tried this): https://community.nxp.com/docs/DOC-105198
4. Edit the file development/build/sdk.atree (again) to comment out the reference to EmulatorSmokeTests.apk
##############################################################################
# Tests Component
##############################################################################
#system/app/EmulatorSmokeTests/EmulatorSmokeTests.apk tests/emulator-test-apps/EmulatorSmokeTests.apk
5. Build the sdk
make sdk
Hi Brian Lee,
That sounds cool, thank for update status.
Hi,
You can refer to the Android_User's_Guide.pdf in NXP website. And the thread https://community.nxp.com/docs/DOC-340804 maybe do help for you.
Have a nice day
Rita
Hi Rita Wang,
Thank you for answer although it does not solved my issues. For Embedded System, we some time modifies Android framework that why we need to build SDK. I hope in the future NXP will help.
Hi Thinh Nguyen,
Did you solve this issue?
I am seeing the same thing when trying to create the SDK for the i.MX 6 Sabre board (MCIMX6Q-SDB).
development/build/sdk-linux-x86.atree:36: couldn't locate source file: lib64/libaapt2_jni.so
development/build/sdk.atree:48: couldn't locate source file: bin/dmtracedump
development/build/sdk.atree:49: couldn't locate source file: bin/etc1tool
development/build/sdk.atree:79: couldn't locate source file: bin/split-select
development/build/sdk.atree:84: couldn't locate source file: bin/bcc_compat
development/build/sdk.atree:132: couldn't locate source file: bin/apksigner
development/build/sdk.atree:133: couldn't locate source file: framework/apksigner.jar
development/build/sdk.atree:136: couldn't locate source file: bin/dx
development/build/sdk.atree:137: couldn't locate source file: framework/dx.jar
development/build/sdk.atree:210: couldn't locate source file: framework/layoutlib-legacy.jar
development/build/sdk.atree:238: couldn't locate source file: userdata.img
development/build/sdk.atree:453: couldn't locate source file: system/app/EmulatorSmokeTests/EmulatorSmokeTests.apk
ninja: build stopped: subcommand failed.
10:10:31 ninja failed with: exit status 1
make: *** [run_soong_ui] Error 1
Hi Brian Lee,
I am sorry I cannot solve this issue. I am learning SDK from Raspberry PI 3. I hope I can port to iMX6.
Hi Thinh Nguyen,
I have made some progress on this.
The issue seems to be that there are some missing dependencies. If I run the following commands, I can get further in the build process:
make dmtracedump
make etc1tool
make split-select
make bcc_compat
make apksigner
make dx
I now get the following error that I am debugging:
lunch sabresd_6dq-eng
make -j2 sdk
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.0.0
TARGET_PRODUCT=sabresd_6dq
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a9
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-127-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=1.0.0-rfp-rc4
OUT_DIR=out
============================================...
SDK: warning: including GNU target out/target/product/sabresd_6dq/system/etc/xtables.lock
SDK: warning: including GNU target out/target/product/sabresd_6dq/system/lib/libcups.so
SDK: warning: including GNU target out/target/product/sabresd_6dq/system/lib/libexif.so
SDK: warning: including GNU target out/target/product/sabresd_6dq/system/lib/libext2_blkid.so
SDK: warning: including GNU target out/target/product/sabresd_6dq/system/lib/libext2_com_err.so
SDK: warning: including GNU target out/target/product/sabresd_6dq/system/lib/libext2_e2p.so
SDK: warning: including GNU target out/target/product/sabresd_6dq/system/lib/libext2_misc.so
SDK: warning: including GNU target out/target/product/sabresd_6dq/system/lib/libext2_quota.so
SDK: warning: including GNU target out/target/product/sabresd_6dq/system/lib/libext2_uuid.so
SDK: warning: including GNU target out/target/product/sabresd_6dq/system/lib/libext2fs.so
SDK: warning: including GNU target out/target/product/sabresd_6dq/system/lib/libiprouteutil.so
SDK: warning: including GNU target out/target/product/sabresd_6dq/system/lib/liblz4.so
SDK: warning: including GNU target out/target/product/sabresd_6dq/system/lib/libnetlink.so
SDK: warning: including GNU target out/target/product/sabresd_6dq/system/lib/libnl.so
SDK: warning: including GNU target out/target/product/sabresd_6dq/system/lib/libopenjdkjvm.so
SDK: warning: including GNU target out/target/product/sabresd_6dq/system/lib/libselinux.so
development/build/sdk-linux-x86.atree:36: couldn't locate source file: lib64/libaapt2_jni.so
development/build/sdk.atree:210: couldn't locate source file: framework/layoutlib-legacy.jar
development/build/sdk.atree:238: couldn't locate source file: userdata.img
ninja: build stopped: subcommand failed.
13:47:35 ninja failed with: exit status 1
A little more progress:
If you do:
make libaapt2_jni
make layoutlib-legacy
It resolves two of the missing source file errors above. Now to solve the userdata.img problem...