Archive

Posts Tagged ‘secret’

Launch your applications on custom secret code

August 13, 2012 3 comments

You might know about some of Android Secret Number or Code, right?

For sample, on the dial pad, type this code: *#*#4636#*#*, the a Testing screen will appear; it’s a secret screen that you do/don’t know about it before.

Dial Pad on SecretCode

Dial Pad on SecretCode

The interesting point here is that you absolutely want to do the same thing, type your custom secret code and your app is launched immediately.

This is what you need to do for it.

1. Create a custom BroadcastReceiver for Secret Code entering; for sample, I named it MySecretCodeReceiver.

This receiver will launch my Activity on detection.

public class MySecretCodeReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {
		if(intent.getAction().equals("android.provider.Telephony.SECRET_CODE")) {
			Intent i = new Intent(context, MainActivity.class);
			i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
			context.startActivity(i);
		}
	}

}

2. Register the MySecretCodeReceiver properly, like below:

        <receiver android:name=".MySecretCodeReceiver">
    	 	<intent-filter>
          		<action android:name="android.provider.Telephony.SECRET_CODE" />
         		<data android:scheme="android_secret_code" android:host="1711" />
   		</intent-filter>
        </receiver>

You need to make sure that the tag <action> should be like exactly same as above, since it’s the pre-defined action for SECRET_CODE handling. Also, pick a number in attribute “android:host” to your application. For sample here, I pick my lucky number 1711.

That’s pretty much straightforward. Have fun anyway!

Cheers,

Pete Houston

Categories: Tricks & Tips Tags: , , ,

Retrieve all secrect codes from your Android devices

December 21, 2011 Leave a comment

In my previous post about list of Google Android Secret Codes, you may find them not working in every Android devices.

So the question is how to know the secrect codes in a specific Android phone?

After searching for a while, I’ve found the could-be answer, at the following link: XDA-Developers – Android’s secret codes

1. First, root your phone

2. Secondly, create this bash shell script, name it, maybe: “secrets.sh

#!/bin/bash
echo -n &gt; apks.txt
echo -n &gt; output.txt
for x in `find . -name "*.apk"`
do
unzip -p $x | strings | grep -i "android.provider.Telephony.SECRET_CODE"
if [ $? -eq 0 ]; then
echo $x &gt;&gt; apks.txt
fi
done
for x in `cat apks.txt`
do
mkdir "$x.folder"
mv $x $x.folder
done
for x in `cat apks.txt`
do
unzip -d $x.folder $x.folder/$x
done
for x in `cat apks.txt`
do
bin2xml $x.folder/AndroidManifest.xml &gt; $x.folder/AndroidManifest.decoded.xml
done
for x in `find . -name "AndroidManifest.decoded.xml"`
do
echo "$x:" &gt;&gt; output.txt
cat $x | grep -i host | sed 's/android:host=\"/*#*#/' | sed 's/\" \/&gt;/#*#*/' | sed 's/\t\t\t\t\t//' &gt;&gt; output.txt
done

3. Download this script: http://android-random.googlecode.com/files/axml2xml.pl

and rename it to “bin2xml.pl“, then put somewhere in your Android phone $PATH.

4. Run the following commands:

chmod a+x secrets.sh
./secrets.sh
cat output.txt

5. Read your output and try it out!

 

Have fun!

Pete Houston

Categories: Tricks & Tips Tags: , , , ,

Google Android Phone Secret Codes

December 21, 2011 2 comments

A really interesting discovery, I’ve found on this page:

Justin.My – Google Android Phone Secret Codes

and

AskVG – Android Phone Secret Codes

These codes have been obtained by decoding various .apk files present in the phone firmware.

*#*#4636#*#*


This code can be used to get some interesting 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 one is my favorite one. 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
NOTE: All above codes have been checked on Google Android phone Samsung Galaxy I7500 only but they should also work in other Google Android phones.

Also, some additional secret codes, found on Android-DLS – Secret Codes

  1. Display IMEI:
    *#06#
  2. Voice Dialer Logging Enabled
    *#*#8351#*#*
  3. Voice Dialer Logging Disabled
    *#*#8350#*#*
  4. Phone Setting
    *#*#4636#*#*
  5. FieldTest
    *#*#7262626#*#*
  6. PUK Unlock (from emergency dial screen)
    **05*<PUK Code>*<enter a new pin>*<confirm the new pin>#

Some secret code specifically for Samsung Galaxy SII: *#0*#

 

Enjoy!

Pete Houston

Categories: Tricks & Tips Tags: , , , ,