[How-to] More space for Apps by moving dalvik-cache to /cache - Xperia Play Android Development

THIS TWEAK IS FOR 2.3.3 ONLY
REMOVAL OF THIS TWEAK
Reflash the Rom OR
Flash a new Rom OR
Remove /cache/dalvik-cache, /system/bin/dalvik2cache and the last line in /etc/install-recovery.sh
And here is why this Tweak wont work on Versions higher than 2.3.3:
AtomicKoala said:
The new firmware changes the partition layout halving the /cache partition from 200MB to 100MB. Unless your Davlik cache is smaller then 80MB you are bound to have problems with this sadly.
Click to expand...
Click to collapse
Did you ever wonder about why your 380Mb /data partion is almost completely filled but you don't have much Apps installed?
Here's how you can get about 80~100Mb more space for Apps. (Depends on which apps are Installed)
First, I am not responsible for any Damage or Brick or whatever which is caused by wrong use of this Guide. Because using root is involved there is always a very minor chance of breaking something but normally nothing should go wrong by exactly following this guide.
Warning: Because the Dalvik-cache gets cleared your mail account settings will get cleared
As already mentioned:You will need root and Insecure ADB
For root follow this guide: http://forum.xda-developers.com/showthread.php?t=1043630
And here is the Insecure ADB apk: http://android.modaco.com/topic/339298-insecure-adb-for-the-arc-updated-now-a-simple-to-use-apk/
Now the procedure:
Make sure your Play is attached to the Computer and Insecure Adb is installed.
Run "adb remount"
Download the attachment and push the extracted dalvik2cache to /system/bin/ by running "adb push /path/to/dalvik2cache /system/bin/"
Run adb shell
"chmod 755 /system/bin/dalvik2cache"
Now you need to run this script on every boot. This is done by adding it to /etc/install-recovery.sh Just run "echo ’/system/bin/dalvik2cache’ >> /etc/install-recovery.sh
"chmod 755 /etc/install-recovery.sh"
"reboot"
The Play should now reboot (it's okay if it reboots twice) and recreate the dalvik-cache which should take about 5 minutes.
You can check if it worked by doing "adb shell" and in the shell "df".
Regards,
Laberkopf
For flashing via recovery:
FrAsErTaG said:
Please Test flashing this via recovery.
CONFIRMED WORKING http://www.mediafire.com/?3yfj8t8ld5yjez9
It has been designed to work with my System Img
If you are on something else, make sure you have insecure ADB installed before flashing this
Click to expand...
Click to collapse

Now we have a custom recovery, can't one of you clever fellows get apps2sd+ working on the play? Its not that i have no space for apps, but that we wouldnt have to worry about the install location of widgets, LWPs and apps people wish to auto sync
Sent from my R800i using Tapatalk

AndroHero said:
Now we have a custom recovery, can't one of you clever fellows get apps2sd+ working on the play? Its not that i have no space for apps, but that we would have to worry about the install location of widgets, LWPs and apps people wish to auto sync
Sent from my R800i using Tapatalk
Click to expand...
Click to collapse
I think it would be better to repartition the nand because there is a / partition with 200mb space which is completely unused.

Laberkopf said:
I think it would be better to repartition the nand because there is a / partition with 200mb space which is completely unused.
Click to expand...
Click to collapse
I just ran your DC2Cache script, works perfect, my internal storage went from 115mb to 275mb Changing the MTD partiton tables is also another idea, especially if there is a 200mb unused / partition, /cache could also be slimmed down to like 50-60mb and the rest added to /data

df after dc2cache:
sh-3.2# df
Filesystem Size Used Free Blksize
/dev 199M 76K 199M 4096
/mnt/asec 199M 0K 199M 4096
/mnt/obb 199M 0K 199M 4096
/system 312M 212M 100M 4096
/data 380M 213M 166M 4096
/cache 225M 98M 126M 4096
/data/idd 10M 1M 8M 4096
/data/dalvik-cache 225M 98M 126M 4096
damn you, / partition :/

I'd really like to do this, my play is rooted but I have no idea how to do these commands (bold parts)?
Download the attachment and push the extracted dalvik2cache to /system/bin/ by running "adb push /path/to/dalvik2cache /system/bin/"
[*]Run adb shell
[*]"chmod 755 /system/bin/dalvik2cache"
[*]Now you need to run this script on every boot. This is done by adding it to /etc/install-recovery.sh Just run "echo ’/system/bin/dalvik2cache’ >> /etc/install-recovery.sh
[*]"chmod 755 /etc/install-recovery.sh"
Click to expand...
Click to collapse
Any help?

You need to write those commands in a terminal (cmd in Windows). Before you try this, I suggest you to familiarise yourself with said terminal so that you 1) don't mess up things and 2) can try this kind of tricks in the future.

All my sync accounts were gone after moving, that is probably stored somewhere in dalvik?
And i'm having some difficulties getting whatsapp to work, it says my message history is damaged and can't restore it, but thats not that big of a deal
New market also constantly fails now, but deleting it and installing again will fix it.
Further i went from 80MB free to 205 :O
Thats a big improvement
FK1983 said:
I'd really like to do this, my play is rooted but I have no idea how to do these commands (bold parts)?
Any help?
Click to expand...
Click to collapse
You first need the Android SDK
Install it.
Go to the program files/android/android-sdk/platform-tools/ folder
extract your dalvik2cache zip there
shift + right mouse button and then open command prompt here.
make sure you have insecure adb installed on your phone !!!
type in the terminal all followed by an enter:
adb remount
adb push dalvik2cache /system/bin/
adb shell
# chmod 755 /system/bin/dalvik2cache
# echo ’/system/bin/dalvik2cache’ >> /etc/install-recovery.sh
# chmod 755 /etc/install-recovery.sh
# reboot
Click to expand...
Click to collapse
The # is a sign that you are in the adb shell, you don't have to type it yourself.
Hope this is clear enough

Please Test flashing this via recovery.
CONFIRMED WORKING http://www.mediafire.com/?3yfj8t8ld5yjez9
It has been designed to work with my System Img
If you are on something else, make sure you have insecure ADB installed before flashing this

From 70 MB free to 245MB!!
****ING NICE !!!

usb debugging was off, thanks
ok i downloaded the abd insecure and every time i click it it just ask if i want to install i. I select yes the phone reboots?
what am i missing?
when i run adb remount from the cmd line inside the sdk folder i get device not found error.
Thanks any help
Click to expand...
Click to collapse

hackit said:
ok i downloaded the abd insecure and every time i click it it just ask if i want to install i. I select yes the phone reboots?
what am i missing?
when i run adb remount from the cmd line inside the sdk folder i get device not found error.
Thanks any help
Click to expand...
Click to collapse
Is usb debugging on the device enabled? You can enable it under Settings - Applications -Developement

hell yea just did this i once had 161 mb used now its 82 mb and 298 mb free!!! wow wow!!!
also now that it is moved is it possible to just delete the dalvik-cache from the /data folder???

thatsupnow said:
hell yea just did this i once had 161 mb used now its 82 mb and 298 mb free!!! wow wow!!!
also now that it is moved is it possible to just delete the dalvik-cache from the /data folder???
Click to expand...
Click to collapse
Nope dont do that! The dalvik-cache folder in /data is just a link to the real dalvik-cache folder on /cache and so it doesn't take up space.

Ah okay sounds good I'll just leave it alone then
Sent from my R800i using XDA App

Went from 40MB Free to 192MB!!
Very, very grateful.

Is there any negatives with doing this? I heard something about a problem with the market after? if so what problem and is it fixed?
Also, can it be reversed?
Thanks!

FK1983 said:
Is there any negatives with doing this? I heard something about a problem with the market after? if so what problem and is it fixed?
Also, can it be reversed?
Thanks!
Click to expand...
Click to collapse
The cache is used to download apps from the market, so say your DC gets so big you only have 10mb left free in /cache, you wouldnt be able to download a 11mb+ apk from the market
Sent from my R800i using Tapatalk

Given that we have CWM which allows us to wipe the dalvik-cache when necessary, that should not be a big concern.

im following this to the letter,
adb remount
adb push dalvik2cache /system/bin/
adb shell
# chmod 755 /system/bin/dalvik2cache
# echo ’/system/bin/dalvik2cache’ >> /etc/install-recovery.sh
I get cannot create /ect/install-recovery.sh: directory nonexistent
any advice ?

Related

installing root, flash_image permission denied

going through the entire 1.5 to 2.1 root tutorial to a tee, but once i get to the recovery image, this happens (following is an entire copy/paste of what I went through, incase i did something wrong before i hit the point)
Code:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Lemcott>cd C:\android-sdk-windows\tools
C:\android-sdk-windows\tools>adb shell mount -o rw,remount /dev/block/mtdblock3
/system
adb server is out of date. killing...
* daemon started successfully *
C:\android-sdk-windows\tools>adb shell mount -o rw,remount /dev/block/mtdblock3
/system
C:\android-sdk-windows\tools>adb push recovery.img /sdcard
1192 KB/s (3926016 bytes in 3.215s)
C:\android-sdk-windows\tools>adb push flash_image /system/bin/flash_image
448 KB/s (9640 bytes in 0.021s)
C:\android-sdk-windows\tools>adb shell flash_image recovery /sdcard/recovery.img
flash_image: permission denied
C:\android-sdk-windows\tools>
EDIT: I am a complete ass hat. nothing to see here, move a long. mods delete this if you please.
P.S. Everyone else: ALWAYS DOUBLE CHECK BEFORE POSTING FOR HELP. *ahem* now be on your way.
try programming thru fastboot. press call + vol down and select the fastboot option and use this command from the pc
fastboot flash recovery recovery.ing
Sent from my Evil Eris v1.1 using the XDA mobile application powered by Tapatalk
It looks like you forgot the step where you modify the flash_image's permissions
Code:
adb shell chmod 755 /system/bin/flash_image
I had the same thing but I just kept reentering
adb shell mount -o rw,remount /dev/block/mtdblock3 /system
adb push recovery.img /sdcard
adb push flash_image /system/bin
and after maybe 4 iterations it worked.
I have a very simular problem:
(moto droid with android 2.1)
$su
su
Permission denied
Click to expand...
Click to collapse
I have try to use chmod the file but it said permission denied on chmod... please help T_T
note this is rooted, of course, when i'm in the phone type su, it'll pop up ask for me to allow or not, allowed, everything seems fine, but when i try to modify files in /system/etc/wifi (trying to make it work for ad hoc) it said permission denied....(even in su???) I tried in adb and it's the same, very very frustrating, any help is appreciated, Thanks.
edit: here's what it looks like using chmod...
>adb shell chmod 755 /system
unable to chmod /system: Read-only file system
>
Click to expand...
Click to collapse
penthoy said:
I have a very simular problem:
(moto droid with android 2.1)
I have try to use chmod the file but it said permission denied on chmod... please help T_T
note this is rooted, of course, when i'm in the phone type su, it'll pop up ask for me to allow or not, allowed, everything seems fine, but when i try to modify files in /system/etc/wifi (trying to make it work for ad hoc) it said permission denied....(even in su???) I tried in adb and it's the same, very very frustrating, any help is appreciated, Thanks.
edit: here's what it looks like using chmod...
Click to expand...
Click to collapse
make it read/write
penthoy said:
I have a very simular problem:
(moto droid with android 2.1)
I have try to use chmod the file but it said permission denied on chmod... please help T_T
note this is rooted, of course, when i'm in the phone type su, it'll pop up ask for me to allow or not, allowed, everything seems fine, but when i try to modify files in /system/etc/wifi (trying to make it work for ad hoc) it said permission denied....(even in su???) I tried in adb and it's the same, very very frustrating, any help is appreciated, Thanks.
edit: here's what it looks like using chmod...
Click to expand...
Click to collapse
I wouldn't try to flash anything you find here to a Moto Droid.
This is for the HTC Droid Eris.
Otherwise, and if I'm misunderstanding you, good luck with your problem.
archmagus said:
It looks like you forgot the step where you modify the flash_image's permissions
Code:
adb shell chmod 755 /system/bin/flash_image
Click to expand...
Click to collapse
I've been bashing my head in ALL day trying to get past this and finally found this thread! This worked perfectly!
theboo7 said:
make it read/write
Click to expand...
Click to collapse
How should i make is read/write?????
i cant get it to work at all.. need help plz.
Hello Guys
why cant i mount that **** together, i have the root permission, but also i dont..somehow
Code:
Microsoft Windows [version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. Alle rettigheder forbeholdes.
C:\Users\Rasmus H. G. Johnsen>d:
D:\>cd android\tools
D:\android\tools>adb devices
List of devices attached
HT9B7LG00092 device
D:\android\tools>adb shell mount -o rw,remount /dev/block/mtdbloc3 /system
mount: Operation not permitted
D:\android\tools>adb shell
$ ls
ls
sqlite_stmt_journals
cache
sdcard
etc
system
sys
sbin
proc
logo.rle
init.rc
init.goldfish.rc
init.bahamas.rc
init
default.prop
data
root
dev
$ exit
exit
Also if I go on and try to do this:
Code:
D:\android\tools>adb push flash_image /system/bin
failed to copy 'flash_image' to '/system/bin/flash_image': Read-only file system
I know that the flash_image fil and my recovery.img file is in this library and also on my sdcard, but I cant push the gotdamn flas_image file in the /system/bin catalog.
Can some one please help me ?
PS. I have the USB-debugging turned ON.
How do you know that you have root? Or, how did you gain root?
doogald said:
How do you know that you have root? Or, how did you gain root?
Click to expand...
Click to collapse
I have the app called androot from google market, ang i have run it to get root.
wfdi said:
I have the app called androot from google market, ang i have run it to get root.
Click to expand...
Click to collapse
I'm not aware of that app, and cannot find it in the market myself (do you have a link?)
However, one way to check for sure if you truly have root is run the adb command adb shell and, when you get a prompt, type the command "su". If it returns with a "#" prompt (rather than the "$" prompt that you are seeing), then you have root on the phone.
Most people these days root with either jcase's 1click root for eris: https://market.android.com/details?id=net.andirc.erisrooter or they use the procedure here: http://androidforums.com/eris-all-things-root/127861-universal-eris-root-dummies.html
You may be able to use the steps here as well, since you seem pretty comfortable with adb and have that working already: http://androidforums.com/eris-all-things-root/125436-detailed-leak-root-tutorial.html
Guys new I found another solution (tested on u8150)
First make sure that you are rooted first.
Open adb shell
Type in su.
Remount the system partition as read write.
Change the owner of system from root to system via chown root system
the exit the shell and push flash_image to system/
also push clockworkmodrecover.img into the system partion dont forget the last /.
then exit.
use a file manager, I used rootbrowser.apk without a memory card and installed recovery.
with rootbrowser copy flash_image to the bin directory.
don't forget to change the owner back to root to the system partition after you finish with rootexplorer or whatever u use even adb can work.
then the rest follows.
The above works only if your'e rooted and have adb.
Goodluck
haha am a genius Installing ROM +Recover without sdcard on u8150
all you have to do is:-
1. Make sure u have installed clockwork mode recovery on your device and have su binary.
2. Open adb with the device normally on.
3. Remount the data partition as read write using mount remount in adb .
4. use adb and push the cynogenmode.zip or any rom that fits into the data partition using
adb push romname.zip /data/
5. Reboot into clockworkmod recovery using the various options available.
6. This is what to do if you don't have a sdcard.
open adb with phone connected and run
adb shell
mount /data /sdcard
then go back to the main recovery menu and wipe dalvik cache only
then choose update from sdcard
flash your rom and tadaaa.
your'e done.
NB:CAUTION MAKE SURE TO FLASH A ROM THAT DOES NOT WRITE INTO THE DATA PARTION
THIS CAN BE DONE BY LOOKING FOR A FILE CALL UPDATE SCRIPT IN THE zip OF THE ROM U WANT TO INSTALL
Am going to make a post about this later.
Goodluck
Lol, 3 and a half year break between responses.
The problem with flash_image & dump_image is that it doesn't work on devices devices which use emmc (recent phones)and have
mmcblk0
and cat /proc/mtd won't work here either.
This means that you have to use dd to write to this devices.
I wonder how guys determine the partitions to use on such devices, and someone should hint as to what is going on since it seems manufacturers seriously don't want people to exploit their devices.

[Q] Enabling BIONIX EXT2 RFS Lag Fix

Guys....
I need help on enabling EXT2 RFS Lag Fix.
I flashed Bionix Fusion 1.1 with the SSL Fix
I flashed Project Core v1 Kernel
I'm trying to enable the EXT2 RFS Lag Fix using the instructions on Team Whiskey's site.
adb shell --> DONE
su --> DONE
******Here's where I get stuck at********
mv /system/bin/userinit.sh /system/bin/used ---> Error saying "FAILED ON '/SYSTEM/BIN/USERINIT.SH' - NO SUCH FILE OR DIRECTORY
**********************************
Any ideas why this file isn't in the BIN folder? I checked via Root Directory and didnt find it at all.
Let me know.
Thank you
I'm having this same error as well. Anybody know how to proceed? Also running Bionix 1.1 with Project Core kernel. Thanks in advance.
Those instructions are to disable EXT2 lagfix, you should follow this:
adb shell
su
busybox dd if=/dev/zero of=/data/dataimg bs=1024 count=1048576 (this transfer takes roughly 3 minutes, be patient!)
busybox mknod /dev/loop0 b 7 0
busybox losetup /dev/loop0 /data/dataimg
busybox mkfs.ext2 /dev/loop0
mkdir /data/data1
mv /system/bin/used /system/bin/userinit.sh
reboot
Click to expand...
Click to collapse
Thanks StefanB86. I'll give it a shot! Just curious.. how can you see if this actually worked and if it actually running the lagfix?
m00nshake said:
Thanks StefanB86. I'll give it a shot! Just curious.. how can you see if this actually worked and if it actually running the lagfix?
Click to expand...
Click to collapse
Go to settings/sd card and phone storage. If your available space in application storage is less than 1gb then it worked. You can also run a quadrand test. Anything 1800 and up means its working.
^ what he said
Fantastic... quad score 2806. Thanks for all of the help.
Screen shot of quadrant score...
StefanB86 said:
Those instructions are to disable EXT2 lagfix, you should follow this:
Click to expand...
Click to collapse
i followed these, they are the same as they have been since the 2.1 releases (im on obsidian 4.2 stock kernel). i get up to:
mv /system/bin/used /system/bin/userinit.sh
but screen returns:
failed on 'system/bin/used' - no such file or directory
logic tells me i can create a file called used in system/bin but to be honest, i have no idea what the commands do and i really dont want to amplify any problems or create any for myself. so, any suggestions? See screen shot for adb.
http://screencast.com/t/9LNnqIHT6iOD

[SCRIPT] Remove Cell Standby Service (No Effect on Battery Life!)

WARNING: I've added this to my script and for some reason it has an adverse effect on the "n" button and Lock Screen if used BEFORE you complete the SetupWizard !!!
WARNING: Again BE WARNED if you do this mod before you finish the setup wizard you will loose the functionality of your "n" button and Lock Screen !!!
I have a feeling poster before me copied and pasted this from somewhere because notice how in his first sentence he says "Phone.apk and TelephonyProvider.apk" but then his script says "Mms.apk"....what happened to Phone.apk because there is no Mms.apk in the system folder on any Nook I have. So below is the corrected script and also this entire process in done in dos instead of in adb;
Code:
adb shell mount -o remount,rw /dev/block/mmcblk0p5 /system
adb shell mv /system/app/Phone.apk /system/app/Phone.OLD
adb shell mv /system/app/TelephonyProvider.apk /system/app/TelephonyProvider.OLD
adb reboot
There is no adverse effect from doing this & it's confirmed after while in NookTools there is no Cell Standy service running.
Download [REMOVAL]
Want to undo this process?
Code:
adb shell mount -o remount,rw /dev/block/mmcblk0p5 /system
adb shell mv /system/app/Phone.OLD /system/app/Phone.apk
adb shell mv /system/app/TelephonyProvider.OLD /system/app/TelephonyProvider.apk
adb reboot
Download [UNDO REMOVAL]
thanks, just got my NC yesterday, and already updated/rooted + done this hack
xmas_spirit said:
thanks, just got my NC yesterday, and already updated/rooted + done this hack
Click to expand...
Click to collapse
Run my script too from the other post?
xboxexpert said:
Run my script too from the other post?
Click to expand...
Click to collapse
No, I just manually entered commands in adb shell
xboxexpert said:
I have a feeling poster before me copied and pasted this from somewhere because notice how in his first sentence he says "Phone.apk and TelephonyProvider.apk" but then his script says "Mms.apk"....what happened to Phone.apk because there is no Mms.apk in the system folder
Click to expand...
Click to collapse
90% of the internet are sites posting info from other sites. Be glad he didn't slap on some ads.
I'm new here, but trying to learn.
Your code is:
adb shell mount -o remount,rw /dev/block/mmcblk0p5 /system
adb shell mv /system/app/Phone.apk /system/app/Phone.OLD
adb shell mv /system/app/TelephonyProvider.apk /system/app/TelephonyProvider.OLD
adb reboot
would it make sense to add:
adb shell mount -o remount,ro /dev/block/mmcblk0p5 /system
before the reboot? Or does that get done automatically upon reboot? I assume it is bad to leave it rw and not reset it to ro?
Thanks for this, I ran 'most' of your other script.
Auto-nooter, your script, adw launcher and it is coming along nicely. Still debating remapping the volume keys to back/menu...
DC_Rob said:
I'm new here, but trying to learn.
Your code is:
adb shell mount -o remount,rw /dev/block/mmcblk0p5 /system
adb shell mv /system/app/Phone.apk /system/app/Phone.OLD
adb shell mv /system/app/TelephonyProvider.apk /system/app/TelephonyProvider.OLD
adb reboot
would it make sense to add:
adb shell mount -o remount,ro /dev/block/mmcblk0p5 /system
before the reboot? Or does that get done automatically upon reboot? I assume it is bad to leave it rw and not reset it to ro?
Thanks for this, I ran 'most' of your other script.
Auto-nooter, your script, adw launcher and it is coming along nicely. Still debating remapping the volume keys to back/menu...
Click to expand...
Click to collapse
yes, the system partition goes back to RO after a reboot
Can this be done using terminal emulator
Sent from my PC36100 using XDA App
Ben74 said:
yes, the system partition goes back to RO after a reboot
Click to expand...
Click to collapse
Great, now I know. I write code for a living so, I try to be tidy....
Thanks
worked perfectly, thanks.......
midnightmaraude said:
Can this be done using terminal emulator
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
Just use Root Explorer; rename those two files to anything else and reboot. Really, you could just remove them, renaming is just a precaution.
Thanks for this, makes the nook even better!
Mike
sent from my nookcolor using the xda app
Just to play devil's advocate, does anyone know if it's really improving battery life, rather than just no longer reporting cell standby under battery use details?
wvcachi said:
Just to play devil's advocate, does anyone know if it's really improving battery life, rather than just no longer reporting cell standby under battery use details?
Click to expand...
Click to collapse
I wondered that, but I also have no reason to run unused services so it can't hurt.
wvcachi said:
Just to play devil's advocate, does anyone know if it's really improving battery life, rather than just no longer reporting cell standby under battery use details?
Click to expand...
Click to collapse
I've been playing angry birds for 30 minutes and only lost 4% battery life. Seems to be awesome.
ummmmmm where is the script
ADB commands are only in OP lol
Therefore you need adb
No such file or directory?
I keep getting an error message stating the following:
"failed on '/system/app/phone.apk' - No such file or directory"
If I navigate to that file using Astro File Manager I can see the files, so I can't figure out what I'm missing here.
Salt72 said:
I keep getting an error message stating the following:
"failed on '/system/app/phone.apk' - No such file or directory"
If I navigate to that file using Astro File Manager I can see the files, so I can't figure out what I'm missing here.
Click to expand...
Click to collapse
Try capitalizing the file names.
Not to beat a dead horse, but this can easily be done in Root Explorer. All you're doing is renaming two files.
Not to be a cheapskate, but is there a free version of Root Explorer or a similar app that will do the same?
No
try Astro or Linda, thats free but ads supported

[EXPANDSD] Join your external SD with internal SD!

WARN: For developer only.
attachment is the EXPANDSD script.
Why use it?
So many applications use /sdcard for mass data storage(gameloft, navigation...),
but I9100's internal_sd size is limit to 11G, so we need external_sd's space.
But these applications dosen't know how to use external_sd, old method is hack the apk for external_sd, but this will change apk's signature, and need smali/baksmali to work. My method work in system level, don't need change any apk file.
How to use:
1.make expandsd.ownhere dirctory in external_sd root directory.
2.move internal_sd's directory(for example:/gameloft) to expandsd.ownhere
3.run init_expandsd.sh
Theory:
use 'mount --bind' feature, bind external_sd's dir to internal_sd.
Because the sd card using fat32 partition format, the 'ln -s' command does not work, so the "mount --bind" is the only way to dynamically change the directory content.
Hi mate,
Thks for your shares. I have a question. How run init_expandsd.sh?
I tried gscript and init.d, but doesn't seem to be working
woohoo a great dev has come. glad you got here mate! love your work on Desire section.
harrynghiem said:
Hi mate,
Thks for your shares. I have a question. How run init_expandsd.sh?
Click to expand...
Click to collapse
you can try to use terminal emu, just type su then navigate to folder where the script located, then type sh init_expandsd.sh then enter. this might do the trick to execute .sh
dexterdave said:
you can try to use terminal emu, just type su then navigate to folder where the script located, then type sh init_expandsd.sh then enter. this might do the trick to execute .sh
Click to expand...
Click to collapse
Does it work for you?
It's a great idea thanks a lot for your work. I was wondering why ln was not working.
But too bad it does not work for me, i get the following error :
[1] Segmentation fault
Do you have any idea why ?
Thanks again
problems when connecting phone to pc
hi,
tried the "mount --bind" in order to try your script.
works fine. the directory contents is shared between the 2 path's,
but i have a problem when i connect the phone to a pc.
when i try to disconnect, the sdcard and external_sd are not
available anymore until i reboot the phone
note: the commands that i have executed are:
Code:
mkdir /mnt/sdcard/external_sd/foo
echo "test" > /mnt/sdcard/external_sd/foo/test
mkdir /mnt/sdcard/foo
mount --bind /mnt/sdcard/external_sd/foo /mnt/sdcard/foo
Can this script be placed in init.d folder for autorun at boot?
Edit: sorry, already answered above: no, it cannot.
Sent from my GT-P1000 using Tapatalk
Seems abandoned by @ownhere
Sent from my GT-I9100
Idan73 said:
Seems abandoned by @ownhere
Sent from my GT-I9100
Click to expand...
Click to collapse
too bad, it could be very useful..
TheFirstBen said:
It's a great idea thanks a lot for your work. I was wondering why ln was not working.
But too bad it does not work for me, i get the following error :
[1] Segmentation fault
Do you have any idea why ?
Thanks again
Click to expand...
Click to collapse
got the same problem please help
How to use?
ownhere said:
WARN: For developer only.
attachment is the EXPANDSD script.
Why use it?
So many applications use /sdcard for mass data storage(gameloft, navigation...),
but I9100's internal_sd size is limit to 11G, so we need external_sd's space.
But these applications dosen't know how to use external_sd, old method is hack the apk for external_sd, but this will change apk's signature, and need smali/baksmali to work. My method work in system level, don't need change any apk file.
How to use:
1.make expandsd.ownhere dirctory in external_sd root directory.
2.move internal_sd's directory(for example:/gameloft) to expandsd.ownhere
3.run init_expandsd.sh
Theory:
use 'mount --bind' feature, bind external_sd's dir to internal_sd.
Because the sd card using fat32 partition format, the 'ln -s' command does not work, so the "mount --bind" is the only way to dynamically change the directory content.
Click to expand...
Click to collapse
thanks,
this is genius
I'm not using your script (have myself some ux & scripting skills) but did not know about the -bind option on android
Ridiculously simple and efficient
Did it my own way and it works great
Thanks a lot for this
dawabz94 said:
thanks,
this is genius
I'm not using your script (have myself some ux & scripting skills) but did not know about the -bind option on android
Ridiculously simple and efficient
Did it my own way and it works great
Thanks a lot for this
Click to expand...
Click to collapse
Then why not share with us please !
Let us know how you did
Yes I'd like to know another method also.!
Sent from my GT-I9100 using XDA
Chairmansaab said:
Then why not share with us please !
Let us know how you did
Click to expand...
Click to collapse
Hi,
it's very easy indeed, once you got the point.
I do most of my stuff using an "adb shell" session so I'll post here my steps to get it working.
Also I like simple implementation so my script is the strict minimum needed to mount necessary folders
I assume you have a rooted device with working busybox and a kernel that supports /etc/init.d/
I suggest you do the test on a dummy folder before applying on a real folder.
So start by creating a folder called /sdcard/dummy
Do it the way you want , I do it with an "adb shell" session
Code:
cd /sdcard
mkdir dummy
Then copy some files in it (photos for examples)
Code:
cd /sdcard
cd DCIM
cd Camera
cp `ls -1 |tail -5` /sdcard/dummy
From now on, we consider we want to move transparently /sdcard/dummy to the external SD
1. move the folder to the external sd
CAUTION : I'm running a CM9 rom => my external sd is mounted on /mnt/emmc
Standard samsung sdcard mount is /sdcard/external_sd
The path might be different according to your brand and rom
Moving the folder code
Code:
cd /sdcard
mv dummy /mnt/emmc/
2. Create the mount point in the indernal SD
Code:
cd /sdcard
mkdir dummy
3.a Check the mount is successful by manually doing it
Code:
mount --bind /mnt/emmc/dummy /sdcard/dummy
3.b Check you see exactly the same thing on both folders
Both commands should return exactly the same output
Code:
ls -l /sdcard/dummy
Code:
ls -l /mnt/emmc/dummy
If everything is fine, then you're good to go
4. Automate mount at boot time
Create a script in /etc/init.d to automate the mount at boot time
I personally use "vi" but most people prefer graphical UIs, I can't recommend any here, do it your own way
So basically you would go root,remount /system in read/write mode and create the file
Code:
su
mount -o remount,rw /dev/block/mmcblk0p9 /system
cd /etc/init.d
vi 90binds
Insert following lines, save and exit
Note that the "sleep 60" is to let the system boot up before mounting partitions (thanks to the initial script shared here)
Code:
#!/system/bin/sh
sleep 60
mount --bind /mnt/emmc/dummy /sdcard/dummy
Change owner and permissions, flush disk cache and remount /system in read only
Code:
su
mount -o remount,rw /dev/block/mmcblk0p9 /system
cd /etc/init.d
chown root:shell
chmod 6755 90binds
sync
mount -o remount,ro /dev/block/mmcblk0p9 /system
To check, run
Code:
su
cd /etc/init.d
ls -l 90binds
The output should look like this :
Code:
-rwsr-sr-x 1 root shell [I]0 MMM D HH:MM[/I] 90binds
5. Now you can reboot and check - after reboot - that the mount is done
Both commands should return exactly the same output (always ran in an "adb shell" session)
Code:
ls -l /sdcard/dummy
Code:
ls -l /mnt/emmc/dummy
6. Now you're good to move other folders
Basically, you move the folder to external SD
Create the mount point on the internal SD
Append the mount command in the 90binds script
And that's it
Hope this helps
---------- Post added at 11:09 AM ---------- Previous post was at 11:04 AM ----------
benc88 said:
Yes I'd like to know another method also.!
Sent from my GT-I9100 using XDA
Click to expand...
Click to collapse
Just posted
Take time to read and understand the idea

Useful Commands in Terminal Emulator

Hi guys!
I created this thread mainly because many useful things can be done in Terminal emulator. I will show you some simple commands which are useful.
Very useful if you don't have Root explorer when you need it.
Make sure you take a Nandroid backup before you try out just in case you can restore when you do something wrong!
You can get terminal Emulator from here: https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en
Note: Most commands need root. So type su and press enter and grant superuser permissions to Terminal Emulator!
First type this command before using any of the commands below just in case(needs root)
Code:
su
Some useful commands:
Turning device off (Turns your device off very fast!! ):
Code:
poweroff
Rebooting:
Code:
reboot
Rebooting to Recovery
Code:
reboot recovery
Rebooting to download mode:
Code:
reboot download
Forcing Most Apps to install to SDcard(Root needed with Terminal Emulator, no need root with ADB):
Code:
pm setInstallLocation 2
Alternatively, you can type 0 at the end instead of 2 for Auto location install mode or 1 for Internal memory install mode
To check what the current install location is:
Code:
pm getInstallLocation
Mounting R/W in system(Use with caution)
Code:
mount -o rw,remount -t /system
If above one doesnt work, try this.
Code:
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
Unmounting R/W in system.
Code:
mount -o ro,remount -t /system
If above code doesn't work, try this
Code:
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
Moving files from sdcard to system (Use after mounting R/W):
Code:
busybox cp /sdcard/<path> /system/<path>
Example: busybox cp /sdcard/demo/framework-res.apk /system/framework/
Changing file permissions to rw-r--r-- (Use after mounting R/W):
Code:
chmod 644 <path>
Example 1: chmod 644 /system/app/mms.apk
Example 2: chmod 644 /system/app/*.apk (This command changes the file permission of all apps in the folder to rw-r--r--)
Changing the current directory:
Code:
cd <path>
Example: cd /sdcard
Listing all the files and folders under the current directory:
Code:
ls
If you want to view all the files and folders in your sdcard, type:
cd /sdcard
ls
Making a new folder:
Code:
mkdir <path>
Example: mkdir /sdcard/newfolder
Removing files (For System files, Use after mounting R/W)
Code:
rm <path>
Example: rm /system/app/demoapp.apk
Removing Folders:
Code:
rmdir <path>
Get info of your build.prop values
Code:
getprop
That's all for now. I will add a few more later!
If you have any more new commands or if I have given an improper command, feel free to post it in the thread
Thanks for reading.
Have you any idea on why if I were to enter pm set-install-location 2(SD card), the next line would be "Killed"?
UserU said:
Have you any idea on why if I were to enter pm set-install-location 2(SD card), the next line would be "Killed"?
Click to expand...
Click to collapse
I don't understand your question...
Anyways...Thanks for reminding me of that command!
system.img said:
I don't understand your question...
Anyways...Thanks for reminding me of that command!
Click to expand...
Click to collapse
No problem. This is the output from the Terminal Emulator. The bold command changes the default install dir to the SD card:
u0 [email protected]:/ $ pm set-install-location 2
Killed
137|u0 [email protected]:/ $
Click to expand...
Click to collapse
UserU said:
No problem. This is the output from the Terminal Emulator. The bold command changes the default install dir to the SD card:
Click to expand...
Click to collapse
I never got that problem on adb.
Let me see....
This:
mount -o remount rw system
Is much easier than the previous one to mount readwrite.
Sent from my GT-P7300 using xda app-developers app
panpjp said:
This:
mount -o remount rw system
Is much easier than the previous one to mount readwrite.
Sent from my GT-P7300 using xda app-developers app
Click to expand...
Click to collapse
Isnt it /system?
ok...will add to op.
Thanks.
system.img said:
Isnt it /system?
ok...will add to op.
Thanks.
Click to expand...
Click to collapse
Not necessary for it to be /system
Sent from my Desire using xda app-developers app
panpjp said:
Not necessary for it to be /system
Sent from my Desire using xda app-developers app
Click to expand...
Click to collapse
Ok....
system.img said:
I never got that problem on adb.
Let me see....
Click to expand...
Click to collapse
Here's a thread which shed some light on the similar issue.
http://forum.xda-developers.com/showthread.php?t=1495423
UserU said:
Here's a thread which shed some light on the similar issue.
http://forum.xda-developers.com/showthread.php?t=1495423
Click to expand...
Click to collapse
I got it.
It needs root.
So type
su
pm set-install-location 2
Then you are done!
wow thanks !!
Bassesh said:
wow thanks !!
Click to expand...
Click to collapse
Welcome!
Useful
A question: once i tried to type
bootanimation
Click to expand...
Click to collapse
The boot animation started but..i couldn't stop it!! I could "use" the phone (i caught 4 or 5 screens) but the only thing i saw was the bootanimation.. i had to pull the battery off and restart my ace.. any solution??
Toni5830 said:
Useful
A question: once i tried to type
The boot animation started but..i couldn't stop it!! I could "use" the phone (i caught 4 or 5 screens) but the only thing i saw was the bootanimation.. i had to pull the battery off and restart my ace.. any solution??
Click to expand...
Click to collapse
That is the use of the bootanimation command. You can stop it either by pulling battery or closing terminal emulator!
But what I did to stop it was to rotate my phone to landscape and somehow close terminal emulator.
But in ADB it is easier to stop using exit command.
how to get info about /system memory and /data memory ?
rajxelton said:
how to get info about /system memory and /data memory ?
Click to expand...
Click to collapse
What info do you exactly want? Free Space, Partition Size or Used space?
system.img said:
What info do you exactly want? Free Space, Partition Size or Used space?
Click to expand...
Click to collapse
partition size. well can you tell me for all.
Anyone know a command to trigger media scanner?
Thanks for the commands. Quite new to all of this and these will help me understand things a little better

Categories

Resources