yashsingh1/xdaforums huggingface dataset:
[HD2 Android Q&A, Help & Troubleshooting and Genera] bullcrapr:
Hi JP,

This is a gem of a post! Thanks alot for the script and the detailed breakdown. Before I get into it though, I must warn you that I am more of a beginner with no coding/scripting experience (I don't know how to use adb or anything)...

Here's what I'm trying to do: I'm trying to activate hard-swap on my hd2 (currently) running the ParanoidAndroid by Xylograph. I've created 3 partitions on my 16gb class 6 sd card: first, fat32 (32k cluster), next, 1GB ext2 (default), 500MB swap.

Procedure:

1. I extracted the script and copied it directly to system/etc/init.d folder of the Rom (I looked at the terminal commands you posted and the first few lines looked like copying the file from the sd root to the init.d folder (it was just a guess though), so I figured might as well put it into the rom before I flash it)

2. Flashed the rom

3. To activate it, I typed the following into the terminal:

su

mount -o remount,rw /system

mkswap /dev/block/mmcblk0p3

mount -o remount,ro /system

exit

after the mkswap command, I did get an activation notification that a certain amount was assigned to swap. But my celebrations were cut short after I rebooted and used the free command to check. The entire swap row still read 0.

I was wondering if you can point me in the right direction... thanks!

Also, is there a way to create a cwm flashable version?
[HD2 Android Q&A, Help & Troubleshooting and Genera] Yank555:
Thanx ;)

In fact you understood correctly that is was about copying the file to init.d.

By the way, these commands do the following :

mount -o remount,rw /system - Mount system partition in read-write

mount -o remount,ro /system - Mount system partition in read-only

So to format the swap partition "mkswap /dev/block/mmcblk0p3" there was no need for it, but it didn't harm in any way, so you're fine there ;)

I guess what is missing is the "chmod 755 /system/etc/init.d/99swap" command which will set the correct file access to the script so it can get executed at boot.

You might do the following in a terminal :

su

mount -o remount,rw /system

chmod 755 /system/etc/init.d/99swap

mount -o remount,ro /system

exit

It should be fine then.

Alternatively you could set the rights with your file explorer (in root explorer mode), they must be "rwxr-xr-x" (which is Read-Write-Execute, Read-Execute, Read-Execute), most file-manager will allow you to do that as well.

I've been working on the script variant for htc Sensation, it is more advanced, dynamic so it can find the swap partition by itself.

I'll make a CWM flashable as soon as I get to it that will handle everything except partitioning the SD card, obviously, for both devices.

As soon as I'm done I'll post the HD2 version here as well (very little change, between both devices, just the access path to the sd-card partitons to change (=1 line in the script).

JP.

Edit ------------------------------------------------

I just reread your post, if in fact you put it into the ROM zipfile, then file access should be correct !?

Could you post the following file (if it exists) :

/data/swap.0.log ?

JP.
[HD2 Android Q&A, Help & Troubleshooting and Genera] bullcrapr:
Hi JP :)

You are incredibly helpful and I appreciate it!

I finally got some time off and tried out what you mentioned... but to no avail. I applied the necessary permissions through the terminal (chmod 755) as well as through the root browser, but it was still the same. After that I even retried the terminal commands, and included the "chown 0:2000...", but that didn't work either...

... and then I saw your post update...

About that, i just typed it into the terminal, and I got "not found".

Was that what I was supposed to do?
[HD2 Android Q&A, Help & Troubleshooting and Genera] Yank555:
Hi,

You're welcome ;)

The file '/data/swap.0.log' is a text-file containing info on the execution of the script...

If it's not there, then the script didn't run at all...

I should have a little time later today, will try to make the CWM flashable solution for you, should be a no fuss solution, as long as the sd-card has a swap partition ;)

How did you partition the card ? CWM ?

JP.
[HD2 Android Q&A, Help & Troubleshooting and Genera] samsamuel:
man thats a helluva sd card ya have there! hehe.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Nigeldg:
Haha I noticed that too :') I want one of those now
[HD2 Android Q&A, Help & Troubleshooting and Genera] Yank555:
Thanx for pointing that out :D Mb of course, but in a few years that might be possible ;)

My first hdd had 60Mb, and that's not soooo long ago ;)

JP.
[HD2 Android Q&A, Help & Troubleshooting and Genera] samsamuel:
heh, my first was a 20mb HDD mounted on a pcb card and plugged into an ISA slot, took up the full length of the PC, weighed LOADS, could have beaten burglars to death with it.
[HD2 Android Q&A, Help & Troubleshooting and Genera] triggaz:
+1 with this (also on Paranoid Rom 1.1a) but I think that it's something with the ROM coz on earlier build v1 this method worked verry good :) I hope that Yank will find a solution coz it reallly helps wit our 576 ram ;)
[HD2 Android Q&A, Help & Troubleshooting and Genera] Yank555:
Mine was huge at the time, was on of the first to have such a big one, even partitioned it into 3 since it was just too big ;) And it was an external device, the size of a pizza-box (it was en Atari Megafile 60, I still have it !!).
[HD2 Android Q&A, Help & Troubleshooting and Genera] Yank555:
I'm working on the CWM flashable right now, should be done within 1-2 hours at most ;)
[HD2 Android Q&A, Help & Troubleshooting and Genera] bullcrapr:
Hi JP, once you told me it was the address to the file, i just navigated there using my explorer and lo and behold!, there it was (attached). If you must know, in my earlier post, the idiot in me just typed it in the terminal and the terminal replied not found.

I made my partition using freeware called Minitool partition wizard. Is 500mb too big for swap in your opinion? I was thinking of compensating for zram, and hence the size... thanks for your speedy responses...

edit...

and hey! whadya know? in the meantime, this place is coming alive!! :D
[HD2 Android Q&A, Help & Troubleshooting and Genera] Yank555:
Hmm ... strange, the content of the file looks like a logcat ?! Not what I was expecting to see :confused:

Give me a little hour, and I think I should be done with the flashable hard-swap and we'll go from there ;)

Minitool is excellent, but did you pay attention to only create "primary" partition ? If it is a logical partition it won't work...

Can you insert your SD card into your card reader, start Minitool an post a print screen of it ?

JP.

EDIT :

About size ... I believe 256Mb is enough, even read somewhere t shouldn't be more than 256, but I think there was no specific reason given.
[HD2 Android Q&A, Help & Troubleshooting and Genera] bullcrapr:
Here we go...

Minitool image attached... I typically pay attention to the partition type and made sure both of them were primary :)

About the logcat, I suspect you're right... I was trying to do one from my pc for the first time using adb and tried the only few commands I know (mkswap...), I think that's what you saw then...

Incidentally, do you feel if I reduce the swap size, the script has a better chance at surviving the boot?
[HD2 Android Q&A, Help & Troubleshooting and Genera] Yank555:
Don't bother, I will test 500Mb and let you know if that is the issue ;)

JP.
[HD2 Android Q&A, Help & Troubleshooting and Genera] triggaz:
I have 512mb partition and it worked without problems as I mentioned earlier so I think that opposite to the "size does matter" in this case it doesn't :) plus I used it with zram from marc1706.
[HD2 Android Q&A, Help & Troubleshooting and Genera] bullcrapr:
Hi triggaz, are you using the built in zram on Para1.1a? Or have you applied a script from elsewhere? I enabled the built-in zram, but get a "not found" reply when i try zram_stats in the terminal. Can you tell me how you got zram working? thanks...
[HD2 Android Q&A, Help & Troubleshooting and Genera] triggaz:
https://www.dropbox.com/s/xr3z102gxiw2f62/marc1706_zram_100MB.zip

all credits to Dorimanx for ZRAM mod and mark1706 for modifications :)

I flashed this and then used the compcashe options in Paranoid (set to 26%)
[HD2 Android Q&A, Help & Troubleshooting and Genera] Yank555:
Guys, you might want to check to OP ;)
[HD2 Android Q&A, Help & Troubleshooting and Genera] Yank555:
I've tested it on HyperDroid CM7 6.6.0 as well as on Tytungs CM9 ICA HWA, worked fine on both, had 500Mb swap.

JP.
[HD2 Android Q&A, Help & Troubleshooting and Genera] bullcrapr:
THANXS! will test and report...

EDIT: WORKING!!! (screenshot below) and so easily activated!! But the best thing was your speed in helping me out!! Thanks once again!
[HD2 Android Q&A, Help & Troubleshooting and Genera] bullcrapr:
If you don't mind JP, I'd like to point this thread to the PA HD2 community :)
[HD2 Android Q&A, Help & Troubleshooting and Genera] Yank555:
Feel free :D
[HD2 Android Q&A, Help & Troubleshooting and Genera] elesbb:
I remember being like 5 and finding this technology to be out of this world xP
[HD2 Android Q&A, Help & Troubleshooting and Genera] fgth90:
Yessssssssssssss

Well done my friend ! Good work !

Flashing zip and swap is working !

See you

Franky
[HD2 Android Q&A, Help & Troubleshooting and Genera] Yank555:
Thanx and happy it's working as expected ;)
[HD2 Android Q&A, Help & Troubleshooting and Genera] HTCHD2V:
Thank you, Yank555!

Works on SD build of Paranoid 1.5b. I copied 99swap from Hard-Swap-Yank555.lu_Flasher-v1.0.zip to /etc/init.d folder, then changed permission from Root Explorer to "rwxr-xr-x", and after restart I see that my 256MB swap is activated!
[HD2 Android Q&A, Help & Troubleshooting and Genera] Yank555:
Great to hear that. I would recommend you set swappiness to 100, makes better use of swap.

Will have to update my HD2 script, only did it for the Sensation... :(

Just change the swappiness setting in the script file from 60 to 100 ;)

JP.

Sent from my HyperNoneSense v2.9 / Yank555.lu kernel v1.2c (based on faux 007u) powered htc Sensation XE using xda premium
[HD2 Android Q&A, Help & Troubleshooting and Genera] anuragchowdry:
what's the advantage or difference of this script over link2sd.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Yank555:
None and everything, really, they do two totally different things ;)

Link2SD is to store apps on SD (in sd-ext).

Hard Swap is to give your system more memory (virtual memory) on SD (swap).

What are you looking to do exactly ?

JP.
[HD2 Android Q&A, Help & Troubleshooting and Genera] anuragchowdry:
Thanks for the reply,asked out of curiosity since I am using a partitioned SD card,wanted to know what it does.
[HD2 Android Q&A, Help & Troubleshooting and Genera] bullcrapr:
Deactivating swap?

Hi JP,

Was wondering, how do I deactivate the swap? The only indirect way I can think of doing it now is setting swappiness to 0. Do I have to reflash my rom, or is there an easier way?
[HD2 Android Q&A, Help & Troubleshooting and Genera] Yank555:
Well yes there is an easier way, simply remove the script from /system/etc/init.d ;)

JP.

Sent from my HyperNonSense v3.0 / Yank555.lu kernel v1.3 (based on faux 008b4) powered htc Sensation XE using xda premium
[HD2 Android Q&A, Help & Troubleshooting and Genera] Qnkel:
Is the HD2 faster with swap?

Gesendet von meinem Desire HD mit Tapatalk 2
[HD2 Android Q&A, Help & Troubleshooting and Genera] Yank555:
In absolute, no, but in a certain way yes...

On the one hand, if you use one app, it will run at whatever speed the HD2 is capable of running it, swap won't make the app run any faster, your hardware limits the execution speed.

On the other hand, if you use several apps one after the other, and come back to a previously used app, the switch will be faster.

That is what swap brings, more "RAM", virtual memory to be precise, so that apps can stay in memory, since you have more of it, rather than being killed by Android's memory manager to free memory for a new app you want to run.

Swapping (out and in) takes time, too, but less than gently killing and restarting an app where the app will save its data before quitting and reload everything on restart, and that is the time you win using swap.

JP.
[HD2 Android Q&A, Help & Troubleshooting and Genera] andy_pp:
Just installed it. I'm now running tytung's 2.6 ICS rom with link2sd on ext4, and version 1.1 of the script on a 400mb swap partition. Wonderful!

When I installed it, I created a linux swap partition in minitool, then put the script in etc/init.d and rebooted, but nothing happened.

Only when I flashed the zip file in CWM did the swap come to life. What does that do that I missed?

Also, is there any advantage (now I've got it working) to your 2.3 script from the sensation thread?

Subjectively, switching between big apps (like the browser) feels faster, although the android memory manager still seems to be suspending apps long before the swap file is full. Is there any way to influence that behaviour? Is this what changing the 'swappiness' would do?

Lastly, is there a gui program that shows the state of the swap partition, so I don't have to go back to the terminal and type 'free' all the time?

Great walk-through setting it up though - thanks for your effort.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Yank555:
Well what you need to do is format the swap partition, that is done during flashing (mkswap) ;)

You can change Android low memory killer limits (System Tuner lets you do that), if you set them lower, LMK will start kicking out processes later, allow free RAM to drop more. But be carfull, too low means lag !!

As for a GUI that shows swap use, don't know of one, but I honestly didn't look for one either ;)

JP.
[HD2 Android Q&A, Help & Troubleshooting and Genera] muadsoft:
doubt

I have a question and can not find a clear explanation. I would appreciate if someone could tell me.

I have a 1 rom in nand and the script works perfectly. I can confirm it through terminal and swap appears.

However, when I want to confirm from any rom nativesd through terminal, swap appears in 0.

Anyone know why?.
[HD2 Android Q&A, Help & Troubleshooting and Genera] melando:
Need to enable in each ROM?

Works fine for me with Native SD. If you are running on HD2 have you tried the PA-HD2 ROM, as this has the script built in?
[HD2 Android Q&A, Help & Troubleshooting and Genera] muadsoft:
How do i enabled in each rom?.

I got 2 nativesd roms: Hyperdroid_CM7_v.6.1.0_Tangled Tarantula and NexusHD2-JellyBean-CM10_V1.2. In both roms, through terminal, swap appears in 0.

My nand, HyperDroid_6.1.0_TTE_SeaderR9_NativeSD, detects perfectly swap and woks great.

Thanks for your answers.
[HD2 Android Q&A, Help & Troubleshooting and Genera] melando:
It won't work without an activation script. Read this thread or try the ROM I suggested which allows you to choose it when installing
[HD2 Android Q&A, Help & Troubleshooting and Genera] muadsoft:
thanks for the advice.

Thanks for your advices.

I have made manually activation in each rom(copy&paste script). Now, they detetct it and work perfectly.

Thanks again, melando.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Yank555:
Ah glad it could get sorted out, I was off for a few days in no-WiFi land and just got back... so I couldn't help, sorry.

JP.

Sent from my custom Paranoid Android 2.54 / Yank555.lu CM10 kernel v1.0 Aroma (Linux 3.0.52) powered Galaxy S3 i9300 using Tapatalk 2
[HD2 Android Q&A, Help & Troubleshooting and Genera] max414:
I am missing some thing ? I am running native sd rom ..I copied Hard-Swap-Yank555.lu_Flasher-v1.0.zip to root of my sd card ..booted into 4ext recovery and chose install zip from sd card and chose Hard-Swap-Yank555.lu_Flasher-v1.0.zip...And there came an error and operation aborted , guys i am missing something?

yes i have created 256mb swap partition in 4ext recovery
[HD2 Android Q&A, Help & Troubleshooting and Genera] Yank555:
Hi,

long time I've not been on my HD2 :(

I never tested the mod as flashable for an SD ROM, only Nand ... maybe that's the problem ?

You could just format the swap partition in a terminal (mkswap /dev/block/....) and copy the script from the zip to your /system/etc/init.d folder ?

That's kind of manual but should work fine.

JP.
[HD2 Android Q&A, Help & Troubleshooting and Genera] max414:
aww, can u be a little noob friendly ?i opened terminal on my rom and typed (mkswap /dev/block/....) and nothing happened :p

do i extract the zip file ? and i cnt find that init.d folder ..there is a initrd.gz file though :silly:
[HD2 Android Q&A, Help & Troubleshooting and Genera] Yank555:
Okay, sorry ;)

Of course, here you go :

1) you need to find out what partition is your Linux swap, and to do that open a terminal and type :

su
fdisk -l /dev/block/mmcblk0

The output will look somewhat like this :

Disk /dev/block/mmcblk0: 31.3 GB, 31393316864 bytes
255 heads, 63 sectors/track, 3816 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 3751 30120960 c Win95 FAT32 (LBA)
[COLOR="Blue"][B]/dev/block/mmcblk0p2[/B][/COLOR] 3784 3816 263168 82 [COLOR="Red"][B]Linux swap[/B][/COLOR]

Look for the Linux Swap partition (highlighted in red) so you can make out the device name it uses (highlighted on blue).

2) Now we need to fromat the swap partition, still in terminal now use this command :

mkswap [COLOR="Blue"][B]/dev/block/mmcblk0p2[/B][/COLOR]

The devicename is the one you got from the step above (all highlighted in blue), if it's different than what you see here, you need to replace it with whatever you saw as devicename in step 1.

With that the partition is ready to work.

3) Now we need to install the hardswap activation script.

Extract the file called "99swap" from the ZIP, it is located in the setup/init.d folder of the ZIP file.

You need to copy that file to /system/etc/init.d :

Still in terminal we need to make sure the /system partition is writable (or else you won't be able to copy anything to it) :

mount -o remount,rw /system

Now using a root filemanager for example, copy the file from whereever you extracted it to /system/etc/init.d .

Once it's copied, we just need to give it the correct filerights so it can be run on every boot, still in terminal type the following :

chmod 755 /system/etc/init.d/99swap

And lastly we better remove write access to the /system partition, still in terminal :

mount -o remount,ro /system

Now reboot and swap should be up & running.

To check if it works, just open a terminal and type :

free

And you should get something that looks like this :

JP.
[HD2 Android Q&A, Help & Troubleshooting and Genera] abced123:
Does the swap really help ? since its microSD R/W is too slow compared to RAM
[HD2 Android Q&A, Help & Troubleshooting and Genera] Yank555:
It's a compromise... some are happy, some not ... so it's here for you to choose ;)

JP.
[AT&T Samsung Galaxy Note I717] manchoi44:
I received an AT&T Galaxy Note (i717) as a gift about a week and a half ago, but right away noticed some wonkiness with the touch screen. In everyday use I noticed that certain portions on the bottom 1/3 of the touch screen were unresponsive/registering multiple inaccurate touches.

While researching the issue, I found the touch and S-Pen tests by dialing *#0*# on the dialer, and found that some rows were unresponsive to touch, but were registering the S-Pen.

Here are the results of the tests:

Touch test:

S-Pen test:

I had taken the phone to a local AT&T store, but they were unable to swap the unit, due to the fact that I received the phone as a gift without any purchase receipt. Also I'm unsure as to how the fact that I received the phone as a gift/don't have a receipt/purchase date will affect my ability to get this phone replaced under warranty.

Can any of you geniuses (no sarcasm intended) tell if this is a hardware/software issue? I've flashed a few roms and found that the problem is persistent so I'm leaning towards this being a hardware issue. If that is indeed the case, is there anything I can do to try and fix this myself? I've taken the phone apart to see if this could be caused by a faulty connection of the digitizer/screen, but once I cracked this baby open, I realized I didn't know which "flap" was the one in question :o

TIA!!
[AT&T Samsung Galaxy Note I717] kimtyson:
I have seen some posts about this issue on here. Do a search and you may get some good info.

I'm surprised about the no receipt issue. I'd try a better store or 611 (customer service). There has to be a record tied to the phones IMEA or serial number.
[AT&T Samsung Galaxy Note I717] manchoi44:
The phone was given to me by my brother-in-law who received this model directly from AT&T corporate (not bought in a store). I believe this is what's causing the (lack of) record issue. Obviously they have it on record of when I started using the phone on the network, however.
[AT&T Samsung Galaxy Note I717] manchoi44:
I'll keep searching, for sure. Any hints for keywords to use? :D
[AT&T Samsung Galaxy Note I717] knoxster:
I had the AT&T ROM & Software on my Telus device and noticed a MARKED difference between the touch screen responsiveness.

Like immediately noticed this.

When I switched back to the Telus S/W .. problem went away.

That said, I have read about some devices having issues on this... If I can find where I'll post.
[AT&T Samsung Galaxy Note I717] manchoi44:
Hm, maybe the software could have more to do with it that I suspected.

I won't dismiss that as a potential culprit as well.
[AT&T Samsung Galaxy Note I717] manchoi44:
Update: I was able to talk an AT&T store employee to getting me another phone via warranty.
[AT&T Samsung Galaxy Note I717] youssry.support:
i have same problem

i have same problem , please advice me if you find any solution , also i found this on youtube explain same problem under (Galaxy Note: Touch Failed but S Pen works?

) name

youtube.com/watch?feature=player_embedded&v=zjE2l0GejvQ
[AT&T Samsung Galaxy Note I717] RussianBear:
similar issues: http://xdaforums.com/showthread.php?t=1500000&page=3
[T-Mobile Sidekick 4G] GuestK0045:
I hve been trying to play games such as temple run that requires the accelerometer to work. However player does not move. Nor does my phon auto rotate in the home scrren or settings or messaging. Is there a hardware malfunction or something esle??
[T-Mobile Sidekick 4G] JiN1337:
Same thing happened to me randomly on GOV2 with Temple Run. Sadly, you need to re-flash the ROM. Only after doing that, did everything start working well again.

Though, YOU COULD try to fix permissions, but that didn't work for me.
[T-Mobile Sidekick 4G] GuestK0045:
Hmm. Thanks
[T-Mobile Sidekick 4G] JiN1337:
Anytime.
[Android Q&A, Help & Troubleshooting] The_R:
Hey :)

You are getting the NetworkOnMainThread exception which i'd guess means that Android doesn't take too well to you trying to make a network connection on the applications main thread.

You should try to make a new thread and put the XMPP connection code in that thread and it should get rid of the errors.

I hope you are aware of multithreading and threads. If not, this is a good time to read and learn about it :)

EDIT: The reason it works well in your Java program is because there is no such restriction in a regular Java program. Android is very different from that.
[Android Q&A, Help & Troubleshooting] tkansara:
Thanks for the reply.. I will look up multi-threading...
[Motorola Atrix 2] lkrasner:
is there a way to change the boot logo (a stupid motorola icon) on the A2? I have seen the option in rom toolbox, but not for our device.
[Motorola Atrix 2] Megabunny:
not impossible, but very hard

I have HTC Desire, and i wanted to drop the white HTC logo in favour of a black background variant.

long story short it was really REALLY hard, it requires FULL root. (ROOT AND S-OFF)

I wouldn't recommend trying it unless your very happy to delve into the darker parts of android customisation.

read these:

http://xdaforums.com/showthread.php?t=794638

http://xdaforums.com/showthread.php?t=833667

I hope this helps get you in the right direction.