[Android Software/Hacking General [Developers Only]] ften:
This walk-through can be used to get around that device compatibility check, by hard coding the game you purchased to see your Device as a Nexus S (or what ever device you would like). Please be aware that just because the game now runs on your device doesn't mean it's actually compatible, you may still receive errors.

This patch/hack/whatever doesn't disable the DRM licensing, so it's useless unless you bought the game. I won't be working on something to disable the license check, so don't ask. I will not be distributing the fully patched games, so don't ask. If you have any questions about the patch, do ask.

Steps;

1. Decompile the Gameloft apk of your choice with your favorite decompiler (Apktool, etc).

2. Open up the /smali/com/gameloft/android/ANMP/GloftA6HP/installer/GameInstaller.smali in your favorite text editor and look for the following lines;

const-string v1, "?model="

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v0

sget-object v1, Landroid/os/Build;->MODEL:Ljava/lang/String;

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v0

&

const-string v1, "&device="

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v0

invoke-static {}, Lcom/gameloft/android/ANMP/GloftA6HP/GLUtils/SUtils;->getPhoneDevice()Ljava/lang/String;

move-result-object v1

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v0

3. Edit them as follows;

const-string v1, "?model="

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v0

const-string v1, "Nexus S"

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v0

&

const-string v1, "&device="

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v0

const-string v1, "samsung"

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v0

4. Open up the /smali/com/gameloft/android/ANMP/GloftM3HM/GLUtils/XPlayer.smali in your favorite text editor and look for the following lines;

const-string v1, "&android_build_model="

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v0

invoke-static {}, Lcom/gameloft/android/ANMP/GloftM3HM/GLUtils/Device;->getPhoneModel()Ljava/lang/String;

move-result-object v1

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v0

&

const-string v1, "&android_build_device="

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v0

invoke-static {}, Lcom/gameloft/android/ANMP/GloftM3HM/GLUtils/Device;->getDevice()Ljava/lang/String;

move-result-object v1

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v0

5. Edit them as follows;

const-string v1, "&android_build_model="

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v0

const-string v1, "Nexus S"

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v0

&

const-string v1, "&android_build_device="

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v0

const-string v1, "Samsung"

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v0

5. Recompile the apk and then sign the apk (autosign).

6. Enjoy a job well done.

As I'm sure you already guess all I did was remove the phone device and model calls and replace them with static const-strings. I'm not a fan of changing my device in the build.prop,which was the previous work around, so to me this is a better way to do it. I've looked at a few different decompiled Gameloft games and the gameinstall and xplayer smali's seem to work the same way, so I'd imagine you should be able to do this with any GameLoft game.. I actually only own one GameLoft game, but it worked perfectly on Asphalt 6 on my Touchpad.

If you run across any issues with this method, just post it in the thread.

Thanks to Unknown26man of Slatedroid for bringing this to my attention, I had actually never tried to play Asphalt 6 on my Touchpad till he mentioned it.

I posted this originally on SDX, but I've seen a bunch of questions on XDA about Gameloft game compatability, so I figured I'd post it here too.