Build Android is fails

Which system do you use? Android, Ubuntu, OOWOW or others?

Android

Which version of system do you use? Please provide the version of the system here:

Official Khadas

Please describe your issue below:

I've tried to build android by the instruction, but receive error on start build

Post a console log of your issue below:


> make -j12 otapackage

device/khadas/common/video_algorithm/hdr10_tmo/hdr10_tmo.mk:22: warning: HDR10_TMO_MODULE is true
device/khadas/common/tuner/tuner.mk:25: warning: TUNER_MODULE is cxd2856 r836 av2018
vendor/amlogic/common/wifi_bt/bluetooth/configs/bluetooth.mk:26: warning: BLUETOOTH_MODULE is multibt
vendor/amlogic/common/wifi_bt/bluetooth/configs/bluetooth.mk:30: warning: BLUETOOTH_INF is not set
device/khadas/kvim1s/kvim1s.mk:469: warning: Params: is_reference_project=[false],need_tv_feature=[true], is_android_tv=[false];  Patch Finish.
device/khadas/common/core_amlogic.mk:161: warning: BOARD_COMPILE_ATV is false
device/khadas/common/dolby_ms12/dolby_ms12.mk:16: warning: 'Dolby MS12 2.4 will be installed'
device/khadas/common/products/mbox/s4/device.mk:127: warning: 'This platform support dolby ms12 & dtshd decoder'
device/khadas/common/sepolicy.mk:1: warning: current build platform is 11
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=11
TARGET_PRODUCT=kvim1s
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-6.5.0-41-generic-x86_64-Ubuntu-22.04.3-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=RD2A.211001.002
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=device/khadas/common hardware/amlogic vendor/amlogic/common vendor/amlogic/kvim1s
============================================
17:03:24 Failed to build minibp: Failed to find deps of github.com/google/blueprint/bootstrap/minibp: Error parsing directory "build/blueprint/proptools": open build/blueprint/proptools: no such file or directory

#### failed to build some targets (4 seconds) ####


Build u-boot and linux kernel was successfully finished. All actions by this guide.
https://docs.khadas.com/products/sbc/vim1s/development/android/build-android

Build system cannot find blueprint/proptools, I find this tools on google github and added it manually in build/proptools directory, but receive new error.
What I do wrong?

@kizapp Is it because the code you downloaded was incomplete? Do you currently have the build/blueprint/props directory for downloading code? Suggest executing the synchronization code command again to see if there are any errors?

repo sync -j4
repo forall -c "git lfs pull"

@goenjoy I keep getting errors when trying to sync. There are no problems with the Internet connection
I tried to download the sources again. When I try to build the project I also get the error that I wrote in the first message

Fetching: 11% (88/760) 0:40 | 12 jobs | 0:39 platform/prebuilts/misc @ prebuilts/misc
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0        
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
fatal: bad object 0760cb5263781d857b80a72d6407b5dadd67b186
error: https://github.com/khadas/android_prebuilts_ktlint did not send all necessary objects

error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates

android_prebuilts_ktlint:
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0        
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
fatal: bad object 0760cb5263781d857b80a72d6407b5dadd67b186
error: https://github.com/khadas/android_prebuilts_ktlint did not send all necessary objects

error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
android_prebuilts_ktlint: sleeping 4.0 seconds before retrying
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0        
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
fatal: bad object 0760cb5263781d857b80a72d6407b5dadd67b186
error: https://github.com/khadas/android_prebuilts_ktlint did not send all necessary objects

error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
error: Cannot fetch android_prebuilts_ktlint from https://github.com/khadas/android_prebuilts_ktlint
Fetching: 33% (256/760) 1:08 | 12 jobs | 1:05 platform/external/chromium-webview @ external/chromium-webview
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/objects does not exist; check .git/objects/info/alternates
fatal: Unable to create '/media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/shallow.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/objects does not exist; check .git/objects/info/alternates
fatal: Unable to create '/media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/shallow.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/objects does not exist; check .git/objects/info/alternates
fatal: Unable to create '/media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/shallow.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.

platform/external/chromium-webview:
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/objects does not exist; check .git/objects/info/alternates
fatal: Unable to create '/media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/shallow.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
platform/external/chromium-webview: sleeping 4.0 seconds before retrying
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/objects does not exist; check .git/objects/info/alternates
fatal: Unable to create '/media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/shallow.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
error: Cannot fetch platform/external/chromium-webview from https://android.googlesource.com/platform/external/chromium-webview
Fetching: 100% (760/760), done in 2m5.707s
Fetching:  0% (0/2) 0:27 | 1 job | 0:26 platform/external/chromium-webview @ external/chromium-webview
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/objects does not exist; check .git/objects/info/alternates
fatal: Unable to create '/media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/shallow.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/objects does not exist; check .git/objects/info/alternates
fatal: Unable to create '/media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/shallow.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/objects does not exist; check .git/objects/info/alternates
fatal: Unable to create '/media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/shallow.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.

platform/external/chromium-webview:
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/objects does not exist; check .git/objects/info/alternates
fatal: Unable to create '/media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/shallow.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
platform/external/chromium-webview: sleeping 4.0 seconds before retrying
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/objects does not exist; check .git/objects/info/alternates
fatal: Unable to create '/media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/shallow.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
error: Cannot fetch platform/external/chromium-webview from https://android.googlesource.com/platform/external/chromium-webview
Fetching:  0% (0/2) 0:33 | 1 job | 0:05 android_prebuilts_ktlint @ prebuilts/ktlint
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0        
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
fatal: bad object 0760cb5263781d857b80a72d6407b5dadd67b186
error: https://github.com/khadas/android_prebuilts_ktlint did not send all necessary objects

error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates

android_prebuilts_ktlint:
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0        
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
fatal: bad object 0760cb5263781d857b80a72d6407b5dadd67b186
error: https://github.com/khadas/android_prebuilts_ktlint did not send all necessary objects

error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
android_prebuilts_ktlint: sleeping 4.0 seconds before retrying
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0        
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
fatal: bad object 0760cb5263781d857b80a72d6407b5dadd67b186
error: https://github.com/khadas/android_prebuilts_ktlint did not send all necessary objects

error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
error: Cannot fetch android_prebuilts_ktlint from https://github.com/khadas/android_prebuilts_ktlint
Fetching: 100% (2/2), done in 33.957s
Checking out:  95% (726/760), done in 33.544s
Checking out:   4% (34/760), done in 1.487s
error: Unable to fully sync the tree
error: Downloading network changes failed.
Try re-running with "-j1 --fail-fast" to exit at the first error.
================================================================================
Repo command failed due to the following `SyncError` errors:
GitCommandError: 'fetch --quiet --progress github --prune --recurse-submodules=no --tags +refs/heads/*:refs/remotes/github/* +refs/tags/*:refs/tags/*' on android_prebuilts_ktlint failed
stdout: error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
GitCommandError: 'fetch --depth=2147483647 --quiet --progress aosp --recurse-submodules=no --tags +refs/heads/*:refs/remotes/aosp/* +refs/tags/android-12.1.0_r11:refs/tags/android-12.1.0_r11 +refs/tags/*:refs/tags/*' on platform/external/chromium-webview failed
stdout: error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/objects does not exist; check .git/objects/info/alternates
GitCommandError: 'fetch --depth=2147483647 --quiet --progress aosp --recurse-submodules=no --tags +refs/heads/*:refs/remotes/aosp/* +refs/tags/android-12.1.0_r11:refs/tags/android-12.1.0_r11 +refs/tags/*:refs/tags/*' on platform/external/chromium-webview failed
stdout: error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/external/chromium-webview.git/objects does not exist; check .git/objects/info/alternates
GitCommandError: 'fetch --quiet --progress github --prune --recurse-submodules=no --tags +refs/heads/*:refs/remotes/github/* +refs/tags/*:refs/tags/*' on android_prebuilts_ktlint failed
stdout: error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates

@kizapp Regarding the error reported in one of the above directories, which may be due to network instability, warehouse damage during the pull process, or conflicts caused by non-standard changes in the warehouse, the solution is to execute the following command:

###repo sync --force-sync -j4 Error directory (such as prebuilts/ktlint)
repo sync --force-sync -j4 prebuilts/ktlint

That is, repo sync --force-sync -j4 + corresponding error directory, where -- force sync represents forcibly overwriting the local warehouse.

@goenjoy

Fetching:  0% (0/1) 0:05 | 1 job | 0:05 android_prebuilts_ktlint @ prebuilts/ktlint
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0        
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
fatal: bad object 0760cb5263781d857b80a72d6407b5dadd67b186
error: https://github.com/khadas/android_prebuilts_ktlint did not send all necessary objects

error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates

android_prebuilts_ktlint:
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0        
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
fatal: bad object 0760cb5263781d857b80a72d6407b5dadd67b186
error: https://github.com/khadas/android_prebuilts_ktlint did not send all necessary objects

error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
android_prebuilts_ktlint: sleeping 4.0 seconds before retrying
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0        
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
fatal: bad object 0760cb5263781d857b80a72d6407b5dadd67b186
error: https://github.com/khadas/android_prebuilts_ktlint did not send all necessary objects

error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
error: Cannot fetch android_prebuilts_ktlint from https://github.com/khadas/android_prebuilts_ktlint
Fetching: 100% (1/1), done in 5.932s
Fetching:  0% (0/1) 0:05 | 1 job | 0:05 android_prebuilts_ktlint @ prebuilts/ktlint
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0        
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
fatal: bad object 0760cb5263781d857b80a72d6407b5dadd67b186
error: https://github.com/khadas/android_prebuilts_ktlint did not send all necessary objects

error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates

android_prebuilts_ktlint:
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0        
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
fatal: bad object 0760cb5263781d857b80a72d6407b5dadd67b186
error: https://github.com/khadas/android_prebuilts_ktlint did not send all necessary objects

error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
android_prebuilts_ktlint: sleeping 4.0 seconds before retrying
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0        
error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
fatal: bad object 0760cb5263781d857b80a72d6407b5dadd67b186
error: https://github.com/khadas/android_prebuilts_ktlint did not send all necessary objects

error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
error: Cannot fetch android_prebuilts_ktlint from https://github.com/khadas/android_prebuilts_ktlint
Fetching: 100% (1/1), done in 5.735s
error: Unable to fully sync the tree
error: Downloading network changes failed.
Try re-running with "-j1 --fail-fast" to exit at the first error.
================================================================================
Repo command failed due to the following `SyncError` errors:
GitCommandError: 'fetch --quiet --progress github --force --prune --recurse-submodules=no --tags +refs/heads/*:refs/remotes/github/* +refs/tags/*:refs/tags/*' on android_prebuilts_ktlint failed
stdout: error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates
GitCommandError: 'fetch --quiet --progress github --force --prune --recurse-submodules=no --tags +refs/heads/*:refs/remotes/github/* +refs/tags/*:refs/tags/*' on android_prebuilts_ktlint failed
stdout: error: object directory /media/ubuntu/Media/Android/khadas/.repo/projects/prebuilts/ktlint.git/objects does not exist; check .git/objects/info/alternates

@kizapp Please post complete information.

@goenjoy I try to execute command repo sync --force-sync -j4 prebuilts/ktlint and receive this error, which attach above

@kizapp Execute the following command to provide complete feedback on the process information

vim1s-android11-sdk/.repo/manifests$ git status
On branch default
Your branch is ahead of 'origin/khadas-vim1s-r' by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean
vim1s-android11-sdk/.repo/manifests$ git log -n 1
commit ab33763af84504b39ab8f14b263002806643492f (HEAD -> default)
Author: Goenjoy Huang <goenjoy@khadas.com>
Date:   Fri Jun 30 15:42:53 2023 +0800

    KhadasRelease: Khadas: vim1s-android-11-v230629
    
    Change-Id: Ifb40421de810bc5324edd9b399c25e6238ef490a

I have empty directory builld/blueprint/proptools
Directory build/blueprint/props is not exists in my downloaded code

@goenjoy

.repo/manifests$ git status
On branch default
Your branch is up to date with 'origin/khadas-vim1s-r'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   default.xml

no changes added to commit (use "git add" and/or "git commit -a")

.repo/manifests$ git log -n 1
commit 5d81cc641a7b67a1ceea489c4e419e9fd608c765 (HEAD -> default, origin/khadas-vim1s-r, m/khadas-vim1s-r)
Author: Goenjoy Huang <goenjoy@khadas.com>
Date:   Fri Jun 30 15:34:30 2023 +0800

    KhadasRelease: Khadas: vim1s-android-11-v230629
    
    Signed-off-by: Goenjoy Huang <goenjoy@khadas.com>

@kizapp Have you made any modifications to this file? What has been modified? Execute the git diff command to see what has been modified?

@goenjoy no, i dont made any changes for this file

git diff

diff --git a/default.xml b/default.xml
old mode 100644
new mode 100755

I was made changes only for file bootloader/uboot/script/dtc/dtc-lexer.l on line 41
YYLTYPE yylloc;extern YYLTYPE yylloc;

@kizapp
You need to execute the following command to delete directory related information, and then synchronize this directory separately to take a look.

vim1s-android11-sdk$ find .repo/ -iname "*ktlint.git"
.repo/projects/prebuilts/ktlint.git
.repo/project-objects/android_prebuilts_ktlint.git
vim1s-android11-sdk$ rm -rf .repo/projects/prebuilts/ktlint.git .repo/project-objects/android_prebuilts_ktlint.git prebuilts/ktlint
vim1s-android11-sdk$ repo sync -j4 prebuilts/ktlint

@goenjoy Done, what’s next?

$ find .repo/ -iname "*ktlint.git"
.repo/project-objects/android_prebuilts_ktlint.git
.repo/projects/prebuilts/ktlint.git
$ rm -rf .repo/projects/prebuilts/ktlint.git .repo/project-objects/android_prebuilts_ktlint.git prebuilts/ktlint
$ repo sync -j4 prebuilts/ktlint

... A new version of repo (2.45) is available.
... New version is available at: /media/ubuntu/Media/Android/khadas/.repo/repo/repo
... The launcher is run from: /usr/bin/repo
!!! The launcher is not writable.  Please talk to your sysadmin or distro
!!! to get an update installed.

Fetching: 100% (1/1), done in 12.477s
repo sync has finished successfully.

@kizapp Synchronize the code, identify all error directories, and then use the same method to resolve the error directories. After all issues are resolved, execute the repo sync -j4 command again until no errors are reported.

@goenjoy Sync was finished successfully

$ repo sync -j12

... A new version of repo (2.45) is available.
... New version is available at: /media/ubuntu/Media/Android/khadas/.repo/repo/repo
... The launcher is run from: /usr/bin/repo
!!! The launcher is not writable.  Please talk to your sysadmin or distro
!!! to get an update installed.

Fetching: 100% (760/760), done in 39m34.866s
Checking out:  95% (726/760), done in 2m37.516s
Checking out:   4% (34/760), done in 3.116s
repo sync has finished successfully.

Later I build an u-boot and linux kernel, they was build successfully
Now I try to start build android, but lunch failed

$ . build/envsetup.sh
$ lunch kvim1s-userdebug
15:28:06 Build sandboxing disabled due to nsjail error.
/bin/bash: line 1: uname: command not found
/bin/bash: line 1: date: command not found
/bin/bash: line 1: date: command not found
/bin/bash: line 1: date: command not found
/bin/bash: line 1: uname: command not found
In file included from build/make/core/config.mk:291:
build/make/core/envsetup.mk:140: error: Unable to determine HOST_OS from uname -sm: !.
15:28:06 dumpvars failed with: exit status 1

when I execute uname -sm and date in terminal - success

$ uname -sm
Linux x86_64

$ date
Чт 04 июл 2024 14:54:51 +04

@kizapp Well, there’s no problem downloading the code. Next, let’s compile the configuration of the environment. We have never encountered such a situation before. The answer to this question should be available online.
https://zhuanlan.zhihu.com/p/445863610

@goenjoy Hi, thanks for your hint. I completely uninstalled ubuntu, installed it again and did everything according to the instructions again. Synchronization was successful, as was the build of u-boot and the Linux kernel. Now I get an error when building android.

$ make -jN otapackage
[  2% 2306/78722] bc: libclcore.bc <= frameworks/rs/driver/runtime/rs_core.c
FAILED: out/target/product/kvim1s/obj/RENDERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_core.bc
/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-3289846/bin/clang -Iframeworks/rs/script_api/include -Iexternal/clang/lib/Headers -MD -DRS_VERS
ION=24 -std=c99 -c -O3 -fno-builtin -emit-llvm -target renderscript32-linux-androideabi -fsigned-char  -Wno-deprecated -Werror  -Werror -Wall -Wextra -Iframeworks/rs
/cpu_ref -DRS_DECLARE_EXPIRED_APIS  -x renderscript frameworks/rs/driver/runtime/rs_core.c -o out/target/product/kvim1s/obj/RENDERSCRIPT_BITCODE/libclcore.bc_interme
diates/rs_core.bc"
prebuilts/clang/host/linux-x86/clang-3289846/bin/clang.real: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or d
irectory
[  2% 2307/78722] bc: libclcore.bc <= frameworks/rs/driver/runtime/rs_allocation.c
FAILED: out/target/product/kvim1s/obj/RENDERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_allocation.bc
/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-3289846/bin/clang -Iframeworks/rs/script_api/include -Iexternal/clang/lib/Headers -MD -DRS_VERS
ION=24 -std=c99 -c -O3 -fno-builtin -emit-llvm -target renderscript32-linux-androideabi -fsigned-char  -Wno-deprecated -Werror  -Werror -Wall -Wextra -Iframeworks/rs
/cpu_ref -DRS_DECLARE_EXPIRED_APIS  -x renderscript frameworks/rs/driver/runtime/rs_allocation.c -o out/target/product/kvim1s/obj/RENDERSCRIPT_BITCODE/libclcore.bc_i
ntermediates/rs_allocation.bc"
prebuilts/clang/host/linux-x86/clang-3289846/bin/clang.real: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or d
irectory
[  2% 2308/78722] bc: libclcore.bc <= frameworks/rs/driver/runtime/rs_cl.c
FAILED: out/target/product/kvim1s/obj/RENDERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_cl.bc
/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-3289846/bin/clang -Iframeworks/rs/script_api/include -Iexternal/clang/lib/Headers -MD -DRS_VERS
ION=24 -std=c99 -c -O3 -fno-builtin -emit-llvm -target renderscript32-linux-androideabi -fsigned-char  -Wno-deprecated -Werror  -Werror -Wall -Wextra -Iframeworks/rs
/cpu_ref -DRS_DECLARE_EXPIRED_APIS  -x renderscript frameworks/rs/driver/runtime/rs_cl.c -o out/target/product/kvim1s/obj/RENDERSCRIPT_BITCODE/libclcore.bc_intermedi
ates/rs_cl.bc"
prebuilts/clang/host/linux-x86/clang-3289846/bin/clang.real: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or d
irectory
[  2% 2309/78722] bc: libclcore.bc <= frameworks/rs/driver/runtime/rs_element.c
FAILED: out/target/product/kvim1s/obj/RENDERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_element.bc
/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-3289846/bin/clang -Iframeworks/rs/script_api/include -Iexternal/clang/lib/Headers -MD -DRS_VERS
ION=24 -std=c99 -c -O3 -fno-builtin -emit-llvm -target renderscript32-linux-androideabi -fsigned-char  -Wno-deprecated -Werror  -Werror -Wall -Wextra -Iframeworks/rs
/cpu_ref -DRS_DECLARE_EXPIRED_APIS  -x renderscript frameworks/rs/driver/runtime/rs_element.c -o out/target/product/kvim1s/obj/RENDERSCRIPT_BITCODE/libclcore.bc_inte
rmediates/rs_element.bc"
prebuilts/clang/host/linux-x86/clang-3289846/bin/clang.real: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or d
irectory
12:01:18 ninja failed with: exit status 1

#### failed to build some targets (03:13 (mm:ss)) ####

@kizapp I can’t tell what the reason is, maybe an error was already reported earlier. Can you provide complete compilation process information? It can be uploaded to Google Cloud Drive.

@kizapp Perhaps you can refer to this link.