Category Archives: Android - Page 2

Android: Too Many Pattern Attempts. Phone is locked.

There you are, showing off your Android and that funky pattern lock feature. But you didn’t think that some joker would try too many times and lock your phone for good. Not to bad, since you just need to wait 30 seconds to retry – or?

Not quite, if you do it too often, the phone will lock you out for good and you can only unlock by either wiping your phone or by logging into your Google account. The Google account feature sounds reasonable and easy — but wait, your Wifi switch is not on (and you can only turn it on when unlocked).

Not all is lost, provided your phone is rooted and you have the Android toolkit installed (if “adb” means something to you, then read on):

Do the following:

> ./adb shell
# sqlite3 data/data/com.android.providers.settings/databases/settings.db
sqlite> update system set value=0 where name='lock_pattern_autolock';
sqlite> update system set value=0 where name='lockscreen.lockedoutpermanently';
sqlite> .exit
# exit

The above commands will connect to your settings-database and then disable the autolock as well as reset the permanent lock.



VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Android: Clear cache before upgrading to a new firmware

I have been using CyanogenMod for a few weeks and am currently running 4.1.9.2 without an issue (no crashes, FCs etc).

Many users complain on the XDA-Developers forum about issues, but I truly believe that if people followed some basics, there would not be so many problems in the first place.

I have now upgraded from 4.0.4 to 4.1.7 to 4.1.8 and then 4.1.9 without having to do a wipe (and suffering data loss / re-install) by doing the following:

  1. Clear cache before installs: (boot into recovery and drop to terminal)
    mount system
    mount system/sd
    rm -rf system/sd/dalvik-cache
    umount system/sd
    umount system
    reboot recovery
  2. Upgrade to the latest firmware
  3. Reboot (be patient – it will take about 10 minutes. you can always remote attach via ./adb shell logcat to watch progress)
  4. Wait (don’t touch the phone until remote logcat has finished)
  5. Reboot into recovery and drop into terminal
  6. Fix permissions via fix_permissions
  7. Reboot & Enjoy the new firmware
VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Android: Partitioning your 16GB card

MAJOR WARNING: The instructions below will wipe your SD-card for good. So make sure that you want to do this. (Follow my backup instructions just in case)

If you are running Cyanogen or a similar firmware which requires 3 partitions (FAT32, EXT3/4 and Swap), then execute the following commands which in short does the following: repartition your SD-card with a FAT32, EXT3 and swap partition and then convert EXT3 to EXT4:

parted /dev/block/mmcblk0
print
rm 1
rm 2 (if you have a 2nd partition)
rm 3 (if you have a 3rd partition)

Then run this for a 16GB SD-card:
mkpartfs primary fat32 0 15416
mkpartfs primary ext2 15416 15916
mkpartfs primary linux-swap 15916 15948

Then run this for a 8GB SD-card:
mkpartfs primary fat32 0 7425
mkpartfs primary ext2 7425 7937
mkpartfs primary linux-swap 7937 7969

Complete the partitioning and convert to EXT4:
upgrade_fs
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2
e2fsck -fpDC0 /dev/block/mmcblk0p2

The above should be done from the recovery-console (turn off phone and then Home + Power-button). If you use App2SD all your apps will be gone and some of the widgets will fail. The above is the perfect way of starting out fresh. I would recommend doing a Wipe as well as install of the latest firmware afterwards.

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Android: Buy some apps from the Android Market

As South Africans we are always on the tail-end of things. It comes as no surprise, that although we have access to the Android marketplace where we can download tons of free applications, Google has still not allowed us to access paid applications.

It is quite ironic, that Market Enabler is hosted on Google’s servers allow us to access the paid market (provided that you have registered with Google checkout):

(I typically install those apps via ./adb install *.apk. I also noticed that upgrading to the latest version did not work and I had to first uninstall).

The Market Enabler allows you to fake the location, kill any running market processes and once you re-enter the market, you have full access to all paid apps:

At the moment I recommend: Power Manager, Touchdown and MyBackup Pro. Awesome about Google’s market is that is you are not happy with the application, simply uninstall it within 24 hours and your money will be automatically refunded.

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Android: Backup your SD card

Provided that you have rooted your cool Google phone and preferably run a class-6 microSD card, you should once in a while backup your SD-card:

BACKUP:
mount -t vfat /dev/block/mmcblk0p1 /sdcard
mount -t ext3 /dev/block/mmcblk0p2 /system/sd
cd /system/sd
tar cvf /sdcard/ext3.tar *

RESTORE:
mount -t vfat /dev/block/mmcblk0p1 /sdcard
mount -t ext3 /dev/block/mmcblk0p2 /system/sd
cd /system/sd
tar xvpf /sdcard/ext3.tar

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Android: The microSD card

There seems to be so much confusion going on about SD cards, and I thought it would be worthwhile to properly explain the use of SD-cards.

The microSD is a format for removable flash memory cards which are commonly used in cellular phones, but also in handheld GPS devices, portable media players, digital audio players, expandable USB flash memory drives, and for Nintendo DS flashcards, along with digital cameras.

It is the smallest memory card available commercially; at 15 mm × 11 mm × 1 mm (about the size of a fingernail). A point of confusion can come from the difference in the microSD and the newer microSDHC format. The SD and SDHC share a similar form factor, but not all devices are compatible with the newer high capacity format.

When you shop for a new microSD-card, you need to be aware, that those cards come in different speed-ratings. A closer look on the packaging will reveal: Class 2 / 4 / 6 as well as 133x / 66x.

The class defines the minimum write speed for a completely empty SD card. That means if you were writing to a new SD card that has never had any data on it how fast would it write.

Class 2 = 2 megabytes/second
Class 4 = 4 megabytes/second
Class 6 = 6 megabytes/second

So in short Class 6 is what you should be buying for fast write speeds. On top of this there is also the speed rating of the card itself. This is based on how fast the microSD card can READ the data off the card. You will see this usually described as 32x, or 66x, or 133x, or something with an x and the end.

These measurements are based on the original CD-ROM drives which could write 150kb/second. So 32x means 32 multiplied by 150kb/second or 4.8MB/second. The following table (sourced from Wikipedia) provides you the detail:

I strongly recommend the Transcend, 16GB, class 6 card which I have been using for a few weeks in my HTC (G1) Dream.

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Android: Snow Leopard breaks DDMS

If you installed Snow Leopard and you are using the Android SDK, you will find that DDMS is broken due to Snow Leopard now including the 64-bit Java version and the Android SDK currently does not support a 64-bit SWT version.

You will most likely get the following error:
MagicDudeAir:tools GNaschenweng$ ./ddms
30:59 E/ddms: shutting down due to uncaught exception
30:59 E/ddms: java.lang.UnsatisfiedLinkError: /Users/GNaschenweng/Downloads/Android/android-sdk-mac_x86-1.5_r3/tools/lib/libswt-pi-carbon-3236.jnilib: no suitable image found. Did find: /Users/GNaschenweng/Downloads/Android/android-sdk-mac_x86-1.5_r3/tools/lib/libswt-pi-carbon-3236.jnilib: no matching architecture in universal wrapper
at java.lang.ClassLoader$NativeLibrary.load(Native Method)

To fix this is quite simple, by adjusting the DDMS script from
if [ `uname` = "Darwin" ]; then
os_opts="-XstartOnFirstThread"

to
if [ `uname` = "Darwin" ]; then
os_opts="-XstartOnFirstThread -d32"

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Android: Push connection to Exchange

Once you have been able to root your HTC phone you will be able to enjoy enterprise WIFI connectivity (such as 802.1X / WPA) and with it, you want to obviously connect to your Exchange server.

In my previous post I mentioned that rooting your HTC will result in loosing ActiveSync. But with TouchDown from NitroDesk you get an Exchange client being able to receive push notifications, which worked faster in my tests on the HTC vs. my Entourage and Outlook clients.

TouchDown provides full ActiveSync support, the ability to instantly and automatically synchronize changes made to the Exchange Personal address book into the Android phone book, and support for setting peak hours to specify when to automatically check for changes to Exchange data. A must have for any Android user.

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Android: The development SDK

If you have an Android phone such as the HTC Dream and you have not rooted the phone AND installed the development SDK (just for super-cool geek factor and some tweaking), then stop reading.

The usage of the Android SDK will work on any Android phone without the need of rooting. Get yourself the SDK, then enable development mode on your phone (via Settings -> Applications -> Development -> USB debugging). You can leave USB debugging on, it does not negatively affect performance of the phone.

After connecting via USB, switch into the “tools”-folder of the SDK and you can do the following:

  • ./adb devices – will show you if an Android phone is connected
  • ./adb shell – will open a remote/telnet shell on the phone where you can do your normal Unix stuff
  • fastboot (downloaded separately) allows you to flash/reboot the phone (your phone needs to be in Fastboot USB-mode via CAMERA+POWER)

One of the cool features DDM – Dalvik Debug Monitor, which you invoke via ./ddms:

You will be able to debug processes as well as display device information remotely. But once you hit CTRL-S, you will be able to take remote screenshots from your device – like so:

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)