How to use SD card to make symbolic links - Samsung Galaxy S (4G Model)

I read a web page here: http://gailly.net/android/android-tips.html about Android tips for the Galaxy S 4G. However, I can't make symbolic links to files that are big (Earth is like 18MB)
I only have around 100 MB left, my Galaxy S 4G was full of bloatware and I am suffering the consequences of that. I have a device that I can install little to no software and it's frustrating to the point to which I need a custom ROM, make symbolic links, or return the device
Here is what I tried
#ln /cache/libearthmobile.so ./
link failed Cross-device link
#ln -f /cache/libearthmobile.so ./
Link failed No such file or directory
#ln -sf /cache/libearthmobile.so ./
Link failed No such file or directory
#ln -s /cache/libearthmobile.so ./
Link failed File exists
Has anybody with a Samsung Galaxy S 4G successfully made symbolic links?

Isn't that essentially what links2sd does?
Sent from my SGH-T959V using XDA App

Yeah but if I use microSD in my computers, I receive a message saying:
"LBA"
or something like that
So by doing that I can't format/resize/delete/create partitions in my microSD

rafarataneneces said:
I read a web page here: http://gailly.net/android/android-tips.html about Android tips for the Galaxy S 4G. However, I can't make symbolic links to files that are big (Earth is like 18MB)
I only have around 100 MB left, my Galaxy S 4G was full of bloatware and I am suffering the consequences of that. I have a device that I can install little to no software and it's frustrating to the point to which I need a custom ROM, make symbolic links, or return the device
Here is what I tried
#ln /cache/libearthmobile.so ./
link failed Cross-device link
#ln -f /cache/libearthmobile.so ./
Link failed No such file or directory
#ln -sf /cache/libearthmobile.so ./
Link failed No such file or directory
#ln -s /cache/libearthmobile.so ./
Link failed File exists
Has anybody with a Samsung Galaxy S 4G successfully made symbolic links?
Click to expand...
Click to collapse
It's hard to tell exactly what you are doing making it hard to tell you what's going wrong. It would help to know what directory you are in (or use an absolute path instead of ./) and to know what files are where and what you want linked. It looks like what you are aiming to do is move libearthmobile.so from data in to cache and then symlink the file back to the orig location but i don't know where you are, what file is where, if you copied or moved (or did anything at all). Please give us some more output.

I am in the following folder:
/data/data/com.google.earth/lib/

Related

Move All yourCaches to SD card at once.

I wrote a small script with help of stericson that will move all your caches to sd card. Right now, it will move caches for following apps;
1)Market
2)browser
3)street view
4)imeem music
5)tune wiki player
all these tutorials used from www.modmygphone.com, i just used all and wrote a script to make my job easier.
This script will make a folder called cache in your sd card, and 5 sub folder, for each apps.
Instructions:
copy the file to your sd card in home directory. make sure you have root.
go to terminal, and type in following commands
#mkdir /data/local/bin
#cp /sdcard/transfer.sh /data/local/bin
#chmod 0755 /data/local/bin/transfer.sh
#transfer.sh
it'll execute itself, if you get any error messages saying "bla bla bla" dir doesnt exist, that is because either you don't have that app installed or you have never used that app before and it doesnt have any cache to transfer.
Leave comments or suggestions. i will make maps work this weekend. i dnt have time right now.
http://rapidshare.com/files/184145725/transfer.sh
i am not responsible if it bricks your phone. I am pretty sure it wont though
thanks for this... btw can you add the steel cache also... will try this scrip as soon as i finish updating my pc.
robpet2 said:
thanks for this... btw can you add the steel cache also... will try this scrip as soon as i finish updating my pc.
Click to expand...
Click to collapse
yes will add more, but those are all for the weekend.
take your time bro...
I probably wont use it my self till after chrome is added.... but the noobs need this bad... lol
Worked. thank you.
Can you upload it somwhere else? I cannot access rapidshare at the moment.
Thanks
Hey Birba, copy and paste the below into notepad, save as transfer.sh
chmod 0777 /data/local/bin/transfer.sh
mkdir /sdcard/cache
rm -R /data/data/com.android.vending/cache
mkdir /sdcard/cache/marketCache
ln -s /sdcard/cache/marketCache /data/data/com.android.vending/cache
rm -R /data/data/com.android.browser/cache/webviewCache
mkdir /sdcard/cache/webviewCache
ln -s /sdcard/cache/webviewCache /data/data/com.android.browser/cache/webviewCache
rm -R /data/data/com.google.android.street/cache
mkdir /sdcard/cache/streetCache
ln -s /sdcard/cache/streetCache /data/data/com.google.android.street/cache
rm -R /data/data/com.imeem.gynoid/cache
mkdir /sdcard/cache/imeemCache
ln -s /sdcard/cache/imeemCache /data/data/com.imeem.gynoid/cache
rm -R /data/data/com.tunewiki.lyricplayer.android/cache/webviewCache
mkdir /sdcard/cache/tunewikiCache
ln -s /sdcard/cache/tunewikiCache /data/data/com.tunewiki.lyricplayer.android/cache/webviewCache
Oh and thank you for this necro, much appreciated for those of us who get hand cramps typing out all these commands on the G1 keyboard
Doesn't it seem like it would be a good idea to copy the cache over before you delete it
I'm a bit of linux noob.. but perhaps instead of deleting you could change it to mv and then you would not need to make the directory on the SD card either
so
rm -R /data/data/com.android.vending/cache
mkdir /sdcard/cache/marketCache
ln -s /sdcard/cache/marketCache /data/data/com.android.vending/cache
would become
mv /data/data/com.android.vending/cache /sdcard/cache/marketCache
ln -s /sdcard/cache/marketCache /data/data/com.android.vending/cache
Sd card myheim!!!
OK please help i have searched all over. I have 2 Questions & Requests:
1. How do I install a script file? I know it automaticlly changes the Registry of the android OS or the Internal/FileSystem whateva its called but how to i install it??? Please help & Be detailed.
2. This is the big one. If a script file does automaticlly change the Internal file system (Android Registry) without using the Abd Shell. Can u please make the upload the script files to "INSTALL & RUN APPS FROM THE SD CARD" its been very difficult using the "adb shell" on my desktop.
Ive tried everything. I even tried to use the "ASTRO" file browser to modify the correct files but evenwith root it wont allow you to modify or switch files.
PLease Help. My SD Card is already perfectly partioned and ready to go.
Thanks, that was an excellent post.
For steel, you can probably add this in the script file:
rm -r /data/data/com.kolbysoft.steel/cache/webviewCache
mkdir /sdcard/cache/steelCache
ln -s /sdcard/cache/steelCache /data/data/com.kolbysoft.steel/cache/webviewCache
-Gus
necromancerr said:
if you get any error messages saying "bla bla bla" dir doesnt exist, that is because either you don't have that app installed or you have never used that app before and it doesnt have any cache to transfer.
Click to expand...
Click to collapse
Would this error cause this to not work properly? In my case, I don't have imeem or tunewiki installed so I don't need these cache's moved. Would this cause a problem?
Also, how do you create a .sh file? I tried deleting these 2 commands myself but I couldn't find a .sh option in the save as drop down menu
Beast84 said:
I don't have imeem or tunewiki installed so I don't need these cache's moved. Would this cause a problem?
Click to expand...
Click to collapse
Nothing bad will happen because their caches won't be moved in the first place.
Beast84 said:
Also, how do you create a .sh file? I tried deleting these 2 commands myself but I couldn't find a .sh option in the save as drop down menu
Click to expand...
Click to collapse
Save as transfer.txt, then rename to transfer.sh
unknown.soul said:
Nothing bad will happen because their caches won't be moved in the first place.
Click to expand...
Click to collapse
Ok so I won't constantly have to dismiss errors on the phone due to this? Also does the script have to stay on the root of my SD or can I delete it after I perform the commands?
unknown.soul said:
Save as transfer.txt, then rename to transfer.sh
Click to expand...
Click to collapse
I tried that but it didn't change the file extension. The original I downloaded says sh file. The one I made still says text document
betawind said:
Hey Birba, copy and paste the below into notepad, save as transfer.sh
chmod 0777 /data/local/bin/transfer.sh
mkdir /sdcard/cache
rm -R /data/data/com.android.vending/cache
mkdir /sdcard/cache/marketCache
ln -s /sdcard/cache/marketCache /data/data/com.android.vending/cache
rm -R /data/data/com.android.browser/cache/webviewCache
mkdir /sdcard/cache/webviewCache
ln -s /sdcard/cache/webviewCache /data/data/com.android.browser/cache/webviewCache
rm -R /data/data/com.google.android.street/cache
mkdir /sdcard/cache/streetCache
ln -s /sdcard/cache/streetCache /data/data/com.google.android.street/cache
rm -R /data/data/com.imeem.gynoid/cache
mkdir /sdcard/cache/imeemCache
ln -s /sdcard/cache/imeemCache /data/data/com.imeem.gynoid/cache
rm -R /data/data/com.tunewiki.lyricplayer.android/cache/webviewCache
mkdir /sdcard/cache/tunewikiCache
ln -s /sdcard/cache/tunewikiCache /data/data/com.tunewiki.lyricplayer.android/cache/webviewCache
Oh and thank you for this necro, much appreciated for those of us who get hand cramps typing out all these commands on the G1 keyboard
Click to expand...
Click to collapse
This will not work because when u save the file it has to be in UNIX format. Android being based on linux needs this format to work. U either have to be in linux to save this file. If in windows u have to use a program called textpad. it is just an evalutation version. buy if you want.
necromancerr said:
This will not work because when u save the file it has to be in UNIX format.
Click to expand...
Click to collapse
Thanks for clearing that up, I actually haven't had the chance to test it out.
Beast84 said:
Ok so I won't constantly have to dismiss errors on the phone due to this? Also does the script have to stay on the root of my SD or can I delete it after I perform the commands?
I tried that but it didn't change the file extension. The original I downloaded says sh file. The one I made still says text document
Click to expand...
Click to collapse
U need to be in linux to save file in sh format. More than saving the file insh format they need to be in unix format. Use either linux or use textpad in windows. It'll work
Beast84 said:
Would this error cause this to not work properly? In my case, I don't have imeem or tunewiki installed so I don't need these cache's moved. Would this cause a problem?
Also, how do you create a .sh file? I tried deleting these 2 commands myself but I couldn't find a .sh option in the save as drop down menu
Click to expand...
Click to collapse
Don't worry abot that. The script will still work. If u ever get imeem, then u'l need to run the script again. Then it'll say that some files and folders already exists but u'll be fine
necromancerr said:
This will not work because when u save the file it has to be in UNIX format. Android being based on linux needs this format to work. U either have to be in linux to save this file. If in windows u have to use a program called textpad. Its a free program.
Click to expand...
Click to collapse
textpad FTW! It is an application that I use ALL the time.
BUT it is not free. It does has an unlimited evaluation, with a very non-intrusive registration reminder thingy. If you use Textpad as much as I do, please pay for it, and support the authors, so we can have more textpad goodness in the future
To save a file in unix format with textpad, go to file->save as, and then there is a "File format" field down at the bottom, where you can choose between PC, Unix and Mac.
JesusFreke said:
textpad FTW! It is an application that I use ALL the time.
BUT it is not free. It does has an unlimited evaluation, with a very non-intrusive registration reminder thingy. If you use Textpad as much as I do, please pay for it, and support the authors, so we can have more textpad goodness in the future
To save a file in unix format with textpad, go to file->save as, and then there is a "File format" field down at the bottom, where you can choose between PC, Unix and Mac.
Click to expand...
Click to collapse
thx for clarification. i dont use that program alot. so i didnt know that. thank you very much.
JesusFreke said:
textpad FTW! It is an application that I use ALL the time.
BUT it is not free. It does has an unlimited evaluation, with a very non-intrusive registration reminder thingy. If you use Textpad as much as I do, please pay for it, and support the authors, so we can have more textpad goodness in the future
To save a file in unix format with textpad, go to file->save as, and then there is a "File format" field down at the bottom, where you can choose between PC, Unix and Mac.
Click to expand...
Click to collapse
And once I change this to Unix, how do I save it as a .sh file? I still don't see the option anywhere. And renaming the file still doesn't change it
EDIT: I think I got it. I had to go into the preferences & manually add .sh as an extension. Is that how you did it JF?

Few EXt2 questions

Is it possible to veiw the files in the EXt2 partition from our G1 terminal? If so, can we also delete files? If so, someone explain how, thanks.
asuming is mounted on /system/sd
just
cd /system/sd
ls -la /system/sd
to list the files
is their a way to erase those files
There are commands for deleting files on Android. Look up the Linux Command prompt commands for performing those functions.
If you've rooted your phone and don't know the commands already, you haven't been paying attention to the instructions.
ls = directory listing
cp = copy
mv = move/rename
rm = remove
Those are the very basics. Remember that Unix-like operating systems are case-sensitive and file.txt is different from File.txt or file.TXT.
If you're using wildcards to delete everything, take a precaution and use the dot-slash. It could save you a lot of trouble by ensuring you're only deleting files in the current working directory. To remove all text files in a directory, for example, you'd type rm ./*.txt
god, i hate how rude people are. I grew up with DOS, so dir, and del come more naturally to me than linux commands. So just ease up on the ppl that don't know linux. I didn't know linux til i started to IRC and wanted to run an eggdrop bot. Not like everyone has irc'd or compiled, or whatever. Heck, it has been so long now, I could not write an irc script or egg addon, and I think i was the first to develop some scripts in IRC 20 years ago. So all I can say is chill.
Shaggy
??huh??
whats the beef all about?
you can google the command and linux and probably have a ton of sites that list and explain the usage and stuff like that for *nix commands unix is a very old OS linus torvalds just woke up 1 day at age 15 or sumthin and said im gonna make a unix kernal that runs on my intel based pc and then instead of selling it and making a fortune I'll give it away and still make a fortune.
LINUS is the greatest man of our time, when the other OS was charging BIG $ to run Apache web servers in the .com boom (even more so now) linux was FREE and gave better throughput on the same hardware
Now if you want a pretty box booklet and packaging as you have become accustomed they have them to, some just feel better if they pay for it, free must not be as good as the one that costs right?
why did I bother just rambling, please ignore the babbling lunatic in the corner he is harmless
bhang
beartard said:
If you've rooted your phone and don't know the commands already, you haven't been paying attention to the instructions.
ls = directory listing
cp = copy
mv = move/rename
rm = remove
Those are the very basics. Remember that Unix-like operating systems are case-sensitive and file.txt is different from File.txt or file.TXT.
If you're using wildcards to delete everything, take a precaution and use the dot-slash. It could save you a lot of trouble by ensuring you're only deleting files in the current working directory. To remove all text files in a directory, for example, you'd type rm ./*.txt
Click to expand...
Click to collapse
if you dontknow how to be polite to the noobz then dont say anything at all. let someone else answer their questions.
Hi Beartard,
Thanks for the info.
This site has such a wealth of information, that it can be overwhelming to many members.
Can you tell me how to copy my apps-private from my ext2 partition to my sd card partition so I can back them up?
Thanks
beartard said:
If you've rooted your phone and don't know the commands already, you haven't been paying attention to the instructions.
ls = directory listing
cp = copy
mv = move/rename
rm = remove
Those are the very basics. Remember that Unix-like operating systems are case-sensitive and file.txt is different from File.txt or file.TXT.
If you're using wildcards to delete everything, take a precaution and use the dot-slash. It could save you a lot of trouble by ensuring you're only deleting files in the current working directory. To remove all text files in a directory, for example, you'd type rm ./*.txt
Click to expand...
Click to collapse
uh you wan't to copy your "app-private" folder as a backup in to yoru sdcard correct? well try this
busybox cp -a /system/sd/app-private /sdcard/app-private
if it don't allows you to copy do this command to re mount the system as read-write
mount -oremount,rw /dev/block/mtdblock3 /system
Hi Nitro .
I tried it both ways and it says operation not permitted.
-------------------
Update:
But wait, I connected my phone to the computer and the app-private is copied to the sdcard.
Your procedure worked!
I erased the folder that was copied to test it again.
Then I used just this set of commands and it worked again:
busybox cp -a /system/sd/app-private /sdcard/app-private
So you still get the same error, but it works.
Thanks alot Nitro!!!
Nitro212 said:
uh you wan't to copy your "app-private" folder as a backup in to yoru sdcard correct? well try this
busybox cp -a /system/sd/app-private /sdcard/app-private
if it don't allows you to copy do this command to re mount the system as read-write
mount -oremount,rw /dev/block/mtdblock3 /system
Click to expand...
Click to collapse
u tried it as root? what error u got?
well glad it worked.
Hi,
The error says:
"cannot preserve ownership of ... cannot preserve permissions of ... operation not permitted"
for every file it tries to transfer.
But then when you look in your sdcard the app-private is there.
So it is a false error.
Thanks again.
Nitro212 said:
uh you wan't to copy your "app-private" folder as a backup in to yoru sdcard correct? well try this
busybox cp -a /system/sd/app-private /sdcard/app-private
if it don't allows you to copy do this command to re mount the system as read-write
mount -oremount,rw /dev/block/mtdblock3 /system
Click to expand...
Click to collapse
It's not working for me...
My error is this:
cp: cannot stat '/system/sd/app-private': No such file or directory
Hi,
Use terminal emulator jf 1.41 or better
type su enter
then the busybox commands
Connect your phone to your computer and look on your memory card.
app-private is there
Proxin said:
It's not working for me...
My error is this:
cp: cannot stat '/system/sd/app-private': No such file or directory
Click to expand...
Click to collapse
bestwebs said:
Hi,
Use terminal emulator jf 1.41 or better
type su enter
then the busybox commands
Connect your phone to your computer and look on your memory card.
app-private is there
Click to expand...
Click to collapse
hey guys need some help here i have the same problem, (as far as the error saying 'no such file or dir') and i tried your suggestion about typing su first then the busybox commands.
i have the most current terminal emulator, unfortunately i still continue to get the same error every time i try to run the busybox commands. it just simply say 'no such file or directory"
you guys have any suggestions for me to try ?
any help would be great.
the error i get is "cannot preserve permissions of" i think that error is not something harmful im n o *nix expert but is just saying it wont save the permision of that folder i think...
Code:
# mkdir /sdcard/bk
mkdir /sdcard/bk
# busybox cp -rf /data/app-private/ /sdcard/bk
busybox cp -rf /data/app-private/ /sdcard/bk
cp: cannot preserve permissions of '/sdcard/bk/app-private': Operation not permi
tted
# ls /sdcard/bk
ls /sdcard/bk
app-private
thats what i did.. worked for me.. moved the app-private in to a folder named bk inside the sdcard
Hi,
We are assuming that you have already moved your apps and caches to the memory in a ext2 partition, correct?
Otherwise this will not work.
I 1st followed all the instructions in this post:
http://forum.xda-developers.com/showthread.php?t=468959
All this has to be done 1st including the 2 step 13's
onikus said:
hey guys need some help here i have the same problem, (as far as the error saying 'no such file or dir') and i tried your suggestion about typing su first then the busybox commands.
i have the most current terminal emulator, unfortunately i still continue to get the same error every time i try to run the busybox commands. it just simply say 'no such file or directory"
you guys have any suggestions for me to try ?
any help would be great.
Click to expand...
Click to collapse
nitro all i can say is thank you very much, i was looking through a 15 yr old unix book looking up commands, and it's just been so damn long ago i couldn't put it together.
thanks a ton. i'm sure you saved me at least a few hours.
@bestwebs ya i have done everything else including moving things to the ext2 partition i was just stuck on a few comands here and there.
but again thanks to both of you, and i'm all setup up now.
Hi,
Nitro is a real blast!
Glad it's working.

Possible [How To] Moving all caches to SD?

Hi i have rooted successfully recently and was wondering how to move my caches to the SDcard, i have search around and stumble upon these 2 script that completely relocate anything with a cache to the SDcard.
Being a total noob with unix command, i can't be sure how perfect these commands are and was wondering if anyone can improve upon it, or notice if there is any problem in applying it?
Lastly, i was wondering if there is a method to activate the code easily then typing it all out?
I have done some searches but none or no one commented on how useful or practical these commands are?
Some of the searches brought me to multiple threads, and i was wondering if my suggestion would make it easier for people to look for it later on.
Again thanks in advance, i don't mind being the first to try any of these commands but wanted a error check first to see the feasibility of such codes.
Thanks to the coders who prepared the 2 code below.
daeglo said:
What it does (allegedly):
Searches /data/data for any file containing the string 'cache' which is not already a simlink.
Moves files to the supplied new cache directory.
Creates simlinks in place of the old files to the new files.
What you need to do:
Save the attached file (recache.zip)
Extract the two shell files (recache, relocate)
Examine the files to be certain I am not malicious/stupid (the latter is quite possible)
Push the files to a directory in the default path on your phone (/system/xbin works for me)
Make the files executable (chmod 555 /system/xbin/{recache,relocate})
Run the command: recache <new_cache_directory>
Synopsis
recache <new_cache_directory>
Moves all files matching /data/data/*/*cache* to new_cache_directory and creates a symlink from the old location of the file.
new_cache_directory - optional - defaults to '/sdcard/cache'
relocate file new_directory
Moves the named file to new directory, encoding the original path in the new file name and creates a symlink from the original file location.
file - required - the file to move
new_directory - required - the directory to move the file to.
edit: emphasized the need to examine the files -- I make no claim of fitness or usefulness of this script for any reason. Many eyes make deep cracks small. If anybody sees a problem with my script, post the problem and PM me about it.
Click to expand...
Click to collapse
Fnorder said:
This one should catch everything that uses 'webviewCache' - provided it's already created it's cache directory. It also has a configurable list for those that hog space in other ways.
Code:
#!/system/xbin/bb/ash
TARGET="/sdcard/cache"
CACHE="
/data/data/com.imeem.gynoid/cache
/data/data/com.google.android.street/cache
/data/data/com.android.vending/cache
/data/data/com.android.browser/app_thumbnails
/data/data/*/cache/webviewCache
"
sdtotal=0;mmctotal=0;successtotal=0;failtotal=0
if [ ! -d "$TARGET" ]; then
mkdir $TARGET
fi
for i in $CACHE; do
local odir=$(echo "$i"|sed s,^/data/data/,,)
local app=$(echo "$odir"|cut -d / -f1)
if [ -d "$i" ]; then
if [ ! -L "$i" ]; then
let mmctotal++
echo -e "$app:\n\t* Moving '$odir'..."
mkdir -p "$TARGET/$odir"
if [ ! -d "$TARGET/$odir" ]; then
echo -e "\t- Error creating directory: $TARGET/$odir"
let failtotal++
else
rm -r "$i"
ln -s "$TARGET/$odir" "$i"
if [ -L "$i" ]; then
echo -e "\t+ Success"
let successtotal++
else
echo -e "\t- Failure! Please investigate $i"
let failtotal++
fi
fi
else
let sdtotal++
fi
fi
done
echo "Matched cache dirs: $sdtotal symlinked, $mmctotal on mmc.";
if [ "$sdtotal" ]; then
echo "Successful moves: $successtotal, Failures: $failtotal"
fi
Click to expand...
Click to collapse
No one willing to look at the codes?
if you are asking on how to use that code there..
1. needs to be saved with an .sh extention eg: recache.sh and located at /usr/local/bin or you can just leave it in the root and esecute it with ./recache path/to/where/u/want/it eg: /sdcard/cache
2. need to give ti permisions.. chmod 555 recache.sh
if thats what u are looking to know?
Nitro212 said:
if you are asking on how to use that code there..
1. needs to be saved with an .sh extention eg: recache.sh and located at /usr/local/bin or you can just leave it in the root and esecute it with ./recache path/to/where/u/want/it eg: /sdcard/cache
2. need to give ti permisions.. chmod 555 recache.sh
if thats what u are looking to know?
Click to expand...
Click to collapse
No actually i was wondering if the codes are correct, and both says they do the same thing however the codes seems different. Was wondering which one should i run, and is the code correct.
Since i am a noob in Linux, i can't be sure what is happening.
I have been looking around and every other cache to sdcard method, are limited to certain programs, the code quoted by me earlier finds any cache and put it into Sdcard automatically, however other then wondering if the codes is correct, i was wondering if there is any possible drawback? And if possible, is there a method so that i can easily clear my caches too?
So my request to sum it up would be :
1)Is the code correct, and will it run?
2)Which of the 2 code is practical?
3)Anydrawback when i transfer all known cache? (Since settings to have cahce right?)
4)Last but not least, a code to clear the caches on my SDcard?
naTTan said:
No actually i was wondering if the codes are correct, and both says they do the same thing however the codes seems different. Was wondering which one should i run, and is the code correct.
Since i am a noob in Linux, i can't be sure what is happening.
I have been looking around and every other cache to sdcard method, are limited to certain programs, the code quoted by me earlier finds any cache and put it into Sdcard automatically, however other then wondering if the codes is correct, i was wondering if there is any possible drawback? And if possible, is there a method so that i can easily clear my caches too?
So my request to sum it up would be :
1)Is the code correct, and will it run?
2)Which of the 2 code is practical?
3)Anydrawback when i transfer all known cache? (Since settings to have cahce right?)
4)Last but not least, a code to clear the caches on my SDcard?
Click to expand...
Click to collapse
basically he created a repeating loop for cache .. the line you are interested in is the first part:
CACHE="
/data/data/com.imeem.gynoid/cache
/data/data/com.google.android.street/cache
/data/data/com.android.vending/cache
/data/data/com.android.browser/app_thumbnails
/data/data/*/cache/webviewCache
"
these are the only cache files at which he's looking .. now the /*/ would potentially mean all programs using /cache/webviewCache under their folder would also be moved .. there are other script and method out there that do the same thing
me personally .. i would change the target to /system/sd/cache and put them on the EXT2 partition .. it also appears he is deleting the existing cache and starting over .. i have a script that copies the existing cache before creating the link
bottom line .. should work ok
Thx for your help but one uses webview cahce while the other uses cahce alone in their command any significant difference?
There are other scripts? Mine linking me? If it not too much of a trouble?
Thanks again for all your help/.

Operation not permitted trying to create Soft link

I have two Wallpaper apps that both save their wallpapers (GreatHD and Flikie) to different folders. One of the apps is responsible for changing wall papers (Flikie) based on the images in it's folder. I wanted to make a symlink so that GreatHD would save it's wallpapers in Flikie's folder. Flikie stores wallpapers in /sdcard/Flixie/Wallpaper and GreatHD in /sdcard/GreatHDWallpapers
So I tried this... from my laptop
adb remount
adb shell
# cd /sdcard
# ln -s Flikie/Wallpapers GreatHDWallpapers
ln: GreatHDWallpapers: Operation not permitted.
Am I missing something here?
The GreatHDWallpapers folder doesn't mistake
Your sdcard is a FAT file system, which does not support symbolic links.
Ok.. can I use a cron or something like that then?
Sent from my HTC One S using xda app-developers app
you could use gscript and just use a cp (copy) or mv (move) command.

Creating asystem.tar

Hi!
I need help Regardin to this thread, hope someone could help me regarding it https://forum.xda-developers.com/showthread.php?t=2195858 Im stuck at making a system.tar in Xperia XZ Nougat.
Im trying to run this
Code:
tar -c system/* >> sdcard/system.tar
Im getting
Code:
Tar: /sdcard/system.tar no such a file or directory
Im on rooted device with systemless su.
Otherwise Im getting permission denied
Code:
tar: cant open ´system/bin/run-as´: permission denied
Code:
tar: cant open ´system/bin/uncrypt´: permission denied
Code:
tar: no system/lost+found: permission denied
or
Code:
tar: system/* no such a file or directory
I cant get it to work, googled it but with no luck.
Edit:
System.tar somehow got created to sdcard and the size is about 4.3gib but there is nothing in there
I really do not know why you want to do this.
For backup you are better off (and with compressed archives) using TWRP.
system.tar could easily fill your userspace...
Do a web search on "man tar". You really screwed up the syntax.
Probably you want to do something like:
tar -cf /sdcard/system.tar /system/*
Hint: "sdcard" is a path name for the internal storage of your phone.
You probably want to use the micro-sdcard plugged into your device.
You will find it via ls /storage
Then use something simalar to
tar -cf /storage/3032-6330/system.tar /system/*
If you are prohibited by SELinux to write there, write into an existing directory on the sdcard instead or create one with a capable filemanager or via adb shell
DHGE said:
I really do not know why you want to do this.
For backup you are better off (and with compressed archives) using TWRP.
system.tar could easily fill your userspace...
Do a web search on "man tar". You really screwed up the syntax.
Probably you want to do something like:
tar -cf /sdcard/system.tar /system/*
Hint: "sdcard" is a path name for the internal storage of your phone.
You probably want to use the micro-sdcard plugged into your device.
You will find it via ls /storage
Then use something simalar to
tar -cf /storage/3032-6330/system.tar /system/*
If you are prohibited by SELinux to write there, write into an existing directory on the sdcard instead or create one with a capable filemanager or via adb shell
Click to expand...
Click to collapse
Yepp, I screwd it up. Thanks for the replay, reflashing it now "AGAIN". Im a newbie, trying to learn how to create a rom. I dont have access to micro-sdcard right now, will try it tomorrow

Categories

Resources