[Android] DiamondJohn:
I am trying to build crDroid A14 for the google sunfish device. Its unofficial;, so I am using the LOS device tree and the crdroid Kernel. Its failing with the following.

[2024-03-02 19:57:27] [ 0% 1381/167313] build out/target/product/sunfish/obj/ETC/build-manifest_intermediates/build-manifest.xml
[2024-03-02 19:57:27] FAILED: out/target/product/sunfish/obj/ETC/build-manifest_intermediates/build-manifest.xml
[2024-03-02 19:57:27] /bin/bash -c "(mkdir -p out/target/product/sunfish/obj/ETC/build-manifest_intermediates/ ) && (python3 .repo/repo/repo manifest -o - -r | grep -Ev \"proprietary_\" > out/target/product/sunfish/obj/ETC/build-manifest_intermediates/build-manifest.xml )"
[2024-03-02 19:57:27] Traceback (most recent call last):
[2024-03-02 19:57:27] File "/home/diamondjohn/android/crDroid/.repo/repo/git_config.py", line 218, in GetString
[2024-03-02 19:57:27] v = self._cache[_key(name)]
[2024-03-02 19:57:27] KeyError: 'repo.worktree'
[2024-03-02 19:57:27]
[2024-03-02 19:57:27] During handling of the above exception, another exception occurred:
[2024-03-02 19:57:27]
[2024-03-02 19:57:27] Traceback (most recent call last):
[2024-03-02 19:57:27] File "/home/diamondjohn/android/crDroid/.repo/repo/git_config.py", line 379, in _SaveJson
[2024-03-02 19:57:27] with open(self._json, "w") as fd:
[2024-03-02 19:57:27] OSError: [Errno 30] Read-only file system: '/home/diamondjohn/.repo_.gitconfig.json'
[2024-03-02 19:57:27]
[2024-03-02 19:57:27] During handling of the above exception, another exception occurred:
[2024-03-02 19:57:27]
[2024-03-02 19:57:27] Traceback (most recent call last):
[2024-03-02 19:57:27] File "/home/diamondjohn/android/crDroid/.repo/repo/main.py", line 874, in <module>
[2024-03-02 19:57:27] _Main(sys.argv[1:])
[2024-03-02 19:57:27] File "/home/diamondjohn/android/crDroid/.repo/repo/main.py", line 850, in _Main
[2024-03-02 19:57:27] result = repo._Run(name, gopts, argv) or 0
[2024-03-02 19:57:27] File "/home/diamondjohn/android/crDroid/.repo/repo/main.py", line 294, in _Run
[2024-03-02 19:57:27] result = run()
[2024-03-02 19:57:27] File "/home/diamondjohn/android/crDroid/.repo/repo/main.py", line 275, in <lambda>
[2024-03-02 19:57:27] lambda: self._RunLong(name, gopts, argv, git_trace2_event_log) or 0
[2024-03-02 19:57:27] File "/home/diamondjohn/android/crDroid/.repo/repo/main.py", line 302, in _RunLong
[2024-03-02 19:57:27] outer_client = RepoClient(self.repodir)
[2024-03-02 19:57:27] File "/home/diamondjohn/android/crDroid/.repo/repo/manifest_xml.py", line 2318, in __init__
[2024-03-02 19:57:27] super().__init__(
[2024-03-02 19:57:27] File "/home/diamondjohn/android/crDroid/.repo/repo/manifest_xml.py", line 465, in __init__
[2024-03-02 19:57:27] if os.path.exists(mp.gitdir) and mp.use_worktree:
[2024-03-02 19:57:27] File "/home/diamondjohn/android/crDroid/.repo/repo/project.py", line 3990, in use_worktree
[2024-03-02 19:57:27] return self.config.GetBoolean("repo.worktree")
[2024-03-02 19:57:27] File "/home/diamondjohn/android/crDroid/.repo/repo/git_config.py", line 191, in GetBoolean
[2024-03-02 19:57:27] v = self.GetString(name)
[2024-03-02 19:57:27] File "/home/diamondjohn/android/crDroid/.repo/repo/git_config.py", line 221, in GetString
[2024-03-02 19:57:27] return self.defaults.GetString(name, all_keys=all_keys)
[2024-03-02 19:57:27] File "/home/diamondjohn/android/crDroid/.repo/repo/git_config.py", line 218, in GetString
[2024-03-02 19:57:27] v = self._cache[_key(name)]
[2024-03-02 19:57:27] File "/home/diamondjohn/android/crDroid/.repo/repo/git_config.py", line 352, in _cache
[2024-03-02 19:57:27] self._cache_dict = self._Read()
[2024-03-02 19:57:27] File "/home/diamondjohn/android/crDroid/.repo/repo/git_config.py", line 359, in _Read
[2024-03-02 19:57:27] self._SaveJson(d)
[2024-03-02 19:57:27] File "/home/diamondjohn/android/crDroid/.repo/repo/git_config.py", line 382, in _SaveJson
[2024-03-02 19:57:27] platform_utils.remove(self._json, missing_ok=True)
[2024-03-02 19:57:27] File "/home/diamondjohn/android/crDroid/.repo/repo/platform_utils.py", line 150, in remove
[2024-03-02 19:57:27] os.remove(longpath)
[2024-03-02 19:57:27] OSError: [Errno 30] Read-only file system: '/home/diamondjohn/.repo_.gitconfig.json'
[2024-03-02 19:57:27] \nWrite to a read-only file system detected. Possible fixes include
[2024-03-02 19:57:27] 1. Generate file directly to out/ which is ReadWrite, #recommend solution
[2024-03-02 19:57:27] 2. BUILD_BROKEN_SRC_DIR_RW_ALLOWLIST := <my/path/1> <my/path/2> #discouraged, subset of source tree will be RW
[2024-03-02 19:57:27] 3. BUILD_BROKEN_SRC_DIR_IS_WRITABLE := true #highly discouraged, entire source tree will be RW
[2024-03-02 19:57:27] [ 0% 1382/167313] Copy: out/target/product/sunfish/vendor/lib/hw/sound_trigger.primary.sm6150.so
[2024-03-02 19:57:27] [ 0% 1383/167313] Copy: out/target/product/sunfish/vendor/lib/hw/audio.primary.sm6150.so
[2024-03-02 19:57:27] [ 0% 1384/167313] Copy: out/target/product/sunfish/vendor/lib/hw/android.hardware.bluetooth@1.0-impl-qti.so
[2024-03-02 19:57:27] [ 0% 1385/167313] Copy: out/target/product/sunfish/vendor/lib/hw/vendor.qti.hardware.qseecom@1.0-impl.so
[2024-03-02 19:57:27] [ 0% 1386/167313] Copy: out/target/product/sunfish/vendor/lib/hw/vendor.qti.hardware.qteeconnector@1.0-impl.so
[2024-03-02 19:57:27] [ 0% 1387/167313] Copy: out/target/product/sunfish/vendor/lib/hw/vulkan.adreno.so
[2024-03-02 19:57:27] [ 0% 1388/167313] Copy: out/target/product/sunfish/vendor/lib/lib-imscmservice.so
[2024-03-02 19:57:27] [ 0% 1389/167313] Copy: out/target/product/sunfish/vendor/lib/lib-imsdpl.so
[2024-03-02 19:57:27] [ 0% 1390/167313] Copy: out/target/product/sunfish/vendor/lib/lib-imsqimf.so
[2024-03-02 19:57:27] ninja: build stopped: subcommand failed.
[2024-03-02 19:57:27] 19:57:27 ninja failed with: exit status 1
[2024-03-02 19:57:27]
[2024-03-02 19:57:27] #### failed to build some targets (37 seconds) ####

The line it fails on, appears to be

/bin/bash -c "(mkdir -p out/target/product/sunfish/obj/ETC/build-manifest_intermediates/ ) && (python3 .repo/repo/repo manifest -o - -r | grep -Ev \"proprietary_\" > out/target/product/sunfish/obj/ETC/build-manifest_intermediates/build-manifest.xml )

So as expected the file build-manifest.xml is empty.

However, If I then run that one line in the terminal, it succeeds, and the file appears to be created, and is full of data. ie as if it should of worked.

Any ideas where I should start looking?

EDIT: I tried an official device, and I get the exact same error! :mad: