can we move the dalvik cache to the sd card?
or move it to the cache folder?
Thanks
hackit said:
can we move the dalvik cache to the sd card?
or move it to the cache folder?
Thanks
Click to expand...
Click to collapse
sure. easiest and most common method is using a symlink. probably best to do this from recovery mode when the android system is not actively using the dalvik-cache.
either copy the existing dalvik-cache from /data/dalvik-cache to the destination where the symlink will be, i.e. /sdcard/dc or /cache/dc OR just wipe /data/dalvik-cache and symlink to the new directory.
ln syntax example:
ln -s file1 file2
Creates a symbolic link to file1 with the name of the file2.
ln -s /data/dalvik-cache /sdcard/dc
or
ln -s /data/dalvik-cache /cache/dc
hope that helps!
Thanks for the reply,
so when you say recovery do you mean from cwm?
i already created the ext partition with cwm.
joeykrim said:
sure. easiest and most common method is using a symlink. probably best to do this from recovery mode when the android system is not actively using the dalvik-cache.
either copy the existing dalvik-cache from /data/dalvik-cache to the destination where the symlink will be, i.e. /sdcard/dc or /cache/dc OR just wipe /data/dalvik-cache and symlink to the new directory.
ln syntax example:
ln -s file1 file2
Creates a symbolic link to file1 with the name of the file2.
ln -s /data/dalvik-cache /sdcard/dc
or
ln -s /data/dalvik-cache /cache/dc
hope that helps!
Click to expand...
Click to collapse
Related
Hi, I want to freeing up some space in my /data partition so I can install more apps...
I manage to get 60mb more space by doing this: forum.xda-developers.com/showthread.php?p=7459981
Then I also thought to move /data/dalvik-cache since it's very big... In other forum, people move /data/dalvik-cache to SD card or /cache...
Moving dalvik-cache to SD card is a little unstable while /cache partition in X10 mini only have 50mb free space... (my data/dalvik-cache had 65mb size)
Besides that, /cache is used by FOTA, browser and market apps to download a files...
Then I look another partition, and I see that /dev partition has 86mb free space! If I do this, I can install 65mb more application to my phone...
Then after searching, I found this script. It must be executed at boot:
Code:
#!/system/bin/sh
echo "++++ DALVIK 2 DEV STARTING ++++"
if [ ! -d /dev/dalvik-cache ]
then
mkdir /dev/dalvik-cache
chown 1000:1000 /dev/dalvik-cache
chmod 775 /dev/dalvik-cache
fi
if [ -L /data/dalvik-cache ]
then
rm -f /data/dalvik-cache
mkdir /data/dalvik-cache
chown 1000:1000 /data/dalvik-cache
chmod 775 /data/dalvik-cache
elif [ ! -d /data/dalvik-cache ]
then
mkdir /data/dalvik-cache
chown 1000:1000 /data/dalvik-cache
chmod 775 /data/dalvik-cache
elif [ -d /data/dalvik-cache ]
then
for filename in /data/dalvik-cache/*
do
if [ -L $filename ]
then
rm -f $filename
fi
done
mv /data/dalvik-cache/* /dev/dalvik-cache/
fi
mount -o bind /dev/dalvik-cache/ /data/dalvik-cache/
The question is, how to execute this script during boot up? Another peoples do it this way in their phones:
Hacre said:
paste the text into a file called 02dalvik2cache (no file extension)
adb remount
adb push 02dalvik2cache /system/etc/init.d/
adb shell chown root:2000 /system/etc/init.d/02dalvik2cache
adb shell chmod 755 /system/etc/init.d/02dalvik2cache
Reboot phone.
Click to expand...
Click to collapse
But it seems that the file structure is different. Also, adb remount command gives "not permitted" errors because ro.secure is 1 in /default.prop
If I change ro.secure=1 to re.secure=0 in /default.prop then reboots, it comes back to ro.secure=1
Any thoughts?
Hi all,
im working on making a ROM for the Asus Transformer and im struggling a bit. im totall new to Linux, using mint and just getting used to it.
Basically im just trying to take a stock ROM and add root but adding superuser.apk and SU binary but im running into problems.
Asus Roms are a bit unusual, packed into blob files, ive unpacked that no problem, the system image is called blob.APP but its just the same as system.img just the name as i understand it.
ok so what ive done:
Code:
mkdir system
sudo mount -t ext4 -o loop blob.APP system/
so this mounts the ext4 fs as a loop device and allows me to copy the contents out
Code:
sudo cp -ar system new_system
then ive copied superuser.apk to /app and SU binary to /dev with drop and drag.
then make the filesystem image
Code:
sudo ./make_ext4fs -l 512m -a system blob.APP new_system/system
then just pack it up and flash it, flashing works fine, no errors but when i go to reboot it warns that theres no OS so somethings not worked. ive tried everything i can find googeling!
i just started learning linux on weds so go easy on me
any advice or help would be really great. thanks!
mkdir system here you will mount the old system
mkdir system_new here you will mount the new system
we now create the actual image
dd if=/dev/zero of=system_new.img bs=4k count=60000
bs=4k is the block size
count=60000 the number of blocks of 4kb size
so is something like 60000*4= 240000 which is actually 240 Mb
so it depends to you how big you want the image.
now we format the system.img in ext4
mkfs.ext4 system_new.img
Proceed anyway? (y,n) y
now we override the filesystem check
tune2fs -c0 -i0 system_new.img
Now we mount the the 2 directories that we created in the first step
mount -o loop system_new.img system_new/
mount -o loop system_new.img system/
Now we copy the contet of the old image to the new one with all the perimissions
cp -v -r -p system/* system_new/
We sinc the files
sync
We unmount the partitions
umount system_new/
umount system/
And voila, the system.img in ext4 is created.
Tips: you will need superuser acces.
if you will copy new files besides the ones from the old system you will have to set by hand all the permissions.
If you are using ubuntu just type
sudo su
and you will be root and no more sudo at each command.
Thank u so much for your guide this is exactly what I'm looking for so massive thanks!
So to add root I.can drop and drag superuser.apk and the binary into the new image?
Also do I need to worry about the android mountpoint?
Sent from my HTC Sensation Z710e using xda premium
yes you can do that, as long as you set the permissions right. (you can google for them)
and from what i remeber you will have to set also the ownership of the su, and superusers files
you need to do tests first, and then try
the mountpoint should be ok as it is now.
globula_neagra said:
mkdir system here you will mount the old system
mkdir system_new here you will mount the new system
we now create the actual image
dd if=/dev/zero of=system_new.img bs=4k count=60000
bs=4k is the block size
count=60000 the number of blocks of 4kb size
so is something like 60000*4= 240000 which is actually 240 Mb
so it depends to you how big you want the image.
now we format the system.img in ext4
mkfs.ext4 system_new.img
Proceed anyway? (y,n) y
now we override the filesystem check
tune2fs -c0 -i0 system_new.img
Now we mount the the 2 directories that we created in the first step
mount -o loop system_new.img system_new/
mount -o loop system_new.img system/
Now we copy the contet of the old image to the new one with all the perimissions
cp -v -r -p system/* system_new/
We sinc the files
sync
We unmount the partitions
umount system_new/
umount system/
And voila, the system.img in ext4 is created.
Tips: you will need superuser acces.
if you will copy new files besides the ones from the old system you will have to set by hand all the permissions.
If you are using ubuntu just type
sudo su
and you will be root and no more sudo at each command.
Click to expand...
Click to collapse
U said, we have to set permissions by ourselves. So what are the permissions that needs to be set when I add a new folder with an APK in it?
Sudo chmod 777 filepath/filename.apk
Sudo chmod a-rwx filepatch/filename.apk.
This is what I remember from top of my head. Google it a bit if it does not work from the first try as I have not used this like in 5 years.
If you allready have root you can you a file manager and just copy the file/folder where you want and set the permissions via thw file manager or using terminal commanda or via adb.
From what remember you can t make a folder in the apk folder as you won t be able to run the apk.
My gallery cache is close to 2gigs. Syncing from Picasa...
Any way to move it my SD Card? If I clear the cache, it just re-downloads and creates new ones.
Currently internal storage cache: SGH-I317M\Phone\Android\data\com.sec.android.gallery3d
I realize this is an 1 year old topic, but I have the exact same problem.
Anyone figure this out?
Thanks!
ThaiM said:
My gallery cache is close to 2gigs. Syncing from Picasa...
Any way to move it my SD Card? If I clear the cache, it just re-downloads and creates new ones.
Currently internal storage cache: SGH-I317M\Phone\Android\data\com.sec.android.gallery3d
Click to expand...
Click to collapse
It is assumed that the device is already rooted and a way to run commands on the device is available. i.e “Terminal Emulator” app, Android ADB. The technique explained in this post (Symbolic Linking) will not work on SD cards formatted with FAT/NTFS.
Basically, the idea is to create a cache folder on SD card, remove the cache folder on internal memory and then link the internal folder to the folder on SD card so SD card space is used.
To move the cache folder
1
2
3
4
5
umount /cache
mount -o rw,remount -t rootfs rootfs /
rmdir /cache
mkdir /sdcard/cache
ln -s /sdcard/cache /cache
Browser Cache
1
2
3
4
cd /data/data/com.android.browser/cache
rm -R webviewCache
mkdir /sdcard/cache/webviewCache
ln -s /sdcard/cache/webviewCache webviewCache
Google Maps
1
2
3
4
cd /data/data/com.google.android.apps.maps
rm -R files
mkdir /sdcard/cache/files/maps
ln -s /sdcard/cache/files/maps files
Google StreetView
1
2
3
4
cd /data/data/com.google.android.street
rm -R cache
mkdir /sdcard/cache/streetCache
ln -s /sdcard/cache/streetCache cache
Market Cache
1
2
3
4
cd /data/data/com.android.vending
rm -R cache
mkdir /sdcard/cache/marketCache
ln -s /sdcard/cache/marketCache cache
imeem Cache
1
2
3
4
cd /data/data/com.imeem.gynoid
rm -R cache
mkdir /sdcard/cache/imeemCache
ln -s /sdcard/cache/imeemCache cache
Tunewiki Cache
1
2
3
4
cd /data/data/com.tunewiki.lyricplayer.android/cache
rm -R webviewCache
mkdir /sdcard/cache/tunewikiCache
ln -s /sdcard/cache/tunewikiCache webviewCache
Steel Browser Cache
1
2
3
4
cd /data/data/com.kolbysoft.steel/cache
rm -R webviewCache
mkdir /sdcard/cache/steelCache
ln -s /sdcard/cache/steelCache webviewCache
OR
1
2
3
4
5
cd /data/data/com.kolbysoft.steel
mkdir cache
cd cache
mkdir /sdcard/cache/steelCache
ln -s /sdcard/cache/steelCache webviewCache
MeetMe Cache
1
2
3
4
cd /data/data/com.stylem.meetme
rm -R cache
mkdir /sdcard/cache/meetmeCache
ln -s /sdcard/cache/meetmeCache cache
MySpace
1
2
3
4
cd /data/data/com.myspace.android
mkdir /system/sd/cache/files/myspace
rm -R files
ln -s /sdcard/cache/files/myspace files
Gmail
1
2
3
cd /data/data/com.google.android.gm/cache
rm -R webviewCache
ln -s /sdcard/cache/webviewCache webviewCache
Voice Search
1
2
3
cd /data/data/com.google.android.voicesearch/cache
rm -R webviewCache
ln -s /sdcard/cache/webviewCache webviewCache
My Maps Editor
1
2
3
cd /data/data/com.google.android.apps.mymaps/cache
rm -R webviewCache
ln -s /sdcard/cache/webviewCache webviewCache
it will help yu...dont forget tp press the thanks button
Thanks, I've already seen these instructions, but I can't seem to find how to move gallery cache using these methods.
Hi... I have a rooted Sony Xperia J. It has phone memory of 764 mb, Internal SD card of 2.01gb and an ext SD card of 32gb.
What I want to do is move my app data which I think is in /data/data to my internal SD card which I think is mounted at /mnt/sdcard? I am going to create a folder on my sdcard called data.
I need some advice though as to whether this is possible and safe to do?
is it as simple as doing;
mkdir /mnt/sdcard/data
cp -r /data/data /mnt/sdcard/data
ln -s /data/data /mnt/sdcard/data
Then rebooting ?
in fact, thinking this might be a better option? Please can someone confirm this wont brick my phone?
mkdir /mnt/sdcard/data
mkdir /mnt/sdcard/app
cp -r /data/data /mnt/sdcard/data
cp -r /data/app /mnt/sdcard/app
ln -s /data/data /mnt/sdcard/data
ln -s /data/app /mnt/sdcard/app
Then rebooting ?
Sorry, I am doing lots of reading on this, but still haven't seen if anyone has done exactly this before. Would like some confirmation. I think I got the linking the wrong way around, so I now think it should be like this;
mkdir /mnt/sdcard/data
mkdir /mnt/sdcard/app
cp -pr /data/data /mnt/sdcard
cp -pr /data/app /mnt/sdcard
rm -r /data/data
rm -r /data/app
ln -s /mnt/sdcard/data /data/data
ln -s /mnt/sdcard/app /data/app
Then rebooting ?
yeah, that doesnt workd... soft bricked
ninjaprawn said:
yeah, that doesnt workd... soft bricked
Click to expand...
Click to collapse
Just in case someone needs this.
This wont work as you guys described because you need to format your card to EXT2 or EXT4, android is linux and needs perms wich FAT32 dont have. Also you need to make init script to mount the sdcard at boot and not at startup.
magix01 said:
Just in case someone needs this.
This wont work as you guys described because you need to format your card to EXT2 or EXT4, android is linux and needs perms wich FAT32 dont have. Also you need to make init script to mount the sdcard at boot and not at startup.
Click to expand...
Click to collapse
But is there any app that makes it easy?
i've a tablet vega with honeice android.
my problem is /data dimension, too.
i'm using link2sd app but /data is full, evenly.
why?
That's "root directory" /sdcard1 and "root directory" /ext_card (just wanna avoid confusion), not /storage/sdcard1, which i do have, some apps I restored via Titanium on RR LP from stock KK depend on /sdcard1, to rebuild all databases from those apps from scratch is out of the question when there are symlinks, just need to learn how to make them work without causing a mess.
Posts I've found from the subject are old (pre-Lollipop), I would have guessed they are still good but somewhere it said it depends on the rom....
Symlink solution (easier, no delay waiting for block device), place the following in /etc/init.d/99sdcard1
Code:
#!/system/bin/sh
ln -s /storage/extSdCard /storage/sdcard1
ln -s /storage/extSdCard /mnt/sdcard1
ln -s /storage/sdcard0 /mnt/sdcard0
Don't know if this will work for me.. because symlink needs to be /sdcard1 at root
I'm not interested in creating mount points, just a symlink should do it, thanks in advance for any help.
I used the following in terminal emulator and it worked once:
Code:
ln -s /storage/sdcard1 /sdcard1
Then I created a file in /etc/init.d/99sdcard1 with that same line
Code:
#!/system/bin/sh
ln -s /storage/sdcard1 /sdcard1
Doesn't create the symlink, and when trying the command in term emu it says ln: sdcard1: Read-only file system