[Nexus 4 Original Android Development] dennis369:
Before this ROM will install, it runs a scripts called repartition.sh

This script checks the exact size (in bytes) of the /system, /cache, and /data partitions.

If any do not match precisely then it will refuse to install. If they do match then it simply deletes the /system and /cache partitions and recreates them, with a larger /system and smaller /cache partition.

I had previously followed some instructions posted elsewhere in these forums on how to manually do this partition resizing. However, manually restoring the partitions back to original sizes (in megabytes), the ROM refused to install because the byte count was not exactly the same. :( I had to go in and edit the repartition.sh script removing the checks so that it would proceed. These checks are way too granular IMHO. Since the script is simply going to delete and recreate the partitions anyway, checking the sizes in MB would be sufficient and avoid problems.

With the current repartition.sh script repartitioning will

only

be done after all other checks to /data /cache /system pass AND the size of the /system partition is exactly 880803840B (pulled from script) B designates size in bytes. If the size of /system is exactly 1333788672B, which is the target size, only then will the script will proceed to installing the ROM.

Update: For those who've run into the your partitions seem to be modified error, I offer the following solution. I have modified by drastically simplifying the repartition.sh script to only check whether the size of the /system partition is the target size of 1334MB. If not, repartition /system and /cache and reboot to recovery. Install ROM again, /system will now be the target size and installation will continue. Save the content below as repartition.sh and replace the original located in \install\bin\ in ROM zip file.

#!/sbin/sh
# Copyright (c) 2019, The LineageOS Project
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the LineageOS Project nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

repartition=0

parted="/tmp/parted"

# Check for /system partition size
$parted /dev/block/mmcblk0p21 unit mb p quit -> /tmp/sizecheck

if grep "1334MB" /tmp/sizecheck > /dev/null
then
repartition=0
else
repartition=1
fi

if [ $repartition == 1 ]
then
echo "Resizing system and cache partitions..."

umount /system
umount /cache

$parted /dev/block/mmcblk0 rm 21
$parted /dev/block/mmcblk0 rm 22
$parted /dev/block/mmcblk0 mkpart primary 159383552B 1493172223B
$parted /dev/block/mmcblk0 name 21 system
$parted /dev/block/mmcblk0 mkpart primary 1493172224B 1627389951B
$parted /dev/block/mmcblk0 name 22 cache

echo "Formatting system and cache partitions..."
mke2fs -b 4096 -T ext4 /dev/block/mmcblk0p21
mke2fs -b 4096 -T ext4 /dev/block/mmcblk0p22

ln -sf /dev/block/mmcblk0p21 system
ln -sf /dev/block/mmcblk0p22 cache

mount /system
mount /cache

echo "Done!"

# Just reboot recovey for now until better solution to reread partition table
reboot recovery
fi

exit 1

Installation script issues aside, ROM is running great on my Mako. :fingers-crossed:

Installed Pico gapps initially, but since the ROM repartitions storage it's likely you could install one of the larger gapps packages.

Magisk seems to only install correctly by downloading and launching the .apk after system is up and running.

Root works as expected on several apps I run such as DHCPv6 and Root Explorer.