Android 9 Source Codes for VIM3

You can try to install arm-none-eabi-cpp tool

sudo apt-get install gcc-arm-none-eabi
5 Likes

You are right. It fix this issue.
Thank you.

@Terry I have some issue. How to fix it?

> [ 30% 21112/70033] build out/target/pr...ows_intermediates/reqd_policy_mask.cil
> out/host/linux-x86/bin/checkpolicy:  loading policy configuration from out/target/product/kvim3/obj/ETC/sepolicy_neverallows_intermediates/reqd_policy_mask.conf
> out/host/linux-x86/bin/checkpolicy:  policy configuration loaded
> out/host/linux-x86/bin/checkpolicy:  writing CIL to out/target/product/kvim3/obj/ETC/sepolicy_neverallows_intermediates/reqd_policy_mask.cil
> [ 30% 21115/70033] build out/target/pr...policy.recovery_intermediates/sepolicy
> FAILED: out/target/product/kvim3/obj/ETC/sepolicy.recovery_intermediates/sepolicy 
> /bin/bash -c "(ASAN_OPTIONS=detect_leaks=0 out/host/linux-x86/bin/checkpolicy -M -c 		30 -o out/target/product/kvim3/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp out/target/product/kvim3/obj/ETC/sepolicy.recovery_intermediates/sepolicy.recovery.conf ) && (out/host/linux-x86/bin/sepolicy-analyze out/target/product/kvim3/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp permissive > out/target/product/kvim3/obj/ETC/sepolicy.recovery_intermediates/sepolicy.permissivedomains ) && (if [ \"userdebug\" = \"user\" -a -s out/target/product/kvim3/obj/ETC/sepolicy.recovery_intermediates/sepolicy.permissivedomains ]; then echo \"==========\" 1>&2; 		echo \"ERROR: permissive domains not allowed in user builds\" 1>&2; 		echo \"List of invalid domains:\" 1>&2; cat out/target/product/kvim3/obj/ETC/sepolicy.recovery_intermediates/sepolicy.permissivedomains 1>&2; 		exit 1; 		fi ) && (mv out/target/product/kvim3/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp out/target/product/kvim3/obj/ETC/sepolicy.recovery_intermediates/sepolicy )"
> device/khadas/common/sepolicy/priv_app.te:8:ERROR 'unknown type dvb_device' at token ';' on line 45228:
> allow priv_app dvb_device:chr_file { { getattr open read ioctl lock map } { open append write lock map } };
> allow priv_app media_prop:file { read };
> checkpolicy:  error(s) encountered while parsing configuration
> out/host/linux-x86/bin/checkpolicy:  loading policy configuration from out/target/product/kvim3/obj/ETC/sepolicy.recovery_intermediates/sepolicy.recovery.conf
> [ 30% 21116/70033] build out/target/pr...ows_intermediates/sepolicy_neverallows
> FAILED: out/target/product/kvim3/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows 
> /bin/bash -c "(rm -f out/target/product/kvim3/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows ) && (ASAN_OPTIONS=detect_leaks=0 out/host/linux-x86/bin/checkpolicy -M -c 		30 -o out/target/product/kvim3/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows out/target/product/kvim3/obj/ETC/sepolicy_neverallows_intermediates/policy.conf )"
> device/khadas/common/sepolicy/priv_app.te:8:ERROR 'unknown type dvb_device' at token ';' on line 43344:
> allow priv_app dvb_device:chr_file { { getattr open read ioctl lock map } { open append write lock map } };
> allow priv_app media_prop:file { read };
> checkpolicy:  error(s) encountered while parsing configuration
> out/host/linux-x86/bin/checkpolicy:  loading policy configuration from out/target/product/kvim3/obj/ETC/sepolicy_neverallows_intermediates/policy.conf
> [ 30% 21118/70033] build out/target/pr...lows_intermediates/plat_pub_policy.cil
> out/host/linux-x86/bin/checkpolicy:  loading policy configuration from out/target/product/kvim3/obj/ETC/sepolicy_neverallows_intermediates/plat_pub_policy.conf
> out/host/linux-x86/bin/checkpolicy:  policy configuration loaded
> out/host/linux-x86/bin/checkpolicy:  writing CIL to out/target/product/kvim3/obj/ETC/sepolicy_neverallows_intermediates/plat_pub_policy.cil.tmp
> [ 30% 21122/70033] //external/sfntly:l...ang++ cpp/src/sfntly/data/font_data.cc
> ninja: build stopped: subcommand failed.
> 10:03:10 ninja failed with: exit status 1

I’m sorry for that. You can refer at this

1 Like

Hi @Terry, can you have a look at this

Blockquote
git-lfs filter-process --skip: 1: git-lfs filter-process --skip: git-lfs: not found
fatal: The remote end hung up unexpectedly
Traceback (most recent call last):
File “/media/superceleron/Data/Vim3_Pie/.repo/repo/main.py”, line 547, in
_Main(sys.argv[1:])
File “/media/superceleron/Data/Vim3_Pie/.repo/repo/main.py”, line 522, in _Main
result = repo._Run(argv) or 0
File “/media/superceleron/Data/Vim3_Pie/.repo/repo/main.py”, line 184, in _Run
result = cmd.Execute(copts, cargs)
File “/media/superceleron/Data/Vim3_Pie/.repo/repo/subcmds/sync.py”, line 855, in Execute
project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)
File “/media/superceleron/Data/Vim3_Pie/.repo/repo/project.py”, line 1380, in Sync_LocalHalf
self._InitWorkTree(force_sync=force_sync, submodules=submodules)
File “/media/superceleron/Data/Vim3_Pie/.repo/repo/project.py”, line 2594, in _InitWorkTree
raise GitError("cannot initialize work tree for " + self.name)
error.GitError: cannot initialize work tree for android_vendor_amlogic_npu

already tried 3 different pc’s(one of them is my work build server) and it always have same problem in same place…
I wanted to download since i wanted to do some work on uboot, since that one i can touch but like this is hard!
Can you have a look? maybe something got corrupted on the upload to git!
Thks

The android_vendor_amlogic_npu is a large repository. You need to install git-lfs. Have a try.

$ mkdir git_lfs
$ cd git_lfs
$ wget https://github.com/git-lfs/git-lfs/releases/download/v2.3.4/git-lfs-linux-amd64-2.3.4.tar.gz
$ tar xvzf git-lfs-linux-amd64-2.3.4.tar.gz
$ cd git-lfs-2.3.4
$ sudo ./install.sh
$ git lfs install
2 Likes

ok thks for the reply, i will try it!

well looks like something is not 100% ok
Any idea @Terry ?

frameworks/av/services/audiopolicy/enginedefault/src/Engine.cpp"
frameworks/av/services/audiopolicy/enginedefault/src/Engine.cpp:539:57: error: use of undeclared identifier ‘AUDIO_POLICY_FORCE_HDMI_ARC’
(mForceUse[AUDIO_POLICY_FORCE_FOR_MEDIA] == AUDIO_POLICY_FORCE_HDMI_ARC)) {
^
frameworks/av/services/audiopolicy/enginedefault/src/Engine.cpp:543:57: error: use of undeclared identifier ‘AUDIO_POLICY_FORCE_SPDIF’
(mForceUse[AUDIO_POLICY_FORCE_FOR_MEDIA] == AUDIO_POLICY_FORCE_SPDIF)) {
^
2 errors generated.

The AUDIO_POLICY_FORCE_HDMI_ARC is defined on the file system/media/audio/include/system/audio_policy.h
You can verify it on that file. BTW I think you need to install some tools for your PC.

  • Ubuntu 16.04 OS.
sudo apt-get install openjdk-8-jdk android-tools-adb bc bison build-essential curl flex g++-multilib gcc-multilib gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc yasm zip zlib1g-dev
1 Like

hmmm, i dont think is that since i have another amlogic pie sdk here and it compiles just fine!
Im in ubuntu 18.04

Hi, davemf
Did you build the VIM3 Pie successfully?

Maybe some files was missed.

another thing that i notice is this change in device.te - type dvb_device, dev_type, mlstrustedobject;
is missing when you do the repo sync!

Yes i think something is not ok with repo in github, some stuff might be missing!

Just now, Amlogic Pie

Yes, I built successfully.

hmm how many threads did yo use to sync?

did you had this error when syncing:

curl: (22) The requested URL returned error: 404 Not Found
Server does not provide clone.bundle; ignoring.

I used - j4
I don’t remember, but I think I have some issues like this.

ok thks, this is driving me nuts… i can compile other amlogic pie sdk just fine, but this one… i simple cant!
So i will give up for now!

I’m having the same issue here trying to compile Android Pie for the Kvim3, I can’t get past this step.