[HOW TO] Create Swap File For Galaxy W - Samsung Galaxy W I8150

Cheers! This is my first thread. Hopeful i'm not reposting similar thread.
I will tell you how to create swap file for our W. Anyway, swap file works like swap partition. It can help your RAM for improve our W performance.
1. Root your phone
2. Install Superuser
3. Install Busybox
4. Install Terminal Emulator
If you are using CM10 from arco, that's mean you don't need to follow first 4 steps.
5. Open Terminal Emulator
6. Change directory to external sd card (external is recomended, because we won't take some spaces on internal sd card)
Code:
[email protected]:~$ su
[email protected]:~# cd /external_sd
7. Create swap file under external_sd directory. I will create 512MB swap file. If you wanna create other size of swap file, just change value of count. 512 is recomended.
Code:
[email protected]:/external_sd# dd if=/dev/zero of=swapfile bs=1M count=512
8. Set the right permissions (a world-readable swap file is a huge local vulnerability)
Code:
[email protected]:/external_sd# chmod 600 swapfile
9. After creating the correctly-sized file, format it to swap:
Code:
[email protected]:/external_sd# mkswap swapfile
10. Activate the swapfile:
Code:
[email protected]:/external_sd# swapon swapfile
11. Check your swap, whether is work or not.
Code:
[email protected]:/external_sd# free -m
Check your swap, if the value exactly like your value on 7th step, then you did it!
Any question? Just ask here.
You did it? Why U No hit thanks button?

This does not create a partition right? Just a swap file.. Like the paging file in windows?
My only concern is does it really help that much? What I mean is a user noticeable difference. Also would it make the lifespan of the SDcard shorter? Higher the class of the card, the better it is???
I have never done swap on my older phones and I really would like to do it if it makes a whole a lot of difference in terms of usage.
Also can you also let us know how to revert back in case one does not like it? Just delete the file?
Thanks for your answer in advance.

[/QUOTE]
thearif said:
This does not create a partition right? Just a swap file.. Like the paging file in windows?
Click to expand...
Click to collapse
No, it does not.
Yes, somewhat similar.
thearif said:
My only concern is does it really help that much? What I mean is a user noticeable difference.
Click to expand...
Click to collapse
Totally depends on your usage pattern.
thearif said:
Also would it make the lifespan of the SDcard shorter?
Click to expand...
Click to collapse
Yes, probably. That's why you shouldn't create a swapfile anywhere but the External SD.
thearif said:
Higher the class of the card, the better it is???
Click to expand...
Click to collapse
Of course.
thearif said:
Also can you also let us know how to revert back in case one does not like it? Just delete the file?
Click to expand...
Click to collapse
Reboot, then delete the file.
Sent from my GT-I8150 using xda app-developers app

Boosting Perfomance?

RezaBeye said:
Boosting Perfomance?
Click to expand...
Click to collapse
Totally depends on your usage pattern.
Sent from my GT-I8150 using xda app-developers app

omegahanggara said:
Cheers! This is my first thread. Hopeful i'm not reposting similar thread.
I will tell you how to create swap file for our W. Anyway, swap file works like swap partition. It can help your RAM for improve our W performance.
1. Root your phone
2. Install Superuser
3. Install Busybox
4. Install Terminal Emulator
If you are using CM10 from arco, that's mean you don't need to follow first 4 steps.
5. Open Terminal Emulator
6. Change directory to external sd card (external is recomended, because we won't take some spaces on internal sd card)
Code:
[email protected]:~$ su
[email protected]:~# cd /external_sd
7. Create swap file under external_sd directory. I will create 512MB swap file. If you wanna create other size of swap file, just change value of count. 512 is recomended.
Code:
[email protected]:/external_sd# dd if=/dev/zero of=swapfile bs=1M count=512
8. Set the right permissions (a world-readable swap file is a huge local vulnerability)
Code:
[email protected]:/external_sd# chmod 600 swapfile
9. After creating the correctly-sized file, format it to swap:
Code:
[email protected]:/external_sd# mkswap swapfile
10. Activate the swapfile:
Code:
[email protected]:/external_sd# swapon swapfile
11. Check your swap, whether is work or not.
Code:
[email protected]:/external_sd# free -m
Check your swap, if the value exactly like your value on 7th step, then you did it!
Any question? Just ask here.
You did it? Why U No hit thanks button?
Click to expand...
Click to collapse
Good evening,
when i put command "[email protected]:/external_sd# mkswap swapfile" phone give following message:
"image is too small"
can i continue??
Tks in advance

moonwonder said:
Good evening,
when i put command "[email protected]:/external_sd# mkswap swapfile" phone give following message:
"image is too small"
can i continue??
Tks in advance
Click to expand...
Click to collapse
Please post here the result of the 'ls -la' command in the directory where you created your swapfile.
Sent from my GT-I8150 using xda app-developers app

R: [HOW TO] Create Swap File For Galaxy W
in attachment.
tks
Sent from my GT-I8150 using xda app-developers app

R: [HOW TO] Create Swap File For Galaxy W
moonwonder said:
in attachment.
tks
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
i'm seeing that file size is 512 byte and not Mbyte...
Sent from my GT-I8150 using xda app-developers app

moonwonder said:
in attachment.
tks
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
Have you installed the latest Busybox by Stericson?

R: [HOW TO] Create Swap File For Galaxy W
resolved:
changing count number on 'dd' function. (from 512 to 536870919)
i suppose that my busybox don't support byte size (bs=1M)
tks.
Sent from my GT-I8150 using xda app-developers app

moonwonder said:
resolved:
changing count number on 'dd' function. (from 512 to 536870919)
i suppose that my busybox don't support byte size (bs=1M)
tks.
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
You should instead try changing bs=1M to bs=$((1024*1024))
Reason: Flash memory works in blocks. bs is the amount of data being written at a time. If you write 1 byte at a time, you're writing thousands of times to the same block, which not only makes the process slower, but also shorten the life of your Flash memory (because, appending 1 byte requires a cycle of: read the whole block, add one byte, write back the whole block).
The largest Flash memory block size I can ascertain from specs on the Internet is 128 KiB. Thus, bs=$((1024*1024)) would be suitable (1 MiB is an integer multiple of 128 KiB).
If your dd doesn't support the bs parameter at all, you really should replace it with one that does.
Sent from my GT-I8150 using xda app-developers app

R: [HOW TO] Create Swap File For Galaxy W
thanks!!!
now i understand reason that the time for swap creation was about 3 hours...ahahaha
in attachment my new swap!
Sent from my GT-I8150 using xda app-developers app

moonwonder said:
thanks!!!
now i understand reason that the time for swap creation was about 3 hours...ahahaha
in attachment my new swap!
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
LOL... with bs=$((1024*1024)), I took only about 1.5 minutes:
Code:
[email protected]:/ $ cd sdcard
ro of=tes.fil bs=$((1024*1024)) count=512 <
512+0 records in
512+0 records out
536870912 bytes transferred in 86.185 secs (6229284 bytes/sec)
[email protected]:/sdcard $
Sent from my GT-I8150 using xda app-developers app

I followed a thread to make an ext2 partition (about 1 GB, unfortunately couldn't make it divisible by 256)
then read this thread and another one so i created a swapfile in that partition ( data/sdext2/ ) . now i have a couple of question about the swapfile
1.is that line important & why ??
omegahanggara said:
8. Set the right permissions (a world-readable swap file is a huge local vulnerability)
Code:
[email protected]:/external_sd# chmod 600 swapfile
Click to expand...
Click to collapse
it's not present in pepoluan's code
pepoluan said:
To create a swap RAM:
Code:
su
targ=/mnt/sdcard/.swapfile
dd if=/dev/zero of=$targ bs=$((1024*1024)) count=64
mkswap $targ
Click to expand...
Click to collapse
2. for heavy games, which is more recommended : 256 or 128 MB swapfile, pep said 64 which will b a bummer for me
pepoluan said:
I have experimented *a lot* with swap memory, and I can tell you with absolute confidence:
Swap files larger than 64 MiB *will* result in additional lags. Larger than 128 MiB, your phone will be very slow.
To activate, you don't need to reboot.
Go to the Terminal and enter the command:
cd /mnt/sdcard
ls .*
(replace "sdcard" with the actual location of where you created the swap file, of course)
Click to expand...
Click to collapse
one last thing : is the ls.* code different from the swapon code or they r the same ??

I made an sh file for this and placed it in init.d coz i want it to automatically run when the system boots. However it didn't work.
So for now i just placed it in /system/bin so that i only need to type enable_swap in the terminal.
Any way to make it work in init.d?

Any Answer ???

klacenas said:
I made an sh file for this and placed it in init.d coz i want it to automatically run when the system boots. However it didn't work.
So for now i just placed it in /system/bin so that i only need to type enable_swap in the terminal.
Any way to make it work in init.d?
Click to expand...
Click to collapse
I assume you put the swap file in /sdcard ?
The first partition of the SD Card does not get mounted until all scripts in init.d have finished. I'm experimenting with Stericson's new BusyBox, which includes the 'nohup' command.
Sent from my GT-I8150 using xda app-developers app

pepoluan said:
I assume you put the swap file in /sdcard ?
The first partition of the SD Card does not get mounted until all scripts in init.d have finished. I'm experimenting with Stericson's new BusyBox, which includes the 'nohup' command.
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
Yes I put it in sdcard. Thanks for the explanation. Please share if you succeed.
Edit: if its not possible through init.d, is there another way of automatically executing a script after init.d?
Sorry not really a Linux person, I'm more familiar with autoexec.bat
Sent from my GT-I8150 using xda app-developers app

klacenas said:
Yes I put it in sdcard. Thanks for the explanation. Please share if you succeed.
Edit: if its not possible through init.d, is there another way of automatically executing a script after init.d?
Sorry not really a Linux person, I'm more familiar with autoexec.bat
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
Install SManager, add the script as a boot script. Boot scripts run using SManager always run after SD Card mounts.
Sent from my GT-I8150 using xda app-developers app

Related

[Cuestion] Swap Partition on CyanogenMod 7.2

I tried every way, but I can not use the swap partition on my WFS.
I installed the latest version of the ROM and the Kernel, but I can't make it work.
Does anyone know what should I do to run the "Swap Partition" on my phone?
Go through this.
http://wiki.cyanogenmod.com/wiki/Swap_and_Compcache
The cyanogenmod team feels that swap doesn't serve it's purpose on an Android device. To quote them
"This question is hotly debated, but you almost definitely do not need swap or compcache. The only exception to this may be if the device is a first generation device (i.e. HTC Dream or HTC Magic). If you think swap or compcache may make the device faster, feel free to follow the directions below."
Click to expand...
Click to collapse
And the WFS is not a first generation device
If you still want to go ahead with it, that link provides a how-to.
But the problem is that with this ROM my phone does not recognize the swap partition. I would like to post on its own thread, but I can not because I am a new user.
DanHidalgo said:
I tried every way, but I can not use the swap partition on my WFS.
I installed the latest version of the ROM and the Kernel, but I can't make it work.
Does anyone know what should I do to run the "Swap Partition" on my phone?
Click to expand...
Click to collapse
You have to create a mount script and copy it to /system/etc/init.d and give it the same permissions all the other files in init.d
Attached is the code to use if you have swap as the third partition on your SD card. Remove the .txt extension and place it in /system/etc/init.d and give it the appropriate permissions then reboot
Use the command "free" in a terminal session to verify swap is active and working.
It should be pretty straightforward to modify it to be the second if you aren't using an SD Ext partition for programs.
The code is:
Code:
#!/system/bin/sh
#Checks for a swap partition on mount 3 of the SD card and use it for swap partition.
if [ -b /dev/block/mmcblk0p3 ];
then
#Uncomment the line below to adjust swappiness. Default is 60 I believe
# echo 20 > /proc/sys/vm/swappiness;
swapon /dev/block/mmcblk0p3;
fi;
Change the line:
if [ -b /dev/block/mmcblk0p3 ];
to
if [ -b /dev/block/mmcblk0p2 ];
If you only have your FAT32 Primary and your Swap partition and no SDExt
I will try it this evening. Some people told me that oboe is that I created the Swap Partition with the recovery and I have to create it with the PC.
If I get it working I'll post my results. If not you will see me here again.
Enviado desde mi HTC Wildfire S usando Tapatalk
d33ps1x said:
You have to create a mount script and copy it to /system/etc/init.d and give it the same permissions all the other files in init.d
Attached is the code to use if you have swap as the third partition on your SD card. Remove the .txt extension and place it in /system/etc/init.d and give it the appropriate permissions then reboot
Use the command "free" in a terminal session to verify swap is active and working.
It should be pretty straightforward to modify it to be the second if you aren't using an SD Ext partition for programs.
The code is:
Code:
#!/system/bin/sh
#Checks for a swap partition on mount 3 of the SD card and use it for swap partition.
if [ -b /dev/block/mmcblk0p3 ];
then
#Uncomment the line below to adjust swappiness. Default is 60 I believe
# echo 20 > /proc/sys/vm/swappiness;
swapon /dev/block/mmcblk0p3;
fi;
Change the line:
if [ -b /dev/block/mmcblk0p3 ];
to
if [ -b /dev/block/mmcblk0p2 ];
If you only have your FAT32 Primary and your Swap partition and no SDExt
Click to expand...
Click to collapse
When I try to move the script to the specific file I get: failed to copy, or failed to move. How could I copy or move the script in /system/etc/init.d and give all permissions? I am using ES File Explorer and ASTRO. Should I move the zipped file or only the script? I couldn't move none of them
Portugah said:
When I try to move the script to the specific file I get: failed to copy, or failed to move. How could I copy or move the script in /system/etc/init.d and give all permissions? I am using ES File Explorer and ASTRO. Should I move the zipped file or only the script? I couldn't move none of them
Click to expand...
Click to collapse
You have to mount system partition as RW to be able to manipulate with files there, big white button "Mounr R/W" in the upper part of the Root explorer app while you are in /system/etc/init.d folder. Then you put there swap.txt file that d33ps1x provided up in the post, rename it just to swap and reboot phone.
I did that with almost every version of cm7 from the begining (in which kernel allowed that) and every time it worked, tnx to d33ps1x
kobredabre said:
You have to mount system partition as RW to be able to manipulate with files there, big white button "Mounr R/W" in the upper part of the Root explorer app while you are in /system/etc/init.d folder. Then you put there swap.txt file that d33ps1x provided up in the post, rename it just to swap and reboot phone.
I did that with almost every version of cm7 from the begining (in which kernel allowed that) and every time it worked, tnx to d33ps1x
Click to expand...
Click to collapse
Root explorer is a paid app. Is there any other app I could do that?
Portugah said:
Root explorer is a paid app. Is there any other app I could do that?
Click to expand...
Click to collapse
Total commander for android can do same:
http://forum.xda-developers.com/showthread.php?t=1619734
and it's free
kobredabre said:
Total commander for android can do same:
http://forum.xda-developers.com/showthread.php?t=1619734
and it's free
Click to expand...
Click to collapse
Once installed the app, how do I grant permissions to the file? the link shows images from the older version.
Portugah said:
Once installed the app, how do I grant permissions to the file? the link shows images from the older version.
Click to expand...
Click to collapse
Push and hold the file, choose properties and then hit first button right from the file name and current permissions to expand the menu
kobredabre said:
Push and hold the file, choose properties and then hit first button right from the file name and current permissions to expand the menu
Click to expand...
Click to collapse
I moved the file to the specific folder and I restarted my phone. Opening a2sd the swap button was turned off. I opened the terminal and I typed free, the results are 0-0-0. I didn't work.
Portugah said:
Once installed the app, how do I grant permissions to the file? the link shows images from the older version.
Click to expand...
Click to collapse
I granted permissions to the file using Total Commander app. Thank you. But it looks like it is not working yet.
Portugah said:
I granted permissions to the file using Total Commander app. Thank you. But it looks like it is not working yet.
Click to expand...
Click to collapse
Then the problem can be with kernel on ROM you are using, basic thing is that kernel needs to be abble to support swap for swap to even work... Can't help you much there since you are probably on marvelc version according to you'r country flag, i'm on diferent version. Some1 with same model as yours could help you tough
Is there any way to install another ROM that support swap? which ROM should I use? is there any tutorial?
Portugah said:
Is there any way to install another ROM that support swap? which ROM should I use? is there any tutorial?
Click to expand...
Click to collapse
The [2nd] above post is correct. Swap support is enabled in some custom kernels. If you're looking for another ROM, you're going to primarily ask about the kernel included with that ROM. Stock kernels do NOT support swap. You can enable swap [if you have a supporting kernel] via A2SDGUI or terminal... read up and familiarize yourself with linux swap.. since Android is a branch of Linux; same principles apply
Rob
Sent from my HTC_A510c using Tapatalk 2
This says it's possible to enable swap and compcache on CM7.2, but the howto wiki link is dead
To answer you question directly, by default the swap and Compcache schemes are disabled, but if you still feel the need to use them, above link provides you with a how-to.
So, yes, the CyanogenMod 7.2 supports swap and its usage needs to be activated.
Click to expand...
Click to collapse
Any idea how to do this?
For me the same question. I'm investigating since 1 week, tried scripts etc. no chance
Nexus One,
4EXT recovery (needed for correct sd-ext formatting)
CM 7.2
swap partition is there but not used.
What could i do to enable the swap partition?
Regards,
Marc
Hello,
I have the stable release cyanogenmod 7.2.0.
Swap is not working and gives following message:
swapon: /dev/block/mmcblk0p3: Function not implement
I found some notes saying that the problem is the kernel not supporting
swap. Which kernel can I use with cyanogenmod 7.2.0 with swap support?.
Thanks for your help.

[Q] Any way to change Thumbnail directory or decrease the size?

My thumbnail exploded to 707 MB and that's taking lost of spaces on internal SDcard
is there anything I can do to move the directory to External SDcard or resize it?
700 is a huge size, too huge for a thumbnail... At least for a normal one.
Thumbnail stores preview files such as those in your gallery or media player.
Its not recommended to modify the thumbnail anyhow.
But you can delete it if you want to.
I suspect its a mutated thumbnail. It means you got virus in it.
Try to scan it, if it doesn't go away, delete it. deleting thumbnails wont damage anything anyhow.
But just to be safe, you can always backup before doing it.
KiD3991 said:
700 is a huge size, too huge for a thumbnail... At least for a normal one.
Thumbnail stores preview files such as those in your gallery or media player.
Its not recommended to modify the thumbnail anyhow.
But you can delete it if you want to.
I suspect its a mutated thumbnail. It means you got virus in it.
Try to scan it, if it doesn't go away, delete it. deleting thumbnails wont damage anything anyhow.
But just to be safe, you can always backup before doing it.
Click to expand...
Click to collapse
Thanks for you reply
I've scan it and get no result..
I suspect it's Arco's CM10 alpha 4 that has this bug...
after I rolled back to alpha 3, the thumbnail stop to explode like that
my wonder thumbnail size 2.5gb,anything help for fix it,i want modified thumbnail..please
Sent from my GT-I8150 using xda premium
iv experienced this too when iv flashed the aokp JB long time ago( the very 1st aokp JB).n the size keep increasing.did delete the content but it keep coming back.did delete the whole folder but then the sd card still showed full memory.didnt know whats the prob.n same as OP i reverted back to my old ROM..mayb didnt do the pristine method when flashing(at that time i didnt know bout pristine)..
Use CM9 aka ICS based ROM. That was most likely one of the bugs remaining in CM10.
Though its true somehow instead of refreshing it accumulates.
Try the following in Terminal:
Code:
su
cd /sdcard/DCIM/.thumbnails
rm *.jpg
for f in .t*; do
: > $f
chmod 055 $f
done
Then, reboot your phone.
Sent from my GT-I8150 using xda app-developers app
pepoluan said:
Try the following in Terminal:
Code:
su
cd /sdcard/DCIM/.thumbnails
rm *.jpg
for f in .t*; do
: > $f
chmod 055 $f
done
Then, reboot your phone.
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
I got an error message when typing
Code:
rm *jpg
No such file or directory
gerz2405 said:
I got an error message when typing
Code:
rm *jpg
No such file or directory
Click to expand...
Click to collapse
u miss the "." b4 jpg?
pepoluan said:
Try the following in Terminal:
Code:
su
cd /sdcard/DCIM/.thumbnails
rm *.jpg
for f in .t*; do
: > $f
chmod 055 $f
done
Then, reboot your phone.
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
What will this do?
Sent from my GT-I8150 using xda app-developers app
pepoluan said:
Try the following in Terminal:
Code:
su
cd /sdcard/DCIM/.thumbnails
rm *.jpg
for f in .t*; do
: > $f
chmod 055 $f
done
Then, reboot your phone.
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
this actually worked!
but the .thumbnail* files are frozen at 0 size. is this okey?
K&Q said:
What will this do?
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
It will zero the .thumbnail files and make them read-only.
klacenas said:
this actually worked!
but the .thumbnail* files are frozen at 0 size. is this okey?
Click to expand...
Click to collapse
No problem on my phone, at all.
Sent from my GT-I8150 using xda app-developers app
Thanks a lot for this tips, I was about to ask this problem but then I found this topic already posted. Just make sure the .thumbnails file is there before doing on terminal.
pepoluan said:
Try the following in Terminal:
Code:
su
cd /sdcard/DCIM/.thumbnails
rm *.jpg
for f in .t*; do
: > $f
chmod 055 $f
done
Then, reboot your phone.
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
Yay! Finally got it right thanks! Awesome stuff..
Sent from my GT-I8150 using xda app-developers app
pepoluan said:
Try the following in Terminal:
Code:
su
cd /sdcard/DCIM/.thumbnails
rm *.jpg
for f in .t*; do
: > $f
chmod 055 $f
done
Then, reboot your phone.
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
Thank you!!!
You are an absolute star.
Just recovered 600mb of space
:victory:
pepoluan said:
Try the following in Terminal:
Code:
su
cd /sdcard/DCIM/.thumbnails
rm *.jpg
for f in .t*; do
: > $f
chmod 055 $f
done
Then, reboot your phone.
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
just curious, since all jpg files will be deleted after executing rm *.jpg
if we just follow it with this command
chmod 055 *
will the result be the same?
i'm just wondering, that would be easier to remember. still trying hard learning linux
edit: will answer myself, it doesn't work
pepoluan said:
Try the following in Terminal:
Code:
su
cd /sdcard/DCIM/.thumbnails
rm *.jpg
for f in .t*; do
: > $f
chmod 055 $f
done
Then, reboot your phone.
Click to expand...
Click to collapse
Thanks!!this work!!
But then I found another .thumbnail folder in root folder, and I think it is for movie coz I found "Oppa Gangnam Style" in it .
so is the command work for this thumbnail too by changing the directory to
cd /sdcard/.thumbnails?
Btw, what is the reverse command for this? coz i'm not really sure that it work as I wish, I remember the thumbnail folder exploded 1.35gb and my available memory is 2.++gb. after the command, the thumbnail get zero but my available memory is still 2.27gb. so i need the reverse command to compare.
sorry for my english, hope you can understand.
ricsonham said:
Thanks!!this work!!
But then I found another .thumbnail folder in root folder, and I think it is for movie coz I found "Oppa Gangnam Style" in it .
so is the command work for this thumbnail too by changing the directory to
cd /sdcard/.thumbnails?
Btw, what is the reverse command for this? coz i'm not really sure that it work as I wish, I remember the thumbnail folder exploded 1.35gb and my available memory is 2.++gb. after the command, the thumbnail get zero but my available memory is still 2.27gb. so i need the reverse command to compare.
sorry for my english, hope you can understand.
Click to expand...
Click to collapse
Have you rebooted? Due to the way Linux works, you can delete -- or zero, in this case -- a file, but the space used won't be released until anything holding that file open have closed. A reboot closes all processes holding a file, thus releasing back the used space.
To reverse the command, run the command again, but change 055 to 075 (the original flags for the file).
I'm not sure about /sdcard/.thumbnails ; I don't see one in my SD Card... what video player are you using? Maybe it belongs to that app...
Sent from my GT-I8150 using xda app-developers app
After i rebooted, the .thumbnails files went down to zero. But after i took a video n pic with d stock camera app, it created another .thumbnails file! So now there's one file with 0kb and another a huge size. What should i do now? M on cm10 alpha6.
Sent from my GT-I8150 using xda app-developers app
K&Q said:
After i rebooted, the .thumbnails files went down to zero. But after i took a video n pic with d stock camera app, it created another .thumbnails file! So now there's one file with 0kb and another a huge size. What should i do now? M on cm10 alpha6.
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
Run the commands I've posted again.
Sent from my GT-I8150 using xda app-developers app

[Q] byte 4byte forensic image of Galaxy w

Hi
I have a rooted Galaxy w and I am looking for a non commercial app that can make a byte for byte forensic dd image of the phone.
I want to do this so I can look for detailed SMS messages using winhex.
I wonder if anyone can suggest such an app but I'd prefer one that does not need complicated command line input as this just confuses the heck out of me.
Also, I have seen on various forensic sites reference is made to files named mtd0 through to mtd5 but when if have searched through
My galaxy w, these files are not on it anywhere?
I apologise if you are sick of this kind of question but any guidance or advice would be much appreciated.
Thanks in advance.
It will take only 5 lines of commands actually, and if you use adb shell instead of Terminal, a very easy copy-and-paste.
Code:
su
targ=/mnt/external_sd
bsiz=$((1024*1024))
blkp=/dev/block/mmcblk0p
dd if=${blkp}17 of=$targ/data.img bs=$bsiz
dd if=${blkp}28 of=$targ/internalsd.img bs=$bsiz
Just modify the "targ=" line to point to your location of external SD (will be 'sdcard' instead of 'external_sd' if you have swapped the SD Cards).
Sent from my GT-I8150 using xda app-developers app
pepoluan said:
It will take only 5 lines of commands actually, and if you use adb shell instead of Terminal, a very easy copy-and-paste.
Code:
su
targ=/mnt/external_sd
bsiz=$((1024*1024))
blkp=/dev/block/mmcblk0p
dd if=${blkp}17 of=$targ/data.img bs=$bsiz
dd if=${blkp}28 of=$targ/internalsd.img bs=$bsiz
Just modify the "targ=" line to point to your location of external SD (will be 'sdcard' instead of 'external_sd' if you have swapped the SD Cards).
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
Hi
Thanks for the reply and the great code which worked perfectly.
Just one question, does this code copy the un allocated spaces (where possible deleted files reside) as well?
Thanks in advance
event2020 said:
Hi
Thanks for the reply and the great code which worked perfectly.
Just one question, does this code copy the un allocated spaces (where possible deleted files reside) as well?
Thanks in advance
Click to expand...
Click to collapse
Yes, because it reads from the 'raw device', so each and every single byte, be them living in a used sector or a 'free' sector, will be copied. Up to and including the very last byte in the source partition.
Sent from my GT-I8150 using xda app-developers app
pepoluan said:
Yes, because it reads from the 'raw device', so each and every single byte, be them living in a used sector or a 'free' sector, will be copied. Up to and including the very last byte in the source partition.
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
Thank you so much.
You have really helped me.

[Q] Symlink from /sdcard to /storage/extSdCard

Hi
I'm trying to use a symlink from the internal SD card to the external one so I can use WikiDroyd on a larger disk. I have done this before to map google music to my extSDcard and it works great, using this command
ln -s /storage/extSdCard/googleMusic/ /data/data/com.google.android.music/files/music
but when I try
ln -s /storage/extSdCard/WikiDroyd/ /storage/emulated/0/WikiDroyd
I get Function not implemented. I'm guessing it's because /storage/emulated/0 doesn't support symlinks, is this because of it's disk format? Does anyone know how to find out it's format? Can I reformat it?
Note: I am using omega rom
Questions go in Q&A
Thread moved
Friendly Neighborhood Moderator
metronews said:
Hi
I'm trying to use a symlink from the internal SD card to the external one so I can use WikiDroyd on a larger disk. I have done this before to map google music to my extSDcard and it works great, using this command
ln -s /storage/extSdCard/googleMusic/ /data/data/com.google.android.music/files/music
but when I try
ln -s /storage/extSdCard/WikiDroyd/ /storage/emulated/0/WikiDroyd
I get Function not implemented. I'm guessing it's because /storage/emulated/0 doesn't support symlinks, is this because of it's disk format? Does anyone know how to find out it's format? Can I reformat it?
Note: I am using omega rom
Click to expand...
Click to collapse
Is /storage/emulated/0 the default directory for the app? If so, it may be failing due to trying to replace an existing directory with a symlink (particularly if that pre-existing directory is in use at the time).
If the app's directory setting can be altered, why not try putting the symlink elsewhere? Even if the app doesn't let you set a custom directory, creating your symlink elsewhere would, if successful, narrow down the likely causes of the error (unfortunately, if the app's directory setting is hard coded out otherwise unchangeable, then it would also prove that what you want to do is not possible, at least not through this approach)
Sent from my SPH-L710 using xda app-developers app
Are you sure that ln -s will work on non ext partitions? I don't think this won't work on FAT32/NTFS partitions.
lexridge said:
Are you sure that ln -s will work on non ext partitions? I don't think this won't work on FAT32/NTFS partitions.
Click to expand...
Click to collapse
That's a good point, I thought that certain configurations might work (like placing the link on an ext partition that points to a file on a fat 32 partition, since Linux can read both and Windows would never see the Linux-style link, for example) but I'll double check...
Sent from my SPH-L710 using xda app-developers app
styles420 said:
That's a good point, I thought that certain configurations might work (like placing the link on an ext partition that points to a file on a fat 32 partition, since Linux can read both and Windows would never see the Linux-style link, for example) but I'll double check...
Sent from my SPH-L710 using xda app-developers app
Click to expand...
Click to collapse
Just a thought, you might also try busybox ln -s and see if that works.

[GUIDE][HOW-TO]Use SWAP As Virtual RAM Without Partitioning SD Card

Firstly what is swap, you should know about it before
you go further
What is Swap:-
Swap space in Linux is used when the amount of
physical memory (RAM) is full. If the system needs
more memory resources and the RAM is full, inactive
pages in memory are moved to the swap space. While
swap space can help machines with a small amount of
RAM, it should not be considered a replacement for
more RAM. Swap space is located on hard drives, which
have a slower access time than physical memory.
Swap space can be a dedicated swap partition, a swap
file, or a combination of swap partitions and swap files.
Normally the swap space should be equal to the Actual
physical Ram
Click to expand...
Click to collapse
.
LEGAL WARNING-Read This before you proceed
I and XDA is not responsible for any damage done to your device..........
Click to expand...
Click to collapse
Requirements for this process:-
* Kernel which supports swap(Deviant,Hells,GNU,Merruk)etc
* Rooted galaxy y
* Busybox (atleast v1.18)
* Terminal Emulator
Click to expand...
Click to collapse
Steps to enable swap:-
1. Open any file explorer(I prefer root explorer) and create a folder and name
it swap
2. Browse to that folder and create a file named swap
3. Open terminal Emulator and type the code busybox
mkswap /sdcard/swap/swap xxxxxx
(xxxxxx is the amount in KB, eg:- 383456 = 378MB),
and this process will take time.)
4. Now we will activate the swap and to activate it type
in terminal busybox swapon /sdcard/swap/swap
5. The last step is to turn on swappiness and to do it
we write echo 100 > /proc/sys/vm/swappiness in
terminal
And now you are done to check the working of swap
type busybox free in terminal emulator.
NOTE-Last two steps are needed to be done after every boot
so it is better to make a script which can be started
from script manager......... and here is a script ready for this Swap.sh
REGARDS
You Can Rate This Thread 5 Stars......I won't ask for thank......if I deserve it..go ahead.....please do not copy the work to any other forum
Click to expand...
Click to collapse
Reserved
Feedback and WARNING by users
thewarlord said:
No confusion dude!!
Watch ur ram in task manager !! Its always in motion (increase & decrease) I think u understand that life of sd card depend on writeing amount !! Ok
If u create a swap in sd card or swap partition !! Its always write on sd card I think u r understanding my feelings!! so, It decrease the sd card life!!
Click to expand...
Click to collapse
New Method Using SWAPPER2.apk
Here the step :
go to settings -> swap place (put correct directory for
example: /sdcard/swap 128 ) bold text depend on your
swap name!
Tick "Safe Unmount" and "Safe Remount", u dont need
to turn off or turn on again before and after sharing sd
IMPORTANT!! :
go to Advanced preferences -> untick "Recreate
swap file" and "Reformat swap" MUST!!
D4rkSh4dow said:
Firstly what is swap, you should know about it before
you go further
.
LEGAL WARNING-Read This before you proceed
Steps to enable swap:-
1. Open any file explorer(I prefer root explorer) and create a folder and name
it swap
2. Browse to that folder and create a file named swap
3. Open terminal Emulator and type the code busybox
mkswap /sdcard/swap/swap xxxxxx
(xxxxxx is the amount in KB, eg:- 383456 = 378MB),
and this process will take time.)
4. Now we will activate the swap and to activate it type
in terminal busybox swapon /sdcard/swap/swap
5. The last step is to turn on swappiness and to do it
we write echo 100 > /proc/sys/vm/swappiness in
terminal
And now you are done to check the working of swap
type busybox free in terminal emulator.
NOTE-Last two steps are needed to be done after every boot
so it is better to make a script which can be started
from script manager......... and here is a script ready for this Swap.sh
REGARDS
Click to expand...
Click to collapse
you can simply use the app swapper for doing this
ok the info is good,but i hope you know about sdcard lifedecrease by using swap.it kills sdcards.
-CALIBAN666- said:
ok the info is good,but i hope you know about sdcard lifedecrease by using swap.it kills sdcards.
Click to expand...
Click to collapse
Sir,hav a look at OP,it says without SD Card paritition.....no use of sd card in this.....
oops my fail,anyway,have you fell a better performance?you didnt need so complex settings,just use System Control from Juwe11.
D4rkSh4dow said:
Sir,hav a look at OP,it says without SD Card paritition.....no use of sd card in this.....
Click to expand...
Click to collapse
no use of sd card ??? then where the file swap is created
internal system patition
-CALIBAN666- said:
internal system patition
Click to expand...
Click to collapse
3. Open terminal Emulator and type the code busybox
mkswap /sdcard/swap/swap xxxxxx
I don't think so
and it is galaxy y section sir we don't have internal memory to install enough apps so where to create a swap folder
apps???????its about ram,dude
sangalaxy said:
no use of sd card ??? then where the file swap is created
Click to expand...
Click to collapse
I meant no need of sd partition........why don't you read the whole post again before posting smthng
-CALIBAN666- said:
apps???????its about ram,dude
Click to expand...
Click to collapse
yes I know sir but you said the swap folder is in internel memory so iwas just pointing out that we only have 190mb data folder and no internel sd partotion
---------- Post added at 01:03 PM ---------- Previous post was at 01:01 PM ----------
D4rkSh4dow said:
I meant no need of sd partition........why don't you read the whole post again before posting smthng
Click to expand...
Click to collapse
yes I know friend but partition or not you have to create a swap folder in sd card which serves as a virtual partition
bro apps are not the same like ram,google for more infos.
Or do a xda search
-CALIBAN666- said:
bro apps are not the same like ram,google for more infos.
Click to expand...
Click to collapse
yes I know sir but iam not saying about the apps ok lets make it clear by using your method we create a folder named swap in the sdcard and it serves as a virtual rom right??
and I was only saying that as caliban666 said continuos read and write in sdcard will decrease its life whether it is a partion or a folder
sangalaxy said:
yes I know sir but iam not saying about the apps ok lets stop this its going outoff topic
Click to expand...
Click to collapse
Yes,u r rite.....btw if u tried it u can post some ss here
I'll add to the OP
D4rkSh4dow said:
Yes,u r rite.....btw if u tried it u can post some ss here
I'll add to the OP
Click to expand...
Click to collapse
sorry about ss friend anyway thanks for the post
i dont know but has anyone read this"tweak"?it creates a swap part on sd,otherwise its not fully working.
-CALIBAN666- said:
i dont know but has anyone read this"tweak"?it creates a swap part on sd,otherwise its not fully working.
Click to expand...
Click to collapse
Did you tried it sir?
no i didnt need to use it,all what i need to know i see,the other thing is swap is buggy for some roms and kernel(my expierence and opinion).

Categories

Resources