Monday, June 25, 2012

Do not Factory Reset your Rooted Android Phone (and how to fix it)

So I did it; I hit Settings -> Privacy -> Factory Reset on my rooted LG Optimus V Android 2.2.1 phone (despite having read that one should never ever do this to a rooted Android phone).  Phone tried to reboot, but got stuck in a loop at the Custom Recovery (a bootup menu).  In other words, I bricked the phone - or at least softly so, because there is a solution, which is particularly easy if you have/had a Custom Recovery installed.  This is what I did:
  1. Powered off the phone.
  2. Moved the SD card from the phone to my notebook.
  3. Downloaded Xionia_CWMA_12518.6_VM_Recovery-signed.zip [5,068,663 bytes]
  4. Copied the above ZIP file to the root of the SD card.
  5. Moved the SD card back to the phone.
  6. Start the phone by holding down Home + Volume Down, and then the Power button (until LG logo appears).  This will boot the phone into recovery mode.
  7. In the recover menu, select 'install zip from sdcard' (navigate with Volumn Up/Down, Back and Camera keys).
  8. Select 'choose zip from sdcard'.
  9. Select 'Xionia_CWMA_12518.6_VM_Recov[...]'.
  10. Confirm the installation by selecting 'Yes - Install  Xionia_CWMA_12[...]'.
  11. Phone will now be reflashed (fast; a few seconds) while displaying:
    -- Installing: SDCARD:Xionia_CWM
    A_12518.6_VM_Recovery-signed.zip
    Finding update package...
    Opening  update package...
    Verifying update package...
    Installing update...
    *-* Flashing Xionia CWMA 12518.4 VM Recovery *-*
    -------------------
    Done!
    Install from sdcard complete.
  12. Hit Back key and select 'advanced'.
  13. Select 'Fix Recovery Boot Loop'.  Screen will go black and phone will reboot.
  14. Phone will start up the default Android image.
Although it's the default Virgin Mobile LG setup, everything works, i.e. WiFi, 3G and phone calls. Phew!

Since I've previously done a full Nandroid backup using the Custom Recovery, I could also restore the ROM image to the most recent backup I've done by:
  1. Power off the phone.
  2. Boot up the phone in Recovery mode (Home + Volume Down & Power buttons).
  3. Select 'backup and restore' in the Recovery menu.
  4. Select 'Restore'.
  5. Select '2012-05-13.03.52.34/' (that was my last backup)
  6. Confirm by selecting 'Yes - Restore'.
  7. This will reflash the phone (taking a few minutes) while displaying:
    Xionia CWMA v1.2518.6
    Checking MD5 sums...
    Erasing boot before restore...
    Restoring boot image...
    Restoring system...
    Restoring data...
    Restoring .android_secure...
    Restoring cache...
    sd-ext.img not found. Skipping r
    estore of /sd-ext/
    Restore complete!
  8. In the recovery menu, select 'reboot system now'.
  9. The phone will startup with the ROM and settings you had when you did the backup.
Awesome!  Phone is back to what it used to be.

Friday, June 22, 2012

Convert a JConnect's JFX fax to PDF (without software)


I rarely receive faxes, but when I do I've been using the jConnect fax service (by j2 Global Inc). I signed up for a free account* many years ago and it is still active and I still have my own free fax number for incoming faxes.


When someone sends you a fax, their servers will send it to you as an email attachment.  Interestingly, the attached *.jfx fax document is just a TIFF file, which you can view in any TIFF viewer.  By changing the filename extension from *.jfx to *.tif, you'll be able to double-click to open it.

Alternatively, just upload the *.jfx file to your Google Drive and view it online.  The fax is will then also be searchable and you can create a PDF by clicking 'Print (PDF)'.  By using the Google Drive client, you can set it all up to such that you save the *.fjx attachment to a local directory and the fax will automatically appear on your Google Drive account.

Footnote: (*) I'm not sure if they still provide free accounts; I found this page, but it appears to do nothing when one fills it out.

Thursday, December 22, 2011

Samsung Galaxy Gio (S5660): Unlocking phone

When travelling abroad, I wish to be able to buy a local SIM card of the country and use it in my Samsung Galaxy Gio (S5660) phone. Turns out my phone is locked down so it only works with SIM cards of my Swedish provider. They're offering to unlock it for a fee after 12 months. I can't wait, so I decided to try it myself. After some searching, I found some instructions online that I followed (using Windows 7 Ultimate 64-bit machine):
  1. Verify that the phone is really network locked by "calling" *#7465625#.
  2. Root the phone (so that you can become a superuser below)
  3. Download and install Android SDK Manager (rev. 16).
  4. Enable USB debugging on the phone by enabling Menu > Settings > Applications > 'USB Debugging'.
  5. Connect the phone to the computer via USB cable.
  6. Start the Windows Command prompt (e.g. Start Menu -> cmd) and go to the ' platform-tools' directory where the Android SDK is installed, e.g. cd "c:\Program Files (x86)\Android\android-sdk\platform-tools\".
  7. Run ADB by executing 'adb shell'.
  8. In the ADB shell, become a superuser by executing 'su' (prompt will change from a dollar sign to a hash symbol confirming you are a superuser).
  9. Copy /dev/block/bml5 to the SD card by executing 'cat /dev/block/bml5 > /sdcard/bml5.img'.
  10. Exit superuser mode by executing 'exit' (prompt will go back to a dollar sign).
  11. Exit ADB by executing 'exit'.
  12. Copy the bml5.img file on the SD card to the computer by executing 'adb pull /sdcard/bml5.img'.
  13. Open the bml5.img in a hex-editor, e.g. TotalCommander.
  14. Search for the hexadecimal string "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 30 30 30 30 30 30 30 30". There was several matches, where some were preceeded by '00000000' (non informative) and some with, say, '15351874' (the 8-digit unlock code; different for each unique phone). Done!
Then I disconnecting and turned off the phone, replaced the SIM card with a SIM card from another provider, and started up the phone. Then the phone detected the new SIM card and that the phone was locked to another provider and asks you to 'Enter Network Lock Control Key'. Entering the above 8-digit phone and voila, the phone was unlocked. Now my phone works also with this other SIM card. Also, calling '*#7465625#' now reports (it used to be that the first one was [ON]):

Network Lock [OFF]
Network Subset Lock [OFF]
SP Lock [OFF]
CP Lock [OFF]





Samsung Galaxy Gio (S5660): Root

There are many reason for acquiring root access ("run as adminstrator") to your Android phone, e.g. remove all ads (AdFree), backup all apps and their settings (Titanium Backup) and unlock the phone so it works with any network provider.

To root my Samsung Galaxy Gio (S5660) with Android 2.3.3 (Gingerbread; firmware KPS), I did the following:

A. "Installed" SuperOneClick on Windows 7 Ultimate 64-bit:
  1. Downloaded SuperOneClick (v2.3.2) and extracted to a directory, e.g. SuperOneClick/.
B. Rooted the phone following instructions by AddictiveTips:
  1. Enable USB debugging on the phone by enabling Menu > Settings > Applications > Development > 'USB Debugging'.
  2. Connected the phone to the computer via USB cable.
  3. Started the Android SDK Manager.
  4. Run SuperOneClick.exe.
  5. In SuperOneClick, click 'Root' (in the 'General' tab).
  6. Wait a couple of minutes. You'll see lots of log entries being printed. Mine ended with the three lines: '[+] Rush did it ! It's a GG, man !', '[+] Killing ADB and restarting as root... enjoy!' and '+++ LOG: write failed (errno=14)'.
  7. Your phone is rooted. It will probably reboot by itself.
C. Verified that the phone was truly rooted:
  1. Start the phone.
  2. Find the 'Superuser' app. If it exists, it is rooted, but you can also start it to make sure; at first you should see an empty list of apps with superuser rights under 'Allow'. Later this list will be populated with apps you allow to run as "superuser", e.g. AdFree and Titanium Backup.

Samsung Galaxy Gio (S5660): Update Android firmware

Current firmware version:
The quickest way to check the current firmware on any Samsung Android phone, dial *#1234#. On my phone I get:

PDA: S5660XXKPE
PHONE: S5660XXKPA
CSC: S5660HTSKP2

This firmware corresponds to Android 2.3.3 (Gingerbread) with build date June 24, 2011. Note that 'PDA' value is the same as one see in Under Menu > Settings > About Phone > Build number (I have 'GINGERBREAD.XXKPE').

Update firmware:
Install and run Samsung Kies [2] (Windows and OSX). Next, after rebooting the computer, connect the phone to the computer via a USB cable. Make sure to be connected to the internet. The Samsung Kies software will automatically detect and connect to the phone. If there is new firmware available, Kies will report this and offer to update the phone. Make sure to follow the instructions given. After a few minutes, the firmware is updated, and the phone will reboot.

New firmware version:
After updating via Samsung Kies, I get:

PDA: S5660XXKPS
PHONE: S5660XXKPA
CSC: S5660HTSKP2

which corresponds to Android 2.3.3 (Gingerbread) with build date August 25, 2011.

PS. The reason why I updated in the first place was that my phone completely froze multiple times a day. The only thing to do when it happened was to restart the phone (reboot by holding Home and Power buttons for several seconds, or simply take out the battery). This is apparently a rather common problem. Update: After updating to KPS the phone has worked flawlessly for more than 10 days now.

Friday, June 11, 2010

PDFCreator v1.0.0 - careful when installing!

I just updated from PDFCreator v0.9.7 to PDFCreator v1.0.0. What a pain! They now install the malware/spyware 'pdfforge Toolbar' (Spigot Inc.) if you are not careful. The installation widget is deliberately designed so that you will install it. The result is that you in Firefox will get a Yahoo search bar, the malware will force the browsers search to be at Yahoo, and you will have two annoying extension 'pdfforge Toolbar Plugin' and 'Search Settings Plugin' that cannot be uninstalled (see below for a solution).

What a pitty that the developers of PDFCreator takes these actions.

To avoid this hassle, make sure to follow these two steps when installing PDFCreator v1.1.0:


1. In dialog 'PDFCreator Browser Add On', uncheck 'Set Yahoo! as my default search engine and notify me of changes.'



2. In dialog 'Select Components', uncheck 'PDFCreator Browser Add On for Internet Explorer and Firefox'.

Note that most people miss to uncheck this second options!


That's all! If you do the above, you are fine.


What to do if the mistake is already done?

If you did not uncheck in Step 2 - no worries, many people do - then
  1. Close Firefox and close Internet Explorer.
  2. Go to Start -> Control Panel and open 'Programs and Features'.
  3. Uninstall 'pdfforge Toolbar' (Spigot, Inc.)
This will also uninstall Firefox extensions 'pdfforge Toolbar Plugin' and 'Search Settings Plugin'. I don't use Internet Explorer, but I assume any problems there will also be solved.

Saturday, October 31, 2009

Booting Ubuntu 9.10 from a USB stick

It is rather straightforward to install Ubuntu 9.10.on a USB stick so that you can boot directly from the USB drive. I did this from Windows Vista following the 'Create a Ubuntu 9.10 Live USB from Windows' instructions at PendriveLinux.com. If you're on Windows Vista, make sure you don't miss that instruction at the end on running 'makeboot.bat' manually.