Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Android's Secret Codes (linux/cygwin)

OP haykuro

24th July 2009, 11:08 PM   |  #1  
OP Senior Member
Flag Sunrise
Thanks Meter: 9
 
597 posts
Join Date:Joined: Nov 2008
More
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)
24th July 2009, 11:12 PM   |  #2  
drpfenderson's Avatar
Senior Member
Flag Portland, OR
Thanks Meter: 37
 
734 posts
Join Date:Joined: Oct 2008
More
Excuse the ignorance - but what are these used for/good for?
24th July 2009, 11:30 PM   |  #3  
pistol4413's Avatar
Senior Member
Flag Philadelphia
Thanks Meter: 0
 
579 posts
Join Date:Joined: May 2009
More
wondering myself
im also wondering what it is good for to. O mystical haykuro care to explain a little more.....
24th July 2009, 11:33 PM   |  #4  
Member
Flag New York City.
Thanks Meter: 0
 
64 posts
Join Date:Joined: Apr 2009
More
im guessing you setup what he said, and u put in whatever code you inserted for the w.e app you want to run? lol
24th July 2009, 11:33 PM   |  #5  
Senior Member
Thanks Meter: 0
 
150 posts
Join Date:Joined: Jul 2009
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.
24th July 2009, 11:34 PM   |  #6  
OP Senior Member
Flag Sunrise
Thanks Meter: 9
 
597 posts
Join Date:Joined: Nov 2008
More
Quote:
Originally Posted by clintz

It makes sense, it hides apps, and makes them only open if you dial that string of numbers and symbols

somewhat.. Talk.apk (google talk) for example, isn't hidden, just has a hidden class that users can't access unless you type in it's corresponding code.
24th July 2009, 11:36 PM   |  #7  
johnnylicious's Avatar
Senior Member
Thanks Meter: 4
 
1,407 posts
Join Date:Joined: Nov 2008
very interesting...
24th July 2009, 11:37 PM   |  #8  
drpfenderson's Avatar
Senior Member
Flag Portland, OR
Thanks Meter: 37
 
734 posts
Join Date:Joined: Oct 2008
More
Quote:
Originally Posted by clintz

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.

Awesometown.
Thanks for this - now it makes me feel like a spy.
24th July 2009, 11:43 PM   |  #9  
Senior Member
Thanks Meter: 7
 
387 posts
Join Date:Joined: Feb 2009
Too much work/too lazy..
24th July 2009, 11:44 PM   |  #10  
Senior Member
RI
Thanks Meter: 0
 
104 posts
Join Date:Joined: Apr 2009
The 4636 one is the one i use to lock the phone into 3g only mode = )

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes