Page 1 of 1

Android 5.1 image build in Ubuntu fails

Posted: Tue Feb 12, 2019 10:26 am
by andrej
Hi, i tried to build the Android 5.1 image for NanoPC-T2 in Ubuntu 14.04 LTS, I want to make some modifications, but first I tried to make the build from unmodified source. I followed the guide on Wiki, but it always fails. Are the source files for Android 5.1? Is it working for anyone?
It fails on:
target R.java/Manifest.java: colorpicker (out/target/common/obj/JAVA_LIBRARIES/colorpicker_intermediates/src/R.stamp)
out/host/linux-x86/bin/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make: *** [out/target/common/obj/JAVA_LIBRARIES/libchips_intermediates/src/R.stamp] Error 127
make: *** Waiting for unfinished jobs....
out/host/linux-x86/bin/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make: *** [out/target/common/obj/JAVA_LIBRARIES/colorpicker_intermediates/src/R.stamp] Error 127

but there are many warnings during the build...

Re: Android 5.1 image build in Ubuntu fails

Posted: Tue Feb 12, 2019 2:08 pm
by andrej
So I manged to get a bit further by following - https://source.android.com/setup/build/initializing, but getting new errors:
Note: frameworks/base/cmds/uiautomator/library/core-src/com/android/uiautomator/core/UiScrollable.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
target Java: BandwidthTests (out/target/common/obj/APPS/BandwidthTests_intermediates/classes)
target Java: BluetoothTests (out/target/common/obj/APPS/BluetoothTests_intermediates/classes)
collect2: error: ld returned 1 exit status
make: *** [out/target/product/nanopi2/obj/SHARED_LIBRARIES/libpac_intermediates/LINKED/libpac.so] Error 1
make: *** Waiting for unfinished jobs....
frameworks/base/core/tests/bandwidthtests/src/com/android/bandwidthtest/util/ConnectionUtil.java:140: error: error while writing ConnectionUtil.ConnectivityReceiver: could not create parent directories
private class ConnectivityReceiver extends BroadcastReceiver {
^
collect2: error: ld returned 1 exit status
make: *** [out/target/product/nanopi2/obj/SHARED_LIBRARIES/libart_intermediates/LINKED/libart.so] Error 1
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
make: *** [out/target/common/obj/APPS/BandwidthTests_intermediates/classes-full-debug.jar] Error 41
collect2: error: ld returned 1 exit status
make: *** [out/target/product/nanopi2/obj/SHARED_LIBRARIES/libartd_intermediates/LINKED/libartd.so] Error 1

#### make failed to build some targets (01:35:42 (hh:mm:ss)) ####

Re: Android 5.1 image build in Ubuntu fails

Posted: Wed Feb 13, 2019 12:44 am
by v8dave
Which version of Ubuntu are you using?

I can't get nanopi3 to build under 16.04 or higher so had to create a VM with version 14.04 instead and it compiles fine. I have made changes to add GSM and landscape etc and it all builds fine.

Re: Android 5.1 image build in Ubuntu fails

Posted: Wed Feb 13, 2019 11:22 am
by andrej
I am using 14.04 LTS, cant build the image even without any modifications, just the original one provided by FriendlyArm...
All I wanted to do is change the bootlogo to a different image... I did not find a way to do it via ADB, however the bootanimation.zip can be changed via ADB..

Re: Android 5.1 image build in Ubuntu fails

Posted: Thu Feb 14, 2019 9:26 am
by v8dave
I think you many still be missing some system files. A search threw up this one as a possible solution.

sudo apt-get install lib32z1

Re: Android 5.1 image build in Ubuntu fails

Posted: Thu Feb 14, 2019 9:28 am
by v8dave
This is the place I found the info. Other stuff may help.

https://stackoverflow.com/questions/170 ... aries-libz