Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,736,274 Members 45,663 Now Online
XDA Developers Android and Mobile Development Forum

Android's Secret Codes (linux/cygwin)

Tip us?
 
haykuro
Old
#1  
Senior Member - OP
Thanks Meter 9
Posts: 597
Join Date: Nov 2008
Location: Sunrise
Default Android's Secret Codes (linux/cygwin)

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)
 
drpfenderson
Old
#2  
drpfenderson's Avatar
Senior Member
Thanks Meter 37
Posts: 730
Join Date: Oct 2008
Location: Portland, OR
Excuse the ignorance - but what are these used for/good for?
Follow me on the web
:: Phone: Google Nexus 4 - ROM: CyanogenMod 10.1.2 - Recovery: TWRP 2.6.0.0 ::
:: Tablet: Google Nexus 7 2013 - ROM: STOCK - Recovery: TWRP 2.6.0.0 ::
Search, search, search BEFORE posting, please.
 
pistol4413
Old
#3  
pistol4413's Avatar
Senior Member
Thanks Meter 0
Posts: 579
Join Date: May 2009
Location: Philadelphia
Default wondering myself

im also wondering what it is good for to. O mystical haykuro care to explain a little more.....
HTC One S
Cyanogenmod


 
youuishype
Old
#4  
Member
Thanks Meter 0
Posts: 64
Join Date: Apr 2009
Location: New York City.
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
T-Mobile G1(White) CyanogenMod V3.9 Spinning the Wheel of Death!
Radio: 2.22.19.26I
Recovery: Cyanogen v1.3.1
Haykuro's SPL:1.33.2005
Theme: l3wish's:Palm Pre v1.6!
 
clintz
Old
#5  
Senior Member
Thanks Meter 0
Posts: 150
Join Date: 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.
▪T▪▪Mobile▪ G2: Unrooted
vvv Retired vvv
▪T▪▪Mobile▪ G1: Black
ROM: SuperD 1.9.3 Blk NRH
Apps2SD: 8GB Class 6
SPL: Danger SPL
Recovery: Amon Ra 1.5.2
 
haykuro
Old
#6  
Senior Member - OP
Thanks Meter 9
Posts: 597
Join Date: Nov 2008
Location: Sunrise
Quote:
Originally Posted by clintz View Post
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.
 
johnnylicious
Old
#7  
johnnylicious's Avatar
Senior Member
Thanks Meter 4
Posts: 1,407
Join Date: Nov 2008
very interesting...

HTC Magic (MyTouch 3G)
Manup's ECLAIR (v1.3)
Donate if you want.
Follow me on Twitter....
 
drpfenderson
Old
#8  
drpfenderson's Avatar
Senior Member
Thanks Meter 37
Posts: 730
Join Date: Oct 2008
Location: Portland, OR
Quote:
Originally Posted by clintz View Post
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.
Follow me on the web
:: Phone: Google Nexus 4 - ROM: CyanogenMod 10.1.2 - Recovery: TWRP 2.6.0.0 ::
:: Tablet: Google Nexus 7 2013 - ROM: STOCK - Recovery: TWRP 2.6.0.0 ::
Search, search, search BEFORE posting, please.
 
CBowley
Old
#9  
Senior Member
Thanks Meter 7
Posts: 387
Join Date: Feb 2009
Too much work/too lazy..
Device - Epic 4G Touch
Rom - Calkulina latest
Carrier - Sprint
 
soba5150
Old
#10  
Senior Member
Thanks Meter 0
Posts: 104
Join Date: Apr 2009
Location: RI
The 4636 one is the one i use to lock the phone into 3g only mode = )
Carrier : T-Mobile
Phone : HTC Sensation
ROM : Cyanogen 7.1
Recovery : CWM 5.0.2.0
Radio : 10.14.9035.01_M
SPL :
SDCard: SanDisk 8GB Class 6

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Get Your Cargo to its Destination in 4×4 Military Operations Reborn

Racing games have evolved quite a bit since the days of Pole … more

Automate Your Device with Sfen

Changing the profile of yourdevice manually is now long forgotten. Since the advent of Android automation … more

Galaxy Photo Screen Lock Displays a Photo Slideshow on Your Lock Screen

Being the most often looked at part of our devices UI, the lock … more

Boost the LG G3 Speaker and Headphone Volume

It seems like OEMs are stepping up their game, with regards to thequality of their devices sound … more