• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Android's Secret Codes (linux/cygwin)

Search This thread

haykuro

Senior Member
Nov 21, 2008
616
19
Sunrise
Props to zinx for pointing it out, this is just an automated script for the nooblets.

gather up your apk's (mainly the ones in /system/app although maybe some other applications have some as well) and throw them where you'd like

copy paste this:

Code:
#!/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

save as secrets.sh (on your computer)

download this: http://android-random.googlecode.com/files/axml2xml.pl
rename it to bin2xml and make sure it's somewhere in your $PATH

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


you should get output of a bunch of codes you can enter into your dialer.

cyanogen mod 3.6.8.1 output:
Code:
$ cat output.txt 
./Phone.apk.folder/AndroidManifest.decoded.xml:
./VoiceDialer.apk.folder/AndroidManifest.decoded.xml:
*#*#8351#*#*
*#*#8350#*#*
./QxdmLog.apk.folder/AndroidManifest.decoded.xml:
*#*#564#*#*
./Ftp.apk.folder/AndroidManifest.decoded.xml:
*#*#9696#*#*
./Talk.apk.folder/AndroidManifest.decoded.xml:
*#*#gtalk#*#*
*#*#8255#*#*
./HtcLog.apk.folder/AndroidManifest.decoded.xml:
*#*#7269#*#*
./Settings.apk.folder/AndroidManifest.decoded.xml:
*#*#4636#*#*
./Contacts.apk.folder/AndroidManifest.decoded.xml:

(of course *#*#gtalk#*#* wouldn't work, but all the ones with numbers do, again it's a primitive script for ease of use)

enjoy :)

EDIT:
oh yea.. for clarification:
Code:
*#*#8255#*#* -> Google Talk Service Monitor (Talk.apk)
*#*#4636#*#* -> Testing / Debug info (Settings.apk)
*#*#9696#*#* -> FTP Testing / App (Ftp.apk)
*#*#8351#*#* -> *#*#VDL1#*#* Voice Dialer Logging Enabled (VoiceDialer.apk)
*#*#8350#*#* -> *#*#VDL0#*#* Voice Dialer Logging Disabled (VoiceDialer.apk)
*#*#7269#*#* -> Standard device logging (Device [logcat?], AT commands, Kernel [dmesg?], and optional log to flash memory) (HtcLog.apk)
*#*#564#*#*  -> QXDM Logging Front end (QxdmLog.apk)
 

clintz

Senior Member
Jul 22, 2009
150
0
It makes sense, it hides apps, and makes them only open if you dial that string of numbers and symbols

edit: After actually reading the code, it seems to just enable some special debugging type logs, not just any app.
 

pinetreehater

Senior Member
Feb 29, 2008
601
127
The ATL
Ummm...in all fairness this isn't a dev topic. Plenty of other threads that were closer to developmental topics got trashed.

People as good as Haykuro should lead by example, not encourage posting in incorrect forums.
 

xREVOx

Senior Member
Jul 10, 2009
272
27
Ummm...in all fairness this isn't a dev topic. Plenty of other threads that were closer to developmental topics got trashed.

People as good as Haykuro should lead by example, not encourage posting in incorrect forums.

to each his own.. you do have the right to be wrong... perfectly fair... these codes might help in debugging later? isn't debugging part of developing?