Android's Secret Codes (linux/cygwin)

Search This thread

pinetreehater

Senior Member
Feb 29, 2008
601
127
The ATL
I am not trying to play "thread police". And you can rationalize Haykuro's actions anyway you want. If you believe it is development related, then that is your opinion. I simply stated mine.

I am only pointing out the unfairness of the action. One should not be allowed to rule-break simply because of status or power. It's like OJ all over again. Moreover, let's see how many people flame me because of their affection for Haykuro. Hell, I know what the man has done. I like him too. He may recall when a certain Italian blogger took him to task about being two-faced, and I made it a point to create an account and point out how foolish her statements were.

As the poster above me stated , "To each, his own".
 

Mi|enko

Senior Member
Jul 15, 2006
1,558
171
Be nice if there was a secret code to enable root. :-D Then, it could potentially open all android devices.

Regardless, thanks Haykuro for bringing this to us and thanks zinx for pointing it out!
 

jady

Member
Jan 18, 2007
34
0
These codes are just what I have been looking for. They exist on all phones to enable certain options that are not supposed to be user configurable. Is there a code that can access the voice encription and change it to 13k?

Also can you access the slot setting to make the G1 ping the towers more often?
 

ModernMonk

New member
Dec 10, 2009
2
0
FYI: the way the dialer works is to broadcast an intent with a URI matching the secret code. You find these in the script because it searches each apps manifest that defines the intent-filters, which is how the OS knows to launch those programs. So maybe this thread can be related to development...

What would be spectacularly awesome is if there was a program on the myTouch that unlocked it from the operator. I have a t-mobile myTouch that is completely useless to me unless I can get my AT&T sim working on it. I can't access the file system or any part of it right now, but if anyone has one out there and wants to post the secret codes, they would be really cool.
 

smartin4166

Member
Sep 13, 2008
48
0
How about the fine example of "leading" by all of these "senior" members acting like children and arguing about nothing? Thanks haykuro!
 

kusotare

Senior Member
Apr 12, 2009
638
84
Colorado
I am not trying to play "thread police". And you can rationalize Haykuro's actions anyway you want. If you believe it is development related, then that is your opinion. I simply stated mine.

I am only pointing out the unfairness of the action. One should not be allowed to rule-break simply because of status or power. It's like OJ all over again. Moreover, let's see how many people flame me because of their affection for Haykuro. Hell, I know what the man has done. I like him too. He may recall when a certain Italian blogger took him to task about being two-faced, and I made it a point to create an account and point out how foolish her statements were.

As the poster above me stated , "To each, his own".
You fail, sir.

So, creating a script to support the use of these functions, which haykuro did, and then giving it to people and giving them information on how to use and understand it ISNT development?

Well DAMN! We ought to just go ahead and remove every single thread that has user tools and instructions on how to use them, right?

Please attempt to use your brain before you decry something. If you dont understand the definition of DEVELOPMENT, dont try to negate that definition with circular logic and comparisons to OJ.


@OP: thanks very much for the script haykuro, always nice to have some new little toys to play with.
 

wcdisciple

Senior Member
Jun 25, 2008
268
0
You fail, sir.

So, creating a script to support the use of these functions, which haykuro did, and then giving it to people and giving them information on how to use and understand it ISNT development?

Well DAMN! We ought to just go ahead and remove every single thread that has user tools and instructions on how to use them, right?

Please attempt to use your brain before you decry something. If you dont understand the definition of DEVELOPMENT, dont try to negate that definition with circular logic and comparisons to OJ.


@OP: thanks very much for the script haykuro, always nice to have some new little toys to play with.

Well Done. :cool:
 

weasel5i2

Senior Member
May 8, 2008
74
13
Austin Texas
And back on topic..............


These secret strings don't appear to be in the system apk files which were extracted from the AT&T Backflip. Or, at least, I can't get these instructions to work properly, as the perl script fails with an "Out of memory" error. So, I used aapt and apktool to snoop around in the strings the hard way, and no such luck.

**EDIT** Never mind, I found two .apks with strings: Settings.apk and VoiceDialer.apk

Settings.apk:
<data android:scheme="android_secret_code" android:host="4636">

VoiceDialer.apk:
<data android:scheme="android_secret_code" android:host="8351">
<data android:scheme="android_secret_code" android:host="8350">

/**EDIT**

[System Dump]Motorola Backflip Blur_Version.0.1.1199.MB300.ATT.en.US

Still picking away at this thing. I noticed that Setup.apk has the system account ownership/UID sharing, and android.permission.WRITE_SECURE_SETTINGS permission. If I am able to hack it into setting ro.debuggable to ON, wouldn't it then allow adb root?

Will apktools allow me to tamper with and recompile a new Setup.apk?
Will the phone allow me to adb uninstall the stock Setup.apk?
Will the phone allow me to install/reinstall the modified Setup.apk?

So many questions.. *still hacking, poking, prodding..* I'll post results and anything I find here and also on backflipforums.

--Weasel5i2
 
Last edited:

TwoPointZero

Senior Member
Apr 15, 2012
65
39
Sony Xperia XZ Premium
My Win32 CMD batch version

Requirements:
* Java RE (with AXMLPrinter2.jar)
* UnxUtils (unzip, egrep)
* Sysinternals Strings


get_strings.cmd
============
Parses APK's in ./system/app subdirectory.
Writes output to strmatch.txt (open with notepad++) in a not very nice format but wtv.
You might need to tweak some invokation paths below.


:: Android's Secret Codes (CMD batch version)
:: Original implementation: hakyuro
:: http://xdaforums.com/showthread.php?t=540483
@echo off && SETLOCAL

SET PATH=C:\Oracle\Middleware\jdk160_24\bin;%PATH%

SET UNZIPPRG=e:\Tools\Unix\usr\local\wbin\unzip
SET STRINGSPRG=e:\Tools\strings -u
::SET EGREPPRG=e:\Tools\pcregrep
SET EGREPPRG=e:\Tools\Unix\usr\local\wbin\egrep

SET STRTMP=strmoo.txt
SET STRTMP2=strmoo2.txt
SET OUTPUT=strmatch.txt

del /F %OUTPUT% 2> NUL

for %%x in (system\app\*.apk) do CALL :process_one %%x
GOTO :end

:process_one
%UNZIPPRG% -p %1 > %STRTMP%
%STRINGSPRG% %STRTMP% > %STRTMP2%
for /f %%d in ('%EGREPPRG% -c "android.provider.Telephony.SECRET_CODE|android_secret_code" %STRTMP2%') DO SET RESULT=%%d
IF NOT "%RESULT%" == "0" (
CALL :process_match %1
)
GOTO :eof

:process_match
echo %1 >> %OUTPUT%
echo AndroidManifest:[%1]
mkdir "%~n1.output" 2>NUL
%UNZIPPRG% -q -o -d "%~n1.output" %1 AndroidManifest.xml
java -jar AXMLPrinter2.jar %~n1.output/AndroidManifest.xml > %~n1.output\AndroidManifest.decoded.xml
%EGREPPRG% -i host %~n1.output\AndroidManifest.decoded.xml
%EGREPPRG% -i host %~n1.output\AndroidManifest.decoded.xml >> %OUTPUT%
GOTO :eof


:end
del /F %STRTMP% %STRTMP2% 2> NUL

ENDLOCAL