Friday, August 13, 2010

Fix for Samsung Galaxy S terrible lagginess

Fresh out of the box the Samsung Galaxy S sped like a rocket but after a week of usage it began to lag TERRIBLY. Killing apps or rebooting phone doesn't help. Googling the issue reveals its a known bug in the way the phone does I/O with its internal SD card.

Here's a fix by Tayutama at xda-developers.com. I've edited the instructions to be more accurate after trying it out myself.

Reference: http://forum.xda-developers.com/showpost.php?p=7587405

1. The update.zip installs all the files needed. It is attached here; http://forum.xda-developers.com/attachment.php?attachmentid=377244&d=1281437129
2. Place it in the top folder on your internal sdcard, ie. /sdcard
3. Turn off your phone.
4. Hold down Up(Volume) + Power Button + Menu button(Home button) simultaneously for a couple of seconds until u see the manual boot screen.
5. Use the up and down buttons to get to update.zip.
6. Press menu button on update.zip to select it
7. It installs root, correct busybox (1.17.1), superuser.app, as well as all the scripts needed for the fix and the 'MCR Scripts' app to run the scripts.
8. After install, the phone restarts.
9. Go to the newly installed 'MCR Scripts' application from the app list, open it and choose from 3 scripts. For example, Lagfix10024 is the 1gb ex2 version.
10. The script would launch superuser permission prompt. Click "Allow" and it should run in a terminal for about 10 minutes. Don't worry if it seems to get stuck on "...takes a while...". You'll see some output of what it's doing later.
11. You should see an 'All complete' terminal prompt, and this means you can close the application.
12. Run Quadrant app (install from Market) to test if the fix was applied. You should see results like in http://www.droiddog.com/android-blog/2010/08/galaxy-s-lag-fix-makes-phones-fly/

**PLEASE READ!!! Some hiccups that I've encountered.**

The first time I clicked "Allow" in step 10, the script encountered Permission denied and didn't do anything. I had to stop the script and try it another time before it got going.

Before 'All complete' prompt, the script seemed to have repeated what it needed to do. After "installing" my Market app couldn't work. Rebooting phone caused screen to be blank. I had to press Up + Menu + Power to enter manual boot and do Factory reset. That meant losing data on my phone. At least I didn't have anything important irrecoverable as my Contacts are synced with Gmail Contacts. I installed and ran Quadrant just to see if the fix had been applied and saw that benchmark results were that of before fix.

I tried again by repeating from step 3. This time the script seemed to have executed properly. I ran Quadrant again and got the benchmark results. Running applications did seem MUCH FASTER but I hope it's not because I've factory reset the phone...

Monday, August 2, 2010

Lithium ion batteries first charge

According to an article at http://www.batteryuniversity.com/print-partone-12.htm

Unlike nickel and lead-based batteries, a new lithium-ion pack does not need cycling through charging and discharging. Priming will make little difference because the maximum capacity of lithium-ion is available right from the beginning. Neither does a full discharge improve the capacity of a faded pack.
So really the "full discharge and initial charge of 8 hours" were obsolete practices of the Nickel Cadmium batteries era.

Sunday, July 25, 2010

Remapping keyboard keys in Mac OSX

Use KeyRemap4MacBook to remap keys on your OSX keyboard.

Snow Leopard Only:
http://pqrs.org/macosx/keyremap4macbook/files/KeyRemap4MacBook-6.7.0.pkg.zip

It'll enable "FN + Numpad" by default. What I would really like is a way to do "Left/Up/Down/Right" without using the arrow cursor which forces my hand to shift down the keyboard too much. The utility provides a "Vi Mode" where you can map "FN + hjkl" for Left/Up/Down/Right.

To change CapsLock to Escape you need to download another utility from the website.

Snow Leopard Only:
http://pqrs.org/macosx/keyremap4macbook/files/PCKeyboardHack-6.3.0.pkg.zip

Tunnel Firefox connections through a server

Use openSSH to open up SOCK5 tunneling to server

ssh -fND PORT_NO USERNAME@IP_ADDRESS
Configure network connection in Firefox to use manual proxy. Leave everything blank except

SOCKS Hosts: localhost Port: PORT_NO

Wednesday, July 21, 2010

Controling a Mac OSX using VNC

From "System Preferences > Sharing > Screen Sharing", click "Computer Options" and set password and voila!

reference: http://lifehacker.com/319528/remote-control-leopard-with-tightvnc

Tuesday, July 20, 2010

Using curl to post data to a rails app


curl -X POST -d "location[lat]=111&location[lng]=222" http://localhost:3000/users/123/devices/456/locations

However rails require authenticity token. To overcome that just turn forgery protection off.

# config/environment.rb
config.action_controller.allow_forgery_protection = false

Monday, July 12, 2010

Print screen in Mac OSX

Fullscreen:

- Hold down Apple key ⌘ + Shift + 3 and release all
- Mouse click on screen

Portion of screen:

- Hold down Apple key ⌘ + Shift + 4 and release all key
- Drag mouse to select portion of screen to capture

From http://www.techiecorner.com/138/how-to-do-print-screen-in-mac-os-x/