The ModMyTM Family of Sites:
ModMyMotoModMyiModMyGphone




 
 
Register or Connect with Facebook

Discuss AppStore Apps | Browse / Search Cydia | MMi Cydia Stats




  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > Computer Modding Software > Windows Specific Modding Discussion
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 10-22-2007, 09:25 AM
iPhone? More like MyPhone
 
Join Date: Aug 2007
Posts: 217
Thanks: 11
Thanked 34 Times in 18 Posts
[GUIDE] Moving /Applications to /private/var/root to free up disk space

EDIT: Wiki now posted for this guide, located here:
http://modmyi.com/wiki/index.php/Mov...edia_Partition

Alright, so I've seen a few people asking about this, and I got curious because I had never thought about it before. Basically it involves moving the /Applications directory to the Media partition to give you more space to install apps and themes from Installer, and creating a symlink in the root directory, much like you do during the jailbreak process. This is for version 1.1.1, I'm not sure if it'll work for 1.0.2, but you don't need to on 1.0.2 because it gives you over 100 megabytes which is more than enough. This will allow you to jump from around 30 megabytes to over 50 or so, which still isn't as much as 1.0.2, but it definitely helps!

Note that I'm on Windows XP, but the process is exactly the same for Macs, you'll just have to use your ssh program.

I've seen a couple of different methods so far, but this is the one that I followed, and I figured I'd type it up and provide screenshots to those that need them, as well as provide instructions for those of you who don't have ssh, the process is exactly the same:
http://www.modmyi.com/forums/showthr...g+applications

NOTE: If you did this on 1.1.1 and then upgraded to 1.1.2, you may notice as you are looking through your ssh program that the symlink is no longer there. You have to be logged in through an SCP session, not an SFTP session(you can do this by installing OpenSSH through Installer.app), and you can recreate this. Delete the ROOT_Applications directory you created, and then follow the steps again. You will have to reinstall all your apps from Installer, but this is the safest way to do this. You won't have to reinstall themes and the like, only the actual applications themselves.

EDIT (12/14/07): I've noticed a lot of people are having trouble with this. To answer some of your questions, yes you CAN do this all on a 1.1.2 phone. Doing this on 1.1.1 then upgrading is NOT recommended, as upgrading with the symlink installed WILL erase your symlink and reinstall the default /Applications folder. You should remove this before upgrading to any new version of firmware and redo it. I just double checked myself by removing and redoing the instructions with my 1.1.2 phone and it works.

NOTE(take two): I noticed after finally getting a chance to look back through the forum that a lot of folks are questioning whether you can use this on any firmware version. As far as I know, yes. I've been using this method since version 1.0.2, and I have used it on each version of firmware since, so I know it does work. Just follow the guide exactly and you'll get it.

NOTE(take three): If you are on firmware version 1.1.3 or higher, make sure to substitute mobile anywhere you see root. For example, instead of putting /private/var/root in the command in step two, put /private/var/mobile. It won't hurt anything to use root instead of mobile, but as of 1.1.3 the /private/var/mobile directory is where Apple is keeping everything instead of /private/var/root like in versions prior to 1.1.3, and it may end up being that the /private/var/root directory is removed altogether eventually.

Alright, here we go:

Needed:
- any firmware version will do
- an SSH program of your choice(i'll be using WinSCP...the username is root and the password is dottie on 1.0.2, and on 1.1.1 the password is alpine)
- more than likely you need to have all the BSD World and BSD Extra files installed, which you should have already, if you followed the guides here to jailbreak 1.1.1, and obviously you need to have gone through installing ssh on your phone

Step 1:
First we have to make sure that the noexec command is not set in the /etc/fstab file. If you followed the guide here on jailbreaking 1.1.1 you may remember looking at this file to make sure that there were no "ro"s in it. Now we are going to check it and make sure that it doesn't say noexec, and if it does, delete it. So, connect via SSH however you'd like, and navigate to your /etc directory. If you are using WinSCP you can double-click the file and view it straight from WinSCP and edit it. If you are using a command-line ssh program, such as Putty, you'll need to pull it from the iPhone and look at it, then put it back. Simply run this command:
Code:
getfile /etc/fstab fstab
And you'll have the fstab file on your computer wherever Putty happens to be stored.

Click the image to open in full size.
Click the image to open in full size.
Open up the fstab file. Notice in the red circle that it says "noexec"? We need to get that out of there. So, delete it, and save it.

Click the image to open in full size.
Again if you are using a command-line ssh program you'll have to put it back. Run this command:
Code:
putfile /etc/fstab fstab
Step 2:
Now that we are able to run the commands that we need to run, we need to actually move the /Applications directory. In WinSCP hit Ctrl+T to bring up the terminal window(I'm not sure what the command is in other programs). Using a command-line terminal you won't need to do this step, obviously


Now type this command and hit Execute:
Code:
cp -R /Applications /private/var/root/ROOT_Applications
Note that, for some reason, after running this command WinSCP reported a connection lost error. If something similar happens to you, simply reconnect and you should be ok.
Click the image to open in full size.
Click the image to open in full size.

Notice that now, in the /private/var/root directory, ROOT_Applications now shows up! That was easy, wasn't it?

Step 3:
Now we need to create the symlink which will trick the iPhone into thinking we never moved the /Applications directory. Go back to your terminal, and type in this command:
Code:
rm -rf /Applications && ln -s /private/var/root/ROOT_Applications /Applications
Click the image to open in full size.
Click the image to open in full size.
This does two things in one step. First it removes the /Applications directory, and then it recreates it as a shortcut to the new one we just made before. If you look in the root directory, you'll see the /Applications folder, only now it has the shortcut arrow on it. Opening it up will show you all your Applications, as normal. If not, something got botched somewhere along the line. Restart your iPhone and you should be good to go!

Removing the symlink:
If something happened to your iPhone, reversing the process is easy to do. Go back in through ssh and type the following three commands into the terminal:
Code:
rm /Applications
cp -R /private/var/root/ROOT_Applications /Applications
rm -rf /private/var/root/ROOT_Applications
And everything should be alright. You might want to do this before doing any future upgrades, as I'm not sure if this will affect the upgrade or not.


Hopefully that wasn't terribly difficult for you to follow, as it's my first guide on something like this. If anybody knows how to execute these commands in iphoneinterface or iphuc let me know. I actually just ran into a weird issue where when I run either of those, it's as if my phone isn't jailbroken anymore, but I have ssh capability and installer and all my third party apps working just fine. Somebody try running these commands in either of those and see if they work, I really don't feel like restoring/downgrading/reupgrading/rejailbreaking my phone today lol.

Again, the method I used was that outlined by scr4p in the thread that was linked above. Thanks!

Last edited by rianbattle; 05-07-2008 at 01:01 PM..
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following 16 Users Say Thank You to rianbattle For This Useful Post:
apwtwenty (12-02-2007), bgattis (11-05-2007), bhz1 (11-17-2007), borsosbalage (12-10-2007), brainfood (01-12-2008), dlubbat (01-11-2008), jwaschbisch (12-01-2007), laving (05-16-2008), mad102190 (01-09-2008), philbee (12-19-2007), RC_OZ (11-22-2007), rotaryheadrx7 (10-30-2007), tonydeli7 (11-17-2007), toyvan (10-31-2007), tsatryan (11-12-2007), Zach23 (12-31-2007)
  #2  
Old 10-22-2007, 09:38 AM
Moderator
 
Join Date: Jul 2007
Device + Firmware: Iphone 3G
Operating System: Windows XP
Location: Saint Louis, MO
Posts: 763
Thanks: 61
Thanked 62 Times in 59 Posts

Thanks bro......
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #3  
Old 10-22-2007, 04:08 PM
808mp5's Avatar
iPhone? More like MyPhone
 
Join Date: Sep 2007
Device + Firmware: iPhone 16GB 3GS RedSnow'd On
Operating System: MacOSX 10.6.x-Win7Pro
Posts: 217
Thanks: 15
Thanked 17 Times in 16 Posts

thanks for the excellent guide.... now what is the username and password to log into winSCP... i read somewhere that it's no longer dottie and the password is different also in 1.1.1
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #4  
Old 10-22-2007, 04:48 PM
bchilton9's Avatar
Green Apple
 
Join Date: Sep 2007
Posts: 72
Thanks: 3
Thanked 14 Times in 14 Posts

username is root

Password is alpine
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to bchilton9 For This Useful Post:
808mp5 (10-22-2007)
  #5  
Old 10-23-2007, 10:05 AM
iPhone? More like MyPhone
 
Join Date: Aug 2007
Posts: 217
Thanks: 11
Thanked 34 Times in 18 Posts

Quote:
Originally Posted by 808mp5 View Post
thanks for the excellent guide.... now what is the username and password to log into winSCP... i read somewhere that it's no longer dottie and the password is different also in 1.1.1
the username is still root, and the default password for 1.1.1 is now alpine instead of dottie. i added it to the guide ^_^
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #6  
Old 10-26-2007, 09:15 PM
What's Jailbreak?
 
Join Date: Sep 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts

I had a question, I edited the fstab file so that noexec was deleted then ran the first command in terminal which copied the Applications to /var/root/ROOT_Applications but it ended up going into private/var/root because its linked to it so I continued and typed in the second command but my Applications folder turned into a dead icon pretty much and looked like the "mach" file if you look at the figure above in the root directory and my springboard disappeared I tried to remove the link but there was no link so I ended up restoring. Any suggestions on why that happened?
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #7  
Old 10-26-2007, 10:07 PM
iPhone? More like MyPhone
 
Join Date: Sep 2007
Posts: 170
Thanks: 1
Thanked 16 Times in 16 Posts

is there a guide for doing this on a mac ive been looking but found nothing anybody have any ideas
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #8  
Old 10-30-2007, 08:45 AM
iPhone? More like MyPhone
 
Join Date: Aug 2007
Posts: 217
Thanks: 11
Thanked 34 Times in 18 Posts

Quote:
Originally Posted by alpineflip View Post
I had a question, I edited the fstab file so that noexec was deleted then ran the first command in terminal which copied the Applications to /var/root/ROOT_Applications but it ended up going into private/var/root because its linked to it so I continued and typed in the second command but my Applications folder turned into a dead icon pretty much and looked like the "mach" file if you look at the figure above in the root directory and my springboard disappeared I tried to remove the link but there was no link so I ended up restoring. Any suggestions on why that happened?
that's actually a really good question. if you wouldn't mind trying again, could you try replacing /var/root/ROOT_Applications with /private/var/root/ROOT_Applications in the two commands that use it and seeing if that will work? if so, i'll update the guide and use that instead. i would try it but i haven't had any problems with that happening...

Quote:
Originally Posted by thebambino View Post
is there a guide for doing this on a mac ive been looking but found nothing anybody have any ideas
you can follow this guide on a mac, the only difference will be which ssh program you use. the only thing that would really change are the screenshots.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #9  
Old 10-30-2007, 10:16 AM
iPhone? More like MyPhone
 
Join Date: Aug 2007
Location: San Juan, PR; NY, NY
Posts: 125
Thanks: 82
Thanked 9 Times in 9 Posts

Quote:
Originally Posted by rianbattle View Post
that's actually a really good question. if you wouldn't mind trying again, could you try replacing /var/root/ROOT_Applications with /private/var/root/ROOT_Applications in the two commands that use it and seeing if that will work? if so, i'll update the guide and use that instead. i would try it but i haven't had any problems with that happening...
I did this a while back and I used /private/var/root/... and have no problems whatsoever. Very good write up!

Wish I had it when I was doing it for the first time.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #10  
Old 10-30-2007, 11:47 AM
iPhone? More like MyPhone
 
Join Date: Aug 2007
Posts: 217
Thanks: 11
Thanked 34 Times in 18 Posts

Quote:
Originally Posted by rotaryheadrx7 View Post
I did this a while back and I used /private/var/root/... and have no problems whatsoever. Very good write up!

Wish I had it when I was doing it for the first time.
Thanks for the confirmation(and compliment)...guide has been updated to use /private/var/root/ROOT_Applications


let me know if anyone else has any problems ^_^
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #11  
Old 10-30-2007, 12:20 PM
What's Jailbreak?
 
Join Date: Sep 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts

I will give it a shot tonight when I get home, is it ok if I already have some apps installed, sense you are creating that symlink it should see it as if nothing happened you just gained more space? And when the symlink is removed do the apps function properly still as long as there is space available ?? Curious for if a future apple update sense symlink might cause some problems unless I am wrong?

Also Thanks for the reply as well to my first question
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #12  
Old 10-30-2007, 12:23 PM
iPhoneaholic
 
Join Date: Jul 2007
Device + Firmware: iphone 16GB 3G White 2.0.2
Operating System: Mac OsX 10.5.1
Location: Westlake, CA
Posts: 361
Thanks: 24
Thanked 37 Times in 27 Posts

kool awsome it worked.. thanks

Last edited by julianqm2; 10-30-2007 at 12:42 PM..
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #13  
Old 10-30-2007, 02:13 PM
iPhone? More like MyPhone
 
Join Date: Aug 2007
Posts: 217
Thanks: 11
Thanked 34 Times in 18 Posts

Quote:
Originally Posted by alpineflip View Post
I will give it a shot tonight when I get home, is it ok if I already have some apps installed, sense you are creating that symlink it should see it as if nothing happened you just gained more space? And when the symlink is removed do the apps function properly still as long as there is space available ?? Curious for if a future apple update sense symlink might cause some problems unless I am wrong?

Also Thanks for the reply as well to my first question
yea, having apps installed won't be a problem. i already had everything i wanted installed from installer and did this and it worked fine. and yea, if you follow the steps to remove the symlink, the phone will tell you that you are running out of space. that most likely won't happen with just apps though.

as far as being affected with a future update, not really sure until it happens. i'll gladly be the first to test updating with the symlink in place to see if it causes any damage, but if it's just an update it should only write to the files that are getting updated and shouldn't mess with moving the directories around. if any apps are updated, the symlink should still work and just point the updates to the ROOT_Applications folder instead of the normal /Applications folder. if you're worried about it, remove the symlink and update, and then reapply it. but, like i said, i'll gladly test it first to make sure it works and post results here ^_^
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #14  
Old 10-31-2007, 02:50 AM
toyvan's Avatar
Theme Creator
 
Join Date: Sep 2007
Device + Firmware: iPhone 1st Gen. & 3GS (3.1.2)
Operating System: PC/MAC
Location: Home Sweet Home
Posts: 624
Thanks: 316
Thanked 415 Times in 157 Posts

Thank you for your helpful and simple guide..cheers!
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #15  
Old 11-05-2007, 06:57 PM
bgattis's Avatar
iPhone? More like MyPhone
 
Join Date: Sep 2007
Device + Firmware: iPhone 3GS - 3.0 - Jailbroken
Operating System: Vista SP1
Location: AR
Posts: 251
Thanks: 38
Thanked 9 Times in 8 Posts

Thanks. Couldn't be any more simple then that!!!
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
Reply

  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > Computer Modding Software > Windows Specific Modding Discussion

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Go to Top
ModMyI

All times are GMT -6. The time now is 08:46 PM. Powered by vBulletin® Version 3.8.4
If you need Dedicated Server Hosting, you should check out SingleHop. | Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 Copyright © 2007-09 by ModMy, LLC. All rights reserved.

iPhone News / iPhone Forums / Apple News / Apple Forums / RSS / Contact Us / / Privacy Statement / Top