yashsingh1/xdaforums huggingface dataset:
[XPERIA X8 General] Segnale007:
I know this topic has been covered many times already, but since I couldn't find a easy and straight forward how-to to create a swap partition on my X8, I am going to walk you through few easy steps that will let you create a swap partition in 5 mins or so.

First things first I assume you have already the latest version of miniCM7 and nAa kernel, although this mini howto should apply for any phone and any rom out there, as long as the kernel supports swap partition.

First thing you want to partition your SD card in order to create our swap partition, I recommend you to follow this accurately.

Now that we have successfully created our swap partition, we want to boot up the phone and enable our swap partition in order to be accessible to the kernel.

To detect the swap partition that we have just created open up a ADB terminal and type

fdisk -l dev/block/mmcblk0

it will look something like this

/dev/block/mmcblk0p3 862 966 843412+ 82 Linux swap

write down the exact number of the swap partition and let's activate it by typing

swapon /dev/block/mmcblk0pX

** where X is the number of the swap partition **

We can now check if our swap partition has been activated by executing the command free

Now we want to make our swap partition to be activated at boot time, without having to activate it manually everytime we reboot the phone.

Assuming you know how to at least write and save a text file in VI, let's go back to our fido ADB shell and type

vi /data/local/userinit.sh

now lets drop few lines in

#!/system/bin/sh

#Swap
swapon /dev/block/mmcblk0pX

** where X is the number of the swap partition **

If you are not really comfortable with VI you can also use Nano or even RootExploer or any other root file manager if you are more comfortable with UI.

save it and once again in ADB shell lets make it executable

chmod a+x /data/local/userinit.sh

As last step you may want to change the swappiness value, note that most of the roms have it set to 60 by default, which is good enough in my opinion, although setting it to higher (max is 100) may help to improve overall performance, while setting it to lower may increase interactivity and overall stability.

Temporary change (until next reboot)

echo 60 > /proc/sys/vm/swappiness

Permanent change

echo vm.swappiness=60 >> /system/etc/sysctl.conf

As result

~ # free
total used free shared buffers
Mem: 186704 177248 9456 0 116
-/+ buffers: 177132 9572
Swap: 843404 53760 789644

** few notes **

I don't intend to take credit for this how-to as it takes few pieces of commands and hints from any guides out there which covers this topic, and anyways its basic linux knowledge really..

So cheers you all and enjoy :)
[XPERIA X8 General] rav3n_pl:
mmcblk0p3 is used when we have 3 partitions on SD and last one is swap.

If we have only 2 (fat+swap like me) it need to be mmcblk0p2

Also mkswap /dev/block/mmcblk0pX need to be done b4 you call swapon.
[XPERIA X8 General] Segnale007:
Yea I forgot to mention that mmcblk0p3 is in my case the swap partition and the number vary depends on how many partitions you have on your SD card.

Btw mkswap isn't needed if you follow my how-to, because Linux Swap file system is already selected when partitioning the SD card, you don't really need to format the swap partition again by using mkswap .
[XPERIA X8 General] Sir_gpm:
I tought that a partition is need it, to run the swap file, but now I am running it in my sd card without partition it. Is any difference, between partition my sd?
[XPERIA X8 General] rav3n_pl:
You are using swap file, it can be created by swapper. Swap partition is easier - it will persist when you connect to pc.
[XPERIA X8 General] Segnale007:
If you meant what's the difference between using swapper2 and partitioning the SD card is that basically you can assign as much space as you want to your swap partition, while with swapper2 you can't really have more than 250mb of swap.

Also like @rav3n_pl said, when you mount the sdcard on your computer the swap will stay available since it uses its own partition.

Personally I found 250mb of swap too little, my suggestion is to give at least 600mb to the swap partition.

My setup is 800mb of swap and swappiness value set to 70.
[XPERIA X8 General] lrakkarl:
I would like to ask you why & in what situation was 256mb swap insufficient?

Did you actually run 'free' in terminal to see how much swap was being used?

I just can't imagine anything running on our phone that will actually use up the whole 256mb swap, unless you are running a linux distro over the top...(less than 1% of users & those users know what they are doing)...the only thing a greater than 256mb swap space partition is doing is decreasing your over-all sd-card capacity for music/files/apps2sd/whatever2sd...

Swap doesn't 'add' ram. We don't magically have 1gb of ram with 800mb swap...

I'm not bashing,

I just think new users could easily take this idea the wrong way.

Same as other people advising newer users to set up 1gig+ of swap...it is just unused space on your sd-card.

The best thing about setting up a partition and not using swapper2 is you don't have an app on your phone that is notorious for auto-running, has root access, as well as internet permission. Root access means they can send any info about your phone straight through. Even with Droidwall+similar apps, they don't mean anything to root.
[XPERIA X8 General] hajiborojobo:
i have fat32 ext3 and swap,ext3 and swap works,but i cant use storage(fat32) phone say its wrong sd card..but in another rom with same kernel works..
[XPERIA X8 General] TimeWasterNL:
In the linked article is adviced to put a SD card of 2GB or smaller on FAT, maybe that's your solution? :)
[XPERIA X8 General] Segnale007:
I have never said that swap adds ram, not that I want new users to believe that, but in my case 256mb of swap was way too little, especially when it comes to play games and at the same times running apps in background while the phone still remains snappy. Maybe 800mb of swap is a little bit exaggerated, but in my opinion 500mb of swap is a must to have..
[XPERIA X8 General] revan17:
Wow, if only I read the second post and not gaze at the OP for 2h, it would have saved me two hours of googling. The OP needs to be modified.
[XPERIA X8 General] ankitxperia:
I Create Partion Using ClockwordRecovery MOD its that simple

even swapper works great can any body tell me i am doing something wrong
[XPERIA X8 General] bind9:
Can i do this in my wt19i?
[XPERIA X8 General] NIMBAH:
Yes you can. Not sure why you'd need to though, you already have 512Mb RAM.
[XPERIA X8 General] cenovita:
Hi all, why I always get this?

mkswap /dev/block/mmcblk0p2

Setting up swapspace version 1, size = 255593472 bytes

swapon /dev/block/mmcblk0p2

swapon: /dev/block/mmcblk0p2: Invalid argument

Also swapper2 is not working either...

I am using last nAa kernel and ROM.

Thanks.
[XPERIA X8 General] NIMBAH:
If you have an ext partition then its mmcblk0p3.
[XPERIA X8 General] cenovita:
I have just 2, one FAT32 (7gb) and the rest is for the SWAP part, I have tried formatting it with swap and ext3, no case...

look at this:

BTW, if i partition with minitool, the card is not mountable by the phone... I have to partition with recovery...

---------- Post added at 04:24 PM ---------- Previous post was at 04:14 PM ----------

OK, I have partitioned with Recovery and created 1 ext partition of 256Mb and 1 swap partition of 256Mb.

After that, i was able to mount swap in p3 (the swap one).

Minitool, useless for me...
[XPERIA X8 General] bobgeneric:
hI DEVS!

I have 2 partitions: Fat32-1,6GB (my files) and ext4-200MB (linked files)

Can i use swap?

If yes... the command will be: swapon /dev/block/mmcblk0p2 ?
[XPERIA X8 General] NIMBAH:
No you will need to create another partition for swap. The best way is through recovery but that will require reformatting your SD Card.
[XPERIA X8 General] webuser71:
Android ICS 4.0.3

Hello,

i have Script und working fine with gscript. But i wont do it in autostart. I copy userinit.sh in data\local\ reboot but i have no swap. I mus the script with gscript.

can anyone help me please.

i have HRC HD2 with CLK-NexusHD2.1HWA ICS-Android 4.0.3

thanks
[XPERIA X8 General] bobgeneric:
tHANKS!

So, Could i create on 8GB SD card : Fat32 6,5GB (storage my files); ext4 500MB (link files - Link2SD app) and Linux Swap 1GB (to swap) ?

Is this a good set?
[XPERIA X8 General] NIMBAH:
Yeah sure you can, 1gb is a bit much for swap though.
[XPERIA X8 General] bobgeneric:
So, can you help me to make the swap turn on after reboot?

I don't understand so much... :o
[XPERIA X8 General] Segnale007:
I didnt have followed the scenario since the beginning, but if u have already a partition that you want to use as swap no matter what fs is it formatted, you can format it in swap linux with

mkswap dev/block/mmcblk0pX

where X is the number of the partition you want to use as swap.

Btw you don't need a partition larger than 500mb, actually 500mb is even way too much.. I have never been able to use more than 20% of it .. Soo ..

As for activating it on boot, just read the first post where I explain how to make a simple script that will activate the swap partition at boot time, as long as the kernel you use supports init.d .
[XPERIA X8 General] bobgeneric:
After digit this:

vi /data/local/userinit.sh

happens it:

~
~
~
~
- /data/local/userini.sh 1/1 100%

What to do after this?

Edit:

I GOT IT now!!!!... Using the Root Explorer, i did create a file on /data/local/userinit.sh

Open it with Text Editor; so i did write this command:

#!/system/bin/sh

#Swap
swapon /dev/block/mmcblk0pX

i did save it.

Now, after reboot:

total used free shared buffers
Mem: 189448 181440 8008 0 8292
-/+ bufers: 173148 16300
Swap: 973884 34464 939420
[XPERIA X8 General] dagger:
i have created the swap partition but now when i try to install a zip in recovery, it says that

Error mounting sdcard

where as when my phone is on, the SD card works fine.

PLEASE HELP...
[XPERIA X8 General] Segnale007:
I doubt its related to the swap partition itself, but maybe at some point you have screwed the sd-card layout partition.

Post the sd-card layout partition here and I will take a look..
[XPERIA X8 General] dagger:
Whats sd card layout?:confused::confused:
[XPERIA X8 General] Segnale007:
The partition scheme .
[XPERIA X8 General] dagger:
OK i will PM it to u currently wiping my partition..

Its taking toooooo long...
[XPERIA X8 General] supernewbdev:
Other phone

Will this guide work for other phones besides the x8? also if I am using link2sd partition and a normal partition, can I also use a third partition for linux swap?
[XPERIA X8 General] ess_kay27:
First of all thank you so much for your detailed information. :thumbup:

Just a problem.. I created a partition of 512 mb... And now it's nearly getting over.. Is there any way of increasing the partition size without data loss? :confused:
[XPERIA X8 General] trabados:
How did you use swapon with the LG-P500? I have a P705G and the swapon responds "Function not implemented"... there are no custo rom or kernel for L7...
[XPERIA X8 General] Segnale007:
512 mb of swap are more than necessary. When I had a x8 with 400mb of swap the OS barely used 180mb of it..
[XPERIA X8 General] holayoo:
How to save a text file in VI?

Well look after I activate the partition I dont know how to save the text file, look:

"Now we want to make our swap partition to be activated at boot time, without having to activate it manually everytime we reboot the phone.

Assuming you know how to at least write and save a text file in VI, let's go back to our fido ADB shell and type

Code:

vi /data/local/userinit.sh

now lets drop few lines in

Code:

#!/system/bin/sh

#Swap

swapon /dev/block/mmcblk0pX"

The last thing I do is write that but I dont know how to save it /: someone can tell me??
[XPERIA X8 General] sara_groves:
THUMBS UP

Very helpful, thanks!
[XPERIA X8 General] soso90:
I think native kernels swap is good
[XPERIA X8 General] baselsayeh:
hello

too many errors

shell@android:/ $ chmod
chmod
Usage: chmod [OPTION] <MODE> <FILE>
-R, --recursive change files and directories recursively
--help display this help and exit
10|shell@android:/ $ mkswap
mkswap
/system/bin/sh: mkswap: not found
127|shell@android:/ $ swapon
swapon
/system/bin/sh: swapon: not found
127|shell@android:/ $ fdisk
fdisk
/system/bin/sh: fdisk: not found
127|shell@android:/ $ free
free
/system/bin/sh: free: not found
127|shell@android:/ $

what to do??
[XPERIA X8 General] Segnale007:
Looks like you don't have busybox installed, or perhaps you don't have it properly installed. Also these commands needs to be executed as root, and from your output it's quite clear you are trying to call these tools from standard user, which even though you had busybox installed they will not work anyways.

What should you do? Understand the difference between root and standard user, install busybox, read the guide again before posting something along "too many errors.
[EVO 4G Q&A, Help & Troubleshooting] Middleasternplayer:
See second post below with the Youtube video for a better understanding of what i am talking about

Hey Fellas, i used Revolution to root my phone, i have since put many roms on my phone, the rom i currently have is shooter sense 3.0....i love the ROM its awesome, i am in a 4G coverage area and my 4G just says scanning but never connects, just says scannning, so i restored back to some stock rooted rom that i d/l online, 4g still doesnt work. so i then d/l the latest radio by Caulking or whatever, and still no 4G, just says scanning, oi am now back to the shooter sense 3.0 rom and still no 4G, and im in a 4G coverage area, how do i fix this?

Just used WiMAX RSa key checker, says my keys are there

Reset to factory RUU using the supersonic RUU utility, on the hboot screen it still says s-off and revolutionary at the top...Sole Conslusion is that this phone, per revolutionary CANNOT be unrooted, now that i have the bone stock rom on my evo, the 4G doesnt work, i know this because on the stock evo rom, while searching for 4g you get in the top left part of the screen it states "4G!" which means there is no 4G, well that little symbol is not on the top the screen in either my new rom or the stock rom, stating something is wrong with my 4G...i think i have a unique situation that i need to be fixed...and i cannot find a fix for this

just updated to a new rom, sinister Rom, with the aggressive freedom kernel, says 4G is scanning, still, so what i did, i went and downloaded a stock kernel and used it on my sinsiter Rom, then is said "4G not working" so i put the Freedom kernel back, and now it says 4G scanning, but still no "4G!" symbol in the top left....

oh and 4G mac acddress is good too, just checked it.

where do i go now? i've tried everything
[EVO 4G Q&A, Help & Troubleshooting] Middleasternplayer:
Look Here

http://www.youtube.com/watch?v=XXlbzJfphwc

Look between 1:08 and 1:20 to know what i am talking about, in reference to the "4G!" symbol

i think my 4G antenna is not turning on? IDK help a brother out...i dont get any of the symbols, not even the one which says "4G antenna on"
[EVO 4G Q&A, Help & Troubleshooting] Middleasternplayer:
Bump
[EVO 4G Q&A, Help & Troubleshooting] wkdclwn:
What Ruu # did you use,also when you download the revolutionary zip there's a pc36img file in there. Flash it in recovery for S-on. if your hboot isn't 6.16 you need to go to

www. revolutionary.io and get the new zip.

Sent from my anthrax infected evo on XDA premium.
[EVO 4G Q&A, Help & Troubleshooting] Middleasternplayer:
i used RUU_Supersonic_1.32.651.1_Radio_1.39.00.04.26_release_171253....

My Hboot is 6.16.1002, i jsut checked it
[EVO 4G Q&A, Help & Troubleshooting] wkdclwn:
Use this ruu it's 4.54.6511. After it boots go and update your phone. There's two separate updates you will have do. then re root your phone with revolutionary. you will then have latest radios and everything should work fine. Use this link...... http://db.tt/c4DlM5Td

Sent from my anthrax infected evo on XDA premium.
[EVO 4G Q&A, Help & Troubleshooting] Steven 1:
Try updating your profile. Menu->settings->update prl/profile manually. Reboot. Chillin
[EVO 4G Q&A, Help & Troubleshooting] Middleasternplayer:
okay just downloaded the unrevoked s-on tool, flashed it. now my phone says s-on..Next Step i did, i flashed the RUU that you gave me per the link. I updated the 1st update, as you stated, i have now downloaded the second update and to my surprise Everything Seems To be Working, in the process of testing. i think you just cured my evo....wow Thank you Dr. i will keep you updated see below i got it working, thanks a million brother
[EVO 4G Q&A, Help & Troubleshooting] wkdclwn:
Good to hear it worked..

Sent from my anthrax infected evo on XDA premium.
[EVO 4G Q&A, Help & Troubleshooting] Middleasternplayer:
ran into another issue i have android 2.3.5 and hboot 2.18 and now i cannot use revolution to root my device, i am stuck. where do i go from here?
[EVO 4G Q&A, Help & Troubleshooting] Notorious:
You can use HTCdev.com I think not 100%
[EVO 4G Q&A, Help & Troubleshooting] Middleasternplayer:
i went there to that website, YOUR NUTS if you think im going to spend the next week downloading and installing things i dont need on my computer. im sure there is a better resolution. i tried to do the RUU, but it says wromg ROM or something like that
[EVO 4G Q&A, Help & Troubleshooting] Notorious:
You can't downgrade so either use HTCdev or wait for revolutionary. Unless your s-off you should be fine for everything and won't have a need for HTCdev
[Android Q&A, Help & Troubleshooting] nemanjan00:
I updated my Samsung Galaxy Fit from custom ROM i got on it to 2.3.4 ROM i found on internet and after doing Odin thing i saw in one tutorial that i should do Factory Reset, Cache Memory Cleaning from Recovery mode and then run "test redbend fota[FS]" in recovery to fix some bugs and to speed it up and after that my phone didnt wanted to boot-up and it was just blinking. When i tryed to get into recovery mode i just got "RAMDUMP" message and only thing that worked is Download mode but i tryed with couple of ROMs and they didnt worked. Can anyone help me?
[Samsung Galaxy Tab Plus] acolwill:
I've been poking around this piece of **** TouchWiz launcher mini launcher, trying to find out whether I can change the applications/actions/intents that it insists I can't do without.

For those of you who have no idea what I am talking about... press the arrow at the bottom middle of your screen.....

I have no use for ANY of these applications in this form. I would love, however, to be able to quicklaunch my Browser, YouTube, CarMode, Andicar (mileage tracker), Maps and a couple of other WELL used programs....

After a lot of decompiling of system apps, I found buried within SystemUI.apk the file which lists the default Samsung ****.

using apktool, I decompiled SystemUI.apk and found

system\app\SystemUI\res\values\arrays.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="mini_mode_apps">
<item>com.sec.minimode.minidialertabservice.DialerTabService</item>
<item>com.sec.minimode.mms.minimode.MiniMessageService</item>
<item>com.sec.minimode.taskcloser.MiniTaskcloserService</item>
<item>com.diotek.mini_penmemo.Mini_PenMemo_Service</item>
<item>com.android.calendar.month.MiniCalendarService</item>
<item>com.sec.minimode.music.MiniMusicService</item>
<item>com.sec.android.app.popupcalculator.PopupCalculatorService</item>
<item>com.sec.android.app.worldclock.MiniWorldClockService</item>
</string-array>
</resources>

...

I found out what intents the YoutubeTablet.apk had (by decompiling it) in order to add it to the list above.

<manifest android:versionCode="3204" android:versionName="3.2.4" package="com.google.android.youtube"
...
<activity android:theme="@style/Theme.Home" android:name=".app.tablet.HomeActivity" android:launchMode="singleTop" android:configChanges="keyboardHidden">

So, I added it to the arrays.xml

<item>com.google.android.youtube.app.tablet.HomeActivity</item>

Recompiled the APK, pushed back to /system/app/

Changed permissions, etc and rebooted.

Afterwards, no status bar. It didn't work.

So.

Anyone else out there willing to have a poke at this? I am not versed enough with doing these kind of modifications so have a feeling I'll not be able to get this working any time soon :)
[Samsung Galaxy Tab Plus] pakalrtb:
Well, at least you got rid of that annoying useles pop-up bar!
[Samsung Galaxy Tab Plus] arikyeo:
Try doing a adb logcat. Should help list out exactly what's going on with it. My Tab 7 plus is coming next week so I can't try it out.. Oh yes, did you forget to sign the apk?
[Samsung Galaxy Tab Plus] acolwill:
Logcat showed:

W/PackageManager( 2910): Failed verifying certificates for package:com.android.systemui
W/PackageManager( 2910): System package com.android.systemui no longer exists; wiping its data

even after replacing the certs.

So if someone wants to have a go a re-signing, have fun :)
[Samsung Galaxy Tab Plus] DragonMama:
I am right there with you, TouchWiz is actually the primary reason I rooted my device, but at the moment it is showing me the SAMSUNG logo and pulsing and has been doing this for the last several minutes since I rebooted the device after trying to uninstall the twlauncher app... suspect it's got a dependency. I'm a hardware nerd not a software one... didn't have much on the device so if I wind up having to go back to stock then reroot or whatever no big deal just annoying... I *hate* that damn launcher, keep hitting it on accident and winding up in World Clock. I don't give a flying **** what time it is in other parts of the world unless I can GET a flying **** on the way there, and I've got no plane tickets in my future.

Urg. Annoying. Especially because I let my toddler play with the tab (I don't let him touch my phone - tab is easier to replace if he breaks it and less annoying if he just manages to get out of the sandbox to wreck havok).

Still giving me that screen through the entire time it took me to type this... yeah, going to be visiting the geek screens via key combos again I think... Mama needs a drink.

---------- Post added at 10:52 PM ---------- Previous post was at 10:42 PM ----------

oh yeah, from the other research I did you're SUPPOSED to be able to go into the Apps screen then hit Menu then Edit and be able to swap out the apps in Twbar thing... except I don't HAVE a menu button in that screen. THIS is why hardware nerds like me HATE soft buttons and why I insisted on getting a phone that HAS hardware buttons. ONE little "oopsie" by a programmer who forgets that sometimes other parts of the program need something that their current obsession does not, and things get FUBAR.
[Samsung Galaxy Tab Plus] rkmj:
As far as I know, the only Galaxy Tab that has the editable MiniApp Tray (as of now,) is the Galaxy Tab 7.7. The others haven't yet been updated with this functionality. This would explain why you, (and I, and so many others,) don't have the menu button and are forced to continue our search for a workaround.

---------- Post added at 04:25 PM ---------- Previous post was at 04:03 PM ----------

By the way acolwill, I think I have some information that might be helpful. Aside from editing the .xml file in the SystemUI app, did you look into the actual minitaskbar app? In the system/app directory there's com.sec.android.app.minimode.res 3.2-UEKL1.apk, which looks like it's the minitaskbar app. I have a feeling that this references the same apps in the "minimode apps" section. If the references were changed in both, I have a feeling that the mini app tray will reappear and will show the youtube app.