Using Swap on LG GT540
What is Swap ?
Code:
If I'm right, Swap is used to move UNused running programs from RAM to a file created in SD card or a swap partition
What method are we using ?
Code:
We will Swap by using [URL="http://adf.ly/4Hoa5"]SWAPPER[/URL]
Pros:
Code:
More Free RAM and faster response
SWAP will Fix "auto-close of some HD games while loading problem".
Cons:
Code:
Takes more time when switching between tasks (Depends on SD card speed)
How to use Swap ?
Code:
Simple just Download Swapper from [URL="http://adf.ly/4Hoa5"]HERE[/URL]
Run application and allow superuser permission
select the amount of MB's you want to swap I recommend 200MB
Select active on boot and click save
How to know if swap is working ?
Code:
In "Terminal Emulator" type free and it should be somthing like this
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
VERY IMPORTANT NOTE : It wont work on (SDSL3) because of some permission bug if someone got it worked just tell me.
List of games I used and worked after Swap:
Code:
GTA III (Never ran correctly before swap)
X-Formula (Never ran correctly before swap)
Worms (Never ran correctly before swap)
Gangstar 1 and 2 (worked at random times before swap)
i do recommend using a swap partition, more stable and with an easy script usable so no need for using swapper.
We can also check is swap working in setcpu. I dont recommend swap on stock sd card because phone is slower. Being ohnest swap is only usefull for games
Sent from my GT540 using Tapatalk
hey i made a thread about this last time time to bump it!!!
Hi,
I tried 'swapper for root' from the market before rooting my 'LG Optimus Pro C660'
no action happened !
I rooted my phone thanks to this great community !!!
Now i re-installed the 'swapper for root' and this time i saw some action, i created a swap size and checked the 'active on boot' and there was a small pop-up saying the swap file was being created.
I got so excited hoping that my 256MB RAM would now be less bothersome...
But alas! my excitement was short-lived ... a 'free' command on my terminal showed swap at 0-total 0-used 0-free
Can somebody help me implement swap successfully on my device
thanks,
aiamuzz.
aiamuzz said:
Hi,
I tried 'swapper for root' from the market before rooting my 'LG Optimus Pro C660'
no action happened !
I rooted my phone thanks to this great community !!!
Now i re-installed the 'swapper for root' and this time i saw some action, i created a swap size and checked the 'active on boot' and there was a small pop-up saying the swap file was being created.
I got so excited hoping that my 256MB RAM would now be less bothersome...
But alas! my excitement was short-lived ... a 'free' command on my terminal showed swap at 0-total 0-used 0-free
Can somebody help me implement swap successfully on my device
thanks,
aiamuzz.
Click to expand...
Click to collapse
Make sure you select the fat partition. Also, make the file smaller. Stay at 200 until it doesn't work, and roll back.
Sent from my LG GT540 Swift using Tapatalk
Thanks for looking into my post.
My research lead me into partitioning my SD card for a swap partition(instead of the swapfile method of 'swapper for root') and enabling swap on it through a shell script from here...
Auto Swap Partition
I was able to execute everything including
mkswap /dev/block/mmcblk0p1 ...
which resulted in the following response...
"Setting up swapspace version 1, size = 1733292032 bytes uuid=4e22c415-5500-48f9-8dc8-a93ebde7794e"
But the final command to implement swap...
swapon /dev/block/mmcblk0p1
resulted in the following error...
" swapon: /dev/block/mmcblk0p1: Function not implemented "
Which did not enable swap successfully !!!
I believe in the case of 'swapper for root' too the same command played the spoil sport.
swapon: /sdcard/swapfile.swp: Function not implemented.
Any Help to have swap enabled on my Android device 'LG Optimus ProC660' is most appreciated.
thanks,
aiamuzz
@up if you want swap on you other phone im sure it needs custom kernel
Thank you!
thanks ...........
Related
this is to EVERYONE that is having an issue using Paragon to partition their card to ext2/ext3. simple solution and it will NEVER fail. are you ready for this???
USE LINUX
now that that's out of the way you can go
here to download the .iso
or
here to order a live CD of the latest ubuntu distribution you will have to register an account but it's free and free to get the CD shipped to your home(AND YOU GET STICKERS!!!!)
this is the EASIEST way to partition your card. before starting backup everything on your card
1. after downloading the .iso burn it to a cd/dvd
2. reboot your computer with the disk still in the cd drive
3. boot to the CD(your computer may or may not be set up to try the cd first so f10 or f12 will usually get you the boot menu)
4. choose your language
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
5. choose the first option "try ubuntu without any changes to your computer"(or something like that)
6. wait for the computer to start up which might take a while as it is loading the OS from your cd drive
7. plug your phone into your computer and mount it
8. click System>Administration>Partition Editor
9. in the top right there is a little box that will let you choose what drive you want to edit(PLEASE MAKE SURE YOU CHOOSE THE CORRECT ONE)
10. after you have chosen your sd card it will appear in the main window with a horizontal graph above it showing your usage
11. right-click on the card in the main window and unmount it
12. go to the top and click Device>Create New Partition Table
13. you now have a totally blank sd card that is unformatted and not recognisable by windows or your phone
14. right-click on the unallocated space and create a new partition and format it as a primary partition and FAT 32, resize to the size you want to be FAT 32
15. right-click on the unallocated space and create a new partition and format as primary partition and make sure it is ext2/ext3 pending the ROM. this is the size of your apps partition
16. at the top click apply and it will go through the steps of partitioning your card.
if you get any errors for any reason at all you probably did something wrong, but check the details and post the error message here and i will answer it as soon as i can.
most times an error will occur because you forgot to unmount the drive from the partition editor. i know it seems stupid but you have to mount the card so the computer sees it, then unmount it so it can be edited.
screen shots will be up tomorrow when i wake up. please post here if you cannot figure this out
Just did this and I can confirm it worked flawlessly. Directions are clear and to the T.
Thanks a lot for this man, once my business starts making some money I'll float you a little present via PayPal, cuz this was just brilliant.
DON'T EVEN THINK ABOUT USING PARAGON - USE THIS GUIDE INSTEAD
Also, Ubuntu looks cool as hell!
glad this helped someone out
after my new 8g card arrived yesterday, i tried to format it and make the partitions via the rom manager app, which failed. dunno why, but it didn't do the trick. so i stumbled across this guide and it's idiot-proof so thx alot. did the trick and everything works nicely
alright follow these steps and you good to go
mounting sd card via command prompt (via adb)
1) go to your's phone's file manager
2) create a folder named external_sd in /sdcard/ (you have to make this folder to mount sd card in /sdcard/ !!!
3) inject this command in cmd (adb)
Code:
su
mount -o bind /mnt/emmc /sdcard/external_sd
and done enjoy ......
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
mounting sd card via terminal (terminal file added for newbies )
first do step 1 and 2 above .
then inject this code in terminal
Code:
busybox mount --bind /mnt/emmc /mnt/sdcard/external_sd
after mounting sd card to /sdcard/external_sd
done ......... enjoy
great! gonna try it! this is one of my reasons for not being in aokp/aosp, 'cause i've linked to much files with directory bind from sdcard to external, so i would have to move them back to internal sd card to re-bind them sdcard- to emmc, let you know if it works, btw, do i prompt this commands with the phone on or in recovery? I'm a noob when it comes to adb
plotinus said:
great! gonna try it! this is one of my reasons for not being in aokp/aosp, 'cause i've linked to much files with directory bind from sdcard to external, so i would have to move them back to internal sd card to re-bind them sdcard- to emmc, let you know if it works, btw, do i prompt this commands with the phone on or in recovery? I'm a noob when it comes to adb
Click to expand...
Click to collapse
1) you can do it when you phone is on
2 ) you have to inject this code after every boot (due to nand suff )
3) just download terminal form my attachment and do it
BTW you can try this method to add this script to boot http://www.xda-developers.com/tag/samsung-vibrant/
apk_xiz said:
2 ) you have to inject this code after every boot (due to nand suff )
http://www.xda-developers.com/tag/samsung-vibrant/
Click to expand...
Click to collapse
I tried to bind emmc to external_sd weeks ago.
The problem is that I couldn't get the script working under init.d. Probably the kernel I was using was the problem who knows.
I used gscript and ran the script at boot with su permission.
Also I suggest you to use this http://forum.xda-developers.com/showthread.php?t=1410262
I made APP
I made an APP to do it on app launch.
h t t p s : / / play . google . com/store/apps/details?id=com.guatedroid.galaxysd
its free no adds, (still in beta) but works.
Hi, I'm not sure if this is specifically a Nexus question or a general Android question but I have both a Nexus 4 and Nexus 7 and have observed the same behaviour on both
I have posted in the General section with nor response so now I'm posting on specific forums
Basically what's happening is when I delete stuff from the SDcard the free space seems to be allocated to the system partition WTF?!
Take a look at the screenshots I'm going to try a couple of things - one of the suggested things was clearing the data in the Google Services Framework data >> Settings - Apps - All - Google Services Framework - Clear Data - which freed up some of it but not all, the next thing from here for me would be to flash the factory images again and see what I start out with
Both devices are on CM10.1 if that helps, is anyone else is having the same issue??
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The discussion on Google+ http://goo.gl/lNyLW
Ok so this is my partition sizes now after flashing the factory images back onto my nexus 7. No where near 5GB anyone have any idea what's causing this?
I am guessing you have a couple of CWM back up? Maybe 3-4 of them? Maybe you tried to delete some of them?
Buggy CWM Recovery. Especially if you still hang on to the older versions. Mostly because the way CWM save the backup files.
KyraOfFire said:
I am guessing you have a couple of CWM back up? Maybe 3-4 of them? Maybe you tried to delete some of them?
Buggy CWM Recovery. Especially if you still hang on to the older versions. Mostly because the way CWM save the backup files.
Click to expand...
Click to collapse
I just use TiBU and DataSync now, stopped doing nandroids a while back now
Sent from my Nexus 7 using Tapatalk 2
It's not "system data" for sure. It's some apps with root permission saving its file to locations it shouldn't be doing.
Some how l still think it is CWM, even as you stopped using it in a distance past (which is like 1-2 months ago). I recommend flashing newest CWM and see if there're still old back up files.
If you still can't find anything, try this
bassmadrigal said:
If you are rooted and have adb set up on your computer, you can find out what folders are using the most space by using the commands below, then change into that directory and run the command again.
Code:
adb
su
cd /
du -hd 1
--find the largest folder and change directory (cd) into it - if you find you no longer want to continue in the folder you are in, you can cd .. to get to the previous folder or cd / to get back to the root of the filesystem--
Code:
cd large_folder
du -hd 1
rinse
repeat
????
profit
This will allow you to find what folders are using the most space and can eventually lead you to any large files and can then let you find out if you can delete them or if you need to keep them.
Click to expand...
Click to collapse
isnt this what they were saying was the reason for no SD card and use of MTP ?; basically if i recall correctly the nexus devices do not truly assign partitions instead there is a storage 'pool' that anything can use dynamically.
We got tired of seeing OEMs include many GB of internal storage for music, while users were still running out of space for apps and data. This approach lets us merge everything on one volume, which is way better.
-- Dan Morrill, Android engineer at Google
Click to expand...
Click to collapse
so i guess there is no partitions its just all 1 volume.
source: http://www.androidcentral.com/why-nexus-devices-have-no-sd-card
noobdeagle said:
isnt this what they were saying was the reason for no SD card and use of MTP ?; basically if i recall correctly the nexus devices do not truly assign partitions instead there is a storage 'pool' that anything can use dynamically.
so i guess there is no partitions its just all 1 volume.
source: http://www.androidcentral.com/why-nexus-devices-have-no-sd-card
Click to expand...
Click to collapse
I wish that was the case but it not, the space goes to the system partition and I cant access it on the sdcard
Hi guys. I want to share with you how to create SWAPFILE to extend memory.
Requirements :
- rooted ROM
- working init.d (if you want to mount it at boot, you need init.d capability)
- busybox (Stericson version is recommended)
- terminal emulator
1. Create swapfile
Open your terminal emulator, then escalate to root access using command
Code:
$ su
Before we step further, choose where you want to make swapfile. In this tutorial, I'll create swapfile on /data directory. Different locations, means different command!
To create swapfile, apply this command
Code:
# dd if=/dev/zero of=/data/swap bs=$((1024*1024)) count=YOUR_DESIRE_VALUE
Make your choice, how big your swapfile will be created. In this tutorial, I'll make 1024 kb of swapfile, yes it's 1 GB of swapfile.
So my command is
Code:
# dd if=/dev/zero of=/data/swap bs=$((1024*1024)) count=1024
Wait a second. The bigger your value, the longer the process. After it's finished, and there's no error. Proceed to next step.
2. Format swapfile using mkswap command
After the creation is success, format the file using mkswap, so that file can be used as swap.
Code:
# mkswap /data/swap
Remember, my swapfile is located in /data directory. Yours maybe different. Depends on where you created it in 1st step.
3. Mount your swapfile
After we format it, now we can mount it as swap using following command
Code:
# swapon /data/swap
Remember, my swapfile is located in /data directory. Yours maybe different. Depends on where you created it in 1st step.
4. Tweak swappiness value to optimize swap system
Code:
# echo 20 > /proc/sys/vm/swappiness
You can put value between 1 - 100. The less the value, the better the result. Why? Swappiness is a condition when to put overload memory to swap when your RAM is running out of memory. If you put value 20, System will put overload memory to swap when RAM is 80% (free 20%). By the way my value is 1 (ONE)
After that, drop cache so next time overload memory will be placed in your swap.
Code:
# echo 3 > /proc/sys/vm/drop_cache
I need to wait 1 - 2 hour(s) to make it work.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
As you can see, my swap is really working. You may need sometime to make it work.
Hit thanks if this helpful.
Is this really necessary on Z1? What improvement we will get have 2gb real Ram + 2gb Swap Ram on SD?
eclyptos said:
Is this really necessary on Z1? What improvement we will get have 2gb real Ram + 2gb Swap Ram on SD?
Click to expand...
Click to collapse
Agreed. Do you see any measurable difference on benchmarks, even?
I can't activate swapp on official 4.3... Can you help me?
Sent from my C6903 using xda app-developers app
On stock rooted .257, last command is
Code:
echo 3 > /proc/sys/vm/drop_cache[B]s[/B]
with an "s" to drop_cache.
This is the most idiotic idea ever, do not do this people, it will not increase performance in the slightest.
benben972 said:
I can't activate swapp on official 4.3... Can you help me?
Sent from my C6903 using xda app-developers app
Click to expand...
Click to collapse
No one knows what you did and what went wrong. Learn to ask questions.
xasbo said:
No one knows what you did and what went wrong. Learn to ask questions.
Click to expand...
Click to collapse
He did.
4.3 is the point - on locked bootloaders as no system rw access. In orher words not possible on LB. A part of that the swap idea is nonsense as it slows down the device.
Sent from my C6903 using xda app-developers app
Swap file is useful when the system needs more 'memory space than available physical memory (RAM)
Z1 has 2GB of RAM and able to provides resources for most of the time without the needs for swap file.
BTW ,swapping to external storage is slow and may increasing the storage failure.
On my Z1, it uses about 1GB of RAM and still have some more ready to be use.
Thank you.
Ref:
Code:
$ cat /proc/meminfo
Sent from my C6903 using xda app-developers app
Gentlemen. And Ladies.
First of all I'd like to all thank you for all your work and input as community of xda-developers.
I came here seeking for your help. I am trying to recover the pictures and videos I lost after accidentally performing factory reset. Since the factory reset I havent been using the phone so as least data as possible is overwritten. My phone is rooted and have Busybox installed.
So far I was able to copy a user data disk (I hope I chose correct one: '/dev/block/bootdevice/by-name/userdata' ) via adb from the device to my computer as a file 'userdata.raw' which has around 111gb. I've tried to mount the 'userdata.raw' as a virtual disk using OSFMount - this resulted in appearance of D: disk partition but it's not accessible via Windows Explorer (as it was corrupted). Afterwards I tried to recover data from that mounted D: drive using ActiveUNDELETE but the program doesnt see that D: Disk in the volumes list. Now I am trying to recover using qphotorec which is able to see D: drive as f2fs system. I'm also trying to restore the data directly from that 'userdata.raw' file using qphotorec. But both of these methods result only in outputting the one file: 'f60340268.swf' of around 3gb in size. Overall overview of the whole process is attached on the overwiew screenshot.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Now I think there are three scenarios but may be more:
I chose the wrong userdata disk while copying it via adb to on my PC. I picked '/dev/block/bootdevice/by-name/userdata'.
On the screenshot above you can see all the other locations which 'adb shell' -> 'su' -> 'df' outputs (number 1. window in left top corner)
I am doing something wrong while mounting the 'userdata.raw' as a virtual disk thus ActiveUNDELETE can't see it. Or doing something wrong while recovering the data directly from 'userdata.raw'
Contents of '/dev/block/bootdevice/by-name/userdata' is encrypted which results in receiving odd 'f60340268.swf'
file weighing around 3gb. You can see both the contents of 'f60340268.swf' and'userdata.raw' after running strings command on them. See attached Strings screenshots.
It feels like I am almost there but I got stuck and dont know how to approach this any further.
For copying user data disk from mi9t to my pc I followed guides I found here: https://stackoverflow.com/a/41397418
Windows won't explore raw files, you have to use linux or some software to recover your data, like minitool mobile recovery
yaro666 said:
Windows won't explore raw files, you have to use linux or some software to recover your data, like minitool mobile recovery
Click to expand...
Click to collapse
I tried minitool mobile recovery but no luck. I also tried minitool and diskdrill but same results - both of these apps dont see the monuted userdata.raw as D: drive. As it was not there. Windows Disk Management doesnt see it neither.
The only app that's able to see it is qphotorec but it determines file system type as f2fs
anyone?