Post Reply

A method to offload /system/app to /preinstall

OP timjosten

28th March 2014, 06:25 PM   |  #1  
OP Junior Member
Thanks Meter: 10
 
12 posts
Join Date:Joined: Mar 2014
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:
/system/etc/bmm/script/boot.sh

remount /system as read-write and add the following code after this line:
Code:
/bb translate -i $MNT $BLK $STR $SYSN > $1/init.fs.rc
this needs to be added:
Code:
  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.
Last edited by timjosten; 16th April 2014 at 09:41 AM.
The Following 4 Users Say Thank You to timjosten For This Useful Post: [ View ]
29th March 2014, 02:22 PM   |  #2  
devilhunter47's Avatar
Senior Member
Flag Kottayam
Thanks Meter: 241
 
869 posts
Join Date:Joined: Jun 2012
More
Quote:
Originally Posted by timjosten

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:
/system/etc/bmm/script/boot.sh

remount /system as read-write and add the following code after this line:

Code:
/bb translate -i $MNT $BLK $STR $SYSN > $1/init.fs.rc
this needs to be added:
Code:
  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 cp /system/app/* /preinstall/system/app         >>$1/init.fs.rc
  echo exec /bb rm /system/app/*                                >>$1/init.fs.rc
  echo exec /bb mount --bind /preinstall/system/app /system/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.

Nice work man!!

Sent from my MB865 using Tapatalk 2
3rd April 2014, 07:22 AM   |  #3  
Junior Member
Thanks Meter: 0
 
3 posts
Join Date:Joined: Aug 2013
Active display
I am on liquid smooth kitkat .
I want to use active display like moto x.
is it possible?
.

---------- Post added at 11:48 AM ---------- Previous post was at 11:44 AM ----------

system-1 stock rom
sys-3 liquid smooth kitkat.

earlier i've tried lot of rom like Mokee, PAC,SlimBean,etc but till today liquid smooth is the best.
please share ur experience regarding roms.

---------- Post added at 11:52 AM ---------- Previous post was at 11:48 AM ----------

system-1 stock rom
sys-3 liquid smooth kitkat.

earlier i've tried lot of rom like Mokee, PAC,SlimBean,etc but till today liquid smooth is the best.
please share ur experience regarding roms.
3rd April 2014, 02:32 PM   |  #4  
sameerm02's Avatar
Senior Member
Flag Pune
Thanks Meter: 127
 
293 posts
Join Date:Joined: Jul 2013
Donate to Me
More
if you want app, use this app from play store

https://play.google.com/store/apps/d...ivedisplay_ads

or refer this forum

http://forum.xda-developers.com/show...utmk=231451420
Last edited by sameerm02; 3rd April 2014 at 02:34 PM.
28th September 2014, 02:49 PM   |  #5  
Member
Thanks Meter: 11
 
70 posts
Join Date:Joined: Aug 2014
Quote:
Originally Posted by timjosten

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:
/system/etc/bmm/script/boot.sh

remount /system as read-write and add the following code after this line:

Code:
/bb translate -i $MNT $BLK $STR $SYSN > $1/init.fs.rc
this needs to be added:
Code:
  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.

OK, the jb leak idea is great unless u have the at&t a2 (in which I do). So what are the negative impacts of using this script rewrite? Any boot failure?

---------- Post added at 02:49 PM ---------- Previous post was at 02:34 PM ----------

Also, how to remount /system as read-write? And can I just "copy/paste" what u posted?
15th October 2014, 10:30 AM   |  #6  
shubham1120's Avatar
Senior Member
Flag Nagpur
Thanks Meter: 80
 
287 posts
Join Date:Joined: Nov 2012
More
Quote:
Originally Posted by timjosten

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:
/system/etc/bmm/script/boot.sh

remount /system as read-write and add the following code after this line:

Code:
/bb translate -i $MNT $BLK $STR $SYSN > $1/init.fs.rc
this needs to be added:
Code:
  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.

No man it's not working properly. I was on JB leak, followed the exact procedure mentioned by you. Now there's always some leftover from previous roms and it causes force close loop. I tried formating /system, /data and /cache too. Nothing. guess I'll have to start with FXZ
15th October 2014, 05:24 PM   |  #7  
OP Junior Member
Thanks Meter: 10
 
12 posts
Join Date:Joined: Mar 2014
How did you edit the boot.sh file? Maybe your text editor has messed up the end-of-line character? It should be in Unix format.

Also, if you change roms, /preinstall folder must be cleared before installing new rom, then there will be no leftover.
Last edited by timjosten; 15th October 2014 at 05:28 PM.
The Following User Says Thank You to timjosten For This Useful Post: [ View ]
15th October 2014, 05:32 PM   |  #8  
shubham1120's Avatar
Senior Member
Flag Nagpur
Thanks Meter: 80
 
287 posts
Join Date:Joined: Nov 2012
More
Quote:
Originally Posted by timjosten

How did you edit the boot.sh file? Maybe your text editor has messed up the end-of-line character? It should be in Unix format.

I used es explorer with rw perm for system. And yes I definitely used UNIX format. Big size gapps work without removing BMM but whenever I install new rom, the apps from previous roms were present and caused constant Force closes. Also, formating system, data and cache from BMM dosen't work. Any idea why because I can't use Mokee and JBX on sys1 because of size limitation.
THANKS in advance

---------- Post added at 05:32 PM ---------- Previous post was at 05:30 PM ----------

Quote:
Originally Posted by timjosten

/preinstall folder must be cleared before installing new rom, then there will be no leftover.

So I have to wipe /preinstall from explorer right? I'll try that! Thanks a ton!

EDIT- It works! Thanks man! I think we gotta market this thread. It's very useful for us sys 1 users!
Last edited by shubham1120; 19th October 2014 at 05:42 PM.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes