Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
inteks
Old
(Last edited by inteks; 21st July 2012 at 09:18 PM.)
#1  
inteks's Avatar
Senior Member - OP
Thanks Meter 613
Posts: 999
Join Date: Oct 2006

 
DONATE TO ME
Angry [HOWTO][Xperia P]save some space on sdcard via init.d script

i dont have many apps on my phone and need the space on sdcard for photos and videos....

so i made an init.d script to move some big folders (games) from sdcard to /data/ and /system/ partition because there is much space left.

Code:
busybox mkdir -p /sdcard/Android/obb/com.nextgenreality.minimoto
busybox mkdir -p /data/Android/obb/com.nextgenreality.minimoto
mount -o bind /data/Android/obb/com.nextgenreality.minimoto /sdcard/Android/obb/com.nextgenreality.minimoto

busybox mkdir -p /sdcard/Navigon
busybox mkdir -p /data/Navigon
mount -o bind /data/Navigon /sdcard/Navigon

rm -r /sdcard/Android/data/com.eamobile.sims3_row_qwf
busybox mkdir -p /sdcard/Android/data/com.eamobile.sims3_row_qwf
busybox mkdir -p /data/Android/data/com.eamobile.sims3_row_qwf
mount -o bind /data/Android/data/com.eamobile.sims3_row_qwf /sdcard/Android/data/com.eamobile.sims3_row_qwf

rm -r /sdcard/Android/data/com.eamobile.nfshp_row_wf
busybox mkdir -p /sdcard/Android/data/com.eamobile.nfshp_row_wf
busybox mkdir -p /system/Android/data/com.eamobile.nfshp_row_wf
mount -o bind /system/Android/data/com.eamobile.nfshp_row_wf /sdcard/Android/data/com.eamobile.nfshp_row_wf
after a reboot i have moved around 1gb to data and 320mb to system ->
Code:
Filesystem               Size     Used     Free   Blksize
/dev                   386.3M    64.0K   386.3M   4096
/mnt/asec              386.3M     0.0K   386.3M   4096
/mnt/obb               386.3M     0.0K   386.3M   4096
/dev/shm               386.3M     0.0K   386.3M   4096
/system               1007.9M   891.6M   116.3M   4096
/modemfs                 2.8M     1.1M     1.7M   1024
/data                    2.0G     1.7G   269.0M   4096
/cache                 246.1M     4.2M   241.8M   4096
/mnt/sdcard             11.3G     5.1G     6.1G   32768
/mnt/secure/asec        11.3G     5.1G     6.1G   32768
/mnt/sdcard/Android/obb/com.nextgenreality.minimoto     2.0G     1.7G   269.0M   4096
/mnt/sdcard/Navigon      2.0G     1.7G   269.0M   4096
/mnt/sdcard/Android/data/com.eamobile.sims3_row_qwf     2.0G     1.7G   269.0M   4096
/mnt/sdcard/Android/data/com.eamobile.nfshp_row_wf  1007.9M   891.6M   116.3M   4096
be aware that these data are lost if you reflash your rom !!!

have fun
inteks

[edit]
to let you know. i faced a small problem and found a solution

after i moved some big folders to phone memory i got a "low phone memory" at 200mb ?! witch i find is MORE than enogh !

this warning come usally at 10% ....

i found a mod to change the threshold to i.e. 2 or 5%

http://forum.xda-developers.com/showthread.php?t=877793
The Following 10 Users Say Thank You to inteks For This Useful Post: [ Click to Expand ]
 
unreal3000
Old
#2  
Senior Member
Thanks Meter 136
Posts: 603
Join Date: Nov 2010
so i can use this script ( or make my own, which would be very similar) on the xperia u too rite?
 
K900
Old
#3  
Senior Member
Thanks Meter 2190
Posts: 4,697
Join Date: Aug 2010
Quote:
Originally Posted by unreal3000 View Post
so i can use this script ( or make my own, which would be very similar) on the xperia u too rite?
Yep, you should be able to.
@OP: what you need is to write a generic script that moves directories based on a plain text list on /sdcard.
For the love of Haruhi, don't PM me with questions. There are Q&A forums for that.
 
ilgreco112
Old
#4  
Senior Member
Thanks Meter 89
Posts: 807
Join Date: Jul 2009
Location: Liège

 
DONATE TO ME
there is a sd card in xperia P ? oO
 
K900
Old
#5  
Senior Member
Thanks Meter 2190
Posts: 4,697
Join Date: Aug 2010
Quote:
Originally Posted by ilgreco112 View Post
there is a sd card in xperia P ? oO
There is no sdcard, but /sdcard is a separate partition.
For the love of Haruhi, don't PM me with questions. There are Q&A forums for that.
 
unreal3000
Old
#6  
Senior Member
Thanks Meter 136
Posts: 603
Join Date: Nov 2010
the main idea stays the same. the xperia u has a partition which acts as an internal sd. so lets say i want to move my music folder on the sdcard to the /data partition. will this work? -
Code:
busybox mkdir -p /sdcard/music
busybox mkdir -p /data/music
mount -o bind /data/music /sdcard/music
tks fr the help!
 
inteks
Old
#7  
inteks's Avatar
Senior Member - OP
Thanks Meter 613
Posts: 999
Join Date: Oct 2006

 
DONATE TO ME
Quote:
Originally Posted by unreal3000 View Post
the main idea stays the same. the xperia u has a partition which acts as an internal sd. so lets say i want to move my music folder on the sdcard to the /data partition. will this work? -
Code:
busybox mkdir -p /sdcard/music
busybox mkdir -p /data/music
mount -o bind /data/music /sdcard/music
tks fr the help!
should work, but you should use it for i. e. gamedata that you can always redownload. because if you reflash your phone this data will be lost.

btw. next version of setxperia is able to execute /sdcard/userinit.sh then you can easily edit this file on pc when phone is docked...

Gesendet von meinem LT22i
 
unreal3000
Old
#8  
Senior Member
Thanks Meter 136
Posts: 603
Join Date: Nov 2010
Quote:
Originally Posted by inteks View Post
should work, but you should use it for i. e. gamedata that you can always redownload. because if you reflash your phone this data will be lost.

btw. next version of setxperia is able to execute /sdcard/userinit.sh then you can easily edit this file on pc when phone is docked...

Gesendet von meinem LT22i
so your saying once i have my music folder on the /data partition, i cant edit it through the sdcard partition? (like copy things to the music folder on the sd from my comp, but it would actual get stored on the /data partition?)
 
K900
Old
#9  
Senior Member
Thanks Meter 2190
Posts: 4,697
Join Date: Aug 2010
Quote:
Originally Posted by unreal3000 View Post
so your saying once i have my music folder on the /data partition, i cant edit it through the sdcard partition? (like copy things to the music folder on the sd from my comp, but it would actual get stored on the /data partition?)
Yeah, that's exactly it.
For the love of Haruhi, don't PM me with questions. There are Q&A forums for that.
 
inteks
Old
#10  
inteks's Avatar
Senior Member - OP
Thanks Meter 613
Posts: 999
Join Date: Oct 2006

 
DONATE TO ME
Quote:
Originally Posted by unreal3000 View Post
so your saying once i have my music folder on the /data partition, i cant edit it through the sdcard partition? (like copy things to the music folder on the sd from my comp, but it would actual get stored on the /data partition?)
no you can't access them through PC. on PC these folders are empty. as i said this is only useful for i. e. big game folder to save some space...

Gesendet von meinem LT22i

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
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

Go to top of page...

XDA PORTAL POSTS

Recognized Contributor Code of Conduct

During the first half of 2012, XDA initiated the Recognized Contributor (RC) program to recognize … more

Careers in Android: What Hiring Managers Won’t Tell You – XDA Developer TV

XDA Developer TV Producer Jayce released a video a … more

Coloring Your Logcat World

Getting feedback for your app during development is as simple as adding logging info where necessary and looking … more

Guide Your Sheep to Safety with Finger Shepherd

Just a coupe of days ago, we brought you news about a game calledAgent Sheep. In that … more