转自:https://wiki.lineageos.org/devices/natrium/build#extract-proprietary-blobs
目标机器 小米5s plus 代号natrium
推荐使用ubuntu python2.7
1、下载google android sdk(software development kit)platform-tools,如果已经安装android studio忽略
下载链接:https://developer.android.com/studio/?hl=zh-cn
完成后解压并配置环境
vim ~/.profile
# add Android SDK platform tools to path
if [ -d "$HOME/platform-tools" ] ; then
PATH="$HOME/platform-tools:$PATH"
fi
source ~/.profile
2、安装软件包
sudo apt install bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev
ubuntu版本小于16.04
libwxgtk3.0-dev → libwxgtk2.8-dev
3、安装jdk(不同版本的要求)
lineage16源代码中自带jdk1.9的编译环境
LineageOS 16.0: OpenJDK 1.9 (included by default)
LineageOS 14.1-15.1: OpenJDK 1.8 (install openjdk-8-jdk)
LineageOS 11.0-13.0: OpenJDK 1.7 (install openjdk-7-jdk)*
4、安装repo(国内推荐使用镜像)
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
使用清华镜像 https://mirrors.tuna.tsinghua.edu.cn/help/git-repo/
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo
chmod +x repo
vim ~/.bashrc
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'
配置环境变量
vim ~/.profile
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
mkdir ~/lineage
cd ~/lineage
#-b可选分支 cm-14.1 lineage-15.1 lineage-16.0
repo init -u https://github.com/LineageOS/android.git -b lineage-16.0
#同步 -j可选参数取决cpu线程数
repo sync -j 8
使用清华镜像 https://mirrors.tuna.tsinghua.edu.cn/help/lineageOS/
repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/lineageOS/LineageOS/android.git -b lineage-16.0
#-b 可选 cm-14.1 lineage-15.1 lineage-16.0
vim .repo/manifest.xml
将
改为
将
改为
将
改为
修改后的
4
6
7
10
11
13
14
18
19
23
同步
repo sync
#部分仓库例如Lineage_framework_base同步的时候会出现bundle错误
repo sync --no-clone-bundle
cd ~/lineage
source build/envsetup.sh
breakfast natrium
方法一:
如果出现vendor makefiles错误,将手机通过usb与电脑连接,然后
cd ~/lineage/device/xiaomi/natrium
./extract-files.sh
如果提示command not found ,检查是否配置好adb的环境变量。
方法二:
https://wiki.lineageos.org/extracting_blobs_from_zips.html
lineage rom下载页面:https://download.lineageos.org
#从基于文件的OTA中提取
#将下载好的设备包移到新建目录
mkdir ~/android/system_dump/
cd ~/android/system_dump/
unzip path/to/lineage-*.zip system/*
./extract-files.sh ~/android/system_dump/
rm -rf ~/android/system_dump/
vim ~/.bashrc
#添加以下内容
export USE_CCACHE=1
export CCACHE_COMPRESS=1
export LC_ALL=C
ccache -M 50G
croot
brunch natrium
cd out
lineage.zip刷机包
recovery.img
++++ boot ++++
building image from target_files BOOT...
running: mkbootfs -f /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/META/boot_filesystem_config.txt /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/BOOT/RAMDISK
running: minigzip
running: /home/sucom/zhq/lineage/lineage16/out/host/linux-x86/bin/mkbootimg --kernel /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/BOOT/kernel --cmdline androidboot.hardware=qcom ehci-hcd.park=3 lpm_levels.sleep_disabled=1 cma=32M@0-0xffffffff firmware_class.path=/vendor/firmware_mnt/image loop.max_part=7 buildvariant=userdebug --base 0x80000000 --pagesize 4096 --ramdisk_offset 0x01000000 --os_version 9 --os_patch_level 2019-03-05 --ramdisk /tmp/tmpPnyRXO --output /tmp/tmpTTVqnt
++++ recovery ++++
building image from target_files RECOVERY...
running: mkbootfs -f /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/META/recovery_filesystem_config.txt /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/RECOVERY/RAMDISK
running: minigzip
running: /home/sucom/zhq/lineage/lineage16/out/host/linux-x86/bin/mkbootimg --kernel /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/RECOVERY/kernel --cmdline androidboot.hardware=qcom ehci-hcd.park=3 lpm_levels.sleep_disabled=1 cma=32M@0-0xffffffff firmware_class.path=/vendor/firmware_mnt/image loop.max_part=7 buildvariant=userdebug --base 0x80000000 --pagesize 4096 --ramdisk_offset 0x01000000 --os_version 9 --os_patch_level 2019-03-05 --ramdisk /tmp/tmp_Crjty --output /tmp/tmpP7axmR
++++ recovery (two-step image) ++++
building image from target_files RECOVERY...
running: mkbootfs -f /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/META/recovery_filesystem_config.txt /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/RECOVERY/RAMDISK
running: minigzip
running: /home/sucom/zhq/lineage/lineage16/out/host/linux-x86/bin/mkbootimg --kernel /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/RECOVERY/kernel --cmdline androidboot.hardware=qcom ehci-hcd.park=3 lpm_levels.sleep_disabled=1 cma=32M@0-0xffffffff firmware_class.path=/vendor/firmware_mnt/image loop.max_part=7 buildvariant=userdebug --base 0x80000000 --pagesize 4096 --ramdisk_offset 0x01000000 --os_version 9 --os_patch_level 2019-03-05 --ramdisk /tmp/tmpujM0aR --output /tmp/tmpH_Gti7
++++ system ++++
creating system.img...
Running: mkuserimg_mke2fs.sh -s /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/SYSTEM /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/system.img ext4 system 3221225472 -j 0 -T 1230739200 -C /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/META/filesystem_config.txt -B /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/system.map -L system -M 0 -U 7fc68ec3-fcb7-5958-8862-55432a7e7f2d -S 89823ea0-0473-5a94-b9d9-6708eedf834a /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/META/file_contexts.bin
MKE2FS_CONFIG=./system/extras/ext4_utils/mke2fs.conf E2FSPROGS_FAKE_TIME=1230739200 mke2fs -O ^has_journal -L system -m 0 -U 7fc68ec3-fcb7-5958-8862-55432a7e7f2d -E android_sparse,hash_seed=89823ea0-0473-5a94-b9d9-6708eedf834a -t ext4 -b 4096 /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/system.img 786432
mke2fs 1.43.3 (04-Sep-2016)
Creating filesystem with 786432 4k blocks and 196608 inodes
Filesystem UUID: 7fc68ec3-fcb7-5958-8862-55432a7e7f2d
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
E2FSPROGS_FAKE_TIME=1230739200 e2fsdroid -T 1230739200 -C /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/META/filesystem_config.txt -B /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/system.map -S /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/META/file_contexts.bin -f /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/SYSTEM -a /system /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/system.img
loaded 2907 fs_config entries
Created filesystem with 2917/196608 inodes and 302785/786432 blocks
Running: simg2img /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/system.img /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/unsparse_system.img
Running: e2fsck -f -n /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/unsparse_system.img
e2fsck 1.43.3 (04-Sep-2016)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
system: 2917/196608 files (0.4% non-contiguous), 302785/786432 blocks
++++ vendor ++++
creating vendor.img...
Running: mkuserimg_mke2fs.sh -s /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/VENDOR /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/vendor.img ext4 vendor 872415232 -j 0 -T 1230739200 -C /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/META/vendor_filesystem_config.txt -B /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/vendor.map -L vendor -M 0 -U 03a2c2d2-86be-5378-92da-25f197d4184d -S bf17ba28-180f-583f-bdc5-cbe47a4e60ea /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/META/file_contexts.bin
MKE2FS_CONFIG=./system/extras/ext4_utils/mke2fs.conf E2FSPROGS_FAKE_TIME=1230739200 mke2fs -O ^has_journal -L vendor -m 0 -U 03a2c2d2-86be-5378-92da-25f197d4184d -E android_sparse,hash_seed=bf17ba28-180f-583f-bdc5-cbe47a4e60ea -t ext4 -b 4096 /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/vendor.img 212992
mke2fs 1.43.3 (04-Sep-2016)
Creating filesystem with 212992 4k blocks and 53312 inodes
Filesystem UUID: 03a2c2d2-86be-5378-92da-25f197d4184d
Superblock backups stored on blocks:
32768, 98304, 163840
Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
E2FSPROGS_FAKE_TIME=1230739200 e2fsdroid -T 1230739200 -C /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/META/vendor_filesystem_config.txt -B /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/vendor.map -S /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/META/file_contexts.bin -f /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/VENDOR -a /vendor /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/vendor.img
loaded 1304 fs_config entries
Created filesystem with 1314/53312 inodes and 62996/212992 blocks
Running: simg2img /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/vendor.img /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/unsparse_vendor.img
Running: e2fsck -f -n /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/unsparse_vendor.img
e2fsck 1.43.3 (04-Sep-2016)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
vendor: 1314/53312 files (0.8% non-contiguous), 62996/212992 blocks
++++ userdata ++++
creating userdata.img...
Running: mkf2fsuserimg.sh /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/userdata.img 58846064640 -f /tmp/tmpbWfpWd -s /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/META/file_contexts.bin -t data -T 1230739200 -L data
in mkf2fsuserimg.sh PATH=/home/sucom/zhq/lineage/lineage16/out/host/linux-x86/bin:/home/sucom/zhq/lineage/lineage16/out/host/linux-x86/bin/:/home/sucom/zhq/lineage/lineage16/prebuilts/jdk/jdk9/linux-x86/bin:/home/sucom/zhq/lineage/lineage16/prebuilts/jdk/jdk9/linux-x86/bin:/home/sucom/zhq/lineage/lineage16/out/soong/host/linux-x86/bin:/home/sucom/zhq/lineage/lineage16/out/host/linux-x86/bin:/home/sucom/zhq/lineage/lineage16/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/sucom/zhq/lineage/lineage16/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/sucom/zhq/lineage/lineage16/development/scripts:/home/sucom/zhq/lineage/lineage16/prebuilts/devtools/tools:/home/sucom/zhq/lineage/lineage16/external/selinux/prebuilts/bin:/home/sucom/zhq/lineage/lineage16/prebuilts/misc/linux-x86/dtc:/home/sucom/zhq/lineage/lineage16/prebuilts/misc/linux-x86/libufdt:/home/sucom/zhq/lineage/lineage16/prebuilts/android-emulator/linux-x86_64:/home/sucom/.conda/envs/android/bin:/home/sucom/zhq/androidSDK/platform-tools:/home/sucom/zhq/bin:/home/sucom/bin:/home/sucom/.local/bin:/home/sucom/anaconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
make_f2fs -S 58846064640 -f -O encrypt -O quota -O verity -l data /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/userdata.img
F2FS-tools: mkfs.f2fs Ver: 1.11.0 (2018-07-10)
Info: Disable heap-based policy
Info: Debug level = 0
Info: Label = data
Info: Trim is disabled
Info: No support kernel version!
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 114933720 (56119 MB)
Info: zone aligned segment0 blkaddr: 512
Info: add quota type = 0 => 4
Info: add quota type = 1 => 5
Info: Overprovision ratio = 0.850%
Info: Overprovision segments = 477 (GC reserved = 243)
Info: format successful
sload_f2fs -S -f /tmp/tmpbWfpWd -s /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/META/file_contexts.bin -t /data -T 1230739200 /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/userdata.img
Info: No support kernel version!
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 114933720 (56119 MB)
Info: MKFS version
"4.15.0-46-generic #49~16.04.1-Ubuntu SMP Tue Feb 12 17:45:24 UTC 2019"
Info: FSCK version
from "4.15.0-46-generic #49~16.04.1-Ubuntu SMP Tue Feb 12 17:45:24 UTC 2019"
to "4.15.0-46-generic #49~16.04.1-Ubuntu SMP Tue Feb 12 17:45:24 UTC 2019"
Info: superblock features = 481 : encrypt verity quota_ino
Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000
Info: total FS sectors = 114933720 (56119 MB)
Info: CKPT version = 3a43c0c7
Info: Write valid nat_bits in checkpoint
Info: Write valid nat_bits in checkpoint
Info: MKFS version
"4.15.0-46-generic #49~16.04.1-Ubuntu SMP Tue Feb 12 17:45:24 UTC 2019"
Info: FSCK version
from "4.15.0-46-generic #49~16.04.1-Ubuntu SMP Tue Feb 12 17:45:24 UTC 2019"
to "4.15.0-46-generic #49~16.04.1-Ubuntu SMP Tue Feb 12 17:45:24 UTC 2019"
Info: superblock features = 481 : encrypt verity quota_ino
Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000
Info: total FS sectors = 114933720 (56119 MB)
Info: CKPT version = 3a43c0c7
Info: Checked valid nat_bits in checkpoint
Info: checkpoint state = 81 : nat_bits unmount
[fsck_chk_quota_files:1714] Fixing Quota file ([ 0] ino [0x4])
[fsck_chk_quota_files:1714] Fixing Quota file ([ 1] ino [0x5])
[FSCK] Unreachable nat entries [Ok..] [0x0]
[FSCK] SIT valid block bitmap checking [Ok..]
[FSCK] Hard link checking for regular file [Ok..] [0x0]
[FSCK] valid_block_count matching with CP [Ok..] [0x9]
[FSCK] valid_node_count matcing with CP (de lookup) [Ok..] [0x4]
[FSCK] valid_node_count matcing with CP (nat lookup) [Ok..] [0x4]
[FSCK] valid_inode_count matched with CP [Ok..] [0x3]
[FSCK] free segment_count matched with CP [Ok..] [0x6ce3]
[FSCK] next block offset is free [Ok..]
[FSCK] fixing SIT types
[FSCK] other corrupted bugs [Fail]
Info: Write valid nat_bits in checkpoint
Done.
userdata size (160) is 0.00% of limit (58846064640)
++++ cache ++++
creating cache.img...
Running: mkf2fsuserimg.sh /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/cache.img 402653184 -f /tmp/tmpZlGG7m -s /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/META/file_contexts.bin -t cache -T 1230739200 -L cache
in mkf2fsuserimg.sh PATH=/home/sucom/zhq/lineage/lineage16/out/host/linux-x86/bin:/home/sucom/zhq/lineage/lineage16/out/host/linux-x86/bin/:/home/sucom/zhq/lineage/lineage16/prebuilts/jdk/jdk9/linux-x86/bin:/home/sucom/zhq/lineage/lineage16/prebuilts/jdk/jdk9/linux-x86/bin:/home/sucom/zhq/lineage/lineage16/out/soong/host/linux-x86/bin:/home/sucom/zhq/lineage/lineage16/out/host/linux-x86/bin:/home/sucom/zhq/lineage/lineage16/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/sucom/zhq/lineage/lineage16/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/sucom/zhq/lineage/lineage16/development/scripts:/home/sucom/zhq/lineage/lineage16/prebuilts/devtools/tools:/home/sucom/zhq/lineage/lineage16/external/selinux/prebuilts/bin:/home/sucom/zhq/lineage/lineage16/prebuilts/misc/linux-x86/dtc:/home/sucom/zhq/lineage/lineage16/prebuilts/misc/linux-x86/libufdt:/home/sucom/zhq/lineage/lineage16/prebuilts/android-emulator/linux-x86_64:/home/sucom/.conda/envs/android/bin:/home/sucom/zhq/androidSDK/platform-tools:/home/sucom/zhq/bin:/home/sucom/bin:/home/sucom/.local/bin:/home/sucom/anaconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
make_f2fs -S 402653184 -f -O encrypt -O quota -O verity -l cache /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/cache.img
F2FS-tools: mkfs.f2fs Ver: 1.11.0 (2018-07-10)
Info: Disable heap-based policy
Info: Debug level = 0
Info: Label = cache
Info: Trim is disabled
Info: No support kernel version!
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 786432 (384 MB)
Info: zone aligned segment0 blkaddr: 512
Info: add quota type = 0 => 4
Info: add quota type = 1 => 5
Info: Overprovision ratio = 10.000%
Info: Overprovision segments = 43 (GC reserved = 28)
Info: format successful
sload_f2fs -S -f /tmp/tmpZlGG7m -s /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/META/file_contexts.bin -t /cache -T 1230739200 /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/IMAGES/cache.img
Info: No support kernel version!
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 786432 (384 MB)
Info: MKFS version
"4.15.0-46-generic #49~16.04.1-Ubuntu SMP Tue Feb 12 17:45:24 UTC 2019"
Info: FSCK version
from "4.15.0-46-generic #49~16.04.1-Ubuntu SMP Tue Feb 12 17:45:24 UTC 2019"
to "4.15.0-46-generic #49~16.04.1-Ubuntu SMP Tue Feb 12 17:45:24 UTC 2019"
Info: superblock features = 481 : encrypt verity quota_ino
Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000
Info: total FS sectors = 786432 (384 MB)
Info: CKPT version = 67b407b5
Info: Write valid nat_bits in checkpoint
Info: Write valid nat_bits in checkpoint
Info: MKFS version
"4.15.0-46-generic #49~16.04.1-Ubuntu SMP Tue Feb 12 17:45:24 UTC 2019"
Info: FSCK version
from "4.15.0-46-generic #49~16.04.1-Ubuntu SMP Tue Feb 12 17:45:24 UTC 2019"
to "4.15.0-46-generic #49~16.04.1-Ubuntu SMP Tue Feb 12 17:45:24 UTC 2019"
Info: superblock features = 481 : encrypt verity quota_ino
Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000
Info: total FS sectors = 786432 (384 MB)
Info: CKPT version = 67b407b5
Info: Checked valid nat_bits in checkpoint
Info: checkpoint state = 81 : nat_bits unmount
[fsck_chk_quota_files:1714] Fixing Quota file ([ 0] ino [0x4])
[fsck_chk_quota_files:1714] Fixing Quota file ([ 1] ino [0x5])
[FSCK] Unreachable nat entries [Ok..] [0x0]
[FSCK] SIT valid block bitmap checking [Ok..]
[FSCK] Hard link checking for regular file [Ok..] [0x0]
[FSCK] valid_block_count matching with CP [Ok..] [0x9]
[FSCK] valid_node_count matcing with CP (de lookup) [Ok..] [0x4]
[FSCK] valid_node_count matcing with CP (nat lookup) [Ok..] [0x4]
[FSCK] valid_inode_count matched with CP [Ok..] [0x3]
[FSCK] free segment_count matched with CP [Ok..] [0xb2]
[FSCK] next block offset is free [Ok..]
[FSCK] fixing SIT types
[FSCK] other corrupted bugs [Fail]
Info: Write valid nat_bits in checkpoint
Done.
cache size (157) is 0.00% of limit (402653184)
++++ radio ++++
done.
[ 99% 93980/93981] Package OTA: /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/lineage_natrium-ota-eng.sucom.zip
--- target info ---
blockimgdiff_versions = (str) 3,4
blocksize = (int) 262144
boot_size = (int) 67108864
build.prop = (dict) {'ro.build.display.id': 'lineage_natrium-userdebug 9 PQ2A.190305.002 eng.sucom.20190403.122821 test-keys', 'ro.wifi.channels': '', 'ro.lineage.device': 'natrium', 'ro.modversion': '16.0-20190403-UNOFFICIAL-natrium', 'ro.build.id': 'PQ2A.190305.002', 'ro.product.cpu.abilist': 'arm64-v8a,armeabi-v7a,armeabi', 'ro.build.product': 'natrium', 'ro.lineage.display.version': '16.0-20190403-UNOFFICIAL-natrium', 'ro.lineage.releasetype': 'UNOFFICIAL', 'ro.build.host': 'wlz', 'ro.product.name': 'natrium', 'ro.build.version.security_patch': '2019-03-05', 'ro.product.manufacturer': 'Xiaomi', 'ro.product.cpu.abilist32': 'armeabi-v7a,armeabi', 'ro.build.version.incremental': 'eng.sucom.20190403.122821', 'ro.build.version.preview_sdk': '0', 'dalvik.vm.isa.arm.features': 'default', 'ro.build.tags': 'test-keys', 'ro.treble.enabled': 'false', 'dalvik.vm.isa.arm64.variant': 'kryo', 'ro.build.version.sdk': '28', 'ro.build.date': 'Wed Apr 3 12:28:06 CST 2019', 'ro.lineage.build.version': '16.0', 'dalvik.vm.isa.arm.variant': 'kryo', 'dalvik.vm.lockprof.threshold': '500', 'ro.product.locale': 'en-US', 'ro.lineage.build.version.plat.sdk': '9', 'ro.build.version.min_supported_target_sdk': '17', 'ro.build.fingerprint': 'Xiaomi/natrium/natrium:7.0/NRD90M/V9.6.2.0.NBGMIFD:user/release-keys', 'ro.build.date.utc': '1554265686', 'ro.build.characteristics': 'default', 'ro.product.cpu.abilist64': 'arm64-v8a', 'ro.build.expect.modem': '2018-11-21 10:46:10,8.11.23', 'ro.build.user': 'sucom', 'dalvik.vm.isa.arm64.features': 'default', 'ro.expect.recovery_id': '0xcec13572c6bee5784d38e94531e3b63f5078f5c3000000000000000000000000', 'ro.product.device': 'natrium', 'ro.build.version.all_codenames': 'REL', 'dalvik.vm.stack-trace-dir': '/data/anr', 'ro.build.description': 'natrium-user 7.0 NRD90M V9.6.2.0.NBGMIFD release-keys', 'ro.build.flavor': 'lineage_natrium-userdebug', 'ro.product.cpu.abi': 'arm64-v8a', 'ro.lineagelegal.url': 'https://lineageos.org/legal', 'ro.product.brand': 'Xiaomi', 'persist.sys.dalvik.vm.lib.2': 'libart.so', 'ro.build.version.release': '9', 'ro.build.version.codename': 'REL', 'net.bt.name': 'Android', 'ro.lineage.build.version.plat.rev': '0', 'ro.build.type': 'userdebug', 'ro.product.model': 'MI 5s Plus', 'ro.build.version.base_os': '', 'ro.lineage.version': '16.0-20190403-UNOFFICIAL-natrium'}
cache_fs_type = (str) f2fs
cache_size = (int) 402653184
default_system_dev_certificate = (str) build/target/product/security/testkey
ext_mkuserimg = (str) mkuserimg_mke2fs.sh
extfs_sparse_flag = (str) -s
extra_recovery_keys = (str) vendor/lineage/build/target/product/security/lineage
fs_type = (str) ext4
fstab = (dict) {'none': , '/vendor/firmware_mnt': , '/cache': , '/boot': , '/system': , '/persist': , '/recovery': , '/misc': , '/vendor/bt_firmware': , '/mnt/vendor/persist': , '/vendor/dsp': , '/data': , '/vendor': }
fstab_version = (int) 2
mkbootimg_args = (str)
mkbootimg_version_args = (str) --os_version 9 --os_patch_level 2019-03-05
multistage_support = (str) 1
ota_override_device = (str) natrium
recovery_api_version = (int) 3
recovery_mount_options = (str) ext4=max_batch_time=0,commit=1,data=ordered,barrier=1,errors=panic,nodelalloc
recovery_size = (int) 67108864
selinux_fc = (str) /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin
squashfs_sparse_flag = (str) -s
system_size = (int) 3221225472
tool_extensions = (str) device/xiaomi/msm8996-common
use_set_metadata = (str) 1
userdata_size = (int) 58846064640
vendor.build.prop = (dict) {'ro.hardware.fingerprint': 'fpc', 'persist.nfc.smartcard.config': 'SIM1,SIM2,eSE1', 'vendor.audio.offload.buffer.size.kb': '64', 'persist.camera.cs.br': '0.7', 'ro.vendor.build.type': 'userdebug', 'persist.data.iwlan.enable': 'true', 'persist.rmnet.data.enable': 'true', 'ro.vendor.build.date.utc': '1554265686', 'ro.vendor.build.security_patch': '2018-10-01', 'persist.data.wda.enable': 'true', 'persist.net.doxlat': 'true', 'persist.data.df.ul_mode': '5', 'ro.frp.pst': '/dev/block/bootdevice/by-name/frp', 'af.fast_track_multiplier': '1', 'vendor.audio.offload.passthrough': 'false', 'ro.vendor.build.id': 'PQ2A.190305.002', 'persist.vendor.radio.custom_ecc': '1', 'persist.vendor.audio.fluence.voicecall': 'true', 'ro.vendor.build.version.sdk': '28', 'vendor.audio.offload.multiple.enabled': 'false', 'sys.fpc.tu.disabled': '0', 'wifi.interface': 'wlan0', 'ro.qcom.ad.sensortype': '2', 'persist.radio.redir_party_num': '1', 'ro.vendor.qti.sys.fw.bg_apps_limit': '60', 'ro.vendor.build.version.incremental': 'eng.sucom.20190403.122821', 'ro.product.vendor.brand': 'Xiaomi', 'sys.usb.controller': '6a00000.dwc3', 'persist.data.df.dl_mode': '5', 'persist.vendor.bt.enable.splita2dp': 'false', 'persist.vendor.audio.fluence.speaker': 'true', 'persist.dbg.vt_avail_ovr': '1', 'persist.demo.hdmirotationlock': 'false', 'persist.data.mode': 'concurrent', 'ro.qcom.ad.calib.data': '/system/etc/calib.cfg', 'vendor.audio.offload.track.enable': 'true', 'ro.product.first_api_level': '23', 'audio.offload.min.duration.secs': '15', 'ro.btconfig.vendor': 'qcom', 'persist.vendor.radio.sib16_support': '1', 'audio.offload.video': 'true', 'ro.vendor.qti.sys.fw.bservice_enable': 'true', 'persist.timed.enable': 'true', 'vendor.audio.parser.ip.buffer.size': '262144', 'vendor.voice.path.for.pcm.voip': 'true', 'ro.board.platform': 'msm8996', 'persist.data.qmi.adb_logmask': '0', 'vidc.enc.dcvs.extra-buff-count': '2', 'vendor.audio_hal.period_size': '192', 'drm.service.enabled': 'true', 'ro.vendor.extension_library': 'libqti-perfd-client.so', 'ro.vendor.product.cpu.abilist32': 'armeabi-v7a,armeabi', 'vendor.gralloc.enable_fb_ubwc': '1', 'vendor.display.disable_rotator_split': '1', 'audio.deep_buffer.media': 'true', 'persist.radio.multisim.config': 'dsds', 'bt.max.hfpclient.connections': '1', 'DEVICE_PROVISIONED': '1', 'persist.camera.imglib.fddsp': '1', 'persist.qfp': 'false', 'vendor.display.enable_default_color_mode': '1', 'ro.opengles.version': '196610', 'ro.vendor.build.date': 'Wed Apr 3 12:28:06 CST 2019', 'persist.vendor.radio.rat_on': 'combine', 'persist.hwc.enable_vds': '1', 'debug.egl.hw': '1', 'vendor.camera.aux.packagelist': 'org.codeaurora.snapcam,com.android.camera,com.miui.cit,org.lineageos.snap', 'persist.camera.gyro.disable': '0', 'ro.qcom.ad': '1', 'ro.carrier': 'unknown', 'ro.product.vendor.manufacturer': 'Xiaomi', 'ro.product.board': 'msm8996', 'ro.dalvik.vm.native.bridge': '0', 'ro.bluetooth.sap': 'true', 'ro.vendor.audio.sdk.fluencetype': 'fluence', 'ro.telephony.default_network': '20,20', 'persist.radio.force_on_dc': 'true', 'vendor.audio.offload.multiaac.enable': 'true', 'ro.use_data_netmgrd': 'true', 'persist.data.df.agg.dl_pkt': '10', 'persist.data.df.mux_count': '8', 'qcom.bluetooth.soc': 'rome', 'keyguard.no_require_sim': 'true', 'vendor.vidc.enc.disable.pq': 'true', 'ro.nfc.port': 'I2C', 'ro.bluetooth.dun': 'true', 'persist.data.df.dev_name': 'rmnet_usb0', 'vendor.audio.dolby.ds2.enabled': 'false', 'vendor.audio.dolby.ds2.hardbypass': 'false', 'ro.btconfig.if': 'uart', 'ro.vendor.display.cabl': '0', 'dev.pm.dyn_samplingrate': '1', 'persist.sys.wfd.virtual': '0', 'debug.sf.latch_unsignaled': '1', 'ro.telephony.call_ring.multiple': 'false', 'vendor.display.perf_hint_window': '50', 'vendor.audio.safx.pbe.enabled': 'true', 'ro.product.vendor.name': 'lineage_natrium', 'ro.vendor.product.cpu.abilist64': 'arm64-v8a', 'vendor.audio.hw.aac.encoder': 'true', 'persist.data.netmgrd.qos.enable': 'true', 'ro.vendor.product.cpu.abilist': 'arm64-v8a,armeabi-v7a,armeabi', 'persist.vendor.audio.fluence.voicerec': 'false', 'ro.sf.lcd_density': '480', 'persist.vendor.cne.feature': '1', 'persist.data.df.iwlan_mux': '9', 'ro.bluetooth.hfp.ver': '1.7', 'ril.subscription.types': 'NV,RUIM', 'persist.dbg.volte_avail_ovr': '1', 'ro.vendor.build.fingerprint': 'Xiaomi/natrium/natrium:7.0/NRD90M/V9.6.2.0.NBGMIFD:user/release-keys', 'rild.libpath': '/vendor/lib64/libril-qc-qmi-1.so', 'debug.sf.hw': '1', 'vendor.audio.tunnel.encode': 'false', 'ro.btconfig.dev': '/dev/ttyHS0', 'ro.vendor.build.tags': 'test-keys', 'ro.control_privapp_permissions': 'enforce', 'vendor.audio.offload.gapless.enabled': 'true', 'ro.vendor.build.version.release': '9', 'persist.data.df.agg.dl_size': '4096', 'ro.product.vendor.model': 'MI 5s Plus', 'ro.vendor.audio.sdk.ssr': 'false', 'ro.btconfig.chip': 'QCA6164', 'ro.telephony.default_cdma_sub': '0', 'persist.radio.apm_sim_not_pwdn': '1', 'vendor.display.disable_skip_validate': '1', 'ro.product.vendor.device': 'natrium', 'ro.config.vc_call_vol_steps': '7', 'ro.config.media_vol_steps': '25'}
vendor_fs_type = (str) ext4
vendor_size = (int) 872415232
running: openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
(using device-specific extensions from target_files)
loaded device-specific extensions from /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/obj/PACKAGING/target_files_intermediates/lineage_natrium-target_files-eng.sucom/META/releasetools.py
using prebuilt recovery.img from IMAGES...
Total of 786432 4096-byte output blocks in 22 input chunks.
Finding transfers...
Generating digraph...
Finding vertex sequence...
Reversing backward edges...
0/0 dependencies (0.00%) were violated; 0 source blocks stashed.
Improving vertex order...
Revising stash size...
Total 0 blocks (0 bytes) are packed as new blocks due to insufficient cache size.
Reticulating splines...
1186570240 1186570240 (100.00%) new __DATA 0-202 209 225-407 8417-32769 32961-98305 98497-163841 164033-229377 229569-294913 295105-298672 524288 524295
max stashed blocks: 0 (0 bytes), limit: 322122547 bytes (0.00%)
Imgdiff Stats Report
========================
Compressing system.new.dat with brotli
running: brotli --quality=6 --output=/tmp/tmpt4BHhE/system.new.dat.br /tmp/tmpt4BHhE/system.new.dat
using prebuilt boot.img from IMAGES...
Total of 212992 4096-byte output blocks in 14 input chunks.
Finding transfers...
Generating digraph...
Finding vertex sequence...
Reversing backward edges...
0/0 dependencies (0.00%) were violated; 0 source blocks stashed.
Improving vertex order...
Revising stash size...
Total 0 blocks (0 bytes) are packed as new blocks due to insufficient cache size.
Reticulating splines...
244056064 244056064 (100.00%) new __DATA 0-54 59-60 67-149 3399-32769 32821-62889 98304-98305 163840-163841
max stashed blocks: 0 (0 bytes), limit: 322122547 bytes (0.00%)
Imgdiff Stats Report
========================
Compressing vendor.new.dat with brotli
running: brotli --quality=6 --output=/tmp/tmpaYpV5j/vendor.new.dat.br /tmp/tmpaYpV5j/vendor.new.dat
boot size (16015360) is 23.86% of limit (67108864)
running: java -Xmx2048m -Djava.library.path=/home/sucom/zhq/lineage/lineage16/out/host/linux-x86/lib64 -jar /home/sucom/zhq/lineage/lineage16/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmpvpA6mb.zip /tmp/tmpz0qRva.zip
running: zip -d /tmp/tmpz0qRva.zip META-INF/com/android/metadata
running: java -Xmx2048m -Djava.library.path=/home/sucom/zhq/lineage/lineage16/out/host/linux-x86/lib64 -jar /home/sucom/zhq/lineage/lineage16/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmpz0qRva.zip /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/lineage_natrium-ota-eng.sucom.zip
done.
[100% 93981/93981] build bacon
Package Complete: /home/sucom/zhq/lineage/lineage16/out/target/product/natrium/lineage-16.0-20190403-UNOFFICIAL-natrium.zip
#### build completed successfully (22:59 (mm:ss)) ####