[Error] Installing Ubuntu in Android (urgent help needed) - Android Q&A, Help & Troubleshooting

Can anyone help me solve this issue?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This is the boot script i am using
PHP:
###########################################
# Linux boot script V9 for Android #
# Built by Zachary Powell (zacthespack) #
# and Martin Møller (Tuxling) #
# Thanks to: #
# Johan Vromans #
# Marshall Levin #
# and to everyone at XDA! #
# Updated to work on Lenovo Tablets and #
# with ext4 .img files by Robherc #
# Feel free to edit/use this script as you#
# like but credit Linuxonandroid.org #
###########################################
# $ver: V9 #
###########################################
###########################################
# This is a function we use to stop the #
# script in case of errors #
###########################################
error_exit() {
echo "Error: $1"
exit 1
}
###########################################
# Set up variables #
###########################################
if [ -f /data/data/com.zpwebsites.linuxonandroid/files/busybox ]; then
export bbox=/data/data/com.zpwebsites.linuxonandroid/files/busybox
elif [ -f /data/data/com.zpwebsites.linuxonandroid.opensource/files/busybox ]; then
export bbox=/data/data/com.zpwebsites.linuxonandroid.opensource/files/busybox
else
export bbox=/system/xbin/busybox
fi
export usermounts=android # Base folder all user mounts are done in, should be moved to app later
export imgfile=$(dirname $0)/ubuntu.img # Default image file, another can be set by using an argument
export bin=/system/bin
export mnt=/data/local/mnt
export USER=root
if [[ ! -d $mnt ]]; then mkdir $mnt; fi
export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export HOME=/root
export SdMounted=no
###########################################
# Handle arguments if present #
###########################################
if [ $# -ne 0 ]; then
if [ -f $1 ]; then # Is full path present?
imgfile=$1
elif [ -f $(dirname $0)/$1 ]; then # Is only a filename present?
imgfile=$(dirname $0)/$1
else
error_exit "Image file not found!($1)"
fi
fi
###########################################
# If a md5 file is found we check it here #
###########################################
if [ -f $imgfile.md5 ]; then
echo "MD5 file found, use to check .img file? (y/n)"
read answer
if [ $answer == y ]; then
echo -n "Validating image checksum... "
$bbox md5sum -c -s $imgfile.md5
if [ $? -ne 0 ];then
echo "FAILED!"
error_exit "Checksum failed! The image is corrupted!"
else
echo "OK"
rm $imgfile.md5
fi
fi
fi
################################
# Find and read config file #
# or use defaults if not found #
################################
use_swap=no
cfgfile=$imgfile.config # Default config file if not specified
if [ -f $imgfile.config ]; then
source $imgfile.config
fi
###########################################
# Set Swap up if wanted #
# #
###########################################
if [ $use_swap == yes ]; then
if [ -f $imgfile.swap ]; then
echo "Swap file found, using file"
echo "Turning on swap (if it errors here you do not have swap support)"
swapon $imgfile.swap
else
echo "Creating Swap file"
dd if=/dev/zero of=$imgfile.swap bs=1048576 count=1024
mkswap $imgfile.swap
echo "Turning on swap (if it errors here you do not have swap support)"
swapon $imgfile.swap
fi
fi
###########################################
# Set up loop device and mount image #
###########################################
echo -n "Checking loop device... "
if [ -b /dev/block/loop255 ]; then
echo "FOUND"
else
echo "MISSING"
# Loop device not found so we create it and verify it was actually created
echo -n "Creating loop device... "
$bbox mknod /dev/block/loop255 b 7 255
if [ -b /dev/block/loop255 ]; then
echo "OK"
else
echo "FAILED"
error_exit "Unable to create loop device!"
fi
fi
$bbox losetup /dev/block/loop255 $imgfile
if [ $? -ne 0 ];then error_exit "Unable to attach image to loop device! (Image = $imgfile)"; fi
$bbox mount -t auto /dev/block/loop255 $mnt
if [ $? -ne 0 ];then error_exit "Unable to mount the loop device!"; fi
###########################################
# Mount all required partitions #
###########################################
$bbox mount -o bind /dev $mnt/dev
if [ $? -ne 0 ];then error_exit "Unable to mount $mnt/dev!"; fi
$bbox mount -t devpts devpts $mnt/dev/pts
if [ $? -ne 0 ];then error_exit "Unable to mount $mnt/dev/pts!"; fi
$bbox mount -t proc proc $mnt/proc
if [ $? -ne 0 ];then error_exit "Unable to mount $mnt/proc!"; fi
$bbox mount -t sysfs sysfs $mnt/sys
if [ $? -ne 0 ];then error_exit "Unable to mount $mnt/sys!"; fi
$bbox mount -o bind /sdcard $mnt/sdcard
if [ $? -ne 0 ];then error_exit "Unable to bind $mnt/sdcard!"; fi
if [[ ! -d $mnt/root/cfg ]]; then mkdir $mnt/root/cfg; fi
$bbox mount -o bind $(dirname $imgfile) $mnt/root/cfg
###########################################
# Checks if you have a external sdcard #
# and mounts it if you do #
###########################################
if [ -d /sdcard/external_sd ]; then
$bbox mount -o bind /sdcard/external_sd $mnt/external_sd
if [ $? == 0 ];then SdMounted="Yes"; fi
elif [ -d /Removable/MicroSD ]; then
$bbox mount -o bind /Removable/MicroSD $mnt/external_sd
if [ $? == 0 ];then SdMounted="Yes"; fi
elif [ -d /storage/sdcard1 ]; then
$bbox mount -o bind /storage/sdcard1 $mnt/external_sd
if [ $? == 0 ];then SdMounted="Yes"; fi
elif [ -d /storage/extSdCard ]; then
$bbox mount -o bind /storage/extSdCard $mnt/external_sd
if [ $? == 0 ];then SdMounted="Yes"; fi
# This last elif statemet will mount internal memory to /external_sd
# within the chroot environment on some devices.
# You may wish to comment it out if this behavior affects you
elif [ -d /storage ]; then
$bbox mount -o bind /storage $mnt/external_sd
if [ $? == 0 ];then SdMounted="Yes"; fi
# This is the end of the statement to comment out
fi
###########################################
# Mount all user defined mounts if any #
###########################################
if [ -f $imgfile.mounts ]; then
olddir=$(pwd)
echo "Mounting user mounts"
cd $mnt
if [[ ! -d $mnt/$usermounts ]]; then $bbox mkdir -p $usermounts; fi
echo "# Script to unmount user defined mounts, do not delete or edit!" > $imgfile.shutdown
echo "cd $mnt/$usermounts" > $imgfile.shutdown
cd $mnt/$usermounts
for entry in $(cat "$imgfile.mounts"); do
ANDROID=${entry%;*}
LINUX=${entry#*;}
if [[ -d $ANDROID ]]; then
echo -n "Mounting $ANDROID to $usermounts/$LINUX... "
if [[ ! -d $mnt/$usermounts/$LINUX ]]; then $bbox mkdir -p $LINUX; fi
$bbox mount -o bind $ANDROID $mnt/$usermounts/$LINUX &> /dev/null
if [ $? -ne 0 ];then
echo FAIL
if [[ -d $mnt/$usermounts/$LINUX ]]; then $bbox rmdir -p $LINUX; fi
else
echo OK
echo "$bbox umount $mnt/$usermounts/$LINUX" >> $imgfile.shutdown
echo "$bbox rmdir -p $LINUX" >> $imgfile.shutdown
fi
else
echo "Android folder not found: $ANDROID"
fi
done
echo "cd $mnt" >> $imgfile.shutdown
echo "$bbox rmdir -p $usermounts" >> $imgfile.shutdown
cd $olddir
else
echo "No user defined mount points"
fi
###########################################
# Sets up network forwarding #
###########################################
$bbox sysctl -w net.ipv4.ip_forward=1
if [ $? -ne 0 ];then error_exit "Unable to forward network!"; fi
# If NOT $mnt/root/DONOTDELETE.txt exists we setup hosts and resolv.conf now
if [ ! -f $mnt/root/DONOTDELETE.txt ]; then
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
if [ $? -ne 0 ];then error_exit "Unable to write resolv.conf file!"; fi
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost" > $mnt/etc/hosts
if [ $? -ne 0 ];then error_exit "Unable to write hosts file!"; fi
fi
###########################################
# Chroot into ubuntu #
###########################################
$bbox chroot $mnt /root/init.sh $(basename $imgfile)
###########################################
# Shut down ubuntu #
###########################################
echo "Shutting down Linux ARM"
#for pid in `lsof | grep $mnt | sed -e's/ / /g' | cut -d' ' -f2`; do kill -9 $pid >/dev/null 2>&1; done
for pid in `$bbox lsof | $bbox grep $mnt | $bbox sed -e's/ / /g' | $bbox cut -d' ' -f2`; do $bbox kill -9 $pid >/dev/null 2>&1; done
sleep 5
###########################################
# Unmount all user defined mounts if any #
###########################################
if [ -f $imgfile.shutdown ]; then
echo "Unmounting user defined mounts"
sh $imgfile.shutdown
rm $imgfile.shutdown
fi
$bbox umount $mnt/root/cfg
$bbox umount $mnt/sdcard
if [ $SdMounted == "Yes" ];then $bbox umount $mnt/external_sd; fi
$bbox umount $mnt/dev/pts
$bbox umount $mnt/dev
$bbox umount $mnt/proc
$bbox umount $mnt/sys
$bbox umount $mnt
$bbox losetup -d /dev/block/loop255 &> /dev/null

Related

Android:adb chroot: can't execute /system/bin/sh

I'm trying to install Linux on android according to this guide: androlinux .com /android-ubuntu-development/how-to-install-ubuntu-on-android/ threw all the necessary files to the memory card. The problem is when it has a file bootubuntu:
Code:
#modprobe ext2
busybox mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
if [ ! -d /data/local/ubuntu ]
then
mkdir /data/local/ubuntu
fi
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
mknod /dev/loop1 b 7 0
losetup /dev/block/loop1 /sdcard/ubuntu/ubuntu.img
mount -t ext4 /dev/block/loop1 /data/local/ubuntu
#mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
sysctl -w net.ipv4.ip_forward=1
echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "Setting localhost on /etc/hosts "
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "READY TO ROCK AND ROLL BABY! "
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo " "
chroot $mnt /system/bin/sh
#After exit command is executed clear it all up
echo " "
echo "Shutting down Ubuntu"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
losetup -d /dev/loop1
Got an error when calling `chroot: can not execute '/system/bin/sh': no such file or directory`
Despite this, the file exists, I checked to `ls -la /system/bin/sh`
What to do?

Modifying build.prop via script

I'm trying to create a script to modify the build.prop file 'automatically'.
I want the script to check for entries I define and:
1. If they do not exist add them
2. If they do exist, check the value, and if it does not match what I've define modify it.
I found a much older (2012) thread and took a script from there. But it doesn't work.
It runs but outputs nothing, not changing the build.prop
I've attached the script. Is it correct?
Code:
#!/system/bin/sh
# Definitions
file=/system/build.prop
tmpf=/system.buildprop.bak
line_list="wifi.supplicant_scan_interval=120 ro.sf.lcd_density=480"
# Function to get args as needed for loop
getargs() {
par=$1
line=`echo $par |cut -d"=" -f1`
arg=`echo $par |cut -d"=" -f2`
}
# Loop to make all changes in line_list
for x in $line_lst; do
# Get all needed arguments
getargs $x
# Write this change to a tmp file to check on it
oldarg=`grep $line $file |cut -d"=" -f2`
sed "s/$line=.*/$line=${arg}/g" $file > $tmpf
# Check if the change was made
chknewarg=`grep $line $tmpf |cut -d"=" -f2`
if [ "$chknewarg" = "$arg" ]; then
cp $tmpf $file
if [ -f $tmpf ]; then
rm $tmpf
fi
echo "File edited"
else
if [ -f $tmpf ]; then
rm $tmpf
fi
echo "Expected $arg, got $chknewarg instead"
exit 1
fi
# If it doesn't exist at all append it to the file
chkexists=`grep -c $line $file`
if [ $chkexists -eq 0 ]; then
echo "$x" >> $file
fi
done
exit 0
I would certainly like to also know how to do this via update script.

[Help!!]Rom Building failed!!

Device tree: https://github.com/TheStrixCoder/device_oneplus_enchilada
https://github.com/TheStrixCoder/device_oneplus_sdm845-common
Vendor tree:= https://github.com/TheStrixCoder/proprietary_vendor_oneplus
Kernel Source:= https://github.com/TheStrixCoder/kernel_oneplus_sdm845
ROM Source:=https://github.com/DirtyUnicorns
Error:= https://del.dog/ozexutiziz
Its failing at 99% for some unknown reason.(i have plenty of space in /tmp and build drive).
Can anyone please give me a hint on why its failing..
TIA
Code:
----- Making recovery ramdisk ------
[ 99% 91442/91444] Package target files: /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky.zip
FAILED: /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky.zip
/bin/bash -c "(if [ -d /media/vicky/SSD/DU/out/target/product/enchilada/system/vendor ] && [ ! -h /media/vicky/SSD/DU/out/target/product/enchilada/system/vendor ]; then echo 'Non-symlink /media/vicky/SSD/DU/out/target/product/enchilada/system/vendor detected!' 1>&2; echo 'You cannot install files to /media/vicky/SSD/DU/out/target/product/enchilada/system/vendor while building a separate vendor.img!' 1>&2; exit 1; fi ) && (ln -sf /vendor /media/vicky/SSD/DU/out/target/product/enchilada/system/vendor ) && (rm -rf /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky.zip /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky.zip.list /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky ) && (mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/ /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky ) && (mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT ) && (if [ -d \"/media/vicky/SSD/DU/out/target/product/enchilada/recovery/root\" -a \"\$(ls -A /media/vicky/SSD/DU/out/target/product/enchilada/recovery/root)\" ]; then mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT/RAMDISK && prebuilts/build-tools/linux-x86/bin/acp -rd /media/vicky/SSD/DU/out/target/product/enchilada/recovery/root/* /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT/RAMDISK; fi ) && (if [ -d \"/media/vicky/SSD/DU/out/target/product/enchilada/install\" -a \"\$(ls -A /media/vicky/SSD/DU/out/target/product/enchilada/install)\" ]; then mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/INSTALL && prebuilts/build-tools/linux-x86/bin/acp -rd /media/vicky/SSD/DU/out/target/product/enchilada/install/* /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/INSTALL; fi ) && (cp /media/vicky/SSD/DU/out/target/product/enchilada/kernel /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT/kernel ) && (echo \"androidboot.hardware=qcom androidboot.console=ttyMSM0 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 service_locator.enable=1 swiotlb=2048 androidboot.configfs=true androidboot.usbcontroller=a600000.dwc3 firmware_class.path=/vendor/firmware_mnt/image loop.max_part=7 androidboot.avb_version=0.0 androidboot.vbmeta.avb_version=0.0 buildvariant=userdebug\" > /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT/cmdline ) && (echo \"0x80000000\" > /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT/base ) && (echo \"4096\" > /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT/pagesize ) && (mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT ) && (mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/ROOT ) && (if [ -d \"/media/vicky/SSD/DU/out/target/product/enchilada/root\" -a \"\$(ls -A /media/vicky/SSD/DU/out/target/product/enchilada/root)\" ]; then mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/ROOT && prebuilts/build-tools/linux-x86/bin/acp -rd /media/vicky/SSD/DU/out/target/product/enchilada/root/* /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/ROOT; fi ) && (if [ -d \"/media/vicky/SSD/DU/out/target/product/enchilada/system\" -a \"\$(ls -A /media/vicky/SSD/DU/out/target/product/enchilada/system)\" ]; then mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/SYSTEM && prebuilts/build-tools/linux-x86/bin/acp -rd /media/vicky/SSD/DU/out/target/product/enchilada/system/* /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/SYSTEM; fi ) && (if [ -d \"/media/vicky/SSD/DU/out/target/product/enchilada/data\" -a \"\$(ls -A /media/vicky/SSD/DU/out/target/product/enchilada/data)\" ]; then mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/DATA && prebuilts/build-tools/linux-x86/bin/acp -rd /media/vicky/SSD/DU/out/target/product/enchilada/data/* /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/DATA; fi ) && (mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/OTA ) && (cp /media/vicky/SSD/DU/out/target/product/enchilada/android-info.txt /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/OTA/ ) && (mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/OTA/bin ) && (cp /media/vicky/SSD/DU/out/target/product/enchilada/obj/EXECUTABLES/updater_intermediates/updater /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/OTA/bin/ ) && (mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META ) && (cp /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/apkcerts_intermediates/du_enchilada-apkcerts-eng.vicky.txt /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/apkcerts.txt ) && (echo \"\" > /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/otakeys.txt ) && (cp /media/vicky/SSD/DU/out/target/product/enchilada/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/file_contexts.bin ) && (echo \"recovery_api_version=3\" > /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"fstab_version=2\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"blocksize=262144 \" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"boot_size=67108864\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"no_recovery=true\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"recovery_mount_options=ext4=max_batch_time=0,commit=1,data=ordered,barrier=1,errors=panic,nodelalloc\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"tool_extensions=device/oneplus/enchilada/../common\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"default_system_dev_certificate=build/target/product/security/testkey\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo 'mkbootimg_args=' >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo 'mkbootimg_version_args=--os_version 9 --os_patch_level 2019-01-05' >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"use_set_metadata=1\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"multistage_support=1\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"blockimgdiff_versions=3,4\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_enable=true\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_vbmeta_key_path=external/avb/test/data/testkey_rsa4096.pem\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_vbmeta_algorithm=SHA256_RSA4096\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_vbmeta_args=--flag 2 --padding_size 4096\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_boot_add_hash_footer_args=\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_recovery_add_hash_footer_args=\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"ext_mkuserimg=mkuserimg_mke2fs.sh\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"fs_type=ext4\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"system_size=2998927360\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"userdata_size=118112366592\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"extfs_sparse_flag=-s\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"squashfs_sparse_flag=-s\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"selinux_fc=/media/vicky/SSD/DU/out/target/product/enchilada/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_avbtool=avbtool\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_system_hashtree_enable=true\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_system_add_hashtree_footer_args=--setup_as_rootfs_from_kernel\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_vendor_hashtree_enable=true\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_vendor_add_hashtree_footer_args=\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_product_hashtree_enable=true\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_product_add_hashtree_footer_args=\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"recovery_as_boot=true\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"system_root_image=true\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt; echo \"ramdisk_dir=/media/vicky/SSD/DU/out/target/product/enchilada/root\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && ((cd /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/SYSTEM; find . -type d | sed 's,\$,/,'; find . \\! -type d) | cut -c 3- | sort | sed 's,^,system/,' | /media/vicky/SSD/DU/out/host/linux-x86/bin/fs_config -C -D /media/vicky/SSD/DU/out/target/product/enchilada/system -S /media/vicky/SSD/DU/out/target/product/enchilada/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin -R \"system/\" > /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/filesystem_config.txt ) && ((cd /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/ROOT; find . -type d | sed 's,\$,/,'; find . \\! -type d) | cut -c 3- | sort | sed 's,^,,' | /media/vicky/SSD/DU/out/host/linux-x86/bin/fs_config -C -D /media/vicky/SSD/DU/out/target/product/enchilada/system -S /media/vicky/SSD/DU/out/target/product/enchilada/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin -R \"\" > /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/root_filesystem_config.txt ) && ((cd /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT/RAMDISK; find . -type d | sed 's,\$,/,'; find . \\! -type d) | cut -c 3- | sort | sed 's,^,,' | /media/vicky/SSD/DU/out/host/linux-x86/bin/fs_config -C -D /media/vicky/SSD/DU/out/target/product/enchilada/system -S /media/vicky/SSD/DU/out/target/product/enchilada/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin -R \"\" > /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/boot_filesystem_config.txt ) && (cp /media/vicky/SSD/DU/out/target/product/enchilada/obj/ETC/framework_manifest.xml_intermediates/manifest.xml /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/system_manifest.xml ) && (cp /media/vicky/SSD/DU/out/target/product/enchilada/obj/ETC/framework_compatibility_matrix.xml_intermediates/compatibility_matrix.xml /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/system_matrix.xml ) && (cp /media/vicky/SSD/DU/out/target/product/enchilada/obj/ETC/device_compatibility_matrix.xml_intermediates/compatibility_matrix.xml /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/vendor_matrix.xml ) && (PATH=/media/vicky/SSD/DU/out/host/linux-x86/bin/:\$PATH MKBOOTIMG=/media/vicky/SSD/DU/out/host/linux-x86/bin/mkbootimg build/make/tools/releasetools/add_img_to_target_files -a -v -p /media/vicky/SSD/DU/out/host/linux-x86 /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky ) && (find /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META | sort >/media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky.zip.list ) && (find /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky -path /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META -prune -o -print | sort >>/media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky.zip.list ) && (/media/vicky/SSD/DU/out/soong/host/linux-x86/bin/soong_zip -L 0 -d -o /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky.zip -C /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky -l /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky.zip.list )"
Warning: could not read VENDOR/build.prop
++++ boot ++++
building image from target_files BOOT...
running: mkbootfs -f /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/boot_filesystem_config.txt /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT/RAMDISK
running: minigzip
running: mkbootimg --kernel /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT/kernel --cmdline androidboot.hardware=qcom androidboot.console=ttyMSM0 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 service_locator.enable=1 swiotlb=2048 androidboot.configfs=true androidboot.usbcontroller=a600000.dwc3 firmware_class.path=/vendor/firmware_mnt/image loop.max_part=7 androidboot.avb_version=0.0 androidboot.vbmeta.avb_version=0.0 buildvariant=userdebug --base 0x80000000 --pagesize 4096 --os_version 9 --os_patch_level 2019-01-05 --ramdisk /tmp/tmpBURvLw --output /tmp/tmpHFwfll
running: avbtool add_hash_footer --image /tmp/tmpHFwfll --partition_size 67108864 --partition_name boot --salt 0baf6f739234cc50a1eaa7040e74d28b55ebd72a7781dbcaf3d28e590591138d
++++ system ++++
creating system.img...
Running: avbtool add_hashtree_footer --partition_size 2998927360 --calc_max_image_size --setup_as_rootfs_from_kernel
2951528448
Running: mkuserimg_mke2fs.sh -s /tmp/tmp6SWt0u /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/IMAGES/system.img ext4 / 2951528448 -j 0 -T 1230748200 -C /tmp/merged_fs_configmuBkDB.txt -B /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/IMAGES/system.map -L / -M 0 -U 74ab2787-89b4-5f32-9f21-2c085107ac1e -S 1fdfba2c-bfa3-5d87-994f-0a46b7071412 /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/file_contexts.bin
MKE2FS_CONFIG=./system/extras/ext4_utils/mke2fs.conf E2FSPROGS_FAKE_TIME=1230748200 mke2fs -O ^has_journal -L / -m 0 -U 74ab2787-89b4-5f32-9f21-2c085107ac1e -E android_sparse,hash_seed=1fdfba2c-bfa3-5d87-994f-0a46b7071412 -t ext4 -b 4096 /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/IMAGES/system.img 720588
mke2fs 1.43.3 (04-Sep-2016)
Creating filesystem with 720588 4k blocks and 180224 inodes
Filesystem UUID: 74ab2787-89b4-5f32-9f21-2c085107ac1e
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=1230748200 e2fsdroid -T 1230748200 -C /tmp/merged_fs_configmuBkDB.txt -B /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/IMAGES/system.map -S /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/file_contexts.bin -f /tmp/tmp6SWt0u -a / /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/IMAGES/system.img
failed to find [/system] in canned fs_config
loaded 2933 fs_config entries
Error: '['mkuserimg_mke2fs.sh', '-s', '/tmp/tmp6SWt0u', '/media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/IMAGES/system.img', 'ext4', '/', '2951528448', '-j', '0', '-T', '1230748200', '-C', '/tmp/merged_fs_configmuBkDB.txt', '-B', '/media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/IMAGES/system.map', '-L', '/', '-M', '0', '-U', '74ab2787-89b4-5f32-9f21-2c085107ac1e', '-S', '1fdfba2c-bfa3-5d87-994f-0a46b7071412', '/media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/file_contexts.bin']' failed with exit code 4:
MKE2FS_CONFIG=./system/extras/ext4_utils/mke2fs.conf E2FSPROGS_FAKE_TIME=1230748200 mke2fs -O ^has_journal -L / -m 0 -U 74ab2787-89b4-5f32-9f21-2c085107ac1e -E android_sparse,hash_seed=1fdfba2c-bfa3-5d87-994f-0a46b7071412 -t ext4 -b 4096 /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/IMAGES/system.img 720588
mke2fs 1.43.3 (04-Sep-2016)
Creating filesystem with 720588 4k blocks and 180224 inodes
Filesystem UUID: 74ab2787-89b4-5f32-9f21-2c085107ac1e
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=1230748200 e2fsdroid -T 1230748200 -C /tmp/merged_fs_configmuBkDB.txt -B /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/IMAGES/system.map -S /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/file_contexts.bin -f /tmp/tmp6SWt0u -a / /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/IMAGES/system.img
failed to find [/system] in canned fs_config
loaded 2933 fs_config entries
Out of space? The tree size of /tmp/tmp6SWt0u is 1110921216 bytes (1059 MB), with reserved space of 0 bytes (0 MB).
The max image size for filsystem files is 2951528448 bytes (2814 MB), out of a total partition size of 2998927360 bytes (2860 MB).
Traceback (most recent call last):
File "build/make/tools/releasetools/add_img_to_target_files", line 825, in <module>
main(sys.argv[1:])
File "build/make/tools/releasetools/add_img_to_target_files", line 819, in main
AddImagesToTargetFiles(args[0])
File "build/make/tools/releasetools/add_img_to_target_files", line 728, in AddImagesToTargetFiles
output_zip, recovery_img=recovery_image, boot_img=boot_image)
File "build/make/tools/releasetools/add_img_to_target_files", line 150, in AddSystem
block_list=block_list)
File "build/make/tools/releasetools/add_img_to_target_files", line 281, in CreateImage
assert succ, "build " + what + ".img image failed"
AssertionError: build system.img image failed
ninja: build stopped: subcommand failed.
19:14:32 ninja failed with: exit status 1
build/make/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
Bidyadhar said:
Device tree: https://github.com/TheStrixCoder/device_oneplus_enchilada
https://github.com/TheStrixCoder/device_oneplus_sdm845-common
Vendor tree:= https://github.com/TheStrixCoder/proprietary_vendor_oneplus
Kernel Source:= https://github.com/TheStrixCoder/kernel_oneplus_sdm845
ROM Source:=https://github.com/DirtyUnicorns
Haste or Dogbin URL:=https://del.dog/ozexutiziz
Its failing at 99% for some unknown reason.(i have plenty of space in /tmp and build drive).
Can anyone please give me a hint on why its failing..
TIA
Code:
[ 99% 91442/91444] Package target files: /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky.zip
FAILED: /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky.zip
/bin/bash -c "(if [ -d /media/vicky/SSD/DU/out/target/product/enchilada/system/vendor ] && [ ! -h /media/vicky/SSD/DU/out/target/product/enchilada/system/vendor ]; then echo 'Non-symlink /media/vicky/SSD/DU/out/target/product/enchilada/system/vendor detected!' 1>&2; echo 'You cannot install files to /media/vicky/SSD/DU/out/target/product/enchilada/system/vendor while building a separate vendor.img!' 1>&2; exit 1; fi ) && (ln -sf /vendor /media/vicky/SSD/DU/out/target/product/enchilada/system/vendor ) && (rm -rf /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky.zip /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky.zip.list /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky ) && (mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/ /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky ) && (mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT ) && (if [ -d \"/media/vicky/SSD/DU/out/target/product/enchilada/recovery/root\" -a \"\$(ls -A /media/vicky/SSD/DU/out/target/product/enchilada/recovery/root)\" ]; then mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT/RAMDISK && prebuilts/build-tools/linux-x86/bin/acp -rd /media/vicky/SSD/DU/out/target/product/enchilada/recovery/root/* /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT/RAMDISK; fi ) && (if [ -d \"/media/vicky/SSD/DU/out/target/product/enchilada/install\" -a \"\$(ls -A /media/vicky/SSD/DU/out/target/product/enchilada/install)\" ]; then mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/INSTALL && prebuilts/build-tools/linux-x86/bin/acp -rd /media/vicky/SSD/DU/out/target/product/enchilada/install/* /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/INSTALL; fi ) && (cp /media/vicky/SSD/DU/out/target/product/enchilada/kernel /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT/kernel ) && (echo \"androidboot.hardware=qcom androidboot.console=ttyMSM0 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 service_locator.enable=1 swiotlb=2048 androidboot.configfs=true androidboot.usbcontroller=a600000.dwc3 firmware_class.path=/vendor/firmware_mnt/image loop.max_part=7 androidboot.avb_version=0.0 androidboot.vbmeta.avb_version=0.0 buildvariant=userdebug\" > /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT/cmdline ) && (echo \"0x80000000\" > /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT/base ) && (echo \"4096\" > /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT/pagesize ) && (mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT ) && (mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/ROOT ) && (if [ -d \"/media/vicky/SSD/DU/out/target/product/enchilada/root\" -a \"\$(ls -A /media/vicky/SSD/DU/out/target/product/enchilada/root)\" ]; then mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/ROOT && prebuilts/build-tools/linux-x86/bin/acp -rd /media/vicky/SSD/DU/out/target/product/enchilada/root/* /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/ROOT; fi ) && (if [ -d \"/media/vicky/SSD/DU/out/target/product/enchilada/system\" -a \"\$(ls -A /media/vicky/SSD/DU/out/target/product/enchilada/system)\" ]; then mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/SYSTEM && prebuilts/build-tools/linux-x86/bin/acp -rd /media/vicky/SSD/DU/out/target/product/enchilada/system/* /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/SYSTEM; fi ) && (if [ -d \"/media/vicky/SSD/DU/out/target/product/enchilada/data\" -a \"\$(ls -A /media/vicky/SSD/DU/out/target/product/enchilada/data)\" ]; then mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/DATA && prebuilts/build-tools/linux-x86/bin/acp -rd /media/vicky/SSD/DU/out/target/product/enchilada/data/* /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/DATA; fi ) && (mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/OTA ) && (cp /media/vicky/SSD/DU/out/target/product/enchilada/android-info.txt /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/OTA/ ) && (mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/OTA/bin ) && (cp /media/vicky/SSD/DU/out/target/product/enchilada/obj/EXECUTABLES/updater_intermediates/updater /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/OTA/bin/ ) && (mkdir -p /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META ) && (cp /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/apkcerts_intermediates/du_enchilada-apkcerts-eng.vicky.txt /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/apkcerts.txt ) && (echo \"\" > /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/otakeys.txt ) && (cp /media/vicky/SSD/DU/out/target/product/enchilada/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/file_contexts.bin ) && (echo \"recovery_api_version=3\" > /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"fstab_version=2\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"blocksize=262144 \" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"boot_size=67108864\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"no_recovery=true\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"recovery_mount_options=ext4=max_batch_time=0,commit=1,data=ordered,barrier=1,errors=panic,nodelalloc\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"tool_extensions=device/oneplus/enchilada/../common\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"default_system_dev_certificate=build/target/product/security/testkey\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo 'mkbootimg_args=' >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo 'mkbootimg_version_args=--os_version 9 --os_patch_level 2019-01-05' >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"use_set_metadata=1\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"multistage_support=1\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"blockimgdiff_versions=3,4\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_enable=true\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_vbmeta_key_path=external/avb/test/data/testkey_rsa4096.pem\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_vbmeta_algorithm=SHA256_RSA4096\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_vbmeta_args=--flag 2 --padding_size 4096\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_boot_add_hash_footer_args=\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_recovery_add_hash_footer_args=\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"ext_mkuserimg=mkuserimg_mke2fs.sh\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"fs_type=ext4\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"system_size=2998927360\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"userdata_size=118112366592\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"extfs_sparse_flag=-s\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"squashfs_sparse_flag=-s\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"selinux_fc=/media/vicky/SSD/DU/out/target/product/enchilada/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_avbtool=avbtool\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_system_hashtree_enable=true\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_system_add_hashtree_footer_args=--setup_as_rootfs_from_kernel\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_vendor_hashtree_enable=true\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_vendor_add_hashtree_footer_args=\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_product_hashtree_enable=true\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"avb_product_add_hashtree_footer_args=\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"recovery_as_boot=true\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && (echo \"system_root_image=true\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt; echo \"ramdisk_dir=/media/vicky/SSD/DU/out/target/product/enchilada/root\" >> /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/misc_info.txt ) && ((cd /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/SYSTEM; find . -type d | sed 's,\$,/,'; find . \\! -type d) | cut -c 3- | sort | sed 's,^,system/,' | /media/vicky/SSD/DU/out/host/linux-x86/bin/fs_config -C -D /media/vicky/SSD/DU/out/target/product/enchilada/system -S /media/vicky/SSD/DU/out/target/product/enchilada/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin -R \"system/\" > /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/filesystem_config.txt ) && ((cd /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/ROOT; find . -type d | sed 's,\$,/,'; find . \\! -type d) | cut -c 3- | sort | sed 's,^,,' | /media/vicky/SSD/DU/out/host/linux-x86/bin/fs_config -C -D /media/vicky/SSD/DU/out/target/product/enchilada/system -S /media/vicky/SSD/DU/out/target/product/enchilada/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin -R \"\" > /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/root_filesystem_config.txt ) && ((cd /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT/RAMDISK; find . -type d | sed 's,\$,/,'; find . \\! -type d) | cut -c 3- | sort | sed 's,^,,' | /media/vicky/SSD/DU/out/host/linux-x86/bin/fs_config -C -D /media/vicky/SSD/DU/out/target/product/enchilada/system -S /media/vicky/SSD/DU/out/target/product/enchilada/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin -R \"\" > /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/boot_filesystem_config.txt ) && (cp /media/vicky/SSD/DU/out/target/product/enchilada/obj/ETC/framework_manifest.xml_intermediates/manifest.xml /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/system_manifest.xml ) && (cp /media/vicky/SSD/DU/out/target/product/enchilada/obj/ETC/framework_compatibility_matrix.xml_intermediates/compatibility_matrix.xml /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/system_matrix.xml ) && (cp /media/vicky/SSD/DU/out/target/product/enchilada/obj/ETC/device_compatibility_matrix.xml_intermediates/compatibility_matrix.xml /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/vendor_matrix.xml ) && (PATH=/media/vicky/SSD/DU/out/host/linux-x86/bin/:\$PATH MKBOOTIMG=/media/vicky/SSD/DU/out/host/linux-x86/bin/mkbootimg build/make/tools/releasetools/add_img_to_target_files -a -v -p /media/vicky/SSD/DU/out/host/linux-x86 /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky ) && (find /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META | sort >/media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky.zip.list ) && (find /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky -path /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META -prune -o -print | sort >>/media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky.zip.list ) && (/media/vicky/SSD/DU/out/soong/host/linux-x86/bin/soong_zip -L 0 -d -o /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky.zip -C /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky -l /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky.zip.list )"
Warning: could not read VENDOR/build.prop
++++ boot ++++
building image from target_files BOOT...
running: mkbootfs -f /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/boot_filesystem_config.txt /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT/RAMDISK
running: minigzip
running: mkbootimg --kernel /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/BOOT/kernel --cmdline androidboot.hardware=qcom androidboot.console=ttyMSM0 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 service_locator.enable=1 swiotlb=2048 androidboot.configfs=true androidboot.usbcontroller=a600000.dwc3 firmware_class.path=/vendor/firmware_mnt/image loop.max_part=7 androidboot.avb_version=0.0 androidboot.vbmeta.avb_version=0.0 buildvariant=userdebug --base 0x80000000 --pagesize 4096 --os_version 9 --os_patch_level 2019-01-05 --ramdisk /tmp/tmpBURvLw --output /tmp/tmpHFwfll
running: avbtool add_hash_footer --image /tmp/tmpHFwfll --partition_size 67108864 --partition_name boot --salt 0baf6f739234cc50a1eaa7040e74d28b55ebd72a7781dbcaf3d28e590591138d
++++ system ++++
creating system.img...
Running: avbtool add_hashtree_footer --partition_size 2998927360 --calc_max_image_size --setup_as_rootfs_from_kernel
2951528448
Running: mkuserimg_mke2fs.sh -s /tmp/tmp6SWt0u /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/IMAGES/system.img ext4 / 2951528448 -j 0 -T 1230748200 -C /tmp/merged_fs_configmuBkDB.txt -B /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/IMAGES/system.map -L / -M 0 -U 74ab2787-89b4-5f32-9f21-2c085107ac1e -S 1fdfba2c-bfa3-5d87-994f-0a46b7071412 /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/file_contexts.bin
MKE2FS_CONFIG=./system/extras/ext4_utils/mke2fs.conf E2FSPROGS_FAKE_TIME=1230748200 mke2fs -O ^has_journal -L / -m 0 -U 74ab2787-89b4-5f32-9f21-2c085107ac1e -E android_sparse,hash_seed=1fdfba2c-bfa3-5d87-994f-0a46b7071412 -t ext4 -b 4096 /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/IMAGES/system.img 720588
mke2fs 1.43.3 (04-Sep-2016)
Creating filesystem with 720588 4k blocks and 180224 inodes
Filesystem UUID: 74ab2787-89b4-5f32-9f21-2c085107ac1e
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=1230748200 e2fsdroid -T 1230748200 -C /tmp/merged_fs_configmuBkDB.txt -B /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/IMAGES/system.map -S /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/file_contexts.bin -f /tmp/tmp6SWt0u -a / /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/IMAGES/system.img
failed to find [/system] in canned fs_config
loaded 2933 fs_config entries
Error: '['mkuserimg_mke2fs.sh', '-s', '/tmp/tmp6SWt0u', '/media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/IMAGES/system.img', 'ext4', '/', '2951528448', '-j', '0', '-T', '1230748200', '-C', '/tmp/merged_fs_configmuBkDB.txt', '-B', '/media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/IMAGES/system.map', '-L', '/', '-M', '0', '-U', '74ab2787-89b4-5f32-9f21-2c085107ac1e', '-S', '1fdfba2c-bfa3-5d87-994f-0a46b7071412', '/media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/file_contexts.bin']' failed with exit code 4:
MKE2FS_CONFIG=./system/extras/ext4_utils/mke2fs.conf E2FSPROGS_FAKE_TIME=1230748200 mke2fs -O ^has_journal -L / -m 0 -U 74ab2787-89b4-5f32-9f21-2c085107ac1e -E android_sparse,hash_seed=1fdfba2c-bfa3-5d87-994f-0a46b7071412 -t ext4 -b 4096 /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/IMAGES/system.img 720588
mke2fs 1.43.3 (04-Sep-2016)
Creating filesystem with 720588 4k blocks and 180224 inodes
Filesystem UUID: 74ab2787-89b4-5f32-9f21-2c085107ac1e
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=1230748200 e2fsdroid -T 1230748200 -C /tmp/merged_fs_configmuBkDB.txt -B /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/IMAGES/system.map -S /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/META/file_contexts.bin -f /tmp/tmp6SWt0u -a / /media/vicky/SSD/DU/out/target/product/enchilada/obj/PACKAGING/target_files_intermediates/du_enchilada-target_files-eng.vicky/IMAGES/system.img
failed to find [/system] in canned fs_config
loaded 2933 fs_config entries
Out of space? The tree size of /tmp/tmp6SWt0u is 1110921216 bytes (1059 MB), with reserved space of 0 bytes (0 MB).
The max image size for filsystem files is 2951528448 bytes (2814 MB), out of a total partition size of 2998927360 bytes (2860 MB).
Traceback (most recent call last):
File "build/make/tools/releasetools/add_img_to_target_files", line 825, in <module>
main(sys.argv[1:])
File "build/make/tools/releasetools/add_img_to_target_files", line 819, in main
AddImagesToTargetFiles(args[0])
File "build/make/tools/releasetools/add_img_to_target_files", line 728, in AddImagesToTargetFiles
output_zip, recovery_img=recovery_image, boot_img=boot_image)
File "build/make/tools/releasetools/add_img_to_target_files", line 150, in AddSystem
block_list=block_list)
File "build/make/tools/releasetools/add_img_to_target_files", line 281, in CreateImage
assert succ, "build " + what + ".img image failed"
AssertionError: build system.img image failed
ninja: build stopped: subcommand failed.
19:14:32 ninja failed with: exit status 1
build/make/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
Click to expand...
Click to collapse
What program are you building with
PoochyXXX
PoochyX said:
What program are you building with
PoochyXXX
Click to expand...
Click to collapse
Sorry i didnt get your question
Edit-I am building it on Ubuntu 18.04
Hi Brother,
Could you tell me how you fixed this build error ?
In fact, I have a same problem as yours.
Same error bro..how did you fix this error?
Dhina_17 said:
Same error bro..how did you fix this error?
Click to expand...
Click to collapse
Did you get fix for the above error? I am also facing same error with Lineage OS.
Naveen56 said:
Did you get fix for the above error? I am also facing same error with Lineage OS.
Click to expand...
Click to collapse
Yes sepolicy thing
Dhina_17 said:
Yes sepolicy thing
Click to expand...
Click to collapse
I had to remove this flag from BoardConfig for successful build.
Code:
BOARD_ROOT_EXTRA_SYMLINKS += /mnt/vendor/persist:/persist
Has anyone been able to fix this error?

[MOD][TWRP] LOS16 Tweak script - Please share yours also![9.0][3/3T][24/07/19]

The last months I am using LOS16 (Pie) on my OP3T and have implemented some tweaks to let it work as I want it to be.
The tweaks I am doing are implemented after a dirty flash, which I am doing roughly once a month.
After the dirty flash I am using the script enclosed to remove some apps, to clear as much as possible and startup almost clean without loosing settings.
Ofcourse also some other stuff like build.prop and userinit.sh settings are implemented.
Note:
Some people say it is not wise to clean all stuff like I do in the script, because a lot of writing is done afterwards, like building caches etc....
But, in my experience, the OP3(t) is a real killer and the cache building does not bother me.
Even after 3 years of heavy usage, everything is like new and performance is great.
So may be the result is a little more wearage of SSD, but I like a clean system and do not expect any troubles when only doing this once a month.
I want to share the script because it can help others, but I am sure there other OP3(t) users are also using scripts to optimise some settings, remove apps etc.... which can help me also.
So please, feel free to add your script(s) also and make this a place where OP3(t) users can find information to make their own script.
When you have some questions, please let me know!
BTW:
Never use a script like this when you do not know what it is doing, and ofcourse using it at your own risk!!
First read every line of it, try to understand what it is doing and what you are missing afterwards when implementing without any change (apps, launcher etc...)
Code:
#!/sbin/sh
#
# Script by 2Tweak
# Last modified 25-07-2019
################################################
# First setup
clear
sleep 0.3
echo
echo "##########################################"
echo "# ROM DEBLOAT SCRIPT #"
echo "##########################################"
echo
mount -o remount,rw /cache
mount -o remount,rw /data
mount -o remount,rw /sdcard
mount -o remount,rw /system
sleep 0.3
################################################
echo -n "Shrinking ROM to the bare minimum..."
# app list to remove
applist="
AntHalService
AudioFX
BackupRestoreConfirmation
BasicDreams
BluetoothMidiService
BookmarkProvider
BuiltInPrintService
Calendar
CaptivePortalLogin
CNEService
CallLogBackup
CellBroadcastReceiver
CompanionDeviceManager
Contacts
CtsShimPrebuilt
CtsShimPrivPrebuilt
DocumentsUI
EasterEgg
Eleven
Email
ExactCalculator
Exchange2
Gallery2
HTMLViewer
InputDevices
Jelly
LatinIME
LineageSetupWizard
LiveWallpapersPicker
LockClock
ManagedProvisioning
OneTimeInitializer
OneplusDoze
OneplusPocketMode
PhotoTable
PrintRecommendationService
SharedStorageBackup
SimAppDialog
Stk
Tag
Terminal
Traceur
TrebuchetQuickStep
Updater
UserDictionaryProvider
VpnDialogs
WallpaperBackup
WeatherProvider
WfdService
"
for appname in $applist
do
if [ -e /system/app/$appname ]; then
chmod -R 777 /system/app/$appname
rm -rf /system/app/$appname
fi
if [ -e /system/priv-app/$appname ]; then
chmod -R 777 /system/priv-app/$appname
rm -rf /system/priv-app/$appname
fi
done
echo " done!"
sleep 0.3
################################################
echo -n "Removing junk files................."
# file list to cleanup
filelist="
/cache
/data/anr
/data/backup
/data/cache
/data/dalvik-cache
/data/lineageos_updates
/data/local/tmp
/data/lost+found
/data/ota
/data/ota_package
/data/resource-cache
/data/system/batterystats.bin
/data/system/dropbox
/data/system/graphicsstats
/data/system/install_sessions.xml
/data/system/last-fstrim
/data/system/package_cache
/data/system/procstats
/data/system/syncmanager-log
/data/system/uiderrors.txt
/data/system/usagestats/0/monthly
/data/system/usagestats/0/weekly
/data/system/usagestats/0/yearly
/data/system/usagestats/daily
/data/tombstones
/sdcard/DCIM/.thumbnails
/system/bin/bootanimation
/system/media/bootanimation.zip
"
for filename in $filelist
do
if [ -d $filename ]; then
chmod -R 777 $filename
rm -rf $filename/*
fi
if [ -f $filename ]; then
chmod 777 $filename
rm -f $filename
fi
done
# Remove bak, log and tmp files
find /data -iname "*.bak" -type f -exec rm -f {} +
find /data -iname "*.log" -type f -exec rm -f {} +
find /data -iname "*.tmp" -type f -exec rm -f {} +
find /data -iname "*.odex" -type f -exec rm -f {} +
find /data -iname "*.vdex" -type f -exec rm -f {} +
find /system -iname "*.bak" -type f -exec rm -f {} +
find /system -iname "*.log" -type f -exec rm -f {} +
find /system -iname "*.tmp" -type f -exec rm -f {} +
# Some other useless system related files
rm -f /data/stock_boot_*.img.gz
# Reduce fonts to the bare minimum
find /system/fonts ! -iname "*roboto*.*" ! -name "DroidSansMono.ttf" -type f -exec rm -f {} +
# Some resets after firmware upgrades
# Reset NFC
rm -f /data/nfc/nfaStorage.bin1
# Remove passwords
rm -f /data/system/locksettings.db
rm -f /data/system/locksettings.db-shm
rm -f /data/system/locksettings.db-wal
rm -f /data/system/gatekeeper.password.key
rm -f /data/system/gatekeeper.pattern.key
# Reset fingerprint
rm -f /data/system/users/0/fpdata/user.db
rm -f /data/system/users/0/settings_fingerprint.xml
echo " done!"
sleep 0.3
################################################
echo -n "Cleaning app data..................."
for i in $(ls /data/data/)
do
if [ -e /data/data/$i/cache ]; then
chmod -R 777 /data/data/$i/cache
rm -rf /data/data/$i/cache/*
fi
if [ -e /data/data/$i/code_cache ]; then
chmod -R 777 /data/data/$i/code_cache
rm -rf /data/data/$i/code_cache/*
fi
if [ -e /data/data/$i/files/.Fabric ]; then
chmod -R 777 /data/data/$i/files/.Fabric
rm -rf /data/data/$i/files/.Fabric/*
fi
if [ -e /data/data/$i/files/cache ]; then
chmod -R 777 /data/data/$i/files/cache
rm -rf /data/data/$i/files/cache/*
fi
if [ -e /data/data/$i/app_webview ]; then
chmod -R 777 /data/data/$i/app_webview
# keep cookies for webapp logins
if [ -e /data/data/$i/app_webview/Cookies ]; then
mv -f /data/data/$i/app_webview/Cookies /data/local/tmp/$i.Cookies
fi
rm -rf /data/data/$i/app_webview/*
if [ -e /data/local/tmp/$i.Cookies ]; then
mv -f /data/local/tmp/$i.Cookies /data/data/$i/app_webview/Cookies
fi
fi
done
for j in $(ls /data/app/)
do
if [ -e /data/app/$j/oat/arm ]; then
chmod -R 777 /data/app/$j/oat/arm
rm -rf /data/app/$j/oat/arm/*
fi
if [ -e /data/app/$j/oat/arm64 ]; then
chmod -R 777 /data/app/$j/oat/arm64
rm -rf /data/app/$j/oat/arm64/*
fi
done
for k in $(ls /sdcard/Android/data/)
do
if [ -e /sdcard/Android/data/$k/cache ]; then
chmod -R 777 /sdcard/Android/data/$k/cache
rm -rf /sdcard/Android/data/$k/cache/*
fi
done
# App specific
rm -rf /data/data/com.abnamro.nl.mobile.payments/app_dex/oat/arm64/*
rm -rf /data/data/org.fdroid.fdroid/files/*.apk
rm -rf /data/data/org.videolan.vlc/app_vlc/*
# Remove empty directories
find /data/data -type d -depth -exec rmdir {} + 2>/dev/null
find /sdcard -type d -depth -exec rmdir {} + 2>/dev/null
echo " done!"
sleep 0.3
################################################
echo -n "Optimizing app databases............"
# Optimize databases
for i in $(find /data -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
for i in $(find /sdcard -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
echo " done!"
sleep 0.3
################################################
echo -n "Setting log permissions read-only..."
chmod 000 /data/system/dropbox
chmod 000 /data/system/procstats
chmod 000 /data/system/usagestats/0/daily
chmod 000 /data/system/usagestats/0/monthly
chmod 000 /data/system/usagestats/0/weekly
chmod 000 /data/system/usagestats/0/yearly
echo " done!"
sleep 0.3
################################################
echo -n "Repair Phone Is Starting error......"
rm -f '/system/vendor/bin/hw/[email protected]'
rm -f '/system/vendor/etc/init/[email protected]'
fname="/system/vendor/etc/vintf/manifest.xml"
found=0
startstop=0
tstr=""
nstr=""
IFS=$'\n'
while read line
do
if [[ "$line" == *'<hal'* ]]; then
startstop=1
elif [[ "$line" == *'</hal'* ]]; then
startstop=2
elif [[ "$line" == *'livedisplay'* ]]; then
found=1
fi
if [ $startstop -eq 1 ]; then
tstr="${tstr}\n${line}"
elif [ $startstop -eq 2 ]; then
tstr="${tstr}\n${line}"
if [ $found -eq 0 ]; then
nstr="${nstr}${tstr}"
else
found=0
fi
tstr=""
startstop=0
else
if [ "$nstr" == "" ]; then
nstr="${line}"
else
nstr="${nstr}\n${line}"
fi
fi
done <"$fname"
echo $nstr > $fname
echo " done!"
sleep 0.3
################################################
echo -n "Adding my build.prop settings......."
fname="/system/build.prop"
tmpvar=$(sed '/.*My settings.*/{s///;q;}' $fname | sed '$d')
echo "$tmpvar" > $fname
echo '
# My settings
# Disable multi user
fw.max_users=1
fw.show_multiuserui=0
fw.show_hidden_users=0
fw.power_user_switcher=0
# Disable logging, checks and sending data
logcat.live=disable
profiler.force_disable_err_rpt=1
profiler.force_disable_ulog=1
persist.android.strictmode=0
ro.config.nocheckin=1
ro.kernel.android.checkjni=0
ro.kernel.checkjni=0
# Disable boot animation
debug.sf.nobootanimation=1
# Disable USB debugging notification
persist.adb.notify=0
# Improve call quality
ro.ril.enable.amr.wideband=1
# Better network signals
persist.cust.tel.eons=1
ro.config.hw_fast_dormancy=1
# Enable Volte functionality
persist.dbg.ims_volte_enable=1
persist.dbg.volte_avail_ovr=1
persist.dbg.vt_avail_ovr=1
persist.dbg.wfc_avail_ovr=1
persist.volte_enalbed_by_hw=1
# Disable scrolling cache
persist.sys.scrollingcache=4
# Optimize Dalvik
dalvik.vm.dexopt-flags=v=n,o=v,m=y
# Power Savings
ro.ril.power_collapse=1
pm.sleep_mode=1
wifi.supplicant_scan_interval=500
ro.mot.eri.losalert.delay=1000
# End of my settings
' >> $fname
chmod 644 $fname
echo " done!"
sleep 0.3
################################################
echo -n "Adding my gps.conf settings........."
rm -f /system/vendor/etc/gps.conf
touch /system/vendor/etc/gps.conf
echo '# My settings
# NTP Server - only one allowed!
NTP_SERVER=nl.pool.ntp.org
# Debug level
DEBUG_LEVEL=0
# End of my settings
' > /system/vendor/etc/gps.conf
chmod 644 /system/vendor/etc/gps.conf
echo " done!"
sleep 0.3
################################################
echo -n "Adding my userinit.sh settings......"
echo '#!/system/bin/sh
# My settings
# Stop perfd before implementing tweaks
stop perfd
# Perfect mount options
mount -o remount,noatime,noauto_da_alloc,nodiratime,barrier=0,commit=60,nobh /system
mount -o remount,noatime,noauto_da_alloc,rw,nosuid,nodev,nodiratime,barrier=0,commit=60,nobh /data
mount -o remount,noatime,noauto_da_alloc,rw,nosuid,nodev,nodiratime,barrier=0,commit=60,nobh /cache
# Flags blocks as non-rotational and increases cache size
LOOP=`ls -d /sys/block/loop*`
RAM=`ls -d /sys/block/ram*`
for j in $LOOP $RAM
do
chmod 666 $j/queue/rotational
echo 0 > $j/queue/rotational
chmod 444 $j/queue/rotational
chmod 666 $j/queue/read_ahead_kb
echo 2048 > $j/queue/read_ahead_kb
chmod 444 $j/queue/read_ahead_kb
done
# Optimize databases
for i in $(find /data -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
for i in $(find /storage/emulated/0 -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
# Enable power_efficient workqueue
chmod 666 sys/module/workqueue/parameters/power_efficient
echo 1 > /sys/module/workqueue/parameters/power_efficient
chmod 444 sys/module/workqueue/parameters/power_efficient
# Battery tweaks
chmod 666 proc/sys/vm/dirty_expire_centisecs
echo 1000 > /proc/sys/vm/dirty_expire_centisecs
chmod 444 proc/sys/vm/dirty_expire_centisecs
chmod 666 proc/sys/vm/dirty_writeback_centisecs
echo 2000 > /proc/sys/vm/dirty_writeback_centisecs
chmod 444 proc/sys/vm/dirty_writeback_centisecs
# Miscellaneous
chmod 666 /sys/module/sync/parameters/fsync_enabled
echo 'N' > /sys/module/sync/parameters/fsync_enabled
chmod 444 /sys/module/sync/parameters/fsync_enabled
chmod 666 /sys/block/sda/queue/iostats
echo '0' > /sys/block/sda/queue/iostats
chmod 444 /sys/block/sda/queue/iostats
# Start perfd again
start perfd
# Fstrim on boot
if [ -e /data/adb/magisk/busybox ]; then
/data/adb/magisk/busybox fstrim /cache &
/data/adb/magisk/busybox fstrim /data &
/data/adb/magisk/busybox fstrim /system &
fi
# End of my settings
' > /data/local/userinit.sh
chmod 777 /data/local/userinit.sh
echo " done!"
sleep 0.3
################################################
echo -n "Change all timestamps..............."
# Useless but nice to have most dates set to install date again
find / -type d -exec touch {} + 2>/dev/null
find / -type f -exec touch {} + 2>/dev/null
echo " done!"
sleep 0.3
################################################
if [ -e /data/adb/magisk/busybox ]; then
echo -n "Optimising disks using fstrim......."
/data/adb/magisk/busybox fstrim /cache
/data/adb/magisk/busybox fstrim /data
/data/adb/magisk/busybox fstrim /system
echo " done!"
fi
echo
Further setup (25-07-2019):
Oxygen 9.04 firmware
TWRP 3.3.1-0
Lineage OS 16
Flashkernel r58 (3.18.140) (sometimes changing to Mady's out of curiousity but performancewise I prefer Flash)
Magisk v19.3
Librechair launcher
No Google stuff, using AuroraStore and AuroraDroid as playstores.
Made some changes in setup to test if I can live without root and as simple as possible.
Further:
- removed some stuff from script,
- solved some small typings,
- added some more apk's and files to remove
I do not like the chmod lines in my userinit.sh, so probably I will add an array for that later.
Code:
#!/sbin/sh
#
# Script by 2Tweak
# Last modified 12-08-2019
################################################
# First setup
clear
echo
echo "##########################################"
echo "# ROM DEBLOAT SCRIPT #"
echo "##########################################"
echo
mount -o remount,rw /cache
mount -o remount,rw /data
mount -o remount,rw /sdcard
mount -o remount,rw /system
################################################
echo -n "Shrinking ROM to the bare minimum..."
# app list to remove
applist="
AntHalService
AudioFX
BackupRestoreConfirmation
BasicDreams
BluetoothMidiService
BookmarkProvider
BuiltInPrintService
Calendar
CaptivePortalLogin
CNEService
CallLogBackup
CellBroadcastReceiver
CompanionDeviceManager
com.qualcomm.location
Contacts
CtsShimPrebuilt
CtsShimPrivPrebuilt
Development
DocumentsUI
EasterEgg
Eleven
Email
ExactCalculator
Exchange2
Gallery2
HTMLViewer
InputDevices
Jelly
LatinIME
LineageSetupWizard
LiveWallpapersPicker
LockClock
ManagedProvisioning
OneTimeInitializer
OneplusDoze
OneplusPocketMode
PhotoTable
PrintRecommendationService
Profiles
SharedStorageBackup
SimAppDialog
Stk
Tag
Terminal
Traceur
Updater
UserDictionaryProvider
VpnDialogs
WallpaperBackup
WallpaperCropper
WeatherProvider
WfdService
"
for appname in $applist
do
if [ -e /system/app/$appname ]; then
chmod -R 777 /system/app/$appname
rm -rf /system/app/$appname
fi
if [ -e /system/priv-app/$appname ]; then
chmod -R 777 /system/priv-app/$appname
rm -rf /system/priv-app/$appname
fi
done
echo " done!"
################################################
echo -n "Removing unneeded and junk files...."
# file list to cleanup
filelist="
/cache
/data/anr
/data/backup
/data/cache
/data/dalvik-cache
/data/lineageos_updates
/data/local/tmp
/data/lost+found
/data/misc/bootstat
/data/ota
/data/ota_package
/data/resource-cache
/data/system/batterystats.bin
/data/system/dropbox
/data/system/graphicsstats
/data/system/install_sessions.xml
/data/system/last-fstrim
/data/system/package_cache
/data/system/procstats
/data/system/syncmanager-log
/data/system/uiderrors.txt
/data/system/usagestats/0/daily
/data/system/usagestats/0/monthly
/data/system/usagestats/0/weekly
/data/system/usagestats/0/yearly
/data/tombstones
/sdcard/DCIM/thumbnails
/system/bin/bootanimation
/system/media/bootanimation.zip
"
for filename in $filelist
do
if [ -d $filename ]; then
chmod -R 777 $filename
rm -rf $filename/*
fi
if [ -f $filename ]; then
chmod 777 $filename
rm -f $filename
fi
done
# Remove bak, log, tmp and dex files
find /data -iname "*.bak" -type f -exec rm -f {} +
find /data -iname "*.log" -type f -exec rm -f {} +
find /data -iname "*.tmp" -type f -exec rm -f {} +
find /data -iname "*.odex" -type f -exec rm -f {} +
find /data -iname "*.vdex" -type f -exec rm -f {} +
find /system -iname "*.bak" -type f -exec rm -f {} +
find /system -iname "*.log" -type f -exec rm -f {} +
find /system -iname "*.tmp" -type f -exec rm -f {} +
# Some other useless system related files
rm -f /data/stock_boot_*.img.gz
rm -rf /system/vendor/overlay
# Some resets after firmware upgrades
# Reset NFC
rm -f /data/nfc/nfaStorage.bin1
# Remove passwords
rm -f /data/system/locksettings.db
rm -f /data/system/locksettings.db-shm
rm -f /data/system/locksettings.db-wal
rm -f /data/system/gatekeeper.password.key
rm -f /data/system/gatekeeper.pattern.key
# Reset fingerprint
rm -f /data/system/users/0/fpdata/user.db
rm -f /data/system/users/0/settings_fingerprint.xml
# Reduce fonts to the bare minimum
find /system/fonts ! -iname "*roboto*.*" ! -name "DroidSansMono.ttf" ! -name "NotoColorEmoji.ttf" -type f -exec rm -f {} +
echo " done!"
################################################
echo -n "Cleaning app data..................."
for i in $(ls /data/data/)
do
if [ -e /data/data/$i/cache ]; then
chmod -R 777 /data/data/$i/cache
rm -rf /data/data/$i/cache/*
fi
if [ -e /data/data/$i/code_cache ]; then
chmod -R 777 /data/data/$i/code_cache
rm -rf /data/data/$i/code_cache/*
fi
if [ -e /data/data/$i/files/.Fabric ]; then
chmod -R 777 /data/data/$i/files/.Fabric
rm -rf /data/data/$i/files/.Fabric/*
fi
if [ -e /data/data/$i/files/cache ]; then
chmod -R 777 /data/data/$i/files/cache
rm -rf /data/data/$i/files/cache/*
fi
if [ -e /data/data/$i/app_webview ]; then
chmod -R 777 /data/data/$i/app_webview
# keep cookies for webapp logins
if [ -e /data/data/$i/app_webview/Cookies ]; then
mv -f /data/data/$i/app_webview/Cookies /data/local/tmp/$i.Cookies
fi
rm -rf /data/data/$i/app_webview/*
if [ -e /data/local/tmp/$i.Cookies ]; then
mv -f /data/local/tmp/$i.Cookies /data/data/$i/app_webview/Cookies
fi
fi
done
for j in $(ls /data/app/)
do
if [ -e /data/app/$j/oat/arm ]; then
chmod -R 777 /data/app/$j/oat/arm
rm -rf /data/app/$j/oat/arm/*
fi
if [ -e /data/app/$j/oat/arm64 ]; then
chmod -R 777 /data/app/$j/oat/arm64
rm -rf /data/app/$j/oat/arm64/*
fi
done
for k in $(ls /sdcard/Android/data/)
do
if [ -e /sdcard/Android/data/$k/cache ]; then
chmod -R 777 /sdcard/Android/data/$k/cache
rm -rf /sdcard/Android/data/$k/cache/*
fi
done
# App specific
rm -rf /data/data/com.abnamro.nl.mobile.payments/app_dex/oat/arm64/*
rm -rf /data/data/org.fdroid.fdroid/files/*.apk
rm -rf /data/data/org.videolan.vlc/app_vlc/*
# Remove empty directories
find /data/data -type d -depth -exec rmdir {} + 2>/dev/null
find /sdcard -type d -depth -exec rmdir {} + 2>/dev/null
echo " done!"
################################################
echo -n "Optimizing app databases............"
# Optimize databases
for i in $(find /data -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
for i in $(find /sdcard -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
echo " done!"
################################################
echo -n "Setting log permissions read-only..."
chmod 000 /data/tombstones
chmod 000 /data/system/dropbox
chmod 000 /data/system/graphicsstats
chmod 000 /data/system/procstats
chmod 000 /data/system/usagestats/0/daily
chmod 000 /data/system/usagestats/0/weekly
chmod 000 /data/system/usagestats/0/monthly
chmod 000 /data/system/usagestats/0/yearly
echo " done!"
################################################
echo -n "Repair Phone Is Starting error......"
rm -f '/system/vendor/bin/hw/[email protected]'
rm -f '/system/vendor/etc/init/[email protected]'
fname="/system/vendor/etc/vintf/manifest.xml"
found=0
startstop=0
tstr=""
nstr=""
IFS=$'\n'
while read line
do
if [[ "$line" == *'<hal'* ]]; then
startstop=1
elif [[ "$line" == *'</hal'* ]]; then
startstop=2
elif [[ "$line" == *'livedisplay'* ]]; then
found=1
fi
if [ $startstop -eq 1 ]; then
tstr="${tstr}\n${line}"
elif [ $startstop -eq 2 ]; then
tstr="${tstr}\n${line}"
if [ $found -eq 0 ]; then
nstr="${nstr}${tstr}"
else
found=0
fi
tstr=""
startstop=0
else
if [ "$nstr" == "" ]; then
nstr="${line}"
else
nstr="${nstr}\n${line}"
fi
fi
done <"$fname"
echo $nstr > $fname
echo " done!"
################################################
echo -n "Adding my build.prop settings......."
fname="/system/build.prop"
tmpvar=$(sed '/.*My settings.*/{s///;q;}' $fname | sed '$d')
echo "$tmpvar" > $fname
echo '
# My settings
# Disable multi user
fw.max_users=1
fw.show_multiuserui=0
fw.show_hidden_users=0
fw.power_user_switcher=0
# Disable logging, checks and sending data
logcat.live=disable
profiler.force_disable_err_rpt=1
profiler.force_disable_ulog=1
persist.android.strictmode=0
ro.config.nocheckin=1
ro.kernel.android.checkjni=0
ro.kernel.checkjni=0
# Disable boot animation
debug.sf.nobootanimation=1
# Disable USB debugging notification
persist.adb.notify=0
# Disable dithering
persist.sys.use_dithering=0
# Disable scrolling cache
persist.sys.scrollingcache=4
# Optimize Dalvik
dalvik.vm.dexopt-flags=v=n,o=v,m=y
# Power Savings
ro.ril.power_collapse=1
pm.sleep_mode=1
wifi.supplicant_scan_interval=500
ro.mot.eri.losalert.delay=1000
# End of my settings
' >> $fname
chmod 644 $fname
echo " done!"
################################################
echo -n "Adding my gps.conf settings........."
rm -f /system/vendor/etc/gps.conf
touch /system/vendor/etc/gps.conf
echo '# My settings
# NTP Server - only one allowed!
NTP_SERVER=nl.pool.ntp.org
# Debug level
DEBUG_LEVEL=0
# End of my settings
' > /system/vendor/etc/gps.conf
chmod 644 /system/vendor/etc/gps.conf
echo " done!"
################################################
echo -n "Adding my userinit.sh settings......"
echo '#!/system/bin/sh
# My settings
# Stop perfd before implementing tweaks
stop perfd
# Optimize databases
for i in $(find /data -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
for i in $(find /storage/emulated/0 -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
# Enable power_efficient workqueue
chmod 666 sys/module/workqueue/parameters/power_efficient
echo '1' > /sys/module/workqueue/parameters/power_efficient
chmod 444 sys/module/workqueue/parameters/power_efficient
# Battery tweaks
chmod 666 proc/sys/vm/dirty_expire_centisecs
echo '1000' > /proc/sys/vm/dirty_expire_centisecs
chmod 444 proc/sys/vm/dirty_expire_centisecs
chmod 666 proc/sys/vm/dirty_writeback_centisecs
echo '2000' > /proc/sys/vm/dirty_writeback_centisecs
chmod 444 proc/sys/vm/dirty_writeback_centisecs
# Disable fsync
chmod 666 /sys/module/sync/parameters/fsync_enabled
echo 'N' > /sys/module/sync/parameters/fsync_enabled
chmod 444 /sys/module/sync/parameters/fsync_enabled
# Disable iostats
chmod 666 /sys/block/sda/queue/iostats
echo '0' > /sys/block/sda/queue/iostats
chmod 444 /sys/block/sda/queue/iostats
# Start perfd again
start perfd
# Fstrim on boot
if [ -e /storage/emulated/fstrim ]; then
chmod 777 /storage/emulated/fstrim
/storage/emulated/fstrim /cache &
/storage/emulated/fstrim /data &
/storage/emulated/fstrim /system &
fi
# End of my settings
' > /data/local/userinit.sh
chmod 777 /data/local/userinit.sh
echo " done!"
################################################
if [ -e /sdcard/Config/Device/fstrim ]; then
echo -n "Optimising disks using fstrim......."
chmod 777 /sdcard/Config/Device/fstrim
/sdcard/Config/Device/fstrim /cache
/sdcard/Config/Device/fstrim /data
/sdcard/Config/Device/fstrim /system
echo " done!"
fi
echo
Further setup (12-08-2019):
Oxygen 9.05 firmware
TWRP 3.3.1-0
Lineage OS 16
Flashkernel r58 (3.18.140)
No Google stuff, using AuroraStore and AuroraDroid as playstores.
Magisk removed (no root), back to default Trebuchet launcher
Copied fstrim to /sdcard/Config/Device to use it in my script and userinit.sh.
I used trimmer app to get a good working fstrim, but probably also available elsewhere.
Removed some stuff because of issues, not working, or even not existing parameters in build.prop.
Pretty basic but working very well for me.
Code:
#!/sbin/sh
#
# Script by 2Tweak
# Last modified 24-08-2019
# Recommended to read before doing all kind of tweaks:
# https://************/most-common-android-optimization-myths-debunked/
################################################
# First setup
clear
echo
echo "##########################################"
echo "# ROM DEBLOAT SCRIPT #"
echo "##########################################"
echo
mount -o remount,rw /cache
mount -o remount,rw /data
mount -o remount,rw /sdcard
mount -o remount,rw /system
################################################
echo -n "Shrinking ROM to the bare minimum..."
# app list to remove
applist="
AntHalService
AudioFX
BackupRestoreConfirmation
BasicDreams
BluetoothMidiService
BookmarkProvider
BuiltInPrintService
Calendar
CaptivePortalLogin
CNEService
CallLogBackup
CellBroadcastReceiver
CompanionDeviceManager
Contacts
CtsShimPrebuilt
CtsShimPrivPrebuilt
Development
DocumentsUI
EasterEgg
Eleven
Email
ExactCalculator
Exchange2
Gallery2
HTMLViewer
InputDevices
Jelly
LatinIME
LineageSetupWizard
LiveWallpapersPicker
LockClock
ManagedProvisioning
OneTimeInitializer
OneplusDoze
OneplusPocketMode
PhotoTable
PrintRecommendationService
Profiles
SharedStorageBackup
SimAppDialog
Stk
Tag
Terminal
Traceur
Updater
UserDictionaryProvider
VpnDialogs
WallpaperBackup
WallpaperCropper
WeatherProvider
WfdService
"
for appname in $applist
do
if [ -e /system/app/$appname ]; then
chmod -R 777 /system/app/$appname
rm -rf /system/app/$appname
fi
if [ -e /system/priv-app/$appname ]; then
chmod -R 777 /system/priv-app/$appname
rm -rf /system/priv-app/$appname
fi
done
echo " done!"
################################################
echo -n "Removing unneeded and junk files...."
# file list to cleanup
filelist="
/cache
/data/anr
/data/backup
/data/cache
/data/dalvik-cache
/data/lineageos_updates
/data/local/tmp
/data/lost+found
/data/misc/bootstat
/data/ota
/data/ota_package
/data/resource-cache
/data/system/batterystats.bin
/data/system/dropbox
/data/system/graphicsstats
/data/system/install_sessions.xml
/data/system/last-fstrim
/data/system/package_cache
/data/system/procstats
/data/system/syncmanager-log
/data/system/uiderrors.txt
/data/system/usagestats/0/daily
/data/system/usagestats/0/monthly
/data/system/usagestats/0/weekly
/data/system/usagestats/0/yearly
/data/tombstones
/sdcard/DCIM/thumbnails
/system/bin/bootanimation
/system/media/bootanimation.zip
"
for filename in $filelist
do
if [ -d $filename ]; then
chmod -R 777 $filename
rm -rf $filename/*
fi
if [ -f $filename ]; then
chmod 777 $filename
rm -f $filename
fi
done
# Remove bak, log, tmp and dex files
find /data -iname "*.bak" -type f -exec rm -f {} +
find /data -iname "*.log" -type f -exec rm -f {} +
find /data -iname "*.tmp" -type f -exec rm -f {} +
find /data -iname "*.odex" -type f -exec rm -f {} +
find /data -iname "*.vdex" -type f -exec rm -f {} +
find /system -iname "*.bak" -type f -exec rm -f {} +
find /system -iname "*.log" -type f -exec rm -f {} +
find /system -iname "*.tmp" -type f -exec rm -f {} +
# Some other useless system related files
rm -f /data/stock_boot_*.img.gz
rm -rf /system/vendor/overlay
# Some resets after firmware upgrades
# Reset NFC
rm -f /data/nfc/nfaStorage.bin1
# Remove passwords
rm -f /data/system/locksettings.db
rm -f /data/system/locksettings.db-shm
rm -f /data/system/locksettings.db-wal
rm -f /data/system/gatekeeper.password.key
rm -f /data/system/gatekeeper.pattern.key
# Reset fingerprint
rm -f /data/system/users/0/fpdata/user.db
rm -f /data/system/users/0/settings_fingerprint.xml
echo " done!"
################################################
echo -n "Disable live display functionality.."
rm -f '/system/vendor/bin/hw/[email protected]'
rm -f '/system/vendor/etc/init/[email protected]'
fname="/system/vendor/etc/vintf/manifest.xml"
found=0
startstop=0
tstr=""
nstr=""
IFS=$'\n'
while read line
do
if [[ "$line" == *'<hal'* ]]; then
startstop=1
elif [[ "$line" == *'</hal'* ]]; then
startstop=2
elif [[ "$line" == *'livedisplay'* ]]; then
found=1
fi
if [ $startstop -eq 1 ]; then
tstr="${tstr}\n${line}"
elif [ $startstop -eq 2 ]; then
tstr="${tstr}\n${line}"
if [ $found -eq 0 ]; then
nstr="${nstr}${tstr}"
else
found=0
fi
tstr=""
startstop=0
else
if [ "$nstr" == "" ]; then
nstr="${line}"
else
nstr="${nstr}\n${line}"
fi
fi
done <"$fname"
echo $nstr > $fname
echo " done!"
################################################
echo -n "Cleaning app data..................."
for i in $(ls /data/data/)
do
if [ -e /data/data/$i/cache ]; then
chmod -R 777 /data/data/$i/cache
rm -rf /data/data/$i/cache/*
fi
if [ -e /data/data/$i/code_cache ]; then
chmod -R 777 /data/data/$i/code_cache
rm -rf /data/data/$i/code_cache/*
fi
if [ -e /data/data/$i/files/.Fabric ]; then
chmod -R 777 /data/data/$i/files/.Fabric
rm -rf /data/data/$i/files/.Fabric/*
fi
if [ -e /data/data/$i/files/cache ]; then
chmod -R 777 /data/data/$i/files/cache
rm -rf /data/data/$i/files/cache/*
fi
if [ -e /data/data/$i/app_webview ]; then
chmod -R 777 /data/data/$i/app_webview
# keep cookies for webapp logins
if [ -e /data/data/$i/app_webview/Cookies ]; then
mv -f /data/data/$i/app_webview/Cookies /data/local/tmp/$i.Cookies
fi
rm -rf /data/data/$i/app_webview/*
if [ -e /data/local/tmp/$i.Cookies ]; then
mv -f /data/local/tmp/$i.Cookies /data/data/$i/app_webview/Cookies
fi
fi
done
for j in $(ls /data/app/)
do
if [ -e /data/app/$j/oat/arm ]; then
chmod -R 777 /data/app/$j/oat/arm
rm -rf /data/app/$j/oat/arm/*
fi
if [ -e /data/app/$j/oat/arm64 ]; then
chmod -R 777 /data/app/$j/oat/arm64
rm -rf /data/app/$j/oat/arm64/*
fi
done
for k in $(ls /sdcard/Android/data/)
do
if [ -e /sdcard/Android/data/$k/cache ]; then
chmod -R 777 /sdcard/Android/data/$k/cache
rm -rf /sdcard/Android/data/$k/cache/*
fi
done
# App specific
rm -rf /data/data/com.abnamro.nl.mobile.payments/app_dex/oat/arm64/*
rm -rf /data/data/org.fdroid.fdroid/files/*.apk
rm -rf /data/data/org.videolan.vlc/app_vlc/*
# Remove empty directories
find /data/data -type d -depth -exec rmdir {} + 2>/dev/null
find /sdcard -type d -depth -exec rmdir {} + 2>/dev/null
echo " done!"
################################################
echo -n "Optimizing app databases............"
# Optimize databases
for i in $(find /data -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
for i in $(find /sdcard -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
echo " done!"
################################################
echo -n "Setting log permissions read-only..."
chmod 000 /data/tombstones
chmod 000 /data/system/dropbox
chmod 000 /data/system/graphicsstats
chmod 000 /data/system/procstats
chmod 000 /data/system/usagestats/0/daily
chmod 000 /data/system/usagestats/0/weekly
chmod 000 /data/system/usagestats/0/monthly
chmod 000 /data/system/usagestats/0/yearly
echo " done!"
################################################
echo -n "Adding my build.prop settings......."
fname="/system/build.prop"
tmpvar=$(sed '/.*My settings.*/{s///;q;}' $fname | sed '$d')
echo "$tmpvar" > $fname
echo '
# My settings
# Disable multi user
fw.max_users=1
fw.show_multiuserui=0
fw.show_hidden_users=0
fw.power_user_switcher=0
# Disable logging
logcat.live=disable
# Remove fps limit
debug.gr.swapinterval=0
# Disable boot animation
debug.sf.nobootanimation=1
# Disable USB debugging notification
persist.adb.notify=0
# Disable dithering
persist.sys.use_dithering=0
# Disable scrolling cache
persist.sys.scrollingcache=4
# Optimize Dalvik
dalvik.vm.dexopt-flags=v=n,o=v,m=y
# Disable ring delay
ro.telephony.call_ring.delay=0
ring.delay=0
# Misc power Savings
wifi.supplicant_scan_interval=500
ro.mot.eri.losalert.delay=1000
# End of my settings
' >> $fname
chmod 644 $fname
echo " done!"
################################################
echo -n "Adding my gps.conf settings........."
rm -f /system/vendor/etc/gps.conf
touch /system/vendor/etc/gps.conf
echo '# My settings
# NTP Server - only one allowed!
NTP_SERVER=nl.pool.ntp.org
# Debug level
DEBUG_LEVEL=0
# End of my settings
' > /system/vendor/etc/gps.conf
chmod 644 /system/vendor/etc/gps.conf
echo " done!"
################################################
echo -n "Adding my userinit.sh settings......"
echo '#!/system/bin/sh
# My settings
# Stop perfd - no side effects found
stop perfd
# Switch to noop
for i in /sys/block/mmc*; do
echo noop > $i/queue/scheduler
echo 0 > $i/queue/iostats
done
# Optimize databases
for i in $(find /data -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
for i in $(find /storage/emulated/0 -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
# Battery tweaks
chmod 666 /proc/sys/vm/dirty_expire_centisecs
echo 1000 > /proc/sys/vm/dirty_expire_centisecs
chmod 444 /proc/sys/vm/dirty_expire_centisecs
chmod 666 /proc/sys/vm/dirty_writeback_centisecs
echo 2000 > /proc/sys/vm/dirty_writeback_centisecs
chmod 444 /proc/sys/vm/dirty_writeback_centisecs
# Enable power_efficient workqueue
chmod 666 /sys/module/workqueue/parameters/power_efficient
echo 1 > /sys/module/workqueue/parameters/power_efficient
chmod 444 /sys/module/workqueue/parameters/power_efficient
# Disable fsync
chmod 666 /sys/module/sync/parameters/fsync_enabled
echo N > /sys/module/sync/parameters/fsync_enabled
chmod 444 /sys/module/sync/parameters/fsync_enabled
# Disable iostats
chmod 666 /sys/block/sda/queue/iostats
echo 0 > /sys/block/sda/queue/iostats
chmod 444 /sys/block/sda/queue/iostats
# Fstrim on boot
if [ -e /storage/emulated/fstrim ]; then
chmod 777 /storage/emulated/fstrim
/storage/emulated/fstrim /cache
/storage/emulated/fstrim /data
/storage/emulated/fstrim /system
fi
# End of my settings
' > /data/local/userinit.sh
chmod 777 /data/local/userinit.sh
echo " done!"
################################################
if [ -e /sdcard/Config/Device/fstrim ]; then
echo -n "Optimising disks using fstrim......."
chmod 777 /sdcard/Config/Device/fstrim
/sdcard/Config/Device/fstrim /cache
/sdcard/Config/Device/fstrim /data
/sdcard/Config/Device/fstrim /system
echo " done!"
fi
echo
Further setup (24-08-2019):
Oxygen 9.05 firmware
TWRP 3.3.1-0
Lineage OS 16
Flashkernel r58 (3.18.140)
No Google stuff, using AuroraStore and AuroraDroid as playstores.
Magisk removed (no root),
Default Trebuchet launcher
Copied fstrim to /sdcard/Config/Device to use it in my script and userinit.sh.
I used trimmer app to get a good working fstrim, but probably also available elsewhere.
<removed>
After some reading and some input from people like @anupritaisno1 I came to the next setup.
I went back to rootless, encrypted my phone and made two scripts instead of one.
The install.sh script is used after installing the firmware, rom and kernel (normal dirty flashes) and is only removing the packages I am not using as some log files, and other useless stuff. Also used to implement some tweaks (userinit.sh, gps.conf, build.prop).
The cleanup.sh script is a script for removing all cache, dalvik-cache, app-caches etc.. and is the part I was only using about once a month to start almost clean without loosing settings.
install.sh, used to remove packages I am not using, some logging and other stuff, implementing some tweaks (userinit.sh):
Code:
#!/sbin/sh
#
# Script by 2Tweak
# Last modified 07-09-2019
################################################
# First setup
clear
echo
echo "##########################################"
echo "# DEBLOAT AND TWEAK SCRIPT #"
echo "##########################################"
echo
mount -o remount,rw /cache
mount -o remount,rw /data
mount -o remount,rw /sdcard
mount -o remount,rw /system
################################################
echo -n "Shrinking ROM to the bare minimum..."
# app list to remove
applist="
AntHalService
AudioFX
BasicDreams
BluetoothMidiService
BookmarkProvider
BuiltInPrintService
Calendar
CaptivePortalLogin
CNEService
CallLogBackup
CellBroadcastReceiver
CompanionDeviceManager
Contacts
CtsShimPrebuilt
CtsShimPrivPrebuilt
DocumentsUI
EasterEgg
Eleven
Email
ExactCalculator
Exchange2
Gallery2
HTMLViewer
InputDevices
Jelly
LineageSetupWizard
LiveWallpapersPicker
LockClock
ManagedProvisioning
OneTimeInitializer
PhotoTable
PrintRecommendationService
SharedStorageBackup
SimAppDialog
Stk
Tag
Terminal
Traceur
Updater
UserDictionaryProvider
VpnDialogs
WallpaperBackup
WfdService
"
for appname in $applist
do
if [ -e /system/app/$appname ]; then
chmod -R 777 /system/app/$appname
rm -rf /system/app/$appname
fi
if [ -e /system/priv-app/$appname ]; then
chmod -R 777 /system/priv-app/$appname
rm -rf /system/priv-app/$appname
fi
done
echo " done!"
################################################
echo -n "Removing unneeded and junk files...."
# file list to cleanup
filelist="
/cache
/data/anr
/data/backup
/data/lineageos_updates
/data/local/tmp
/data/lost+found
/data/misc/bootstat
/data/ota
/data/ota_package
/data/system/batterystats.bin
/data/system/dropbox
/data/system/graphicsstats
/data/system/install_sessions.xml
/data/system/last-fstrim
/data/system/procstats
/data/system/syncmanager-log
/data/system/uiderrors.txt
/data/system/usagestats/0/daily
/data/system/usagestats/0/monthly
/data/system/usagestats/0/weekly
/data/system/usagestats/0/yearly
/data/tombstones
/system/bin/bootanimation
/system/media/bootanimation.zip
"
for filename in $filelist
do
if [ -d $filename ]; then
chmod -R 777 $filename
rm -rf $filename/*
fi
if [ -f $filename ]; then
chmod 777 $filename
rm -f $filename
fi
done
# Remove bak, log, tmp files
find /data -iname "*.bak" -type f -exec rm -f {} +
find /data -iname "*.log" -type f -exec rm -f {} +
find /data -iname "*.tmp" -type f -exec rm -f {} +
find /system -iname "*.bak" -type f -exec rm -f {} +
find /system -iname "*.log" -type f -exec rm -f {} +
find /system -iname "*.tmp" -type f -exec rm -f {} +
echo " done!"
################################################
echo -n "Cleaning app data..................."
for i in $(ls /data/data/)
do
if [ -e /data/data/$i/app_webview ]; then
chmod -R 777 /data/data/$i/app_webview
# keep cookies for webapp logins
if [ -e /data/data/$i/app_webview/Cookies ]; then
mv -f /data/data/$i/app_webview/Cookies /data/local/tmp/$i.Cookies
fi
rm -rf /data/data/$i/app_webview/*
if [ -e /data/local/tmp/$i.Cookies ]; then
mv -f /data/local/tmp/$i.Cookies /data/data/$i/app_webview/Cookies
fi
fi
done
for k in $(ls /sdcard/Android/data/)
do
if [ -e /sdcard/Android/data/$k/cache ]; then
chmod -R 777 /sdcard/Android/data/$k/cache
rm -rf /sdcard/Android/data/$k/cache/*
fi
done
echo " done!"
################################################
echo -n "Optimizing app databases............"
# Optimize databases
for i in $(find /data -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
for i in $(find /sdcard -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
echo " done!"
################################################
echo -n "Setting log permissions read-only..."
chmod 000 /data/tombstones
chmod 000 /data/system/dropbox
chmod 000 /data/system/graphicsstats
chmod 000 /data/system/procstats
chmod 000 /data/system/usagestats/0/daily
chmod 000 /data/system/usagestats/0/weekly
chmod 000 /data/system/usagestats/0/monthly
chmod 000 /data/system/usagestats/0/yearly
echo " done!"
################################################
echo -n "Adding my build.prop settings......."
fname="/system/build.prop"
tmpvar=$(sed '/.*My settings.*/{s///;q;}' $fname | sed '$d')
echo "$tmpvar" > $fname
echo '
# My settings
# Disable multi user
fw.max_users=1
fw.show_multiuserui=0
fw.show_hidden_users=0
fw.power_user_switcher=0
# Disable logging
logcat.live=disable
# Disable boot animation
debug.sf.nobootanimation=1
# Disable USB debugging notification
persist.adb.notify=0
# Enable VoLTE
persist.dbg.ims_volte_enable=1
persist.dbg.volte_avail_ovr=1
persist.dbg.vt_avail_ovr=1
persist.dbg.wfc_avail_ovr=1
persist.radio.rat_on=combine
persist.radio.data_ltd_sys_ind=1
persist.radio.data_con_rprt=1
persist.radio.calls.on.ims=1
# End of my settings
' >> $fname
chmod 644 $fname
echo " done!"
################################################
echo -n "Adding my gps.conf settings........."
rm -f /system/vendor/etc/gps.conf
touch /system/vendor/etc/gps.conf
echo '# My settings
# NTP Server - only one allowed!
NTP_SERVER=nl.pool.ntp.org
# Debug level
DEBUG_LEVEL=0
# End of my settings
' > /system/vendor/etc/gps.conf
chmod 644 /system/vendor/etc/gps.conf
echo " done!"
################################################
echo -n "Adding my userinit.sh settings......"
echo '#!/system/bin/sh
# My settings
# Optimize databases
for i in $(find /data -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
for i in $(find /storage/emulated/0 -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
# Disable iostats
chmod 666 /sys/block/sda/queue/iostats
echo "0" > /sys/block/sda/queue/iostats
chmod 444 /sys/block/sda/queue/iostats
# Disable some wakelocks
if [ -e /sys/devices/virtual/misc/boeffla_wakelock_blocker ]; then
echo "IPA_WS;NETLINK;bms;netmgr_wl;qcom_rx_wakelock;sensor_SMD;wlan;wlan_extscan_wl;wlan_ipa;wlan_pno_wl;wlan_wow_wl" > /sys/devices/virtual/misc/boeffla_wakelock_blocker/wakelock_blocker
fi
# End of my settings
' > /data/local/userinit.sh
chmod 777 /data/local/userinit.sh
echo " done!"
echo
cleanup.sh, used about once a month to have the feeling I start with an almost clean system (probably useless):
Code:
]#!/sbin/sh
#
# Script by 2Tweak
# Last modified 06-09-2019
################################################
# First setup
clear
echo
echo "##########################################"
echo "# DEEP CLEAN SCRIPT #"
echo "##########################################"
echo
mount -o remount,rw /cache
mount -o remount,rw /data
mount -o remount,rw /sdcard
mount -o remount,rw /system
################################################
echo -n "Removing unneeded and junk files...."
# file list to cleanup
filelist="
/cache
/data/anr
/data/backup
/data/cache
/data/dalvik-cache
/data/lineageos_updates
/data/local/tmp
/data/lost+found
/data/misc/bootstat
/data/ota
/data/ota_package
/data/resource-cache
/data/system/batterystats.bin
/data/system/dropbox
/data/system/graphicsstats
/data/system/install_sessions.xml
/data/system/last-fstrim
/data/system/package_cache
/data/system/procstats
/data/system/syncmanager-log
/data/system/uiderrors.txt
/data/system/usagestats/0/daily
/data/system/usagestats/0/monthly
/data/system/usagestats/0/weekly
/data/system/usagestats/0/yearly
/data/tombstones
/system/bin/bootanimation
/system/media/bootanimation.zip
"
for filename in $filelist
do
if [ -d $filename ]; then
chmod -R 777 $filename
rm -rf $filename/*
fi
if [ -f $filename ]; then
chmod 777 $filename
rm -f $filename
fi
done
# Remove bak, log, tmp and dex files
find /data -iname "*.bak" -type f -exec rm -f {} +
find /data -iname "*.log" -type f -exec rm -f {} +
find /data -iname "*.tmp" -type f -exec rm -f {} +
find /data -iname "*.odex" -type f -exec rm -f {} +
find /data -iname "*.vdex" -type f -exec rm -f {} +
find /system -iname "*.bak" -type f -exec rm -f {} +
find /system -iname "*.log" -type f -exec rm -f {} +
find /system -iname "*.tmp" -type f -exec rm -f {} +
# Some other useless system related files
rm -f /data/stock_boot_*.img.gz
rm -rf /system/vendor/overlay
echo " done!"
################################################
echo -n "Cleaning app data and caches........"
for i in $(ls /data/data/)
do
if [ -e /data/data/$i/cache ]; then
chmod -R 777 /data/data/$i/cache
rm -rf /data/data/$i/cache/*
fi
if [ -e /data/data/$i/code_cache ]; then
chmod -R 777 /data/data/$i/code_cache
rm -rf /data/data/$i/code_cache/*
fi
if [ -e /data/data/$i/files/.Fabric ]; then
chmod -R 777 /data/data/$i/files/.Fabric
rm -rf /data/data/$i/files/.Fabric/*
fi
if [ -e /data/data/$i/files/cache ]; then
chmod -R 777 /data/data/$i/files/cache
rm -rf /data/data/$i/files/cache/*
fi
if [ -e /data/data/$i/app_webview ]; then
chmod -R 777 /data/data/$i/app_webview
# keep cookies for webapp logins
if [ -e /data/data/$i/app_webview/Cookies ]; then
mv -f /data/data/$i/app_webview/Cookies /data/local/tmp/$i.Cookies
fi
rm -rf /data/data/$i/app_webview/*
if [ -e /data/local/tmp/$i.Cookies ]; then
mv -f /data/local/tmp/$i.Cookies /data/data/$i/app_webview/Cookies
fi
fi
done
for k in $(ls /sdcard/Android/data/)
do
if [ -e /sdcard/Android/data/$k/cache ]; then
chmod -R 777 /sdcard/Android/data/$k/cache
rm -rf /sdcard/Android/data/$k/cache/*
fi
done
echo " done!"
################################################
echo -n "Cleaning app oat files.............."
for j in $(ls /data/app/)
do
if [ -e /data/app/$j/oat/arm ]; then
chmod -R 777 /data/app/$j/oat/arm
rm -rf /data/app/$j/oat/arm/*
fi
if [ -e /data/app/$j/oat/arm64 ]; then
chmod -R 777 /data/app/$j/oat/arm64
rm -rf /data/app/$j/oat/arm64/*
fi
done
echo " done!"
################################################
echo -n "Remove some app specific files......"
# App specific
rm -rf /data/data/org.fdroid.fdroid/files/*.apk
rm -rf /data/data/org.videolan.vlc/app_vlc/*
echo " done!"
################################################
echo -n "Remove empty directories............"
# Remove empty directories
find /data/data -type d -depth -exec rmdir {} + 2>/dev/null
find /sdcard -type d -depth -exec rmdir {} + 2>/dev/null
echo " done!"
################################################
echo -n "Optimizing app databases............"
# Optimize databases
for i in $(find /data -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
for i in $(find /sdcard -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
echo " done!"
################################################
echo -n "Setting log permissions read-only..."
chmod 000 /data/tombstones
chmod 000 /data/system/dropbox
chmod 000 /data/system/graphicsstats
chmod 000 /data/system/procstats
chmod 000 /data/system/usagestats/0/daily
chmod 000 /data/system/usagestats/0/weekly
chmod 000 /data/system/usagestats/0/monthly
chmod 000 /data/system/usagestats/0/yearly
echo " done!"
echo
My setup now:
Oxygen 9.05 firmware
op3_recovery 3.3.1-0 from @anupritaisno1
Lineage OS 16
Flash kernel 3.18.140
No Google stuff, using FDroid and Aurora Store as playstores.
The idea was to have a topic where also other people would share their scripts, tweaks etc...
Am I really the only one tweaking a little around??
2Tweak said:
Am I really the only one tweaking a little around??
Click to expand...
Click to collapse
Seems so
Instead of disabling fsync try raising the fsync interval
The default is 5 seconds. Most filesystems will allow up to 300
It can be changed as:
Code:
mount -o commit=300,remount /data
Remember the higher you set it the higher the chance of data loss in case of system failure
Some filesystems will warn you in dmesg if you set the commit interval too high
anupritaisno1 said:
Seems so
Instead of disabling fsync try raising the fsync interval
The default is 5 seconds. Most filesystems will allow up to 300
It can be changed as:
Code:
mount -o commit=300,remount /data
Remember the higher you set it the higher the chance of data loss in case of system failure
Some filesystems will warn you in dmesg if you set the commit interval too high
Click to expand...
Click to collapse
Thanks, will give it a try.
2Tweak said:
Am I really the only one tweaking a little around??
Click to expand...
Click to collapse
I can think of some reasons:
- many people are over the use of scripts and just flash one of the magic magisk modules (up to debate if they are useful and if at all which of them)
- Lack of understanding which stuff is save to remove and what breaks if you do so (I struggle with this point myself) Maybe there is a neat list what the removed apks do? I mean most are pretty self explaining but not all.
Maybe my response is useless because I might not be part of the target audience but I'm still very grateful that you took your time to set up this thread and that you shared your findings and thoughts with us. I learned some new things by visiting this thread
SenseSei said:
I can think of some reasons:
- many people are over the use of scripts and just flash one of the magic magisk modules (up to debate if they are useful and if at all which of them)
- Lack of understanding which stuff is save to remove and what breaks if you do so (I struggle with this point myself) Maybe there is a neat list what the removed apks do? I mean most are pretty self explaining but not all.
Maybe my response is useless because I might not be part of the target audience but I'm still very grateful that you took your time to set up this thread and that you shared your findings and thoughts with us. I learned some new things by visiting this thread
Click to expand...
Click to collapse
Thanks for your response SenseSei, nice to hear you have learned something! :good:
That is how it works, with sharing information we all benefit!
I understand your comment about some kind of neat list of what apk's are doing.
In fact I have searched the internet a lot, but did not keep a list with explanations...
When I see an apk which is not on my list already and I do not know what it is doing, I simply search on the internet.
Then I can make my decision to remove it or not, test if it is not breaking other parts and add it to my list or not.
I was planning to switch to Glassrom last weekend, but because I am very happy with my Lineage installation at the moment AND Android 10 is on it's way, I have decided to keep using Lineage till the switch to 10.
This also means I switched back to my old behaviour; one script with removal of apk's, some tweaks in build.prop and userinit.sh and the deep clean included.
Keep in mind it is not wise to use this every day, Android need's time to settle and using this script every day will result in higher drain and wearage of your drive.
Some small things added / changed. For example I included the remount with raised fsync interval for /data instead of disabling fsync completely; a tip of @anupritaisno1. Based on some tips from him the script is also changed a little; removed some spaces and added quotes to improve riability. Font removal is back, though more fonts are kept to keep special characters in for example the weather app I am using. I added the removal of the live display stuff again because I am not using it. The 'PIS'-error is solved though, so therefor you do not need the live display removal anymore.
My setup still is:
- Firmware 9.05
- TWRP from anupritaisno1
- Lineage 16 latest nightly
- Flash kernel 3.18.140 latest (hardened kernel; fast, secure and stable)
- No Google stuff, using FDroid and AuroraStore for app installs and updates
Code:
#!/sbin/sh
#
# Script by 2Tweak
# Last modified 17-09-2019
################################################
# First setup
clear
echo
echo "##########################################"
echo "# LINEAGE CLEANUP SCRIPT #"
echo "##########################################"
echo
mount -o remount,rw /cache
mount -o remount,rw /data
mount -o remount,rw /sdcard
mount -o remount,rw /system
################################################
echo -n "Shrinking ROM to the bare minimum..."
# app list to remove
applist="
AntHalService
AudioFX
BackupRestoreConfirmation
BasicDreams
BluetoothMidiService
BookmarkProvider
BuiltInPrintService
Calendar
CaptivePortalLogin
CNEService
CallLogBackup
CellBroadcastReceiver
CompanionDeviceManager
com.qualcomm.location
Contacts
CtsShimPrebuilt
CtsShimPrivPrebuilt
Development
DocumentsUI
EasterEgg
Eleven
Email
ExactCalculator
Exchange2
Gallery2
HTMLViewer
InputDevices
Jelly
LineageSetupWizard
LiveWallpapersPicker
LockClock
ManagedProvisioning
OneTimeInitializer
OneplusDoze
OneplusPocketMode
PhotoTable
PrintRecommendationService
SharedStorageBackup
SimAppDialog
Stk
Tag
Terminal
Traceur
Updater
UserDictionaryProvider
VpnDialogs
WallpaperBackup
WallpaperCropper
WeatherProvider
WfdService
"
for appname in $applist
do
if [ -e /system/app/"$appname" ]; then
chmod -R 777 /system/app/"$appname"
rm -rf /system/app/"$appname"
fi
if [ -e /system/priv-app/"$appname" ]; then
chmod -R 777 /system/priv-app/"$appname"
rm -rf /system/priv-app/"$appname"
fi
done
echo " done!"
################################################
echo -n "Removing unneeded and junk files...."
# file list to cleanup
filelist="
/cache
/data/anr
/data/backup
/data/cache
/data/dalvik-cache
/data/lineageos_updates
/data/local/tmp
/data/lost+found
/data/misc/bootstat
/data/ota
/data/ota_package
/data/resource-cache
/data/system/batterystats.bin
/data/system/dropbox
/data/system/graphicsstats
/data/system/install_sessions.xml
/data/system/last-fstrim
/data/system/package_cache
/data/system/procstats
/data/system/syncmanager-log
/data/system/uiderrors.txt
/data/system/usagestats/0/daily
/data/system/usagestats/0/monthly
/data/system/usagestats/0/weekly
/data/system/usagestats/0/yearly
/data/tombstones
/system/bin/bootanimation
/system/media/bootanimation.zip
"
for filename in $filelist
do
if [ -d "$filename" ]; then
chmod -R 777 "$filename"
rm -rf "${filename:?}"/*
fi
if [ -f "$filename" ]; then
chmod 777 "$filename"
rm -f "$filename"
fi
done
# Remove bak, log, tmp files
find /data -iname "*.bak" -iname "*.log" -iname "*.tmp" -iname "*.odex" -iname "*.vdex" -type f -exec rm -f {} +
find /system -iname "*.bak" -iname "*.log" -iname "*.tmp" -type f -exec rm -f {} +
# Reduce fonts to the bare minimum
find /system/fonts ! -iname "*roboto*.*" ! -name "DroidSansMono.ttf" ! -name "NotoColorEmoji.ttf" -name "NotoSansSymbols-Regular-Subsetted*.ttf" -type f -exec rm -f {} +
# Some other useless system related files
rm -f /data/stock_boot_*.img.gz
rm -rf /system/vendor/overlay
echo " done!"
################################################
echo -n "Cleaning app data..................."
for i in $(ls /data/data/)
do
if [ -e /data/data/"$i"/cache ]; then
chmod -R 777 /data/data/"$i"/cache
rm -rf /data/data/"$i"/cache/*
fi
if [ -e /data/data/"$i"/code_cache ]; then
chmod -R 777 /data/data/"$i"/code_cache
rm -rf /data/data/"$i"/code_cache/*
fi
if [ -e /data/data/"$i"/files/.Fabric ]; then
chmod -R 777 /data/data/"$i"/files/.Fabric
rm -rf /data/data/"$i"/files/.Fabric/*
fi
if [ -e /data/data/"$i"/files/cache ]; then
chmod -R 777 /data/data/"$i"/files/cache
rm -rf /data/data/"$i"/files/cache/*
fi
if [ -e /data/data/"$i"/app_webview ]; then
chmod -R 777 /data/data/"$i"/app_webview
# keep cookies for webapp logins
if [ -e /data/data/"$i"/app_webview/Cookies ]; then
mv -f /data/data/"$i"/app_webview/Cookies /data/local/tmp/"$i".Cookies
fi
rm -rf /data/data/"$i"/app_webview/*
if [ -e /data/local/tmp/"$i".Cookies ]; then
mv -f /data/local/tmp/"$i".Cookies /data/data/"$i"/app_webview/Cookies
fi
fi
done
for k in $(ls /sdcard/Android/data/)
do
if [ -e /sdcard/Android/data/"$k"/cache ]; then
chmod -R 777 /sdcard/Android/data/"$k"/cache
rm -rf /sdcard/Android/data/"$k"/cache/*
fi
done
echo " done!"
################################################
echo -n "Cleaning app oat files.............."
for j in $(ls /data/app/)
do
if [ -e /data/app/"$j"/oat/arm ]; then
chmod -R 777 /data/app/"$j"/oat/arm
rm -rf /data/app/"$j"/oat/arm/*
fi
if [ -e /data/app/"$j"/oat/arm64 ]; then
chmod -R 777 /data/app/"$j"/oat/arm64
rm -rf /data/app/"$j"/oat/arm64/*
fi
done
echo " done!"
################################################
echo -n "Remove some app specific files......"
# App specific
rm -rf /data/data/com.abnamro.nl.mobile.payments/app_dex/oat/arm64/*
rm -rf /data/data/org.fdroid.fdroid/files/*.apk
rm -rf /data/data/org.videolan.vlc/app_vlc/*
echo " done!"
################################################
echo -n "Optimizing app databases............"
# Optimize databases
for i in $(find /data -iname "*.db" -type f)
do
sqlite3 "$i" "VACUUM;" 2>/dev/null
sqlite3 "$i" "REINDEX;" 2>/dev/null
done
for i in $(find /sdcard -iname "*.db" -type f)
do
sqlite3 "$i" "VACUUM;" 2>/dev/null
sqlite3 "$i" "REINDEX;" 2>/dev/null
done
echo " done!"
################################################
echo -n "Remove live display functionality..."
rm -f '/system/vendor/bin/hw/[email protected]'
rm -f '/system/vendor/etc/init/[email protected]'
fname="/system/vendor/etc/vintf/manifest.xml"
found=0
startstop=0
tstr=""
nstr=""
IFS=$'\n'
while read line
do
if [[ "$line" == *'<hal'* ]]; then
startstop=1
elif [[ "$line" == *'</hal'* ]]; then
startstop=2
elif [[ "$line" == *'livedisplay'* ]]; then
found=1
fi
if [ $startstop -eq 1 ]; then
tstr="${tstr}\n${line}"
elif [ $startstop -eq 2 ]; then
tstr="${tstr}\n${line}"
if [ $found -eq 0 ]; then
nstr="${nstr}${tstr}"
else
found=0
fi
tstr=""
startstop=0
else
if [ "$nstr" == "" ]; then
nstr="${line}"
else
nstr="${nstr}\n${line}"
fi
fi
done <"$fname"
echo $nstr > $fname
echo " done!"
################################################
echo -n "Remove empty directories............"
# Remove empty directories
find /data/data -type d -depth -exec rmdir {} + 2>/dev/null
find /sdcard -type d -depth -exec rmdir {} + 2>/dev/null
echo " done!"
################################################
echo -n "Setting log permissions read-only..."
chmod 000 /data/tombstones
chmod 000 /data/system/dropbox
chmod 000 /data/system/graphicsstats
chmod 000 /data/system/procstats
chmod 000 /data/system/usagestats/0/daily
chmod 000 /data/system/usagestats/0/weekly
chmod 000 /data/system/usagestats/0/monthly
chmod 000 /data/system/usagestats/0/yearly
echo " done!"
################################################
echo -n "Adding my build.prop settings......."
fname="/system/build.prop"
tmpvar=$(sed '/.*My settings.*/{s///;q;}' $fname | sed '$d')
echo "$tmpvar" > $fname
echo '
# My settings
# Disable multi user
fw.max_users=1
fw.show_multiuserui=0
fw.show_hidden_users=0
fw.power_user_switcher=0
# Disable logging
logcat.live=disable
# Disable boot animation
debug.sf.nobootanimation=1
# Disable USB debugging notification
persist.adb.notify=0
# Disable ring delay
ro.telephony.call_ring.delay=0
ring.delay=0
# Remove fps limit
debug.gr.swapinterval=0
# Disable dithering
persist.sys.use_dithering=0
# Disable scrolling cache
persist.sys.scrollingcache=4
# End of my settings
' >> $fname
chmod 644 $fname
echo " done!"
################################################
echo -n "Adding my gps.conf settings........."
rm -f /system/vendor/etc/gps.conf
touch /system/vendor/etc/gps.conf
echo '# My settings
# NTP Server - only one allowed!
NTP_SERVER=nl.pool.ntp.org
# Debug level
DEBUG_LEVEL=0
# End of my settings
' > /system/vendor/etc/gps.conf
chmod 644 /system/vendor/etc/gps.conf
echo " done!"
################################################
echo -n "Adding my userinit.sh settings......"
echo '#!/system/bin/sh
# My settings
# Optimize databases
for i in $(find /data -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
for i in $(find /storage/emulated/0 -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
# Instead of disabling fsync remount with higher fsync interval
mount -o remount,rw,commit=300 /data
# Enable power_efficient workqueue
chmod 666 /sys/module/workqueue/parameters/power_efficient
echo 1 > /sys/module/workqueue/parameters/power_efficient
chmod 444 /sys/module/workqueue/parameters/power_efficient
# Disable iostats
chmod 666 /sys/block/sda/queue/iostats
echo "0" > /sys/block/sda/queue/iostats
chmod 444 /sys/block/sda/queue/iostats
# When there, use Boeffla to disable some wakelocks
if [ -e /sys/devices/virtual/misc/boeffla_wakelock_blocker ]; then
echo "IPA_WS;NETLINK;bms;netmgr_wl;qcom_rx_wakelock;sensor_SMD;wlan;wlan_extscan_wl;wlan_ipa;wlan_pno_wl;wlan_wow_wl" > /sys/devices/virtual/misc/boeffla_wakelock_blocker/wakelock_blocker
fi
# End of my settings
' > /data/local/userinit.sh
chmod 777 /data/local/userinit.sh
echo " done!"
echo
2Tweak said:
Thanks for your response SenseSei, nice to hear you have learned something! :good:
That is how it works, with sharing information we all benefit!
I understand your comment about some kind of neat list of what apk's are doing.
In fact I have searched the internet a lot, but did not keep a list with explanations...
When I see an apk which is not on my list already and I do not know what it is doing, I simply search on the internet.
Then I can make my decision to remove it or not, test if it is not breaking other parts and add it to my list or not.
I was planning to switch to Glassrom last weekend, but because I am very happy with my Lineage installation at the moment AND Android 10 is on it's way, I have decided to keep using Lineage till the switch to 10.
This also means I switched back to my old behaviour; one script with removal of apk's, some tweaks in build.prop and userinit.sh and the deep clean included.
Keep in mind it is not wise to use this every day, Android need's time to settle and using this script every day will result in higher drain and wearage of your drive.
Some small things added / changed. For example I included the remount with raised fsync interval for /data instead of disabling fsync completely; a tip of @anupritaisno1. Based on some tips from him the script is also changed a little; removed some spaces and added quotes to improve riability. Font removal is back, though more fonts are kept to keep special characters in for example the weather app I am using. I added the removal of the live display stuff again because I am not using it. The 'PIS'-error is solved though, so therefor you do not need the live display removal anymore.
My setup still is:
- Firmware 9.05
- TWRP from anupritaisno1
- Lineage 16 latest nightly
- Flash kernel 3.18.140 latest (hardened kernel; fast, secure and stable)
- No Google stuff, using FDroid and AuroraStore for app installs and updates
Code:
#!/sbin/sh
#
# Script by 2Tweak
# Last modified 17-09-2019
################################################
# First setup
clear
echo
echo "##########################################"
echo "# LINEAGE CLEANUP SCRIPT #"
echo "##########################################"
echo
mount -o remount,rw /cache
mount -o remount,rw /data
mount -o remount,rw /sdcard
mount -o remount,rw /system
################################################
echo -n "Shrinking ROM to the bare minimum..."
# app list to remove
applist="
AntHalService
AudioFX
BackupRestoreConfirmation
BasicDreams
BluetoothMidiService
BookmarkProvider
BuiltInPrintService
Calendar
CaptivePortalLogin
CNEService
CallLogBackup
CellBroadcastReceiver
CompanionDeviceManager
com.qualcomm.location
Contacts
CtsShimPrebuilt
CtsShimPrivPrebuilt
Development
DocumentsUI
EasterEgg
Eleven
Email
ExactCalculator
Exchange2
Gallery2
HTMLViewer
InputDevices
Jelly
LineageSetupWizard
LiveWallpapersPicker
LockClock
ManagedProvisioning
OneTimeInitializer
OneplusDoze
OneplusPocketMode
PhotoTable
PrintRecommendationService
SharedStorageBackup
SimAppDialog
Stk
Tag
Terminal
Traceur
Updater
UserDictionaryProvider
VpnDialogs
WallpaperBackup
WallpaperCropper
WeatherProvider
WfdService
"
for appname in $applist
do
if [ -e /system/app/"$appname" ]; then
chmod -R 777 /system/app/"$appname"
rm -rf /system/app/"$appname"
fi
if [ -e /system/priv-app/"$appname" ]; then
chmod -R 777 /system/priv-app/"$appname"
rm -rf /system/priv-app/"$appname"
fi
done
echo " done!"
################################################
echo -n "Removing unneeded and junk files...."
# file list to cleanup
filelist="
/cache
/data/anr
/data/backup
/data/cache
/data/dalvik-cache
/data/lineageos_updates
/data/local/tmp
/data/lost+found
/data/misc/bootstat
/data/ota
/data/ota_package
/data/resource-cache
/data/system/batterystats.bin
/data/system/dropbox
/data/system/graphicsstats
/data/system/install_sessions.xml
/data/system/last-fstrim
/data/system/package_cache
/data/system/procstats
/data/system/syncmanager-log
/data/system/uiderrors.txt
/data/system/usagestats/0/daily
/data/system/usagestats/0/monthly
/data/system/usagestats/0/weekly
/data/system/usagestats/0/yearly
/data/tombstones
/system/bin/bootanimation
/system/media/bootanimation.zip
"
for filename in $filelist
do
if [ -d "$filename" ]; then
chmod -R 777 "$filename"
rm -rf "${filename:?}"/*
fi
if [ -f "$filename" ]; then
chmod 777 "$filename"
rm -f "$filename"
fi
done
# Remove bak, log, tmp files
find /data -iname "*.bak" -iname "*.log" -iname "*.tmp" -iname "*.odex" -iname "*.vdex" -type f -exec rm -f {} +
find /system -iname "*.bak" -iname "*.log" -iname "*.tmp" -type f -exec rm -f {} +
# Reduce fonts to the bare minimum
find /system/fonts ! -iname "*roboto*.*" ! -name "DroidSansMono.ttf" ! -name "NotoColorEmoji.ttf" -name "NotoSansSymbols-Regular-Subsetted*.ttf" -type f -exec rm -f {} +
# Some other useless system related files
rm -f /data/stock_boot_*.img.gz
rm -rf /system/vendor/overlay
echo " done!"
################################################
echo -n "Cleaning app data..................."
for i in $(ls /data/data/)
do
if [ -e /data/data/"$i"/cache ]; then
chmod -R 777 /data/data/"$i"/cache
rm -rf /data/data/"$i"/cache/*
fi
if [ -e /data/data/"$i"/code_cache ]; then
chmod -R 777 /data/data/"$i"/code_cache
rm -rf /data/data/"$i"/code_cache/*
fi
if [ -e /data/data/"$i"/files/.Fabric ]; then
chmod -R 777 /data/data/"$i"/files/.Fabric
rm -rf /data/data/"$i"/files/.Fabric/*
fi
if [ -e /data/data/"$i"/files/cache ]; then
chmod -R 777 /data/data/"$i"/files/cache
rm -rf /data/data/"$i"/files/cache/*
fi
if [ -e /data/data/"$i"/app_webview ]; then
chmod -R 777 /data/data/"$i"/app_webview
# keep cookies for webapp logins
if [ -e /data/data/"$i"/app_webview/Cookies ]; then
mv -f /data/data/"$i"/app_webview/Cookies /data/local/tmp/"$i".Cookies
fi
rm -rf /data/data/"$i"/app_webview/*
if [ -e /data/local/tmp/"$i".Cookies ]; then
mv -f /data/local/tmp/"$i".Cookies /data/data/"$i"/app_webview/Cookies
fi
fi
done
for k in $(ls /sdcard/Android/data/)
do
if [ -e /sdcard/Android/data/"$k"/cache ]; then
chmod -R 777 /sdcard/Android/data/"$k"/cache
rm -rf /sdcard/Android/data/"$k"/cache/*
fi
done
echo " done!"
################################################
echo -n "Cleaning app oat files.............."
for j in $(ls /data/app/)
do
if [ -e /data/app/"$j"/oat/arm ]; then
chmod -R 777 /data/app/"$j"/oat/arm
rm -rf /data/app/"$j"/oat/arm/*
fi
if [ -e /data/app/"$j"/oat/arm64 ]; then
chmod -R 777 /data/app/"$j"/oat/arm64
rm -rf /data/app/"$j"/oat/arm64/*
fi
done
echo " done!"
################################################
echo -n "Remove some app specific files......"
# App specific
rm -rf /data/data/com.abnamro.nl.mobile.payments/app_dex/oat/arm64/*
rm -rf /data/data/org.fdroid.fdroid/files/*.apk
rm -rf /data/data/org.videolan.vlc/app_vlc/*
echo " done!"
################################################
echo -n "Optimizing app databases............"
# Optimize databases
for i in $(find /data -iname "*.db" -type f)
do
sqlite3 "$i" "VACUUM;" 2>/dev/null
sqlite3 "$i" "REINDEX;" 2>/dev/null
done
for i in $(find /sdcard -iname "*.db" -type f)
do
sqlite3 "$i" "VACUUM;" 2>/dev/null
sqlite3 "$i" "REINDEX;" 2>/dev/null
done
echo " done!"
################################################
echo -n "Remove live display functionality..."
rm -f '/system/vendor/bin/hw/[email protected]'
rm -f '/system/vendor/etc/init/[email protected]'
fname="/system/vendor/etc/vintf/manifest.xml"
found=0
startstop=0
tstr=""
nstr=""
IFS=$'\n'
while read line
do
if [[ "$line" == *'<hal'* ]]; then
startstop=1
elif [[ "$line" == *'</hal'* ]]; then
startstop=2
elif [[ "$line" == *'livedisplay'* ]]; then
found=1
fi
if [ $startstop -eq 1 ]; then
tstr="${tstr}\n${line}"
elif [ $startstop -eq 2 ]; then
tstr="${tstr}\n${line}"
if [ $found -eq 0 ]; then
nstr="${nstr}${tstr}"
else
found=0
fi
tstr=""
startstop=0
else
if [ "$nstr" == "" ]; then
nstr="${line}"
else
nstr="${nstr}\n${line}"
fi
fi
done <"$fname"
echo $nstr > $fname
echo " done!"
################################################
echo -n "Remove empty directories............"
# Remove empty directories
find /data/data -type d -depth -exec rmdir {} + 2>/dev/null
find /sdcard -type d -depth -exec rmdir {} + 2>/dev/null
echo " done!"
################################################
echo -n "Setting log permissions read-only..."
chmod 000 /data/tombstones
chmod 000 /data/system/dropbox
chmod 000 /data/system/graphicsstats
chmod 000 /data/system/procstats
chmod 000 /data/system/usagestats/0/daily
chmod 000 /data/system/usagestats/0/weekly
chmod 000 /data/system/usagestats/0/monthly
chmod 000 /data/system/usagestats/0/yearly
echo " done!"
################################################
echo -n "Adding my build.prop settings......."
fname="/system/build.prop"
tmpvar=$(sed '/.*My settings.*/{s///;q;}' $fname | sed '$d')
echo "$tmpvar" > $fname
echo '
# My settings
# Disable multi user
fw.max_users=1
fw.show_multiuserui=0
fw.show_hidden_users=0
fw.power_user_switcher=0
# Disable logging
logcat.live=disable
# Disable boot animation
debug.sf.nobootanimation=1
# Disable USB debugging notification
persist.adb.notify=0
# Disable ring delay
ro.telephony.call_ring.delay=0
ring.delay=0
# Remove fps limit
debug.gr.swapinterval=0
# Disable dithering
persist.sys.use_dithering=0
# Disable scrolling cache
persist.sys.scrollingcache=4
# End of my settings
' >> $fname
chmod 644 $fname
echo " done!"
################################################
echo -n "Adding my gps.conf settings........."
rm -f /system/vendor/etc/gps.conf
touch /system/vendor/etc/gps.conf
echo '# My settings
# NTP Server - only one allowed!
NTP_SERVER=nl.pool.ntp.org
# Debug level
DEBUG_LEVEL=0
# End of my settings
' > /system/vendor/etc/gps.conf
chmod 644 /system/vendor/etc/gps.conf
echo " done!"
################################################
echo -n "Adding my userinit.sh settings......"
echo '#!/system/bin/sh
# My settings
# Optimize databases
for i in $(find /data -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
for i in $(find /storage/emulated/0 -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
# Instead of disabling fsync remount with higher fsync interval
mount -o remount,rw,commit=300 /data
# Enable power_efficient workqueue
chmod 666 /sys/module/workqueue/parameters/power_efficient
echo 1 > /sys/module/workqueue/parameters/power_efficient
chmod 444 /sys/module/workqueue/parameters/power_efficient
# Disable iostats
chmod 666 /sys/block/sda/queue/iostats
echo "0" > /sys/block/sda/queue/iostats
chmod 444 /sys/block/sda/queue/iostats
# When there, use Boeffla to disable some wakelocks
if [ -e /sys/devices/virtual/misc/boeffla_wakelock_blocker ]; then
echo "IPA_WS;NETLINK;bms;netmgr_wl;qcom_rx_wakelock;sensor_SMD;wlan;wlan_extscan_wl;wlan_ipa;wlan_pno_wl;wlan_wow_wl" > /sys/devices/virtual/misc/boeffla_wakelock_blocker/wakelock_blocker
fi
# End of my settings
' > /data/local/userinit.sh
chmod 777 /data/local/userinit.sh
echo " done!"
echo
Click to expand...
Click to collapse
Fixed it some more
Code:
# Script by 2Tweak
# Last modified 17-09-2019
################################################
# First setup
clear
echo
echo "##########################################"
echo "# LINEAGE CLEANUP SCRIPT #"
echo "##########################################"
echo
mount -o remount,rw /cache
mount -o remount,rw /data
mount -o remount,rw /sdcard
mount -o remount,rw /system
################################################
echo -n "Shrinking ROM to the bare minimum..."
# app list to remove
applist="
AntHalService
AudioFX
BackupRestoreConfirmation
BasicDreams
BluetoothMidiService
BookmarkProvider
BuiltInPrintService
Calendar
CaptivePortalLogin
CNEService
CallLogBackup
CellBroadcastReceiver
CompanionDeviceManager
com.qualcomm.location
Contacts
CtsShimPrebuilt
CtsShimPrivPrebuilt
Development
DocumentsUI
EasterEgg
Eleven
Email
ExactCalculator
Exchange2
Gallery2
HTMLViewer
InputDevices
Jelly
LineageSetupWizard
LiveWallpapersPicker
LockClock
ManagedProvisioning
OneTimeInitializer
OneplusDoze
OneplusPocketMode
PhotoTable
PrintRecommendationService
SharedStorageBackup
SimAppDialog
Stk
Tag
Terminal
Traceur
Updater
UserDictionaryProvider
VpnDialogs
WallpaperBackup
WallpaperCropper
WeatherProvider
WfdService
"
for appname in $applist
do
if [ -e /system/app/"$appname" ]; then
chmod -R 777 /system/app/"$appname"
rm -rf /system/app/"$appname"
fi
if [ -e /system/priv-app/"$appname" ]; then
chmod -R 777 /system/priv-app/"$appname"
rm -rf /system/priv-app/"$appname"
fi
done
echo " done!"
################################################
echo -n "Removing unneeded and junk files...."
# file list to cleanup
filelist="
/cache
/data/anr
/data/backup
/data/cache
/data/dalvik-cache
/data/lineageos_updates
/data/local/tmp
/data/lost+found
/data/misc/bootstat
/data/ota
/data/ota_package
/data/resource-cache
/data/system/batterystats.bin
/data/system/dropbox
/data/system/graphicsstats
/data/system/install_sessions.xml
/data/system/last-fstrim
/data/system/package_cache
/data/system/procstats
/data/system/syncmanager-log
/data/system/uiderrors.txt
/data/system/usagestats/0/daily
/data/system/usagestats/0/monthly
/data/system/usagestats/0/weekly
/data/system/usagestats/0/yearly
/data/tombstones
/system/bin/bootanimation
/system/media/bootanimation.zip
"
for filename in $filelist
do
if [ -d "$filename" ]; then
chmod -R 777 "$filename"
rm -rf "${filename:?}"/*
fi
if [ -f "$filename" ]; then
chmod 777 "$filename"
rm -f "$filename"
fi
done
# Remove bak, log, tmp files
find /data -iname "*.bak" -iname "*.log" -iname "*.tmp" -iname "*.odex" -iname "*.vdex" -type f -exec rm -f {} +
find /system -iname "*.bak" -iname "*.log" -iname "*.tmp" -type f -exec rm -f {} +
# Reduce fonts to the bare minimum
find /system/fonts ! -iname "*roboto*.*" ! -name "DroidSansMono.ttf" ! -name "NotoColorEmoji.ttf" -name "NotoSansSymbols-Regular-Subsetted*.ttf" -type f -exec rm -f {} +
# Some other useless system related files
rm -f /data/stock_boot_*.img.gz
rm -rf /system/vendor/overlay
echo " done!"
################################################
echo -n "Cleaning app data..................."
for i in $(ls /data/data/)
do
if [ -e /data/data/"$i"/cache ]; then
chmod -R 777 /data/data/"$i"/cache
rm -rf /data/data/"$i"/cache/*
fi
if [ -e /data/data/"$i"/code_cache ]; then
chmod -R 777 /data/data/"$i"/code_cache
rm -rf /data/data/"$i"/code_cache/*
fi
if [ -e /data/data/"$i"/files/.Fabric ]; then
chmod -R 777 /data/data/"$i"/files/.Fabric
rm -rf /data/data/"$i"/files/.Fabric/*
fi
if [ -e /data/data/"$i"/files/cache ]; then
chmod -R 777 /data/data/"$i"/files/cache
rm -rf /data/data/"$i"/files/cache/*
fi
if [ -e /data/data/"$i"/app_webview ]; then
chmod -R 777 /data/data/"$i"/app_webview
# keep cookies for webapp logins
if [ -e /data/data/"$i"/app_webview/Cookies ]; then
mv -f /data/data/"$i"/app_webview/Cookies /data/local/tmp/"$i".Cookies
fi
rm -rf /data/data/"$i"/app_webview/*
if [ -e /data/local/tmp/"$i".Cookies ]; then
mv -f /data/local/tmp/"$i".Cookies /data/data/"$i"/app_webview/Cookies
fi
fi
done
for k in $(ls /sdcard/Android/data/)
do
if [ -e /sdcard/Android/data/"$k"/cache ]; then
chmod -R 777 /sdcard/Android/data/"$k"/cache
rm -rf /sdcard/Android/data/"$k"/cache/*
fi
done
echo " done!"
################################################
echo -n "Cleaning app oat files.............."
for j in $(ls /data/app/)
do
if [ -e /data/app/"$j"/oat/arm ]; then
chmod -R 777 /data/app/"$j"/oat/arm
rm -rf /data/app/"$j"/oat/arm/*
fi
if [ -e /data/app/"$j"/oat/arm64 ]; then
chmod -R 777 /data/app/"$j"/oat/arm64
rm -rf /data/app/"$j"/oat/arm64/*
fi
done
echo " done!"
################################################
echo -n "Remove some app specific files......"
# App specific
rm -rf /data/data/com.abnamro.nl.mobile.payments/app_dex/oat/arm64/*
rm -rf /data/data/org.fdroid.fdroid/files/*.apk
rm -rf /data/data/org.videolan.vlc/app_vlc/*
echo " done!"
################################################
echo -n "Optimizing app databases............"
# Optimize databases
for i in $(find /data -iname "*.db" -type f)
do
sqlite3 "$i" "VACUUM;" 2>/dev/null
sqlite3 "$i" "REINDEX;" 2>/dev/null
done
for i in $(find /sdcard -iname "*.db" -type f)
do
sqlite3 "$i" "VACUUM;" 2>/dev/null
sqlite3 "$i" "REINDEX;" 2>/dev/null
done
echo " done!"
################################################
echo -n "Remove live display functionality..."
rm -f '/system/vendor/bin/hw/[email protected]'
rm -f '/system/vendor/etc/init/[email protected]'
fname="/system/vendor/etc/vintf/manifest.xml"
found=0
startstop=0
tstr=""
nstr=""
IFS=$'\n'
while read line
do
if [[ "$line" == *'<hal'* ]]; then
startstop=1
elif [[ "$line" == *'</hal'* ]]; then
startstop=2
elif [[ "$line" == *'livedisplay'* ]]; then
found=1
fi
if [ $startstop -eq 1 ]; then
tstr="${tstr}\n${line}"
elif [ $startstop -eq 2 ]; then
tstr="${tstr}\n${line}"
if [ $found -eq 0 ]; then
nstr="${nstr}${tstr}"
else
found=0
fi
tstr=""
startstop=0
else
if [ "$nstr" == "" ]; then
nstr="${line}"
else
nstr="${nstr}\n${line}"
fi
fi
done <"$fname"
echo "$nstr" > $fname
echo " done!"
################################################
echo -n "Remove empty directories............"
# Remove empty directories
find /data/data -type d -depth -exec rmdir {} + 2>/dev/null
find /sdcard -type d -depth -exec rmdir {} + 2>/dev/null
echo " done!"
################################################
echo -n "Setting log permissions read-only..."
chmod 000 /data/tombstones
chmod 000 /data/system/dropbox
chmod 000 /data/system/graphicsstats
chmod 000 /data/system/procstats
chmod 000 /data/system/usagestats/0/daily
chmod 000 /data/system/usagestats/0/weekly
chmod 000 /data/system/usagestats/0/monthly
chmod 000 /data/system/usagestats/0/yearly
echo " done!"
################################################
echo -n "Adding my build.prop settings......."
fname="/system/build.prop"
tmpvar=$(sed '/.*My settings.*/{s///;q;}' $fname | sed '$d')
echo "$tmpvar" > $fname
echo '
# My settings
# Disable multi user
fw.max_users=1
fw.show_multiuserui=0
fw.show_hidden_users=0
fw.power_user_switcher=0
# Disable logging
logcat.live=disable
# Disable boot animation
debug.sf.nobootanimation=1
# Disable USB debugging notification
persist.adb.notify=0
# Disable ring delay
ro.telephony.call_ring.delay=0
ring.delay=0
# Remove fps limit
debug.gr.swapinterval=0
# Disable dithering
persist.sys.use_dithering=0
# Disable scrolling cache
persist.sys.scrollingcache=4
# End of my settings
' >> $fname
chmod 644 $fname
echo " done!"
################################################
echo -n "Adding my gps.conf settings........."
rm -f /system/vendor/etc/gps.conf
touch /system/vendor/etc/gps.conf
echo '# My settings
# NTP Server - only one allowed!
NTP_SERVER=nl.pool.ntp.org
# Debug level
DEBUG_LEVEL=0
# End of my settings
' > /system/vendor/etc/gps.conf
chmod 644 /system/vendor/etc/gps.conf
echo " done!"
################################################
echo -n "Adding my userinit.sh settings......"
echo '#!/system/bin/sh
# My settings
# Optimize databases
for i in $(find /data -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
for i in $(find /storage/emulated/0 -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
# Instead of disabling fsync remount with higher fsync interval
mount -o remount,rw,commit=300 /data
# Enable power_efficient workqueue
chmod 666 /sys/module/workqueue/parameters/power_efficient
echo 1 > /sys/module/workqueue/parameters/power_efficient
chmod 444 /sys/module/workqueue/parameters/power_efficient
# Disable iostats
chmod 666 /sys/block/sda/queue/iostats
echo "0" > /sys/block/sda/queue/iostats
chmod 444 /sys/block/sda/queue/iostats
# When there, use Boeffla to disable some wakelocks
if [ -e /sys/devices/virtual/misc/boeffla_wakelock_blocker ]; then
echo "IPA_WS;NETLINK;bms;netmgr_wl;qcom_rx_wakelock;sensor_SMD;wlan;wlan_extscan_wl;wlan_ipa;wlan_pno_wl;wlan_wow_wl" > /sys/devices/virtual/misc/boeffla_wakelock_blocker/wakelock_blocker
fi
# End of my settings
' > /data/local/userinit.sh
chmod 777 /data/local/userinit.sh
echo " done!"
echo
anupritaisno1 said:
Fixed it some more
Code:
<cut>
Click to expand...
Click to collapse
I compared both scripts, but why did you remove the first two lines?
Further you added quotes for the echo command:
Code:
echo "$nstr" > $fname
which is indeed a good one; thanks!
Further any changes?
The latest script for Pie I guess, seeing a lot of Android 10 activity and always been an early adapter....
Some changes:
Switched back to LibreChair as launcher. Very nice option is the ability to shape your own icons (see screenshot)
Really like Apkgrabber and Aurora, so using the combi Aurora Droid, Aurora Store (wo automatic update) and Apkgrabber now instead of GPS.
Added New Pipe and Transistor to my apps but has nothing to do with the basic setup
Setup still:
Firmware 9.05
TWRP from anupritaisno1
Latest Lineage Nightly 16.0 (Pie)
Latest Flash Kernel (3.18.140)
Further the tweak and cleanup script is pretty stable now.
Nothing to optimise or other tweaks I want to implement, so here the latest lineage.sh (also added as attachment):
Code:
#!/sbin/sh
#
# Script by 2Tweak
# Last modified 21-09-2019
################################################
# First setup
clear
echo
echo "##########################################"
echo "# LINEAGE CLEANUP SCRIPT #"
echo "##########################################"
echo
mount -o remount,rw /cache
mount -o remount,rw /data
mount -o remount,rw /sdcard
mount -o remount,rw /system
################################################
echo -n "Shrinking ROM to the bare minimum..."
# app list to remove
applist="
AntHalService
AudioFX
BackupRestoreConfirmation
BasicDreams
BluetoothMidiService
BookmarkProvider
BuiltInPrintService
Calendar
CaptivePortalLogin
CNEService
CallLogBackup
CellBroadcastReceiver
CompanionDeviceManager
com.qualcomm.location
Contacts
CtsShimPrebuilt
CtsShimPrivPrebuilt
Development
DocumentsUI
EasterEgg
Eleven
Email
ExactCalculator
Exchange2
Gallery2
HTMLViewer
InputDevices
Jelly
LineageSetupWizard
LiveWallpapersPicker
LockClock
ManagedProvisioning
OneTimeInitializer
OneplusDoze
OneplusPocketMode
PhotoTable
PrintRecommendationService
SharedStorageBackup
SimAppDialog
Stk
Tag
Terminal
Traceur
TrebuchetQuickStep
Updater
UserDictionaryProvider
VpnDialogs
WallpaperBackup
WallpaperCropper
WeatherProvider
WfdService
"
for appname in $applist
do
if [ -e /system/app/"$appname" ]; then
chmod -R 777 /system/app/"$appname"
rm -rf /system/app/"$appname"
fi
if [ -e /system/priv-app/"$appname" ]; then
chmod -R 777 /system/priv-app/"$appname"
rm -rf /system/priv-app/"$appname"
fi
done
echo " done!"
################################################
echo -n "Removing unneeded and junk files...."
# file list to cleanup
filelist="
/cache
/data/anr
/data/backup
/data/cache
/data/dalvik-cache
/data/lineageos_updates
/data/local/tmp
/data/lost+found
/data/misc/bootstat
/data/ota
/data/ota_package
/data/resource-cache
/data/system/batterystats.bin
/data/system/dropbox
/data/system/graphicsstats
/data/system/install_sessions.xml
/data/system/last-fstrim
/data/system/package_cache
/data/system/procstats
/data/system/syncmanager-log
/data/system/uiderrors.txt
/data/system/usagestats/0/daily
/data/system/usagestats/0/monthly
/data/system/usagestats/0/weekly
/data/system/usagestats/0/yearly
/data/tombstones
/system/bin/bootanimation
/system/media/bootanimation.zip
"
for filename in $filelist
do
if [ -d "$filename" ]; then
chmod -R 777 "$filename"
rm -rf "${filename:?}"/*
fi
if [ -f "$filename" ]; then
chmod 777 "$filename"
rm -f "$filename"
fi
done
# Remove bak, log, tmp files
find /data -iname "*.bak" -iname "*.log" -iname "*.tmp" -iname "*.odex" -iname "*.vdex" -type f -exec rm -f {} +
find /system -iname "*.bak" -iname "*.log" -iname "*.tmp" -type f -exec rm -f {} +
# Reduce fonts to the bare minimum
find /system/fonts ! -iname "*roboto*.*" ! -name "DroidSansMono.ttf" ! -name "NotoColorEmoji.ttf" -name "NotoSansSymbols-Regular-Subsetted*.ttf" -type f -exec rm -f {} +
# Some other useless system related files
rm -f /data/stock_boot_*.img.gz
rm -rf /system/vendor/overlay
echo " done!"
################################################
echo -n "Cleaning app data..................."
for i in $(ls /data/data/)
do
if [ -e /data/data/"$i"/cache ]; then
chmod -R 777 /data/data/"$i"/cache
rm -rf /data/data/"$i"/cache/*
fi
if [ -e /data/data/"$i"/code_cache ]; then
chmod -R 777 /data/data/"$i"/code_cache
rm -rf /data/data/"$i"/code_cache/*
fi
if [ -e /data/data/"$i"/files/.Fabric ]; then
chmod -R 777 /data/data/"$i"/files/.Fabric
rm -rf /data/data/"$i"/files/.Fabric/*
fi
if [ -e /data/data/"$i"/files/cache ]; then
chmod -R 777 /data/data/"$i"/files/cache
rm -rf /data/data/"$i"/files/cache/*
fi
if [ -e /data/data/"$i"/app_webview ]; then
chmod -R 777 /data/data/"$i"/app_webview
# keep cookies for webapp logins
if [ -e /data/data/"$i"/app_webview/Cookies ]; then
mv -f /data/data/"$i"/app_webview/Cookies /data/local/tmp/"$i".Cookies
fi
rm -rf /data/data/"$i"/app_webview/*
if [ -e /data/local/tmp/"$i".Cookies ]; then
mv -f /data/local/tmp/"$i".Cookies /data/data/"$i"/app_webview/Cookies
fi
fi
done
for k in $(ls /sdcard/Android/data/)
do
if [ -e /sdcard/Android/data/"$k"/cache ]; then
chmod -R 777 /sdcard/Android/data/"$k"/cache
rm -rf /sdcard/Android/data/"$k"/cache/*
fi
done
echo " done!"
################################################
echo -n "Cleaning app oat files.............."
for j in $(ls /data/app/)
do
if [ -e /data/app/"$j"/oat/arm ]; then
chmod -R 777 /data/app/"$j"/oat/arm
rm -rf /data/app/"$j"/oat/arm/*
fi
if [ -e /data/app/"$j"/oat/arm64 ]; then
chmod -R 777 /data/app/"$j"/oat/arm64
rm -rf /data/app/"$j"/oat/arm64/*
fi
done
echo " done!"
################################################
echo -n "Remove some app specific files......"
# App specific
rm -rf /data/data/com.abnamro.nl.mobile.payments/app_dex/oat/arm64/*
rm -rf /data/data/org.fdroid.fdroid/files/*.apk
rm -rf /data/data/org.videolan.vlc/app_vlc/*
echo " done!"
################################################
echo -n "Optimizing app databases............"
# Optimize databases
for i in $(find /data -iname "*.db" -type f)
do
sqlite3 "$i" "VACUUM;" 2>/dev/null
sqlite3 "$i" "REINDEX;" 2>/dev/null
done
for i in $(find /sdcard -iname "*.db" -type f)
do
sqlite3 "$i" "VACUUM;" 2>/dev/null
sqlite3 "$i" "REINDEX;" 2>/dev/null
done
echo " done!"
################################################
echo -n "Remove live display functionality..."
rm -f '/system/vendor/bin/hw/[email protected]'
rm -f '/system/vendor/etc/init/[email protected]'
fname="/system/vendor/etc/vintf/manifest.xml"
found=0
startstop=0
tstr=""
nstr=""
IFS=$'\n'
while read line
do
if [[ "$line" == *'<hal'* ]]; then
startstop=1
elif [[ "$line" == *'</hal'* ]]; then
startstop=2
elif [[ "$line" == *'livedisplay'* ]]; then
found=1
fi
if [ $startstop -eq 1 ]; then
tstr="${tstr}\n${line}"
elif [ $startstop -eq 2 ]; then
tstr="${tstr}\n${line}"
if [ $found -eq 0 ]; then
nstr="${nstr}${tstr}"
else
found=0
fi
tstr=""
startstop=0
else
if [ "$nstr" == "" ]; then
nstr="${line}"
else
nstr="${nstr}\n${line}"
fi
fi
done <"$fname"
echo "$nstr" > $fname
echo " done!"
################################################
echo -n "Remove empty directories............"
# Remove empty directories
find /data/data -type d -depth -exec rmdir {} + 2>/dev/null
find /sdcard -type d -depth -exec rmdir {} + 2>/dev/null
echo " done!"
################################################
echo -n "Setting log permissions read-only..."
chmod 000 /data/tombstones
chmod 000 /data/system/dropbox
chmod 000 /data/system/graphicsstats
chmod 000 /data/system/procstats
chmod 000 /data/system/usagestats/0/daily
chmod 000 /data/system/usagestats/0/weekly
chmod 000 /data/system/usagestats/0/monthly
chmod 000 /data/system/usagestats/0/yearly
echo " done!"
################################################
echo -n "Adding my build.prop settings......."
fname="/system/build.prop"
tmpvar=$(sed '/.*My settings.*/{s///;q;}' $fname | sed '$d')
echo "$tmpvar" > $fname
echo '
# My settings
# Disable multi user
fw.max_users=1
fw.show_multiuserui=0
fw.show_hidden_users=0
fw.power_user_switcher=0
# Disable logging
logcat.live=disable
# Disable boot animation
debug.sf.nobootanimation=1
# Disable USB debugging notification
persist.adb.notify=0
# Disable ring delay
ro.telephony.call_ring.delay=0
ring.delay=0
# Remove fps limit
debug.gr.swapinterval=0
# Disable dithering
persist.sys.use_dithering=0
# Disable scrolling cache
persist.sys.scrollingcache=4
# End of my settings
' >> $fname
chmod 644 $fname
echo " done!"
################################################
echo -n "Adding my gps.conf settings........."
rm -f /system/vendor/etc/gps.conf
touch /system/vendor/etc/gps.conf
echo '# My settings
# NTP Server - only one allowed!
NTP_SERVER=nl.pool.ntp.org
# Debug level
DEBUG_LEVEL=0
# End of my settings
' > /system/vendor/etc/gps.conf
chmod 644 /system/vendor/etc/gps.conf
echo " done!"
################################################
echo -n "Adding my userinit.sh settings......"
echo '#!/system/bin/sh
# My settings
# Optimize databases
for i in $(find /data -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
for i in $(find /storage/emulated/0 -iname "*.db" -type f)
do
sqlite3 $i "VACUUM;" 2>/dev/null
sqlite3 $i "REINDEX;" 2>/dev/null
done
# Instead of disabling fsync remount with higher fsync interval
mount -o remount,rw,commit=300 /data
# Enable power_efficient workqueue
chmod 666 /sys/module/workqueue/parameters/power_efficient
echo 1 > /sys/module/workqueue/parameters/power_efficient
chmod 444 /sys/module/workqueue/parameters/power_efficient
# Disable iostats
chmod 666 /sys/block/sda/queue/iostats
echo "0" > /sys/block/sda/queue/iostats
chmod 444 /sys/block/sda/queue/iostats
# When there, use Boeffla to disable some wakelocks
if [ -e /sys/devices/virtual/misc/boeffla_wakelock_blocker ]; then
echo "IPA_WS;NETLINK;bms;netmgr_wl;qcom_rx_wakelock;sensor_SMD;wlan;wlan_extscan_wl;wlan_ipa;wlan_pno_wl;wlan_wow_wl" > /sys/devices/virtual/misc/boeffla_wakelock_blocker/wakelock_blocker
fi
# End of my settings
' > /data/local/userinit.sh
chmod 777 /data/local/userinit.sh
echo " done!"
echo
As you probably know; use at your own risc!
---
I am on NOS 10 at the moment and started with a new, in fact my old approach.
Not using Magisk or SuperSU and keeping it as default as possible.
Using adb to disable packages without removing, next step will be a short twrp cleanup script once a month for cache and other crap files.
Using the following bat file for disabling packages and setting some optimised doze settings:
Code:
:setup
@echo off
color 0A
cls
echo.
echo Connect device...
adb devices
:packages
echo.
echo Disable packages...
:: Tag
adb shell pm disable-user --user 0 com.android.apps.tag
adb shell am force-stop com.android.apps.tag
adb shell pm clear com.android.apps.tag
:: BackupRestoreConfirmation
adb shell pm disable-user --user 0 com.android.backupconfirm
adb shell am force-stop com.android.backupconfirm
adb shell pm clear com.android.backupconfirm
:: BuiltInPrintService
adb shell pm disable-user --user 0 com.android.bips
adb shell am force-stop com.android.bips
adb shell pm clear com.android.bips
:: BluetoothMidiService
adb shell pm disable-user --user 0 com.android.bluetoothmidiservice
adb shell am force-stop com.android.bluetoothmidiservice
adb shell pm clear com.android.bluetoothmidiservice
:: BookmarkProvider
adb shell pm disable-user --user 0 com.android.bookmarkprovider
adb shell am force-stop com.android.bookmarkprovider
adb shell pm clear com.android.bookmarkprovider
:: Calendar
adb shell pm disable-user --user 0 com.android.calendar
adb shell am force-stop com.android.calendar
adb shell pm clear com.android.calendar
:: CallLogBackup >> HAVE TO TEST!!
adb shell pm disable-user --user 0 com.android.calllogbackup
adb shell am force-stop com.android.calllogbackup
adb shell pm clear com.android.calllogbackup
:: CaptivePortalLogin
adb shell pm disable-user --user 0 com.android.captiveportallogin
adb shell am force-stop com.android.captiveportallogin
adb shell pm clear com.android.captiveportallogin
:: CellBroadcastReceiver
adb shell pm disable-user --user 0 com.android.cellbroadcastreceiver
adb shell am force-stop com.android.cellbroadcastreceiver
adb shell pm clear com.android.cellbroadcastreceiver
:: CompanionDeviceManager
adb shell pm disable-user --user 0 com.android.companiondevicemanager
adb shell am force-stop com.android.companiondevicemanager
adb shell pm clear com.android.companiondevicemanager
:: Contacts
adb shell pm disable-user --user 0 com.android.contacts
adb shell am force-stop com.android.contacts
adb shell pm clear com.android.contacts
:: CtsShimPrebuilt
adb shell pm disable-user --user 0 com.android.cts.ctsshim
adb shell am force-stop com.android.cts.ctsshim
adb shell pm clear com.android.cts.ctsshim
:: CtsShimPrivPrebuilt
adb shell pm disable-user --user 0 com.android.cts.priv.ctsshim
adb shell am force-stop com.android.cts.priv.ctsshim
adb shell pm clear com.android.cts.priv.ctsshim
:: DocumentsUI
adb shell pm disable-user --user 0 com.android.documentsui
adb shell am force-stop com.android.documentsui
adb shell pm clear com.android.documentsui
:: BasicDreams
adb shell pm disable-user --user 0 com.android.dreams.basic
adb shell am force-stop com.android.dreams.basic
adb shell pm clear com.android.dreams.basic
:: PhotoTable
adb shell pm disable-user --user 0 com.android.dreams.phototable
adb shell am force-stop com.android.dreams.phototable
adb shell pm clear com.android.dreams.phototable
:: DynamicSystemInstallationService
adb shell pm disable-user --user 0 com.android.dynsystem
adb shell am force-stop com.android.dynsystem
adb shell pm clear com.android.dynsystem
:: EasterEgg
adb shell pm disable-user --user 0 com.android.egg
adb shell am force-stop com.android.egg
adb shell pm clear com.android.egg
:: Email
adb shell pm disable-user --user 0 com.android.email
adb shell am force-stop com.android.email
adb shell pm clear com.android.email
:: ExternalStorageProvider
adb shell pm disable-user --user 0 com.android.externalstorage
adb shell am force-stop com.android.externalstorage
adb shell pm clear com.android.externalstorage
:: Gallery2
adb shell pm disable-user --user 0 com.android.gallery3d
adb shell am force-stop com.android.gallery3d
adb shell pm clear com.android.gallery3d
:: InputDevices
adb shell pm disable-user --user 0 com.android.inputdevices
adb shell am force-stop com.android.inputdevices
adb shell pm clear com.android.inputdevices
:: DisplayCutoutEmulationCorner
adb shell pm disable-user --user 0 com.android.internal.display.cutout.emulation.corner
adb shell am force-stop com.android.internal.display.cutout.emulation.corner
adb shell pm clear com.android.internal.display.cutout.emulation.corner
:: DisplayCutoutEmulationDouble
adb shell pm disable-user --user 0 com.android.internal.display.cutout.emulation.double
adb shell am force-stop com.android.internal.display.cutout.emulation.double
adb shell pm clear com.android.internal.display.cutout.emulation.double
:: DisplayCutoutEmulationTall
adb shell pm disable-user --user 0 com.android.internal.display.cutout.emulation.tall
adb shell am force-stop com.android.internal.display.cutout.emulation.tall
adb shell pm clear com.android.internal.display.cutout.emulation.tall
:: LocalTransport
adb shell pm disable-user --user 0 com.android.localtransport
adb shell am force-stop com.android.localtransport
adb shell pm clear com.android.localtransport
:: ManagedProvisioning
adb shell pm disable-user --user 0 com.android.managedprovisioning
adb shell am force-stop com.android.managedprovisioning
adb shell pm clear com.android.managedprovisioning
:: Music
adb shell pm disable-user --user 0 com.android.music
adb shell am force-stop com.android.music
adb shell pm clear com.android.music
:: MusicFX
adb shell pm disable-user --user 0 com.android.musicfx
adb shell am force-stop com.android.musicfx
adb shell pm clear com.android.musicfx
:: NfcNci
adb shell pm disable-user --user 0 com.android.nfc
adb shell am force-stop com.android.nfc
adb shell pm clear com.android.nfc
:: OneTimeInitializer
adb shell pm disable-user --user 0 com.android.onetimeinitializer
adb shell am force-stop com.android.onetimeinitializer
adb shell pm clear com.android.onetimeinitializer
:: PrintRecommendationService
adb shell pm disable-user --user 0 com.android.printservice.recommendation
adb shell am force-stop com.android.printservice.recommendation
adb shell pm clear com.android.printservice.recommendation
:: QuickSearchBox
adb shell pm disable-user --user 0 com.android.quicksearchbox
adb shell am force-stop com.android.quicksearchbox
adb shell pm clear com.android.quicksearchbox
:: SettingsIntelligence
adb shell pm disable-user --user 0 com.android.settings.intelligence
adb shell am force-stop com.android.settings.intelligence
adb shell pm clear com.android.settings.intelligence
:: SharedStorageBackup
adb shell pm disable-user --user 0 com.android.sharedstoragebackup
adb shell am force-stop com.android.sharedstoragebackup
adb shell pm clear com.android.sharedstoragebackup
:: SimAppDialog
adb shell pm disable-user --user 0 com.android.simappdialog
adb shell am force-stop com.android.simappdialog
adb shell pm clear com.android.simappdialog
:: Stk
adb shell pm disable-user --user 0 com.android.stk
adb shell am force-stop com.android.stk
adb shell pm clear com.android.stk
:: Terminal
adb shell pm disable-user --user 0 com.android.terminal
adb shell am force-stop com.android.terminal
adb shell pm clear com.android.terminal
:: Traceur
adb shell pm disable-user --user 0 com.android.traceur
adb shell am force-stop com.android.traceur
adb shell pm clear com.android.traceur
:: UserDictionaryProvider
adb shell pm disable-user --user 0 com.android.providers.userdictionary
adb shell am force-stop com.android.providers.userdictionary
adb shell pm clear com.android.providers.userdictionary
:: VpnDialogs
adb shell pm disable-user --user 0 com.android.vpndialogs
adb shell am force-stop com.android.vpndialogs
adb shell pm clear com.android.vpndialogs
:: WallpaperBackup
adb shell pm disable-user --user 0 com.android.wallpaperbackup
adb shell am force-stop com.android.wallpaperbackup
adb shell pm clear com.android.wallpaperbackup
:: LiveWallpapersPicker
adb shell pm disable-user --user 0 com.android.wallpaper.livepicker
adb shell am force-stop com.android.wallpaper.livepicker
adb shell pm clear com.android.wallpaper.livepicker
:: AntHalService
adb shell pm disable-user --user 0 com.dsi.ant.server
adb shell am force-stop com.dsi.ant.server
adb shell pm clear com.dsi.ant.server
:: HTMLViewer
adb shell pm disable-user --user 0 com.android.htmlviewer
adb shell am force-stop com.android.htmlviewer
adb shell pm clear com.android.htmlviewer
:: WfdService
adb shell pm disable-user --user 0 com.qualcomm.wfd.service
adb shell am force-stop com.qualcomm.wfd.service
adb shell pm clear com.qualcomm.wfd.service
:: datastatusnotification
adb shell pm disable-user --user 0 com.qti.qualcomm.datastatusnotification
adb shell am force-stop com.qti.qualcomm.datastatusnotification
adb shell pm clear com.qti.qualcomm.datastatusnotification
:: CNEService
adb shell pm disable-user --user 0 com.quicinc.cne.CNEService
adb shell am force-stop com.quicinc.cne.CNEService
adb shell pm clear com.quicinc.cne.CNEService
:: SoterService
adb shell pm disable-user --user 0 com.tencent.soter.soterserver
adb shell am force-stop com.tencent.soter.soterserver
adb shell pm clear com.tencent.soter.soterserver
:: Unknown
adb shell pm disable-user --user 0 org.chromium.webview_shell
adb shell am force-stop org.chromium.webview_shell
adb shell pm clear org.chromium.webview_shell
:: DO NOT DISABLE WHEN USING PASSWORD:
:: LatinIME - com.android.inputmethod.latin
:: DO NOT DISABLE WHEN NO OTHER LAUNCHER IS USED:
:: Launcher3QuickStep - com.android.launcher3
:: DO NOT DISABLE AT FIRST BOOT:
:: OneTimeInitializer - com.android.onetimeinitializer
:: DO NOT DISABLE ON NITROGEN BECAUSE OF CRASH ON BOOT:
:: WallpaperCropper - com.android.wallpapercropper
:doze
echo.
echo Modify doze settings...
:: Remove old modified settings
adb shell settings delete global device_idle_constants
:: Enable doze
adb shell dumpsys deviceidle enable
:: To put phone in deep sleep immediately
adb shell dumpsys deviceidle force-idle
:: Modified doze settings
adb shell settings put global device_idle_constants inactive_to=15000,sensing_to=0,locating_to=0,location_accuracy=20.0,motion_inactive_to=0,idle_after_inactive_to=0,idle_pending_to=60000,max_idle_pending_to=120000,idle_pending_factor=2.0,idle_to=900000,max_idle_to=86400000,idle_factor=2.0,min_time_to_alarm=600000,max_temp_app_whitelist_duration=10000,mms_temp_app_whitelist_duration=10000,sms_temp_app_whitelist_duration=10000
:reboot
echo.
echo Press button to reboot phone...
pause
adb reboot
GuestK00264 said:
I am on NOS 10 at the moment and started with a new, in fact my old approach.
Not using Magisk or SuperSU and keeping it as default as possible.
Using adb to disable packages without removing, next step will be a short twrp cleanup script once a month for cache and other crap files.
Using the following bat file for disabling packages and setting some optimised doze settings:
Click to expand...
Click to collapse
Hi!
Why did you go back to trebuchet, is there anything wrong with librechair? I installed librechair today and I kinda like it, so I'm curious whether you found a downside or just prefer the more simplistic trebuchet..
Thanks in advance
Okay script people, i'm currently using the following to delete a font on Pie ROMs:
Code:
run_program("/sbin/mount", "/system");
ui_print(" ");
ui_print("***Working***");
delete_recursive(
"/system/fonts/NotoColorEmoji.ttf"
);
ui_print("Removing Emoji");
show_progress(8.800000, 5);
run_program("/sbin/umount", "/system");
ui_print(" ");
ui_print("Done.");
ui_print("Ready to reboot.");
How should this be adapted to work on Android 10? As far as i know the folder is now system/system/fonts which is easy to change, but is there anything that needs changing regarding the mount point now that system is root? I know that bash scripts need adapting but don't know about edify.
Thanks.
<deleted>
<deleted>
The script as using it for latest LOS18.1:
Code:
#!/sbin/sh
#
# Last modified 2022-01-01
#############################################################
clear
sleep 0.1
echo
echo "#######################################################"
echo "# ANDROID SETUP SCRIPT #"
echo "#######################################################"
echo
# User input to choose what to do
echo "Choose one of the following options:"
echo "S or s = Setup Android without cleaning"
echo "C or c = Deep clean current installation"
echo "F or f = Setup Android including deep clean"
echo "Q or q = Quit the script"
echo
while true
do
# (1) prompt user, and read command line argument
# the second line is producing a backslash to hide output
read -s -n1 answer
echo -n -e "\b \b"
# (2) handle the input we were given
case $answer in
[sS]* ) parm="1"
echo "Your choice:"
echo "Setup of Android without cleaning"
break;;
[cC]* ) parm="2"
echo "Your choice:"
echo "Deep clean of current installation"
break;;
[fF]* ) parm="3"
echo "Your choice:"
echo "Setup of Android including deep clean"
break;;
[qQ]* ) echo "Exited script"
echo
exit;;
* ) echo "Please enter an existing option...";;
esac
done
echo
echo "#######################################################"
echo
#############################################################
echo -n "First script setup..............................."
# Mount or remount drives read-write
umount /system 2>/dev/null
umount /system_root 2>/dev/null
mount -o rw /cache 2>/dev/null
mount -o rw /data 2>/dev/null
mount -o rw /sdcard 2>/dev/null
mount -o rw /system_root 2>/dev/null
# Mount vendor/firmware_mnt
if ! mountpoint -q "/system_root/system/vendor/firmware_mnt"; then
mount /dev/block/by-name/modem /system_root/system/vendor/firmware_mnt
fi
if [ ! -e "/system_root/system/vendor/firmware_mnt" ]; then
echo " done!"
echo ""
echo "ERROR:"
echo "/system/vendor not mounted correctly, exiting script"
exit
fi
echo " done!"
#############################################################
if [ "$parm" == "1" ] || [ "$parm" == "3" ]; then
echo -n "Remove some system apps, modules and services...."
applist="
AntHalService
AudioFX
BasicDreams
BluetoothMidiService
BookmarkProvider
BuiltInPrintService
CallLogBackup
CaptivePortalLogin
CarrierDefaultApp
CellBroadcastLegacyApp
CneApp
CompanionDeviceManager
CtsShimPrebuilt
CtsShimPrivPrebuilt
datastatusnotification
dpmserviceapp
DynamicSystemInstallationService
EasterEgg
Eleven
embms
Gallery2
HTMLViewer
IFAAService
InputDevices
IWlanService
Jelly
LineageSetupWizard
LineageThemesStub
LiveWallpapersPicker
ManagedProvisioning
OneTimeInitializer
PhotoTable
PowerOffAlarm
PrintRecommendationService
QuickAccessWallet
Seedvault
SimAppDialog
SoterService
Stk
Traceur
Updater
VpnDialogs
WallpaperBackup
WallpaperCropper
WAPPushManager
"
# BASIC:
# AudioFX
# Eleven
# Gallery2
# IFAAService
# Jelly
# PowerOffAlarm
# SoterService
# Updater
for appname in $applist
do
if [ -e "/system_root/system/app/$appname" ]; then
chmod -R 777 "/system_root/system/app/$appname" 2>/dev/null
rm -rf "/system_root/system/app/$appname" 2>/dev/null
fi
if [ -e "/system_root/system/priv-app/$appname" ]; then
chmod -R 777 "/system_root/system/priv-app/$appname" 2>/dev/null
rm -rf "/system_root/system/priv-app/$appname" 2>/dev/null
fi
if [ -e "/system_root/system/product/app/$appname" ]; then
chmod -R 777 "/system_root/system/product/app/$appname" 2>/dev/null
rm -rf "/system_root/system/product/app/$appname" 2>/dev/null
fi
if [ -e "/system_root/system/product/priv-app/$appname" ]; then
chmod -R 777 "/system_root/system/product/priv-app/$appname" 2>/dev/null
rm -rf "/system_root/system/product/priv-app/$appname" 2>/dev/null
fi
if [ -e "/system_root/system/system_ext/app/$appname" ]; then
chmod -R 777 "/system_root/system/system_ext/app/$appname" 2>/dev/null
rm -rf "/system_root/system/system_ext/app/$appname" 2>/dev/null
fi
if [ -e "/system_root/system/system_ext/priv-app/$appname" ]; then
chmod -R 777 "/system_root/system/system_ext/priv-app/$appname" 2>/dev/null
rm -rf "/system_root/system/system_ext/priv-app/$appname" 2>/dev/null
fi
if [ -e "/system_root/system/vendor/app/$appname" ]; then
chmod -R 777 "/system_root/system/vendor/app/$appname" 2>/dev/null
rm -rf "/system_root/system/vendor/app/$appname" 2>/dev/null
fi
done
# Remove Soter Ifaa and Alipay blobs
# https://forum.xda-developers.com/oneplus-3/how-to/guide-deblob-alipay-ifaa-tencent-soter-t4064893/
find /system_root/system ! -name "*manager*" -name "*alipay*" -name "*soter*" -name "*ifaa*" -type f -exec rm -f {} + 2>/dev/null
# Remove emergency service
rm -rf /system_root/system/apex/com.android.cellbroadcast 2>/dev/null
# Reduce fonts to the bare minimum
find /system_root/system/fonts ! -name "Roboto*.*" ! -name "DroidSansMono.ttf" ! -name "NotoColorEmoji.ttf" ! -name "NotoSansSymbols-Regular-Subsetted*.ttf" -type f -exec rm -f {} +
# Remove most overlay and related stuff
rm -rf /system_root/system/product/fonts 2>/dev/null
find /system_root/system/product/overlay -maxdepth 1 -mindepth 1 -not -name "*LineageBlackTheme*" -not -name "." -exec rm -rf {} +
echo " done!"
fi
#############################################################
if [ "$parm" == "1" ] || [ "$parm" == "3" ]; then
echo -n "Remove live display functionality................"
rm -f '/system_root/system/vendor/bin/hw/[email protected]'
rm -f '/system_root/system/vendor/etc/init/[email protected]'
found=0
startstop=0
tstr=""
nstr=""
IFS=$'\n'
while read line
do
if [[ "$line" == *'<hal'* ]]; then
startstop=1
elif [[ "$line" == *'</hal'* ]]; then
startstop=2
elif [[ "$line" == *'livedisplay'* ]]; then
found=1
fi
if [ $startstop -eq 1 ]; then
tstr="${tstr}\n${line}"
elif [ $startstop -eq 2 ]; then
tstr="${tstr}\n${line}"
if [ $found -eq 0 ]; then
nstr="${nstr}${tstr}"
else
found=0
fi
tstr=""
startstop=0
else
if [ "$nstr" == "" ]; then
nstr="${line}"
else
nstr="${nstr}\n${line}"
fi
fi
done < "/system_root/system/vendor/etc/vintf/manifest.xml"
echo "$nstr" > "/system_root/system/vendor/etc/vintf/manifest.xml"
chmod 644 "/system_root/system/vendor/etc/vintf/manifest.xml"
echo " done!"
fi
#############################################################
if [ "$parm" == "1" ] || [ "$parm" == "3" ]; then
if [ -e /sdcard/Config/System/arm64_SystemWebView.apk ]; then
echo -n "Adding Bromite webview (install also after boot!)"
cp -f /sdcard/Config/System/arm64_SystemWebView.apk /system_root/system/product/app/webview/webview.apk
chmod 644 /system_root/system/product/app/webview/webview.apk
echo " done!"
fi
fi
#############################################################
if [ "$parm" == "1" ] || [ "$parm" == "3" ]; then
if [ -e /sdcard/Config/System/bootanimation.zip ]; then
echo -n "Adding customized boot animation................."
rm -f /system_root/system/media/bootanimation.zip
cp -f /sdcard/Config/System/bootanimation.zip /system_root/system/media/bootanimation.zip
chmod 644 /system_root/system/media/bootanimation.zip
echo " done!"
fi
fi
#############################################################
if [ "$parm" == "1" ] || [ "$parm" == "3" ]; then
echo -n "Adding optimised build.prop settings............."
iname="/system_root/system/vendor/build.prop"
jname="/system_root/system/build.prop"
kname="/system_root/system/product/build.prop"
lname="/system_root/system/system_ext/build.prop"
# Replace 3250mv by 3400mv for battery
sed -i 's/3250/3400/g' $jname
# Disable iwlan in build.prop as we actually removed the apk
sed -i 's/persist.data.iwlan.enable=true/persist.data.iwlan.enable=false/g' $jname
# Disable CNE in build.prop as we actually removed the apk
sed -i 's/persist.vendor.cne.feature=1/persist.vendor.cne.feature=0/g' $jname
# Remove all settings we are using in build.prop files
proplist="
persist.vendor.cne.feature
logcat.live
ro.config.nocheckin
profiler.force_disable_err_rpt
profiler.force_disable_ulog
pm.sleep_mode
ro.ril.disable.power.collapse
ro.ril.power_collapse
persist.android.strictmode
ro.kernel.checkjni
ro.kernel.android.checkjni
dalvik.vm.checkjni
dalvik.vm.dexopt-data-only
dalvik.vm.verify-bytecode
dalvik.vm.dexopt-flags
dalvik.vm.execution-mode
ro.mot.eri.losalert.delay
wifi.supplicant_scan_interval
debug.composition.type
debug.sf.hw
persist.debug.wfd.enable
ro.sf.lcd_density
hwui.disable_vsync
debug.sf.no_hw_vsync
hwui.render_dirty_regions
persist.sys.use_dithering
ro.build.selinux
ro.debuggable
ro.secure
ro.build.tags
ro.product.build.tags
ro.system.build.tags
ro.system_ext.build.tags
ro.vendor.build.tags
ro.build.type
ro.product.build.type
ro.system.build.type
ro.system_ext.build.type
ro.vendor.build.type
ro.build.version.security_patch
ro.vendor.build.security_patch
fw.max_users
fw.power_user_switcher
fw.show_hidden_users
fw.show_multiuserui
audio.safemedia.bypass
persist.adb.notify
"
for propname in $proplist
do
tmpvar1=$(sed "/$propname/d" $iname)
echo "$tmpvar1" > $iname
tmpvar2=$(sed "/$propname/d" $jname)
echo "$tmpvar2" > $jname
tmpvar3=$(sed "/$propname/d" $kname)
echo "$tmpvar3" > $kname
tmpvar4=$(sed "/$propname/d" $lname)
echo "$tmpvar4" > $lname
done
# Now add or replace settings
tmpvar5=$(sed '/.*My settings.*/{s///;q;}' $iname | sed '$d')
echo "$tmpvar5" > $iname
echo '
# My settings
# LOGGING & ERRORS
logcat.live=disable
ro.config.nocheckin=1
profiler.force_disable_err_rpt=1
profiler.force_disable_ulog=1
# EFFICIENCY
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
ro.ril.power_collapse=1
persist.android.strictmode=0
ro.kernel.checkjni=0
ro.kernel.android.checkjni=0
dalvik.vm.checkjni=false
dalvik.vm.dexopt-data-only=1
dalvik.vm.verify-bytecode=false
dalvik.vm.dexopt-flags=v=n,o=a,u=y
dalvik.vm.execution-mode=int:jit
ro.mot.eri.losalert.delay=1000
wifi.supplicant_scan_interval=360
debug.composition.type=gpu
debug.sf.hw=1
# MIRACAST DISABLE
persist.debug.wfd.enable=0
# SCREEN
ro.sf.lcd_density=432
hwui.disable_vsync=true
debug.sf.no_hw_vsync=1
hwui.render_dirty_regions=false
persist.sys.use_dithering=0
# SECURITY SPOOFING
ro.build.selinux=0
ro.debuggable=0
ro.secure=1
ro.build.tags=release-keys
ro.product.build.tags=release-keys
ro.system.build.tags=release-keys
ro.system_ext.build.tags=release-keys
ro.vendor.build.tags=release-keys
ro.build.type=user
ro.product.build.type=user
ro.system.build.type=user
ro.system_ext.build.type=user
ro.vendor.build.type=user
ro.build.version.security_patch=2022-01-03
ro.vendor.build.security_patch=2022-01-03
# SINGLE USER
fw.max_users=1
fw.power_user_switcher=0
fw.show_hidden_users=0
fw.show_multiuserui=0
# WARNINGS
audio.safemedia.bypass=true
persist.adb.notify=0
' >> $iname
chmod 644 $iname
chmod 644 $jname
chmod 644 $kname
chmod 644 $lname
echo " done!"
fi
#############################################################
if [ "$parm" == "1" ] || [ "$parm" == "3" ]; then
echo -n "Adding optimised gps.conf settings..............."
rm -f "/system_root/system/vendor/etc/gps.conf"
rm -f "/system_root/system/etc/gps_debug.conf"
touch "/system_root/system/vendor/etc/gps.conf"
echo '# My secure gps only settings
# NTP Server - only one allowed!
NTP_SERVER=nl.pool.ntp.org
# Standalone mode
SUPL_MODE=0
# Disable AGPS injection
AGPS_CONFIG_INJECT=0
# No XTRA testing
XTRA_TEST_ENABLED=0
# AGPS secure settings
SUPL_HOST=localhost
SUPL_PORT=7275
SUPL_TLS_HOST=localhost
# Accuracy all better then 5000m
ACCURACY_THRES=5000
# Give position immediately also without lock
INTERMEDIATE_POS=1
# Debug level
DEBUG_LEVEL=0
# GPS lock for privacy when switched off
GPS_LOCK=3
# Disable emergency SUPL
SUPL_ES=0
# End of my settings
' > "/system_root/system/vendor/etc/gps.conf"
cp -f "/system_root/system/vendor/etc/gps.conf" "/system_root/system/etc/gps_debug.conf"
chmod 644 "/system_root/system/vendor/etc/gps.conf"
chmod 644 "/system_root/system/etc/gps_debug.conf"
echo " done!"
fi
#############################################################
if [ "$parm" == "2" ] || [ "$parm" == "3" ]; then
echo -n "Cleanup system files............................."
# file list to cleanup
filelist="
/cache
/data/anr
/data/backup
/data/cache
/data/dalvik-cache
/data/local/tmp
/data/lost+found
/data/misc/bootstat
/data/ota
/data/ota_package
/data/resource-cache
/data/system/battery-history
/data/system/battery-saver
/data/system/batterystats-checkin.bin
/data/system/batterystats-daily.bin
/data/system/batterystats.bin
/data/system/dropbox
/data/system/graphicsstats
/data/system/install_sessions.xml
/data/system/last-fstrim
/data/system/package_cache
/data/system/procstats
/data/system/syncmanager-log
/data/system/uiderrors.txt
/data/system/usagestats/0/daily
/data/system/usagestats/0/monthly
/data/system/usagestats/0/weekly
/data/system/usagestats/0/yearly
/data/tombstones
/data/xtended_updates
/sdcard/DCIM/.thumbnails
/sdcard/Movies/.thumbnails
/sdcard/Music/.thumbnails
/sdcard/Pictures/.thumbnails
"
for filename in $filelist
do
if [ -d "$filename" ]; then
chmod -R 777 "$filename" 2>/dev/null
rm -rf "${filename:?}"/* 2>/dev/null
fi
if [ -f "$filename" ]; then
chmod 777 "$filename" 2>/dev/null
rm -f "$filename" 2>/dev/null
fi
done
# Remove bak, log, tmp files in /system
find /system_root/system -name "*.bak" -name "*.log" -name "*.tmp" -exec rm -f {} + 2>/dev/null
# Misc stuff
rm -f "/system_root/system/vendor/recovery-from-boot.p" 2>/dev/null
rm -f "/system_root/system/vendor/recovery-from-boot.bak" 2>/dev/null
# App specific
rm -rf /data/data/com.abnamro.nl.mobile.payments/app_dex/oat/arm64/* 2>/dev/null
rm -rf /data/data/org.fdroid.fdroid/files/*.apk 2>/dev/null
rm -rf /data/data/org.videolan.vlc/app_vlc/* 2>/dev/null
# Battery stuff
rm -rf /data/system/batt*.* 2>/dev/null
rm -rf /data/system/batt* 2>/dev/null
echo " done!"
fi
#############################################################
if [ "$parm" == "2" ] || [ "$parm" == "3" ]; then
echo -n "Cleanup app data................................."
# Remove bak, log, tmp, odex, vdex files
find /data -iname "*.bak" -iname "*.log" -iname "*.tmp" -iname "*.odex" -iname "*.vdex" -exec rm -f {} + 2>/dev/null
find /sdcard -iname "*.bak" -iname "*.log" -iname "*.tmp" -iname "*.odex" -iname "*.vdex" -exec rm -f {} + 2>/dev/null
# Some app file cleanup
for i in $(ls /data/data/)
do
if [ -e /data/data/"$i"/cache ]; then
chmod -R 777 /data/data/"$i"/cache 2>/dev/null
rm -rf /data/data/"$i"/cache/* 2>/dev/null
fi
if [ -e /data/data/"$i"/code_cache ]; then
chmod -R 777 /data/data/"$i"/code_cache 2>/dev/null
rm -rf /data/data/"$i"/code_cache/* 2>/dev/null
fi
if [ -e /data/data/"$i"/files/.Fabric ]; then
chmod -R 777 /data/data/"$i"/files/.Fabric 2>/dev/null
rm -rf /data/data/"$i"/files/.Fabric/* 2>/dev/null
fi
if [ -e /data/data/"$i"/files/cache ]; then
chmod -R 777 /data/data/"$i"/files/cache 2>/dev/null
rm -rf /data/data/"$i"/files/cache/* 2>/dev/null
fi
if [ -e /data/data/"$i"/app_webview ]; then
find /data/data/"$i"/app_webview ! -name "Cookies*" -type f -exec rm -f {} + 2>/dev/null
find /data/data/"$i"/app_webview -type d -depth -exec rmdir {} + 2>/dev/null
fi
done
for k in $(ls /sdcard/Android/data/)
do
if [ -e /sdcard/Android/data/"$k"/cache ]; then
chmod -R 777 /sdcard/Android/data/"$k"/cache 2>/dev/null
rm -rf /sdcard/Android/data/"$k"/cache/* 2>/dev/null
fi
done
# App specific
rm -rf /data/data/com.abnamro.nl.mobile.payments/app_dex/oat/arm64/* 2>/dev/null
rm -rf /data/data/org.fdroid.fdroid/files/*.apk 2>/dev/null
rm -rf /data/data/org.videolan.vlc/app_vlc/* 2>/dev/null
echo " done!"
fi
#############################################################
if [ "$parm" == "2" ] || [ "$parm" == "3" ]; then
echo -n "Cleanup empty directories........................"
# Remove empty directories
find /sdcard ! -name "*Downloads*" ! -name "*Camera*" -type d -depth -exec rmdir {} + 2>/dev/null
# Just to be sure they are (still) there...
mkdir /sdcard/Download 2>/dev/null
mkdir -p /sdcard/DCIM/Camera 2>/dev/null
chmod -R 770 /sdcard/Download 2>/dev/null
chmod -R 770 /sdcard/DCIM 2>/dev/null
echo " done!"
fi
#############################################################
echo -n "Optimising app databases........................."
# Optimize databases
for i in $(find /data -name "*.db" -type f)
do
sqlite3 "$i" "VACUUM;" 2>/dev/null
sqlite3 "$i" "REINDEX;" 2>/dev/null
done
for i in $(find /sdcard -name "*.db" -type f)
do
sqlite3 "$i" "VACUUM;" 2>/dev/null
sqlite3 "$i" "REINDEX;" 2>/dev/null
done
echo " done!"
#############################################################
# If available, run fstrim to optimise disks
if [ -e /sdcard/Config/System/fstrim ]; then
echo -n "Optimising disks using fstrim...................."
chmod 777 /sdcard/Config/System/fstrim
/sdcard/Config/System/fstrim /cache 2>/dev/null
/sdcard/Config/System/fstrim /data 2>/dev/null
/sdcard/Config/System/fstrim /sdcard 2>/dev/null
/sdcard/Config/System/fstrim /system 2>/dev/null
echo " done!"
fi
#############################################################
echo -n "Let us finish and unmount disks.................."
umount /system_root/system/vendor/firmware_mnt
umount /system 2>/dev/null
umount /system_root 2>/dev/null
echo " done!"
#############################################################
# User input to choose what to do
echo
echo "#######################################################"
echo
echo "Script completed, what now?"
echo "R or r = Reboot to system"
echo "Q or q = Quit the script"
echo
while true
do
# (1) prompt user, and read command line argument
# the second line is producing a backslash to hide output
read -s -n1 answer
echo -n -e "\b \b"
# (2) handle the input we were given
case $answer in
[rR]* ) echo "Your choice:"
echo "Reboot to system"
echo
sleep 0.5
reboot;;
[qQ]* ) echo "Your choice:"
echo "Quit the script"
echo
exit;;
* ) echo "Please enter an existing option...";;
esac
done
echo

Need help with errors when finishing the build (CM-14.1)

For the past weeks I've been trying to compile lineage 14.1 (cm-14.1 branch) for my phone and I'm getting this error:
https://pastebin.com/ChEsxc8n
Code:
[ 98% 857/872] Target boot image: /home/fr...d/Lineage/out/target/product/Z01M/boot.img
/home/frost/Android/Lineage/out/target/product/Z01M/boot.img maxsize=68395008 blocksize=135168 total=24012800 reserve=811008
[ 98% 858/872] ----- Making recovery ramdisk ------
Copying baseline ramdisk...
Modifying ramdisk contents...
cp: cannot stat '/home/frost/Android/Lineage/out/target/product/Z01M/root/init.recovery.*.rc': No such file or directory
----- Making uncompressed recovery ramdisk ------
[ 98% 860/872] ----- Making recovery image ------
+/home/frost/Android/Lineage/out/target/product/Z01M/recovery.img maxsize=68395008 blocksize=135168 total=30031872 reserve=811008
----- Made recovery image: /home/frost/Android/Lineage/out/target/product/Z01M/recovery.img --------
[ 99% 864/872] build /home/frost/Android/L...ge/out/target/product/Z01M/obj/NOTICE.html
Combining NOTICE files into HTML
Combining NOTICE files into text
[ 99% 867/872] Construct recovery from boot
failed to reconstruct target deflate chunk 1 [(null)]; treating as normal
chunk 0: type 0 start 0 len 22478858
chunk 1: type 2 start 22478858 len 3942144
chunk 2: type 0 start 24012269 len 531
Construct patches for 3 chunks...
patch 0 is 215 bytes (of 22478858)
patch 1 is 5215187 bytes (of 1533411)
patch 2 is 181 bytes (of 531)
chunk 0: normal ( 0, 22478858) 215
chunk 1: deflate ( 22478858, 7552091) 5215187 (null)
chunk 2: normal ( 30030949, 923) 181
[ 99% 868/872] Target system fs image: /ho...AGING/systemimage_intermediates/system.img
BuildImage: in_dir = /home/frost/Android/Lineage/out/target/product/Z01M/system, out_file = /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/systemimage_intermediates/system.img
fs type is not ext4
Running: mkuserimg.sh -s /home/frost/Android/Lineage/out/target/product/Z01M/system /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/systemimage_intermediates/system.img ext4 system 4831838208 -D /home/frost/Android/Lineage/out/target/product/Z01M/system -L system /home/frost/Android/Lineage/out/target/product/Z01M/root/file_contexts.bin
make_ext4fs -s -T -1 -S /home/frost/Android/Lineage/out/target/product/Z01M/root/file_contexts.bin -L system -l 4831838208 -a system /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/systemimage_intermediates/system.img /home/frost/Android/Lineage/out/target/product/Z01M/system /home/frost/Android/Lineage/out/target/product/Z01M/system
Creating filesystem with parameters:
Size: 4831838208
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 18432
Label: system
Blocks: 1179648
Block groups: 36
Reserved block group size: 287
Created filesystem with 5340/294912 inodes and 362434/1179648 blocks
Running ['mkuserimg.sh', '-s', '/home/frost/Android/Lineage/out/target/product/Z01M/system', '/home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/systemimage_intermediates/system.img', 'ext4', 'system', '4831838208', '-D', '/home/frost/Android/Lineage/out/target/product/Z01M/system', '-L', 'system', '/home/frost/Android/Lineage/out/target/product/Z01M/root/file_contexts.bin'] command, exit code = 0
[ 99% 869/872] Install system fs image: /h...Lineage/out/target/product/Z01M/system.img
/home/frost/Android/Lineage/out/target/product/Z01M/system.img+/home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=4932956160 blocksize=135168 total=1408239079 reserve=49876992
[ 99% 870/872] Package target files: /home...iates/aosp_Z01M-target_files-eng.frost.zip
FAILED: /bin/bash -c "(rm -rf /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost.zip /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost ) && (mkdir -p /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/ /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost ) && (mkdir -p /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/RECOVERY ) && (if [ -d \"/home/frost/Android/Lineage/out/target/product/Z01M/recovery/root\" -a \"\$(ls -A /home/frost/Android/Lineage/out/target/product/Z01M/recovery/root)\" ]; then mkdir -p /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/RECOVERY/RAMDISK && /home/frost/Android/Lineage/out/host/linux-x86/bin/acp -rd /home/frost/Android/Lineage/out/target/product/Z01M/recovery/root/* /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/RECOVERY/RAMDISK; fi ) && (if [ -d \"/home/frost/Android/Lineage/out/target/product/Z01M/install\" -a \"\$(ls -A /home/frost/Android/Lineage/out/target/product/Z01M/install)\" ]; then mkdir -p /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/INSTALL && /home/frost/Android/Lineage/out/host/linux-x86/bin/acp -rd /home/frost/Android/Lineage/out/target/product/Z01M/install/* /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/INSTALL; fi ) && (/home/frost/Android/Lineage/out/host/linux-x86/bin/acp /home/frost/Android/Lineage/out/target/product/Z01M/kernel /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/RECOVERY/kernel ) && (echo \"0x00000100\" > /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/RECOVERY/tags_offset ) && (echo \"cmd_line='console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.bootdevice=7824900.sdhci earlycon=msm_hsl_uart,0x78af000 androidboot.selinux=permissive buildvariant=eng\" > /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/RECOVERY/cmdline ) && (echo \"0x80000000\" > /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/RECOVERY/base ) && (echo \"2048\" > /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/RECOVERY/pagesize ) && (echo \"0x01000000\" > /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/RECOVERY/ramdisk_offset ) && (mkdir -p /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/BOOT ) && (if [ -d \"/home/frost/Android/Lineage/out/target/product/Z01M/root\" -a \"\$(ls -A /home/frost/Android/Lineage/out/target/product/Z01M/root)\" ]; then mkdir -p /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/BOOT/RAMDISK && /home/frost/Android/Lineage/out/host/linux-x86/bin/acp -rd /home/frost/Android/Lineage/out/target/product/Z01M/root/* /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/BOOT/RAMDISK; fi ) && (/home/frost/Android/Lineage/out/host/linux-x86/bin/acp /home/frost/Android/Lineage/out/target/product/Z01M/kernel /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/BOOT/kernel ) && (echo \"0x00000100\" > /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/BOOT/tags_offset ) && (echo \"cmd_line='console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.bootdevice=7824900.sdhci earlycon=msm_hsl_uart,0x78af000 androidboot.selinux=permissive buildvariant=eng\" > /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/BOOT/cmdline ) && (echo \"0x80000000\" > /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/BOOT/base ) && (echo \"2048\" > /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/BOOT/pagesize ) && (echo \"0x01000000\" > /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/BOOT/ramdisk_offset ) && (if [ -d \"/home/frost/Android/Lineage/out/target/product/Z01M/system\" -a \"\$(ls -A /home/frost/Android/Lineage/out/target/product/Z01M/system)\" ]; then mkdir -p /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/SYSTEM && /home/frost/Android/Lineage/out/host/linux-x86/bin/acp -rd /home/frost/Android/Lineage/out/target/product/Z01M/system/* /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/SYSTEM; fi ) && (if [ -d \"/home/frost/Android/Lineage/out/target/product/Z01M/data\" -a \"\$(ls -A /home/frost/Android/Lineage/out/target/product/Z01M/data)\" ]; then mkdir -p /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/DATA && /home/frost/Android/Lineage/out/host/linux-x86/bin/acp -rd /home/frost/Android/Lineage/out/target/product/Z01M/data/* /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/DATA; fi ) && (mkdir -p /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/BOOTABLE_IMAGES ) && (/home/frost/Android/Lineage/out/host/linux-x86/bin/acp /home/frost/Android/Lineage/out/target/product/Z01M/boot.img /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/BOOTABLE_IMAGES/ ) && (/home/frost/Android/Lineage/out/host/linux-x86/bin/acp /home/frost/Android/Lineage/out/target/product/Z01M/recovery.img /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/BOOTABLE_IMAGES/ ) && (mkdir -p /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/OTA ) && (/home/frost/Android/Lineage/out/host/linux-x86/bin/acp /home/frost/Android/Lineage/out/target/product/Z01M/android-info.txt /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/OTA/ ) && (mkdir -p /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/OTA/bin ) && (/home/frost/Android/Lineage/out/host/linux-x86/bin/acp /home/frost/Android/Lineage/out/target/product/Z01M/obj/EXECUTABLES/updater_intermediates/updater /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/OTA/bin/ ) && (mkdir -p /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META ) && (/home/frost/Android/Lineage/out/host/linux-x86/bin/acp /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/apkcerts_intermediates/aosp_Z01M-apkcerts-eng.frost.txt /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/apkcerts.txt ) && (if test -e device/asus/Z01M/../common/releasetools.py; then /home/frost/Android/Lineage/out/host/linux-x86/bin/acp device/asus/Z01M/../common/releasetools.py /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/; fi ) && (echo \"\" > /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/otakeys.txt ) && (/home/frost/Android/Lineage/out/host/linux-x86/bin/acp /home/frost/Android/Lineage/out/target/product/Z01M/root/file_contexts.bin /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/file_contexts.bin ) && (echo \"recovery_api_version=3\" > /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"fstab_version=2\" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"blocksize=131072\" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"boot_size=67108864 \" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"recovery_as_boot=\" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"recovery_size=67108864 \" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"recovery_mount_options=ext4=max_batch_time=0,commit=1,data=ordered,barrier=1,errors=panic,nodelalloc\" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"tool_extensions=device/asus/Z01M/../common\" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"default_system_dev_certificate=build/target/product/security/testkey\" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"extra_recovery_keys=vendor/cm/build/target/product/security/lineage\" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo 'mkbootimg_args=' >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo 'mkbootimg_version_args=--os_version 7.1.2 --os_patch_level 2020-08-05' >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"use_set_metadata=1\" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"multistage_support=1\" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"update_rename_support=1\" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"blockimgdiff_versions=1,2,3,4\" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"fs_type=ext4\" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"system_size=4831838208 \" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"userdata_size=56614698496 \" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"cache_fs_type=ext4\" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"cache_size=134217728 \" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"extfs_sparse_flag=-s\" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"squashfs_sparse_flag=-s\" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (echo \"selinux_fc=/home/frost/Android/Lineage/out/target/product/Z01M/root/file_contexts.bin\" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && (PATH=/home/frost/Android/Lineage/out/host/linux-x86/bin/:\$PATH MKBOOTIMG=/home/frost/Android/Lineage/out/host/linux-x86/bin/mkbootimg ./build/tools/releasetools/make_recovery_patch /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost ) && (vendor/cm/build/tools/getb64key.py build/target/product/security/testkey.x509.pem > /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/releasekey.txt ) && (echo \"ota_override_device=Z01M,ASUS_Z01M,Z01MD,ASUS_Z01MD,ZD552KL\" >> /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/misc_info.txt ) && ((cd /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost && zip -qryX ../aosp_Z01M-target_files-eng.frost.zip ./META && zip -qryXu ../aosp_Z01M-target_files-eng.frost.zip .) ) && (zipinfo -1 /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost.zip | awk 'BEGIN { FS=\"SYSTEM/\" } /^SYSTEM\\// {print \"system/\" \$2}' | /home/frost/Android/Lineage/out/host/linux-x86/bin/fs_config -C -D /home/frost/Android/Lineage/out/target/product/Z01M/system -S /home/frost/Android/Lineage/out/target/product/Z01M/root/file_contexts.bin > /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/filesystem_config.txt ) && (zipinfo -1 /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost.zip | awk 'BEGIN { FS=\"VENDOR/\" } /^VENDOR\\// {print \"vendor/\" \$2}' | /home/frost/Android/Lineage/out/host/linux-x86/bin/fs_config -C -D /home/frost/Android/Lineage/out/target/product/Z01M/system -S /home/frost/Android/Lineage/out/target/product/Z01M/root/file_contexts.bin > /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/vendor_filesystem_config.txt ) && (zipinfo -1 /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost.zip | awk 'BEGIN { FS=\"BOOT/RAMDISK/\" } /^BOOT\\/RAMDISK\\// {print \$2}' | /home/frost/Android/Lineage/out/host/linux-x86/bin/fs_config -C -D /home/frost/Android/Lineage/out/target/product/Z01M/system -S /home/frost/Android/Lineage/out/target/product/Z01M/root/file_contexts.bin > /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/boot_filesystem_config.txt ) && (zipinfo -1 /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost.zip | awk 'BEGIN { FS=\"RECOVERY/RAMDISK/\" } /^RECOVERY\\/RAMDISK\\// {print \$2}' | /home/frost/Android/Lineage/out/host/linux-x86/bin/fs_config -C -D /home/frost/Android/Lineage/out/target/product/Z01M/system -S /home/frost/Android/Lineage/out/target/product/Z01M/root/file_contexts.bin > /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost/META/recovery_filesystem_config.txt ) && ((cd /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost && zip -qX ../aosp_Z01M-target_files-eng.frost.zip META/*filesystem_config.txt) ) && (PATH=/home/frost/Android/Lineage/out/host/linux-x86/bin/:\$PATH MKBOOTIMG=/home/frost/Android/Lineage/out/host/linux-x86/bin/mkbootimg ./build/tools/releasetools/add_img_to_target_files -a -v -p /home/frost/Android/Lineage/out/host/linux-x86 /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost.zip )"
using prebuilt recovery.img from BOOTABLE_IMAGES...
using prebuilt boot.img from BOOTABLE_IMAGES...
running: unzip -o -q /home/frost/Android/Lineage/out/target/product/Z01M/obj/PACKAGING/target_files_intermediates/aosp_Z01M-target_files-eng.frost.zip -d /tmp/targetfiles-ajXmds
++++ boot ++++
using prebuilt boot.img from BOOTABLE_IMAGES...
++++ recovery ++++
using prebuilt recovery.img from BOOTABLE_IMAGES...
++++ recovery (two-step image) ++++
building image from target_files RECOVERY...
running: mkbootfs -f /tmp/targetfiles-ajXmds/META/recovery_filesystem_config.txt /tmp/targetfiles-ajXmds/RECOVERY/RAMDISK
running: minigzip
running: /home/frost/Android/Lineage/out/host/linux-x86/bin/mkbootimg --kernel /tmp/targetfiles-ajXmds/RECOVERY/kernel --cmdline cmd_line='console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.bootdevice=7824900.sdhci earlycon=msm_hsl_uart,0x78af000 androidboot.selinux=permissive buildvariant=eng --base 0x80000000 --tags_offset 0x00000100 --ramdisk_offset 0x01000000 --pagesize 2048 --os_version 7.1.2 --os_patch_level 2020-08-05 --ramdisk /tmp/tmpzITR1e --output /tmp/tmpeIubBx
++++ system ++++
creating system.img...
BuildImage: in_dir = /tmp/targetfiles-ajXmds/system, out_file = /tmp/system-jMQMgY.img
fs type is not ext4
Running: mkuserimg.sh -s /tmp/targetfiles-ajXmds/system /tmp/system-jMQMgY.img ext4 system 4831838208 -T 1230778800 -C /tmp/targetfiles-ajXmds/META/filesystem_config.txt -B /tmp/system-blocklist-rMJHYe.map -L system /tmp/targetfiles-ajXmds/META/file_contexts.bin
make_ext4fs -s -T 1230778800 -S /tmp/targetfiles-ajXmds/META/file_contexts.bin -C /tmp/targetfiles-ajXmds/META/filesystem_config.txt -B /tmp/system-blocklist-rMJHYe.map -L system -l 4831838208 -a system /tmp/system-jMQMgY.img /tmp/targetfiles-ajXmds/system
loaded 5331 fs_config entries
Creating filesystem with parameters:
Size: 4831838208
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 18432
Label: system
Blocks: 1179648
Block groups: 36
Reserved block group size: 287
Created filesystem with 5341/294912 inodes and 362846/1179648 blocks
Running ['mkuserimg.sh', '-s', '/tmp/targetfiles-ajXmds/system', '/tmp/system-jMQMgY.img', 'ext4', 'system', '4831838208', '-T', '1230778800', '-C', '/tmp/targetfiles-ajXmds/META/filesystem_config.txt', '-B', '/tmp/system-blocklist-rMJHYe.map', '-L', 'system', '/tmp/targetfiles-ajXmds/META/file_contexts.bin'] command, exit code = 0
++++ userdata ++++
creating userdata.img...
BuildImage: in_dir = /tmp/tmpsrG8BS/data, out_file = /tmp/tmpoSlGmd
fs type is not ext4
Running: mkuserimg.sh -s /tmp/tmpsrG8BS/data /tmp/tmpoSlGmd ext4 data 56614698496 -T 1230778800 -L data /tmp/targetfiles-ajXmds/META/file_contexts.bin
make_ext4fs -s -T 1230778800 -S /tmp/targetfiles-ajXmds/META/file_contexts.bin -L data -l 56614698496 -a data /tmp/tmpoSlGmd /tmp/tmpsrG8BS/data
Creating filesystem with parameters:
Size: 56614694912
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 32768
Label: data
Blocks: 13821947
Block groups: 422
Reserved block group size: 1024
Created filesystem with 11/3457024 inodes and 263056/13821947 blocks
Running ['mkuserimg.sh', '-s', '/tmp/tmpsrG8BS/data', '/tmp/tmpoSlGmd', 'ext4', 'data', '56614698496', '-T', '1230778800', '-L', 'data', '/tmp/targetfiles-ajXmds/META/file_contexts.bin'] command, exit code = 0
userdata size (14) is 0.00% of limit (56614698496)
++++ extrauserdata ++++
++++ cache ++++
creating cache.img...
Traceback (most recent call last):
File "./build/tools/releasetools/add_img_to_target_files", line 554, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/add_img_to_target_files", line 548, in main
AddImagesToTargetFiles(args[0])
File "./build/tools/releasetools/add_img_to_target_files", line 476, in AddImagesToTargetFiles
AddCache(output_zip)
File "./build/tools/releasetools/add_img_to_target_files", line 375, in AddCache
image_props["fs_type"] = fstab["/cache"].fs_type
KeyError: '/cache'
ninja: build stopped: subcommand failed.
make: *** [build/core/ninja.mk:152: ninja_wrapper] Error 1
make: Leaving directory '/home/frost/Android/Lineage'
#### make failed to build some targets (17:07 (mm:ss)) ####
Device Tree: https://github.com/2003Frost/android_device_asus_Z01M/tree/cm-14.1
Vendor: https://github.com/2003Frost/proprietary_vendor_asus_Z01M
Kernel: https://github.com/2003Frost/android_kernel_asus_Z01M
I've been stuck on this for a while now, so any help is appreciated.
0

Categories

Resources