[Android Software/Hacking General [Developers Only]] alzakx:
Hey everybody.

So remember when I said that one way to trick Skype was to mod the OS. Well, I think I did but I can't test it. I was hoping one of you guys might help me.

Ok, first of all, let me explain how I did it: after looking over and over again at the code on the Skype .smali files, more specifically at the y.smali file, and digging through the obfuscated code I noticed that even though they protect their code, they cannot obfuscate the OS method calls. So, that's where I found that Skype does two method calls to try to determine the Network Country Location and the SIM Country location. On my previous hacks attempts I mod the Skype code to return values other than the ones returned by the OS when those methods were called and as you all know, it worked, but partially. So, if I can't intercept the Skype method calls I can go one step deeper and intercept the OS method calls, or return values. So, Skype made it easy to know what classes and methods those were: android.telephony.TelephonyManager.getNetworkCountryIso and android.telephony.TelephonyManager.getSimCountryIso. You can look them up on Google, just type android.telephony.

OK, so I got a hold of the Android Froyo 2.2 update file that I downloaded a while ago when it first came out. The zip is named update.zip. I unpacked this zip, looked into update/system/framework/ to find the framework.odex file.

My quest took me to find one single .smali file that I wanted to mod, the android.telephony.TelephonyManager file. So I pulled the framework.odex file, used backsmali to unpack it, looked for the file, open it with TextPad, looked for the methods and add one single line of code to each, shown on the attachments. As you can see, I add a line of code that will replace the return value with the "xx" string. Before, they will return the country iso code, which is a 2 letter code, being "us" the code for the USA. With that, every time Skype asks for the country, it will get "xx" as the answer from the OS therefore defeating the comparison Skype does on the y.smali file against the "us" string. After that I saved the file, used smali to repack the odex, put it back on the update.zip file and sign it.

Now I have the file ready, but I can't test it because I don't have a phone to test it with. It is stock Froyo + my mod. If someone is interested on testing it please contact me. I'll upload the file somewhere so that it can be downloaded. It's like 84 MB.

I guess all you have to do is follow these intructions:

Copy the update.zip file onto your microSD card.

With your Nexus One off, hold down the trackball and press the power button.

You'll be booted into a white screen with three Android robots on skateboards.

Select "Bootloader."

On the next screen, select "Recovery."

Your phone will reboot, giving you a picture of the Android robot and an exclamation point inside a triangle.

Now press the power button and volume up button at the same time. It could take a couple of tries.

Now (using the trackball this time) choose "Apply sdcard:update.zip" and let things run their course.

Then I guess you have to run Skype and test it.

Please let me know.