Home > Tricks & Tips > Retrieve all secrect codes from your Android devices

Retrieve all secrect codes from your Android devices


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 > apks.txt
echo -n > 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 >> 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 > $x.folder/AndroidManifest.decoded.xml
done
for x in `find . -name "AndroidManifest.decoded.xml"`
do
echo "$x:" >> output.txt
cat $x | grep -i host | sed 's/android:host=\"/*#*#/' | sed 's/\" \/>/#*#*/' | sed 's/\t\t\t\t\t//' >> 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

Advertisements
Categories: Tricks & Tips Tags: , , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: