A method to offload /system/app to /preinstall
Hello! I would like to share some knowledge about Atrix 2, especially about using the KitKat port by alteredlikeness on it. If you want to install the ROM on System 1, you face some problems with free space. There is no space to install Google Apps, even the micro modular one. Fortunately, there are unused partitions on the device, like /cache and /preinstall. We can benefit from using it.
Also, I recommend installing custom ROMs on JB Leak 3 firmware. It has better partition layout than the stock ICS (big data partition, relatively small cache partition).
Let's go straight to the facts. To offload the system apps to /preinstall partition you need to edit this file:
remount /system as read-write and add the following code after this line:
/bb translate -i $MNT $BLK $STR $SYSN > $1/init.fs.rc
this needs to be added:
echo exec /bb mount -o remount rw /system >>$1/init.fs.rc
echo exec /bb mkdir -p /preinstall/system/app >>$1/init.fs.rc
echo exec /bb mkdir -p /preinstall/system/priv-app >>$1/init.fs.rc
echo exec /bb cp /system/app/* /preinstall/system/app >>$1/init.fs.rc
echo exec /bb cp /system/priv-app/* /preinstall/system/priv-app >>$1/init.fs.rc
echo exec /bb rm /system/app/* >>$1/init.fs.rc
echo exec /bb rm /system/priv-app/* >>$1/init.fs.rc
echo exec /bb mount --bind /preinstall/system/app /system/app >>$1/init.fs.rc
echo exec /bb mount --bind /preinstall/system/priv-app /system/priv-app >>$1/init.fs.rc
On each reboot, it will look for apps in /system/app and move them to /preinstall/system/app and bind that folder to /system/app. Binding works stable, symlinks are not working at all in this case. Don't know why, apps always crashed if I used symlinks.
This all is useful if you want to install custom ROM on System 1.