Building Android Pie for VIM3

Not yet, we are also waiting for some binaries from Amlogic.

1 Like

Now it fails on ffmpeg:

1 warning generated.
[ 67% 46449/69326] target arm C: libamffmpeg.vendor <= vendor/amlogic/common/external/ffmpeg/libavutil/../compat/strtod.c
FAILED: out/target/product/kvim3/obj/SHARED_LIBRARIES/libamffmpeg.vendor_intermediates/compat/strtod.o 
/bin/bash -c "PWD=/proc/self/cwd  prebuilts/clang/host/linux-x86/clang-4691093/bin/clang 	-I external/zlib -I vendor/amlogic/common/external/ffmpeg -I out/target/product/kvim3/obj/SHARED_LIBRARIES/libamffmpeg.vendor_intermediates -I out/target/product/kvim3/gen/SHARED_LIBRARIES/libamffmpeg.vendor_intermediates \$(cat out/target/product/kvim3/obj/SHARED_LIBRARIES/libamffmpeg.vendor_intermediates/import_includes)   -isystem out/target/product/kvim3/obj/include -c  -fomit-frame-pointer -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict-aliasing -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -Wno-zero-as-null-pointer-constant -fdebug-prefix-map=\$PWD/= -ffunction-sections -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -Werror=format-security -nostdlibinc -msoft-float -march=armv7-a -mfloat-abi=softfp -mfpu=neon  -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin   -std=gnu99 -fstrict-aliasing   -Wall -DHAVE_AV_CONFIG_H -Ivendor/amlogic/common/external/ffmpeg -Wno-error=return-type -Wno-missing-field-initializers -Wno-parentheses -Wno-pointer-sign -Wno-sign-compare -Wno-switch -fPIC -std=c99 -llvm -DDISABLE_NEONINTR -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -DFF_API_AV_GETTIME=0 -D__ANDROID_API__=28 -D__ANDROID_VNDK__ -fPIC -DARCH_ARM -D_USING_LIBCXX -DANDROID_STRICT   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-null-pointer-arithmetic -Wno-enum-compare -Wno-enum-compare-switch -MD -MF out/target/product/kvim3/obj/SHARED_LIBRARIES/libamffmpeg.vendor_intermediates/libavutil/../compat/strtod.d -o out/target/product/kvim3/obj/SHARED_LIBRARIES/libamffmpeg.vendor_intermediates/libavutil/../compat/strtod.o vendor/amlogic/common/external/ffmpeg/libavutil/../compat/strtod.c"
error: unable to open output file 'out/target/product/kvim3/obj/SHARED_LIBRARIES/libamffmpeg.vendor_intermediates/libavutil/../compat/strtod.o': 'No such file or directory'
1 error generated.
[ 67% 46452/69326] target arm C: libamffmpeg.vendor <= vendor/amlogic/common/external/ffmpeg/libavutil/aes.c
vendor/amlogic/common/external/ffmpeg/libavutil/aes.c:164:47: warning: unused parameter 'decrypt' [-Wunused-parameter]
                  int count, uint8_t *iv, int decrypt)
                                              ^
1 warning generated.
ninja: build stopped: subcommand failed.
22:14:52 ninja failed with: exit status 1

#### failed to build some targets (02:14:51 (hh:mm:ss)) ####

Will upload full log later.

1 Like

Can you provide full log for me? Thanks very much.

1 Like

Please find full log here.

1 Like

Did you exec “make clean” command for your project ? you can have a try. Thanks

1 Like

Yes, I ran ˋmake cleanˋ for both uboot and Android.

I think I had similar problem complaining afout ffmpeg when I was building Android Nougat some time ago, but can’t remember exactly - will try to lookup from my older notes.
No, sorry - that was different problem referring to ffmpeg.

1 Like

I only saw the command ‘make installclean’ and not ‘make clean’ after you repo sync source code.

1 Like

I can try again, but I’ve had:

gytis@gytis-vm:~/khadas/vim3$ make clean
19:52:55 Entire build directory removed.
gytis@gytis-vm:~/khadas/vim3$ repo sync -j4

Oh, you meant do make clean after repo sync?

1 Like

It’s best to remove the out path manually. :grinning:

2 Likes

Thanks! Build succeeded :blush:

#### build completed successfully (02:55:47 (hh:mm:ss)) ####

I will burn it to VIM3 tomorrow to check if Android Pie works.

Sequence was such:

  1. repo sync
  2. lunch
  3. make clean
  4. Delete out/ folder
  5. make otapackage
1 Like

Build successfull and running on VIM3 Pro:

Works:

  • Google Play
  • Ethernet connection (MAC address is stable! :blush:)

Doesn’t work:

  • SuperSU from Nougat branch - @Terry, maybe any ideas?
  • Touch screen (doesn’t show any signs of life the same way as on Ubuntu Bionic :neutral_face:);
  • Sound - there is no sound via HDMI nor via ToneBoard :neutral_face:.
2 Likes

The root is in our list of plans. We will add root support in the feature.

Did you use HID touch screen?

Is HDMI no sound? Did you connect VIM3 with other monitor?

1 Like

Apparently to use SuperSU currently working Android version is Nougat - yesterday I’ve buit an image for VIM1 - with GApps and SuperSU - all works (I have SuperSU Pro licence - all got updated fine).

As for VIM3 Pro, I tried it with TS050 touch screen - it did not work at all with Android Pie built from source. Also audio is not passed via HDMI. I also plugged in Tone Board, but it was not giving sound either.

Currently I have Ubuntu Bionic Xfce built and burned to VIM3 Pro - there both HDMI audio and Tone Board works fine. After @numbqq updated Kernel also TS050 touch screen works with Ubuntu.

So to sum up, Android Pie on VIM3 Pro:

  • Touch screen TS050 doesn’t work;
  • There is no audio via HDMI and via Tone Board;
  • SuperSU is not installed when using ˋhttps://github.com/khadas/supersuˋ;
  • There are no controls to enable/disable top status bar and bottom bar;
  • I couldn’t find how to reach typical Android settings - only right menu opens. In Nougat you can select More settings and see full list of usual Android settings.
2 Likes

@Terry Hi!
I have a problem with build Android ROM from the latest source:

  [ 69% 49872/71457] target Prebuilt: Chrome (out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk)
FAILED: out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk 
/bin/bash -c "(rm -f out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk ) && (cp \"device/khadas/kvim3/preinstall/Chrome.apk\" \"out/target/product/kvim3
/obj/APPS/Chrome_intermediates/package.apk\" ) && (if (zipinfo out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk 'lib/*.so' 2>/dev/null | grep -v ' stor
 ' >/dev/null) ; then rm -rf out/target/product/kvim3/obj/APPS/Chrome_intermediates/uncompressedlibs && mkdir out/target/product/kvim3/obj/APPS/Chrome_intermediates/unco
mpressedlibs; unzip -q out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk 'lib/*.so' -d out/target/product/kvim3/obj/APPS/Chrome_intermediates/uncompress
edlibs && zip -qd out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk 'lib/*.so' && ( cd out/target/product/kvim3/obj/APPS/Chrome_intermediates/uncompress
edlibs && find lib -type f | sort | zip -qD -X -0 ../package.apk -@ ) && rm -rf out/target/product/kvim3/obj/APPS/Chrome_intermediates/uncompressedlibs; fi ) && (if ! ou
t/host/linux-x86/bin/zipalign -c -p 4 out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk >/dev/null ; then mv out/target/product/kvim3/obj/APPS/Chrome_in
termediates/package.apk out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk.unaligned; out/host/linux-x86/bin/zipalign -f -p 4 out/target/product/kvim3/ob
j/APPS/Chrome_intermediates/package.apk.unaligned out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk.aligned; mv out/target/product/kvim3/obj/APPS/Chrome
_intermediates/package.apk.aligned out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk; fi )"
Unable to open 'out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk' for verification
Unable to open 'out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk.unaligned' as zip archive
mv: cannot stat 'out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk.aligned': No such file or directory
[ 69% 49882/71457] //bionic/libc:libc.llndk versioner preprocess include
warning: attempted to generate guard with empty availability: obsoleted = 21
warning: attempted to generate guard with empty availability: obsoleted = 23
[ 69% 49883/71457] //bionic/libc:common_libc versioner preprocess include [linux_glibc]
warning: attempted to generate guard with empty availability: obsoleted = 21
warning: attempted to generate guard with empty availability: obsoleted = 23
ninja: build stopped: subcommand failed.
00:51:39 ninja failed with: exit status 1

tried to build on another computer - got the same error:
[ 69% 49874/71457] target Prebuilt: Chrome (out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk)
FAILED: out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk
/bin/bash -c “(rm -f out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk ) && (cp “device/khadas/kvim3/preinstall/Chrome.apk” “out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk” ) && (if (zipinfo out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk ‘lib/.so’ 2>/dev/null | grep -v ’ stor ’ >/dev/null) ; then rm -rf out/target/product/kvim3/obj/APPS/Chrome_intermediates/uncompressedlibs && mkdir out/target/product/kvim3/obj/APPS/Chrome_intermediates/uncompressedlibs; unzip -q out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk 'lib/.so’ -d out/target/product/kvim3/obj/APPS/Chrome_intermediates/uncompressedlibs && zip -qd out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk ‘lib/*.so’ && ( cd out/target/product/kvim3/obj/APPS/Chrome_intermediates/uncompressedlibs && find lib -type f | sort | zip -qD -X -0 …/package.apk -@ ) && rm -rf out/target/product/kvim3/obj/APPS/Chrome_intermediates/uncompressedlibs; fi ) && (if ! out/host/linux-x86/bin/zipalign -c -p 4 out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk >/dev/null ; then mv out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk.unaligned; out/host/linux-x86/bin/zipalign -f -p 4 out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk.unaligned out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk.aligned; mv out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk.aligned out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk; fi )”
Unable to open ‘out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk’ for verification
Unable to open ‘out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk.unaligned’ as zip archive
mv: cannot stat ‘out/target/product/kvim3/obj/APPS/Chrome_intermediates/package.apk.aligned’: No such file or directory
[ 69% 49880/71457] //bionic/libc:common_libc versioner preprocess include [linux_glibc]
warning: attempted to generate guard with empty availability: obsoleted = 21
warning: attempted to generate guard with empty availability: obsoleted = 23
[ 69% 49881/71457] //bionic/libc:libc.llndk versioner preprocess include
warning: attempted to generate guard with empty availability: obsoleted = 21
warning: attempted to generate guard with empty availability: obsoleted = 23
ninja: build stopped: subcommand failed.
22:26:45 ninja failed with: exit status 1

failed to build some targets (06:05:56 (hh:mm:ss))

well all is in there in the log if you look…
Just make sure you have this apk “Chrome.apk” in this dir "“device/khadas/kvim3/preinstall”

1 Like

Thanks for the answer! I checked this first - the apk is in the folder.Screenshot from 2020-01-09 23-44-47
I also tried to delete it from the preinstall.mk (because I do not need a preinstalled Chrome - I build gapps from opengapps repo). Same error …

1 Like

the apk is broken i just checked, see its size and you will notice it, just remove the apk and you will notice it will compile!

3 Likes

Ok!
I’m going to try it now.

You’re right! Chrome.apk is 134b :man_facepalming:
My mistake. It was necessary to make a git lfs pull after repo sync
Sorry)

build completed successfully (55:02 (mm:ss))

well we all make mistakes :slight_smile:

1 Like