Tuesday, May 22, 2012

Hidden menu/Service menu shortcuts of android phones using # codes aka dialer codes

Few helpful hidden menu/Service menu shortcuts using # codes aka dialer codes


 
P.S I knew some of these dialer codes and collected others from
 the internet. Credit goes to the respective bloggers who found 
these codes. Use it at your own risk.  Not all codes may work with
 your android hardware and the mileage may vary.
 
 
 Let me start with the most popular dialer code
                                      *#06#
This will display the  International Mobile Equipment Identity(IMEI)  
number of the phone
*#*#4636#*#*
This code can be used to get some basic information about your phone and battery. It shows following 4 menus on screen:
  • Phone information
  • Battery information
  • Battery history
  • Usage statistics
*#*#7780#*#*
This code can be used for a factory data reset. It'll remove following things:
  • Google account settings stored in your phone
  • System and application data and settings
  • Downloaded applications
It'll NOT remove:
  • Current system software and bundled applications
  • SD card files e.g. photos, music files, etc.
PS: Once you give this code, you get a prompt screen asking you to click on "Reset phone" button. So you get a chance to cancel your operation.
*2767*3855#
Think before you give this code. This code is used for factory format. It'll remove all files and settings including the internal memory storage. It'll also reinstall the phone firmware.
PS: Once you give this code, there is no way to cancel the operation unless you remove the battery from the phone. So think twice before giving this code.
*#*#34971539#*#*
This code is used to get information about phone camera. It shows following 4 menus:
  • Update camera firmware in image (Don't try this option)
  • Update camera firmware in SD card
  • Get camera firmware version
  • Get firmware update count
WARNING: Never use the first option otherwise your phone camera will stop working and you'll need to take your phone to service center to reinstall camera firmware.
*#*#7594#*#*
This code can be used to change the "End Call / Power" button action in your phone. Be default, if you long press the button, it shows a screen asking you to select any option from Silent mode, Airplane mode and Power off.
You can change this action using this code. You can enable direct power off on this button so you don't need to waste your time in selecting the option.
*#*#273283*255*663282*#*#*
This code opens a File copy screen where you can backup your media files e.g. Images, Sound, Video and Voice memo.
*#*#197328640#*#*
This code can be used to enter into Service mode. You can run various tests and change settings in the service mode.
WLAN, GPS and Bluetooth Test Codes:
*#*#232339#*#* OR *#*#526#*#* OR *#*#528#*#* - WLAN test (Use "Menu" button to start various tests)
*#*#232338#*#* - Shows WiFi MAC address
*#*#1472365#*#* - GPS test
*#*#1575#*#* - Another GPS test
*#*#232331#*#* - Bluetooth test
*#*#232337#*# - Shows Bluetooth device address
*#*#8255#*#*
This code can be used to launch GTalk Service Monitor.
Codes to get Firmware version information:
*#*#4986*2650468#*#* - PDA, Phone, H/W, RFCallDate
*#*#1234#*#* - PDA and Phone
*#*#1111#*#* - FTA SW Version
*#*#2222#*#* - FTA HW Version
*#*#44336#*#* - PDA, Phone, CSC, Build Time, Changelist number
Codes to launch various Factory Tests:
*#*#0283#*#* - Packet Loopback
*#*#0*#*#* - LCD test
*#*#0673#*#* OR *#*#0289#*#* - Melody test
*#*#0842#*#* - Device test (Vibration test and BackLight test)
*#*#2663#*#* - Touch screen version
*#*#2664#*#* - Touch screen test
*#*#0588#*#* - Proximity sensor test
*#*#3264#*#* - RAM version

*#*#34971539#*#* for information about phone camera (be very careful hitting options here)


*#*#197328640#*#* service mode
*#1234# display phones current firmware
*#0011# network mode/cell info/power info hidden menu
*#32489# (Ciphering Info)
*#232337# Bluetooth Address
*#2263# RF Band Selection ***My phones says this is restricted***
*#1575# GPS Control Menu
*#0589# Light Sensor Test Mode
*#07# Test History
*#3214789# GCF Mode Status
*#301279# HSDPA/HSUPA Control Menu
*#7353# Quick Test Menu **Melody brings up an interesting song. I don't think this song is one of mine**
*2767*4387264636# Sellout SMS / PCODE view
*#7465625# View Phone Lock Status
*7465625*638*# Configure Network Lock MCC/MNC
#7465625*638*# Insert Network Lock Keycode
*7465625*782*# Configure Network Lock NSP
#7465625*782*# Insert Partitial Network Lock Keycode
*7465625*77*# Insert Network Lock Keycode SP
#7465625*77*# Insert Operator Lock Keycode
*7465625*27*# Insert Network Lock Keycode NSP/CP
#7465625*27*# Insert Content Provider Keycode
*#9090# Service mode
*#7284# Phone utilities (change USB and UART modes)


Monday, January 24, 2011

How to increase phone battery running time (reduce the battery drain)

Spice MI 300 is a smart phone with lots of features.  Most of  you may be facing short battery life like me . How to maximise the battery life?
While it helps to have more features under one hood, enabling each additional feature will consume additional power.  Some features use more battery power than the other.  Also, the battery technology has NOT evolved as fast as other field of electronics with respect to SIZE and STORAGE CAPACITY. We need to be very cautious about, when to Enable/Disable the different features of phone given the limited battery resourse.


One of the easiest way to figure out this is by classifing the features of the phone like ESSENTIAL/REQUIRED and LUXURY with respect to Power consumption. A right balance of these will help you get a optimal battery mileage per charge.

MI 300 is powered by linux kernel and Android operating system which provides the infrastructure to use/control/enable/disable the different features of the hardware.  Use it effectively to achieve a better battery life. Most of these battery saving  tips are quite generic and applicable to Android devices in general ( Tablets / Phones ),  few are specific to Spice MI 300 and its clones.

21 tips to stretch the phone battery
==========================

1) The phone batteries have limited number of charge/discharge cycles. Always charge the battery to its  full capacity and also drain it completely before the next charge. So you go through the full charge/recharge cycle, there by utilising the full capacity of one charge cycle and also increase the battery life.

2) The phone has a big display and powering that display would take about 40% of the battery power at any given point of time. Enable autobrightness. This will automatically reduce/increase the brightnness based on the lighting.

Settings->display-> brightness->automatic brightness

3) Keep the autolock enabled with minimal screen timeout time. Two benfits. It automatically switches off display after timeout there by saving power and Avoiding  accidental usage

Settings->display->screen timeout
4)  Disable Network notification when an open network is available. This will help increase the battery life as it will not keep scanning for new wifi hotspot. This will not affect, connecting,  to an already registered wifi hotspot.

Settings->Wireless and networks->Wi-Fi Settings->Network notification

5) Turn off wifi when not in Use. Use Wifi with the phone connected to mains power(at home/office) as much as possible . :-)


6) 3G/HSDPA data uses more power and hence can drain the battery fast. Use it only when it is needed as it will cost for data usage aswell. Use 2G/GPRS is you can do with less data speed. 2G consumes comparitively less power. Opt for USB tethering over wifi tethering so that the  phone is charging while it shares the internet with PC/laptop.

7)  While multitasking helps run more apps concurrently, they also consume more power. Close the app if it is NOT required(Use task Manager). Or Run one app at a time.

8)  Less speed  =  less battery consumption.
If you have rooted your android phone, install the Ondemand CPU scaling apps, like "SetCPU", "No-Frills CPU control" which can run the CPU at the minimum possible speed  to run a given task. It runs at lowest speed while in idle state. It can scale up on demand upto the CPUs maxspeed based on the requirement. These apps are FREE for registered users of  http://xda-developers.com . You can also purchase some of these apps from the market.

9) There are advantages of background apps which are mainly used for monitoring/syncing/logging/scheduling/notifying purposes. By nature of it running all the time without user intervention requires that much additional power. However, of  these background apps, few of them tend to be battery killers. Identifying those background killer apps helps reducing the battery drians. One of them is "Background data sync".
Disabling background data sync can significantly(20-30%) improve the battery time. You can disable this feature under

Settings-> Accounts and sync ->Background data.

10) GPS and related apps can drain the battery pretty fast. We know that these apps are used mostly while driving. Use it caustiously, or connect it to a (car)charger while using it.

11) Disable audible sounds for notifications and keypad taps.

12) Disable haptic feedback with keypad. This also consumes battery.

13) Music is good to hear. Avoid music on Speaker on as much as possible. Use headset. This consumes less battery.

14) Turn on bluetooth only when required. Turn it off after the use.

15) When the battery charge is 30% or less, disable all the apps/feature which are not essential. ONLY critical apps must be running on the phone so that the remaining juice in the battery can be stretched as much as possible. Yes, Just it should work like a very basic phone.

16) Wallpapers.  Do not use Live wallpapers. If you can disable Wallpaper altogether, it even more better. More free memeory and saves power aswell.

17) Themes. Switch to lighter themes. Heavily animated themes consumes more  power hence drain battery faster.

18) Games. While it is good to have games.3D and animated games use more GPU/CPU power. Play the games as much as possible with charger on.

19) Carry Additional/Spare battery if possible while on the move.

20) Custom ROMs. Yes, choose the best custom ROMs available, which has tweaked , optimised kernel  and system apps for a better battery life.  As of now, Android 2.2 Froyo based  firetrapTwonights 2.2.1 from "androidpt" is very well tuned and  has the highest scoring for battery on Spice MI 300 and its clones like z71, Motorola quench xt2..
Also update your apps regularly so that bugs/issues in those apps are fixed in the later versions, they run better and hence consume less power :-)

21) Battery profiles. Set/enable different features of phone with different profiles.
a) Auto mode (default mode)

  Should  based on the battery percentage.

b) Enable all.
  This can be used while the phone has more than 80% of charge with charger connected.

c) Office/network mode.
   It can be with call/wifi enabled or just Airplane mode with wifi.

d) Music mode.
  This one is for music lovers. Options to enabe disable wifi

e) Custom mode
 User has the choice :)

 I am not sure if there is already an app in the market which has all the combined features of CPU scaling , task manager and system settings to achieve the goal of getting a best possible battery life, effectively.


Monday, January 10, 2011

Partitions inside Spice MI 300

Spice MI 300 is powered by linux 2.6 kernel and has the following partitions. This snapshot was taken on the device running Android 2.2(Froyo).
 $cat /proc/mtd
dev:    size    erasesize   name         
 mtd0:  00500000 00020000 "boot" 
 mtd1:  00200000 00020000 "misc" 
 mtd2:  00080000 00020000 "splash" 
 mtd3:  00500000 00020000 "recovery"
 mtd4:  00500000 00020000 "ftm" 
 mtd5:  01a00000 00020000 "hidden"
 mtd6:  00060000 00020000 "dbgmsk"
 mtd7:  0a000000 00020000 "system"
 mtd8:  00200000 00020000 "misc2"
 mtd9:  05800000 00020000 "cache"
 mtd10: 0ab80000 00020000 "userdata"

Partition name            Device path                                          Size
boot         /dev/block/mtdblock0          5   MiB
misc         /dev/block/mtdblock1          2   MiB
splash       /dev/block/mtdblock2          512 KiB
recovery     /dev/block/mtdblock3          5   MiB
ftm          /dev/block/mtdblock4          5   MiB
hidden       /dev/block/mtdblock5          26  MiB
dbgmsk       /dev/block/mtdblock6          384 KiB
system       /dev/block/mtdblock7          160 MiB
misc2        /dev/block/mtdblock8          2   MiB
cache        /dev/block/mtdblock9          88  MiB
userdata     /dev/block/mtdblock10         171 MiB

 
Mobile devices filesytems typically are, flash filesystem , here we see yaffs2 filesystem
and MicroSD card is mounted with vfat fs.
 

rootfs / rootfs rw,relatime 0 0
tmpfs /dev tmpfs rw,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
/dev/block/mtdblock7 /system yaffs2 rw,relatime 0 0
/dev/block/mtdblock10 /data yaffs2 rw,nosuid,nodev,relatime 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
/dev/block/mtdblock1 /misc yaffs2 rw,nosuid,nodev,relatime 0 0
/dev/block/mtdblock5 /hidden yaffs2 rw,nosuid,nodev,relatime 0 0
/dev/block/mtdblock9 /cache yaffs2 rw,nosuid,nodev,relatime 0 0
/dev/block/mtdblock8 /misc2 yaffs2 rw,nosuid,nodev,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
/dev/block/vold/179:1 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime
 

Sunday, January 9, 2011

Boot modes of Spice MI 300 phone

Spice MI 300 can be booted in 5 different modes based what you intend to do with the phone apart from the power on.
(Clones are Vibo A688, Orange Boston, Gsmart G1305, Motorola XT502, Apanda A60,  Excalibur, A1, A88, Commtiva Z71, Blaze , Videocon Zeus...)
============================================
Boot Modes on Spice MI 300
============================================
Recovery Mode                      : Vol  Up        + Camera             + Power
FTM Mode(bootloader)           : Vol  Up        + Vol Down           + Power
Download Mode                     : Vol  Up         + Hang Up(red)    + Power
Fastboot Mode                      : Vol Down      + Hang Up(red)    + Power
Master Reset                        : Camera        + Hang Up(red)    + Power   
============================================

Incoming Download mode (Vol Up + Red + power)
----------------------------------------------------------------
This Mode is used for updating firmware .nb0 file or the ROM file using the utilities like RUT(ROM updating tool) , Software update tool(SUT) from computer.
Windows 64 RUT
Windows 32bit RUT

Windows 32/64bit SUT

Android 1.6.2 based firmware for a  spice MI 300 clone
Firmware Apanda A60 1.6.2
Android 2.2 firmware from Foxconn

Tugzip to unrar the firmware

Download these and start the SUT and point it to the unzipped Firmware file .nb0.  Put the phone in incoming download mode. Now connect the phone to PC  in Incoming Download Mode and press next to complete the ROM update.


Fast boot mode(Vol Down + Red + Power)
----------------------------------------------------

Fastboot is a protocol used to update image files of a ROM onto a android device.

Custom boot logo for Spice MI 300 and its clones

Bored to see the factory default splash boot logo everytime you boot/power on your phone, here is a simple guide to have a custom boot logo on your phone. This post does NOT cover how to customize the boot animation while the phone bootstrap the OS.


What you need:
===========
1. A Spice MI 300 or its clone (commtiva z71, orange boston, Motorola quench xt2...)
2. A custom boot logo. Skip 2 and 3 if you already have a boot logo for MI 300.
3  (a) Image editing tool to get the a raw format file.
    (b) Android utility tool rgb2565 to convert this raw file into bootlogo

4. Fastboot binary to push the file into android splash partition.
5. 10-15 minutes of your time :)

 Image editing tools.
================
Like Imagemagick (Convert.exe), Gimp, Adobe photoshop, Microsoft Paint. (Google picasa  will NOT do :( )
Android utility tool rgb2565 Source
Binary rgb2565 file

 
Android boot logo specification for MI 300.
=======================================
The boot logo file is of 320x480 pixels 16bit raw565 format with a size <= 307200 bytes.

How to get this file ?
Search, borrow, or just create one :)
a)To create this custom boot logo we shall start with a picture file of your choice, letsay splashfile.png.
b)Use MSpaint/gimp/Adobephotoshop to rezise the file into 320x480 8bit color non-interlaced png file.
c)Then convert this file into raw format splashfile.raw using (convert.exe from imagemagick)/gimp/photoshop. Make sure that the file size is less than or equal to  <= 460800 bytes.
$ convert -depth 8 splashfile320x480.png rgb:splashfile320x480.raw
Convert expects the input file to be in the same directory.
d) Now use rgb2565 to convert the raw image file into splashfile.raw565
$ rgb2565 < splashfile320x480.raw > splashfile.raw56  
 Make sure that the file size is less than or equal to <= 307200 bytes
Once you have the logo file ready, shutdown/poweroff the phone.
Boot  the into fastboot mode (Vol Down + Hang Up(red) + Power).
Connect the phone to your computer.  Now run in command prompt

$ fastboot flash splash splashfile.raw565
$ fastboot reboot

Enjoy your custom logo :)

Little background about android filesystems and partitions:
=======================================
Android device firmware ROM will have the following  partitions.

[Firmware File Name]
 FILENAME_FLASH_HEX         = "F0X-0-1280-NPRG7627.hex"
 FILENAME_FLASH_BIN         = "xxx.bin"
 FILENAME_PARTITION         = "F0X-0-1280-partition.mbn"
 FILENAME_QCSBLHDCFG        = "F0X-0-1280-qcsblhd_cfgdata.mbn"
 FILENAME_QCSBL             = "F0X-0-1280-qcsbl.mbn"
 FILENAME_OEMSBLHD          = "F0X-0-1280-oemsblhd.mbn"
 FILENAME_OEMSBL            = "F0X-0-1280-oemsbl.mbn"
 FILENAME_AMSSHD            = "F0X-0-1280-amsshd.mbn"
 FILENAME_AMSS              = "F0X-0-1280-amss.mbn"
 FILENAME_CEFS              = "cefs_modem.mbn"
 FILENAME_APPSBOOTHD        = "F0X-0-1280-appsboothd.mbn"
 FILENAME_APPSBOOT          = "F0X-0-1280-appsboot.mbn"
 FILENAME_ANDROID_BOOT      = "F0X-0-1280-7003-boot.img"
 FILENAME_ANDROID_SYSTEM    = "F0X-0-1280-7003-system.img"
 FILENAME_ANDROID_USER_DATA = "F0X-0-1280-7003-userdata.img"
 FILENAME_ANDROID_RECOVERY  = "F0X-0-1280-recovery.img"
 FILENAME_ANDROID_SPLASH    = "F0X-0-1280-7003-splash.img"
 FILENAME_ANDROID_HIDDEN    = "F0X-0-1280-7003-hidden.img"
 FILENAME_ANDROID_FTM       = "F0X-0-1280-ftm.img"
Of these the boot logo goes into FILENAME_ANDROID_SPLASH partition which has a flag 0x1000.
We use the fastboot protocol to update the splash filesystem with a custom boot logo 
to the android device.  
========================================================================================== 
 Note: If you get dll missing error while mile running fastboot, you need to install the
Android SDK or atleast get these dll files and put them in the same directory as fastboot.
Adbwinapi.dll
AdbwinUsbapi.dll
 

My New Capacitive Touchscreen phone

Last week/year, I started looking out for a new capacitive touch screen, 3G mobile phone after my jailbroken(rooted), unlocked iPhone started loosing battery. Came across this device, a factory unlocked phone with most of the features I was looking for below INR Rs 10,000/- called Spice MI 300.



This device turned out to be a good phone with 3.2 inch WVGA capacitive touchscreen, GPS/AGPS, Gsensor ,a decent CPU qualcomm MSM 7227 ARMv6 running at 600MHZ, with a 2GB MicroSD (upgradable to 32GB) 156MB user phone memory, 256MB RAM, 512MB ROM, hardware capable of FM radio( SOC USI WM-BG-BM-02  need to verify), with a 1230mAH battery and a 5 Megapixel camera, Optical trackball, E-compass, Proximity Sensor, bluetooth 2.0 with A2DP + EDR, Wifi 802.11 b/g, GPRS | EDGE | 7.2Mbps HSDPA.

This phone is powered by modified version of linux 2.6 kernel. This mobile operating system is called Android which has an application platform running on a java stack,. The stock MI 300 runs (donut)Android 1.6 with an upgradable option of the firmware to (Eclair)Android 2.1.
I had earlier played with montavista linux runnning 2.4 kernel on a motorola A780 which had a resistive touch screen and also a keypad.

The first thing I do when I get any device is, try to dissassemble and see what goes inside the device. Warranty doesnot mean much these days. Before starting I searched around the net for any tips. It turned out that this device is a widely popular phone and has a 14 variants/clones with the same hardware under the hud manufactured by commtiva. Some of these clones are factory unlocked and some are tied to carriers which can be easily unlocked.

1 Spice MI 300(India)
2 Optimus Boston (Portuguese)
3 Orange Boston(Europe)
4 Gigabyte Gsmart G1305
5 Motorola Quench Xt3/XT502(India)
http://www.gsmarena.com/motorola_quench_xt3_xt502-3354.php
6 Apanda A60(China)
7 Vibo A688(Taiwan)
8 Chinavision Excalibur
9 Muchtel A1(Taiwan)
10 Wellcom A88(Thailand)
11 Cincinnati Bell Blaze
12 Nexian Journey Lounge
13 Commtiva z71(USA, Taiwan)
14 Videocon v7500 zeus(India)

The PCB of a MI 300 Clone, Apanda A60.
Here is a pdf file of dissassembly with pictures of chinese version of motorola quench xt2.

Update: FM Receiver
The combo Bluetooth/WIFI/SIP mobule USI WM-BG-AQ-02  spec pdf file and USI WM-BG-AQ-02 description. Looks like the hardware doesnot support FM Receiver :(