Posts Tagged with purchasing apps
Values for DE and CH Markets…

Glad to see people are helping out for posting the values for other markets. This is post is essentially just a rehash of the values posted on xda for the German and Switzerland.

Posted by rac2030 on this thread.

Sunrise Switzerland // Market has not yet started but anyway

o2 Germany – thanxs to t4c

“It works, with the o2 values i have RadAlert in the market thats only available in german market and not in US ;-)”

So you can use these values and my previous post to manually change your market values to these.

How to manually access “restricted” market areas

Mmmmm... Market Data...

Mmmmm... Market Data...

I’ve noticed some people have been having trouble with Andrea’s program, the Market-Enabler – so prior to him launching his GPL’ed code for the program. I thought that I would explain what it is actually doing.

While I’m not 100% sure, I believe that the problems people are having are with the super-user whitelist application. So running these commands yourself via adb or the terminal on the phone should resolve any of the issues. Also, an obvious thing should be that, you DO need root! This method has been testing on 1.43 JF, 1.5 JF and theDUDE and has worked fine on all of them.

What to do
Simply fire up adb or the terminal on your phone, and type in “getprop”. This will return a large list of variables – you should either make a back up of these or write them down. Simply typing “getprop > prop.backup” will make a back up of these values and pipe them to the file named “prop.backup”. This will be needed incase you mess anything up.

To enable seeing of paid applications that are available to the US, the following commands must be run:

setprop gsm.sim.operator.numeric 31026
setprop gsm.operator.numeric 31026
setprop gsm.sim.operator.iso-country us
setprop gsm.operator.iso-country us
setprop gsm.operator.alpha T-Mobile
setprop gsm.sim.operator.alpha T-Mobile
kill $(ps | grep vending | tr -s ‘ ‘ | cut -d ‘ ‘ -f2)
rm -rf /data/data/*

Essentially you are setting the US standard values (for the T-Mobile Operator) on your phone, these values are the gsm.sim.operator.numeric, gsm.operator.numeric, gsm.sim.operator.iso-country, gsm.operator.alpha and gsm.sim.operator.alpha.

The next line simply looks for the vending application, and kills the process. The next time will remove the cache files you have stored from the vending application. These two lines essentially make sure your phone will regrab the values you have set, so you can properly view the market data.

What about other markets?
I’ve gotten quiet a few comments and questions regarding this. The same method used to set your phone to the US T-Mobile market could be used to set your phone to any other market. All you need to know is the values from that area. So get your friend to give you the values for their area and carrier and simply replace the values above with it.

Again… Yet another note
I did not make the program Market-Enabler, I only helped Andrea and have also translated his posted. Please when using this information quote your sources, both my site and Andrea’s – it’s only fair to do so!

Enjoy πŸ™‚

Purchase applications outside of the “authorized” zones

Paid apps on an italian G1

Paid apps on an italian G1

First let me just make a little disclaimer that this is my own translation from Italian to English and I used google-translate a little bit also. So try to hang in there with me since my Italian isn’t very good, and I’ve tried to rephrase things to make a little more sense in English. For the original article (Italian) go to and for the translated (via google-translate) go here translated

As announced previously, today will be the launch day of the program we have called “Android Enabler”. This is a program that should help people across the world (and in the US) who have been restricted thus far with the inability to purchase applications on the Android Market.

If you have previously read the blog (and if you do not, perhaps it is time you subscribe ;)) you would know that yesterday we launched a preview of the application and what will be going on. On to the news now though…

The Builders
We start by presenting Tim Strazzere, an American friend (in fact I recently discovered he has ancestors from Sicily), who write an interesting articles on reversing applications and control systems from the Android OS. (Link to blog)

He gas written a few “bomb shell” articles that have been about reversing the market. After contacting him I discovered that he was working on a scraper of the market.

Then we came to meet on gchat where we talked about the possibilities and how we could accomplish such a task of purchasing outside of the US. I provided the out-of-the-country phone and knowledge, and provided the reversing knowledge. πŸ˜‰

The other coder of this application is myself, Andrea Baccega, that was absolutely bored to ask his friend over the ocean to purchase applications, reimburse his fee, and then get the application to be able to review it for my site. (Tim: I was getting bored of that myself!)

The method
Tim and I quickly set to work to find ways to enable the market for pay applications outside of the US (which at the time was the only viable market, with UK soon to follow). First I will explain the methods we tried and the solutions we used, this will hopefully let you understand the process we used for which the final solution came about.

To be able to play around with the data the market would send to the phone, we needed to understand how the data was exchanged with google servers. It was not enough to simple snag the packages by a simple mitme (man in the middle) attack. As one might expect, the data being exchanged was not always clear…

At this point, if we wanted to understand what we where sending to google, we had to reverse the market and understand exactly what function is employed to encode and decode the data being sent and received. More importantly though, we had to understand what was going on within these two methods.

Surprisingly, we found that the method of encoding and decoding that are used are extensively documents and were Baser64.decodeWebSafe and Base64encodeWebSafe. Both part of the google data API. Though the values that the android where producing where often a little nerfed and not out-of-the-box uses of these functions.

Once we decoded and sniffed a good number of packages from both the US and Italy we knew what information apparently was going to be required to change:

    Name of the operator (which in Italy would often be IT and Vodafone, in the US would often be T-Mobile)
    Operator number (which in Italy was 22210 though it needed to be 31026) This is a number made up of the MCC + MNC

According to our theory, simply by changing every occurrence of these values, we should be able to access the paid applications on the market from anywhere.

After a quick brainstorming session we figured the following routes would be the best solutions:

1. Intercept the outgoing packet and change on the fly (too costly, too time consuming and would probably require writing a driver or massive patch)
2. Change the core android functions that manages requests and posts to the internet.
3. Change the core android functions that return the operator name and operator number.

At fire glance, I immediately worked to rebuild the entire Android OS and create a patch that would manage and restore the values from Italian to the US values.

Although this process had turned out to be a long and painful process, which I’ll spare you the details of. Essentially I was recompiling the ServiceState class. (it should be easy to guess where)

Once recompiled with the changed we crossed our fingers and with some effort, managed to get it to run on my Italian G1 running “thedude” patched firmware.

To our surprise, however, the enormous amount of work done was not enough to make it fully functional. The market seemed to be pulling data from other locations that just the ServiceState class. The data it was pulling turned to be half Italian and Half American, so we started to work on a different solution.

In the amended version of “thedude” I wanted to make one more final test. For those who do not know android has a list of global variables that are used as real properties.

Some of the properties are written, while others are read-only values. Through a few bash commands, we discovered that the previous patch I had created was not changing all the properties that we needed to change, so these had to be manually changed through the shell.

After several attempts we succeeded … We finally saw paid applications! … Now Tim says:

“Why don’t we just see if we can do this through all setprop commands, opposed to even using the patched ServiceState class?”

Done… This method also worked, so it was much easier to do. Next I downloaded the latest version of the android firmware are just released by JesusFreke.

Retried all the setprop commands we had figured out, crossed out fingers – and then reopened the market. Success, it works!

The result of this discovery is that all the idea we had, we basically in vain. They all would have worked – though this was much more simple than we originally thought it would be.

Moreover, the final solution we came to, was not firmware dependent – there is no reason to patch framework.jar so you could use this on any firmware, as long as you have root.

Market Enabler

Market Enabler

I will just quickly go over the disclaimer for this applications and a quick how to;

    – As usual, I am not responsible for the use of this application. This application is to be used as a Proof of Concept only, for enabling paid applications on your phone.
    – If using this program to enable paid applications, I am not responsible for anything that happens to your phone or applications that you’ve purchase should this be fixed at a later date
    – The application will be issues under the GPL shortly, once I can gather up the code and clean it up a little bit

How to User the program
The applications only has two buttons πŸ˜‰ a right and a left one.

    The left button enables paid applications on the market
    The right button restores the normal values (in case some applications have problems after changing the values)

That’s it! Doesn’t get much easier than that. πŸ˜‰
Note: Each reboot you must restart this application to enable the paid applications on the market.

Download Market Enabler
The Market Enabler can be downloaded from here.

To install the application you can simply run the command:

adb install MarketEnabler.apk

or open the Android Browser to this link:

For problems with the application, refer to our forum! (Italian) Or post here for help in English.

Note: To use the market to pay for applications you have to register an account on google checkout. Google Checkout is a secure payment platform similar to paypal. To do this, use your pc to navigate to this web site. The instructions will guide you to sign up step by step πŸ˜‰

Donations: Donations are always welcome! Also I will publish a list of all donors, who have supported our work.

To donate (even $1), click here. (Click the “Donate” button that says paypal)

You can copy of take ideas from this program/post and redistribute the post/application (which will soon be released under the GPL) as long as the source of the article and the download link is not changed.