Android R official release r3 build


Update:2020-09-12
오늘 sync해보니 뭔가 바뀌어 있음.. manifest snapshot은 같은데.. 뭘까. –; 잠정적인 결론은… S master branch에서 빌드한 out가지고, R로 브랜치만 바꾼 뒤에 그냥 빌드 해서 인가봄.. -,.-;; clean 빌드 가동!

-> Clean build 결과,, Fail …했다가 성공.. 도합 11:01:31 –; 오늘 8700 32GB짜리 중고로 업어왔으니 이제 바꿔서 테스트합니다. 구형 리눅스 머신은 이제 작별해야겠네요..

[ 98% 117450/119397] //frameworks/base:framework-minus-apex javac26 [common]
FAILED: out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/javac/framework-minus-apex.jar26
rm -rf "out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/javac/shard26/classes" "out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/javac/shard26/anno" "out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/javac/shard26/srcjars" && mkdir -p "out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/javac/shard26/classes" "out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/javac/shard26/anno" "out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/javac/shard26/srcjars" && out/soong/host/linux-x86/bin/zipsync -d out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/javac/shard26/srcjars -l out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/javac/shard26/srcjars/list -f "*.java"  && (if [ -s out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/javac/shard26/srcjars/list ] || [ -s out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/javac/framework-minus-apex.jar26.rsp ] ; then out/soong/host/linux-x86/bin/soong_javac_wrapper prebuilts/jdk/jdk11/linux-x86/bin/javac -J-Xmx2048M -J-XX:OnError="cat hs_err_pid%p.log" -J-XX:CICompilerCount=6 -J-XX:+UseDynamicNumberOfGCThreads -Xmaxerrs 9999999 -encoding UTF-8 -sourcepath "" -g -XDskipDuplicateBridges=true -XDstringConcat=inline -processorpath out/soong/.intermediates/tools/platform-compat/java/android/processor/compat/changeid/compat-changeid-annotation-processor/linux_glibc_common/withres/compat-changeid-annotation-processor.jar:out/soong/.intermediates/tools/platform-compat/java/android/processor/compat/unsupportedappusage/unsupportedappusage-annotation-processor/linux_glibc_common/withres/unsupportedappusage-annotation-processor.jar:out/soong/.intermediates/frameworks/base/tools/processors/view_inspector/view-inspector-annotation-processor/linux_glibc_common/withres/view-inspector-annotation-processor.jar:out/soong/.intermediates/frameworks/base/tools/processors/staledataclass/staledataclass-annotation-processor/linux_glibc_common/withres/staledataclass-annotation-processor.jar -processor android.processor.compat.changeid.ChangeIdProcessor,android.processor.compat.unsupportedappusage.UnsupportedAppUsageProcessor,android.processor.view.inspector.PlatformInspectableProcessor,android.processor.staledataclass.StaleDataclassProcessor -Xlint:-dep-ann --system=out/soong/.intermediates/libcore/mmodules/core_platform_api/core-platform-api-stubs-system-modules/android_common/system -classpath out/soong/.intermediates/tools/platform-compat/java/android/compat/annotation/app-compat-annotations/android_common/turbine-combined/app-compat-annotations.jar:out/soong/.intermediates/frameworks/base/ext/android_common/turbine-combined/ext.jar:out/soong/.intermediates/tools/platform-compat/java/android/compat/annotation/unsupportedappusage/android_common/turbine-combined/unsupportedappusage.jar:out/soong/.intermediates/frameworks/base/framework-updatable-stubs-module_libs_api/android_common/turbine-combined/framework-updatable-stubs-module_libs_api.jar:out/soong/.intermediates/frameworks/base/framework-internal-utils/android_common/turbine-combined/framework-internal-utils.jar:out/soong/.intermediates/frameworks/base/mime/mimemap/android_common/turbine-combined/mimemap.jar:out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/turbine-combined/framework-minus-apex.jar -source 1.9 -target 1.9 -d out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/javac/shard26/classes -s out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/javac/shard26/anno @out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/javac/framework-minus-apex.jar26.rsp @out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/javac/shard26/srcjars/list ; fi ) && out/soong/host/linux-x86/bin/soong_zip -jar -o out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/javac/framework-minus-apex.jar26 -C out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/javac/shard26/classes -D out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/javac/shard26/classes && rm -rf "out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/javac/shard26/srcjars"
frameworks/base/opengl/java/android/opengl/Matrix.java:17: error: cannot access android.opengl
package android.opengl;
^
  /android/service/chooser/Choos%rTargetService$IChooserTargetServiceWrapper.class
1 error

### failed to build some targets (09:54:31 (hh:mm:ss)) ####

+

[100% 26505/26505] Target vbmeta image: out/target/product/generic_arm64/vbmeta.img

#### build completed successfully (01:07:20 (hh:mm:ss)) ####
$(shell find build/make/tools/releasetools -name "*.pyc" -prune -o \( -type f -o -type l \) -print) was changed, regenerating...
[ 77% 710/920] including out/soong/Android-aosp_arm64.mk ...

그냥 날짜 바뀌어서 인가 봄. --;

다 와서. system.img 생성 실패 –;; 어..음..
lunch menu 2번 aosp_arm64-eng 에서 사용되는 BoardConfig는 아래 두개임을 확인함.
1. /build/target/product/aosp_arm64.mk
2. /build/target/board/generic_arm64/BoardConfig.mk
3. /build/make/target/board/BoardConfigGsiCommon.mk
4. /build/make/target/board/BoardConfigMainlineCommon.mk
5. /out/soong/Android-aosp_arm64.mk
3번 파일에서 SYSTEM_RESERVED를 늘리면, 전체이미지에서 여분으로 빼는 공간이 빠져서 마이너스 효과.
1번 파일이 메인 configuration
2번 파일에 수정을 가하면, mk파일 200여개를 새로 읽음.
5번파일이 합쳐진 Android.mk

BOARD_SYSTEMIMAGE_PARTITION_SIZE를 지정하면, 아래 오류…
build/make/core/config.mk:903: error: Should not define BOARD_SYSTEMIMAGE_PARTITION_SIZE and BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE together.

./make/tools/releasetools/test_verity_utils.py:175: DEFAULT_PARTITION_SIZE = 4096 * 1024
./make/target/board/BoardConfigEmuCommon.mk:37: BOARD_SUPER_PARTITION_SIZE := 3229614080

아래파일이 로그와 마찬가지로 기록됨
out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt
out/target/product/generic_arm64/misc_info.txt


아무래도 크기 계산은 그냥 맞아떨어지는 것 같은데 selinux때매 부가적으로 추정 로그 찍어주느것 같고.

/make/tools/releasetools/build_image.py:362: "The max image size for filesystem files is {} bytes ({} MB), out of a "

  if (prop_dict.get("use_dynamic_partition_size") == "true" and
      "partition_size" not in prop_dict):
    # If partition_size is not defined, use output of `du' + reserved_size.
    size = GetDiskUsage(in_dir)
    logger.info(
        "The tree size of %s is %d MB.", in_dir, size // BYTES_IN_MB)
    # If not specified, give us 16MB margin for GetDiskUsage error ...
    reserved_size = int(prop_dict.get("partition_reserved_size", BYTES_IN_MB * 16))
    partition_headroom = int(prop_dict.get("partition_headroom", 0))
    if fs_type.startswith("ext4") and partition_headroom > reserved_size:
      reserved_size = partition_headroom
..
  prop_dict["image_size"] = prop_dict["partition_size"]

# Adjust the image size to make room for the hashes if this is to be verified.
if verity_image_builder:
max_image_size = verity_image_builder.CalculateMaxImageSize()
prop_dict["image_size"] = str(max_image_size)

build/make/tools/releasetools/build_image.py:485:    max_image_size = verity_image_builder.CalculateMaxImageSize()
build/make/tools/releasetools/verity_utils.py:221:  def CalculateMaxImageSize(self, partition_size):
build/make/tools/releasetools/verity_utils.py:259:  def CalculateMaxImageSize(self, partition_size=None):
build/make/tools/releasetools/verity_utils.py:392:      size_calculator = self.CalculateMaxImageSize
build/make/tools/releasetools/verity_utils.py:443:  def CalculateMaxImageSize(self, partition_size=None):
build/make/tools/releasetools/verity_utils.py:598:    adjusted_size = self.verity_image_builder.CalculateMaxImageSize()


make/tools/releasetools/test_verity_utils.py:374: """Max image size is the power of 0.95 of partition size."""
make/tools/releasetools/test_verity_utils.py:375: # Max image size grows less than partition size, which means

def _test_CalculateMinPartitionSize_SetUp(self):
# To test CalculateMinPartitionSize(), by using 200MB to 2GB image size.
# - 51200 = 200MB * 1024 * 1024 / 4096
# - 524288 = 2GB * 1024 * 1024 * 1024 / 4096
image_sizes = [BLOCK_SIZE * random.randint(51200, 524288) + offset
for offset in range(BLOCK_SIZE)]

범인은 아래 같은데, 파일 찾기가 더럽게 어려움. –;

common.ExternalError: Failed to run command '['mkuserimg_mke2fs', '-s', '/mnt/Dev512/out/soong/.temp/tmpJctZ3S', 'out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system.img', 'ext4', '/', '2357256192', '-j', '0', '-D', 'out/target/product/generic_arm64/system', '-L', '/', '-i', '5281', '-M', '0', '-c', '--inode_size', '256', 'out/target/product/generic_arm64/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin']' (exit code 4):
00:58:32 mkuserimg_mke2fs.py INFO: Env: {'MKE2FS_CONFIG': '/mnt/Dev512/out/soong/.temp/tmpKm4PGC'}
00:58:32 mkuserimg_mke2fs.py INFO: Running: mke2fs -O ^has_journal -L / -N 5281 -I 256 -M / -m 0 -E android_sparse -t ext4 -b 4096 out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system.img 575502
00:58:32 mkuserimg_mke2fs.py INFO: Env: {}
00:58:32 mkuserimg_mke2fs.py INFO: Running: e2fsdroid -p out/target/product/generic_arm64/system -s -S out/target/product/generic_arm64/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin -f /mnt/Dev512/out/soong/.temp/tmpJctZ3S -a / out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system.img
00:58:51 mkuserimg_mke2fs.py ERROR: Failed to run e2fsdroid_cmd: set_selinux_xattr: No such file or directory searching for label "/odm_dlkm"
e2fsdroid: No such file or directory while configuring the file system

[ 99% 150740/150742] Target system fs image: out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system.img
FAILED: out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system.img
/bin/bash -c "(if [ -d out/target/product/generic_arm64/system/vendor ] && [ ! -h out/target/product/generic_arm64/system/vendor ]; then echo 'Non-symlink out/target/product/generic_arm64/system/vendor detected!' 1>&2; echo 'You cannot install files to out/target/product/generic_arm64/system/vendor while building a separate vendor.img!' 1>&2; exit 1; fi ) && (ln -sf /vendor out/target/product/generic_arm64/system/vendor ) && (mkdir -p out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/ out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates && rm -rf out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"system_reserved_size=67108864\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"system_selinux_fc=out/target/product/generic_arm64/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"ext_mkuserimg=mkuserimg_mke2fs\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"fs_type=ext4\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"extfs_sparse_flag=-s\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"squashfs_sparse_flag=-s\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"f2fs_sparse_flag=-S\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"ext4_share_dup_blocks=true\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"verity_disable=true\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_avbtool=avbtool\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_system_hashtree_enable=true\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_system_add_hashtree_footer_args=--prop com.android.build.system.fingerprint:\$(cat out/target/product/generic_arm64/build_fingerprint.txt) --prop com.android.build.system.os_version:11 --prop com.android.build.system.security_patch:2020-09-05 --rollback_index 1599264000\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_system_key_path=external/avb/test/data/testkey_rsa2048.pem\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_system_algorithm=SHA256_RSA2048\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_system_rollback_index_location=1\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_system_other_hashtree_enable=true\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_system_other_add_hashtree_footer_args=\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_vendor_hashtree_enable=true\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_vendor_add_hashtree_footer_args=--prop com.android.build.vendor.fingerprint:\$(cat out/target/product/generic_arm64/build_fingerprint.txt) --prop com.android.build.vendor.os_version:11\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_product_hashtree_enable=true\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_product_add_hashtree_footer_args=--prop com.android.build.product.fingerprint:\$(cat out/target/product/generic_arm64/build_fingerprint.txt) --prop com.android.build.product.os_version:11 --prop com.android.build.product.security_patch:2020-09-05\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_system_ext_hashtree_enable=true\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_system_ext_add_hashtree_footer_args=--prop com.android.build.system_ext.fingerprint:\$(cat out/target/product/generic_arm64/build_fingerprint.txt) --prop com.android.build.system_ext.os_version:11 --prop com.android.build.system_ext.security_patch:2020-09-05\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_odm_hashtree_enable=true\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_odm_add_hashtree_footer_args=--prop com.android.build.odm.fingerprint:\$(cat out/target/product/generic_arm64/build_fingerprint.txt) --prop com.android.build.odm.os_version:11\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"recovery_as_boot=true\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"root_dir=out/target/product/generic_arm64/root\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"use_dynamic_partition_size=true\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"skip_fsck=true\" >>  out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (PATH=out/host/linux-x86/bin/:system/extras/ext4_utils/:\$PATH out/host/linux-x86/bin/build_image out/target/product/generic_arm64/system out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system_image_info.txt out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/generic_arm64/system || ( mkdir -p \${DIST_DIR}; cp out/target/product/generic_arm64/installed-files.txt \${DIST_DIR}/installed-files-rescued.txt; exit 1 ) )"
2020-09-11 10:51:16 - build_image.py - ERROR   : Failed to build out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system.img from out/target/product/generic_arm64/system
Out of space? Out of inodes? The tree size of /mnt/Dev512/out/soong/.temp/tmp0LxGOw is 2088820736 bytes (1992 MB), with reserved space of 67108864 bytes (64 MB).
The max image size for filesystem files is 2155929600 bytes (2056 MB), out of a total partition size of 2155929600 bytes (2056 MB).
Traceback (most recent call last):
  File "/mnt/Dev512/out/host/linux-x86/bin/build_image/internal/stdlib/runpy.py", line 174, in _run_module_as_main
  File "/mnt/Dev512/out/host/linux-x86/bin/build_image/internal/stdlib/runpy.py", line 72, in _run_code
  File "/mnt/Dev512/out/host/linux-x86/bin/build_image/__main__.py", line 12, in <module>
  File "/mnt/Dev512/out/host/linux-x86/bin/build_image/internal/stdlib/runpy.py", line 174, in _run_module_as_main
  File "/mnt/Dev512/out/host/linux-x86/bin/build_image/internal/stdlib/runpy.py", line 72, in _run_code
  File "/mnt/Dev512/out/host/linux-x86/bin/build_image/build_image.py", line 815, in <module>
  File "/mnt/Dev512/out/host/linux-x86/bin/build_image/build_image.py", line 807, in main
  File "/mnt/Dev512/out/host/linux-x86/bin/build_image/build_image.py", line 434, in BuildImage
  File "/mnt/Dev512/out/host/linux-x86/bin/build_image/build_image.py", line 345, in BuildImageMkfs
  File "/mnt/Dev512/out/host/linux-x86/bin/build_image/common.py", line 281, in RunAndCheckOutput
common.ExternalError: Failed to run command '['mkuserimg_mke2fs', '-s', '/mnt/Dev512/out/soong/.temp/tmp0LxGOw', 'out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system.img', 'ext4', '/', '2155929600', '-j', '0', '-D', 'out/target/product/generic_arm64/system', '-L', '/', '-i', '5281', '-M', '0', '-c', '--inode_size', '256', 'out/target/product/generic_arm64/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin']' (exit code 4):
10:50:58 mkuserimg_mke2fs.py INFO: Env: {'MKE2FS_CONFIG': '/mnt/Dev512/out/soong/.temp/tmpHpzfuV'}
10:50:58 mkuserimg_mke2fs.py INFO: Running: mke2fs -O ^has_journal -L / -N 5281 -I 256 -M / -m 0 -E android_sparse -t ext4 -b 4096 out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system.img 526350
10:50:58 mkuserimg_mke2fs.py INFO: Env: {}
10:50:58 mkuserimg_mke2fs.py INFO: Running: e2fsdroid -p out/target/product/generic_arm64/system -s -S out/target/product/generic_arm64/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin -f /mnt/Dev512/out/soong/.temp/tmp0LxGOw -a / out/target/product/generic_arm64/obj/PACKAGING/systemimage_intermediates/system.img
10:51:16 mkuserimg_mke2fs.py ERROR: Failed to run e2fsdroid_cmd: set_selinux_xattr: No such file or directory searching for label "/odm_dlkm"
e2fsdroid: No such file or directory while configuring the file system

mke2fs 1.45.4 (23-Sep-2019)
Creating filesystem with 526350 4k blocks and 5440 inodes
Filesystem UUID: ea257445-9088-43aa-b5c3-8d20f9e7408c
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912

Allocating group tables: done                            
Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done 


set_selinux_xattr: No such file or directory searching for label "/odm_dlkm"
e2fsdroid: No such file or directory while configuring the file system


10:51:17 ninja failed with: exit status 1

#### failed to build some targets (10:46:46 (hh:mm:ss)) ####