[Android Apps and Games] Tsjoklat:
GSF DPI Patch:

If you are testing a "DPI Hacked" version of the Android Market, you may also need to replace /system/app/GoogleServicesFramework.apk with one of the following "DPI Patched" files below (depending on the version of the Android OS that you are running and the default DPI device specification that you want to emulate). Upon further testing, the "densityDpi" call in GoogleServicesFramework.apk seems to be what is triggering incompatibilities with specific applications in the Android Market. The "DPI Patch" forces GoogleServicesFramework to use a specific DPI value. The Android Market and GoogleServicesFramework should both use the same DPI value. For example, if you are testing a "DPI 240" version of the Android Market, then you will need to also use a "DPI 240" version of GoogleServicesFramework.apk.

These modified versions of GSF are experimental and require testing.

GoogleServicesFramework version 2.3.x DPI 160 patch:

diff -ru GoogleServicesFramework.2.3.4.orig/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali GoogleServicesFramework.2.3.4/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali
--- GoogleServicesFramework.2.3.4.orig/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali	2012-05-05 22:58:35.000000000 +0200
+++ GoogleServicesFramework.2.3.4/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali	2012-05-05 23:00:53.559464022 +0200
@@ -525,7 +525,7 @@
.line 500
const/4 v2, 0x7

- iget v3, v0, Landroid/util/DisplayMetrics;->densityDpi:I
+ const/16 v3, 0xa0

invoke-virtual {v1, v2, v3}, Lcom/google/common/io/protocol/ProtoBuf;->setInt(II)V

GoogleServicesFramework version 2.3.x DPI 240 patch:

diff -ru GoogleServicesFramework.2.3.4.orig/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali GoogleServicesFramework.2.3.4/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali
--- GoogleServicesFramework.2.3.4.orig/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali	2012-05-05 22:58:35.000000000 +0200
+++ GoogleServicesFramework.2.3.4/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali	2012-05-05 23:00:53.559464022 +0200
@@ -525,7 +525,7 @@
.line 500
const/4 v2, 0x7

- iget v3, v0, Landroid/util/DisplayMetrics;->densityDpi:I
+ const/16 v3, 0xf0

invoke-virtual {v1, v2, v3}, Lcom/google/common/io/protocol/ProtoBuf;->setInt(II)V

GoogleServicesFramework version 2.3.x DPI 320 patch:

diff -ru GoogleServicesFramework.2.3.4.orig/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali GoogleServicesFramework.2.3.4/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali
--- GoogleServicesFramework.2.3.4.orig/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali	2012-05-05 22:58:35.000000000 +0200
+++ GoogleServicesFramework.2.3.4/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali	2012-05-05 23:00:53.559464022 +0200
@@ -525,7 +525,7 @@
.line 500
const/4 v2, 0x7

- iget v3, v0, Landroid/util/DisplayMetrics;->densityDpi:I
+ const/16 v3, 0x140

invoke-virtual {v1, v2, v3}, Lcom/google/common/io/protocol/ProtoBuf;->setInt(II)V

GoogleServicesFramework version 4.0.x DPI 160 patch:

diff -ru GoogleServicesFramework.4.0.4-255454.orig/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali GoogleServicesFramework.4.0.4-255454/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali
--- GoogleServicesFramework.4.0.4-255454.orig/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali	2012-05-05 23:32:15.000000000 +0200
+++ GoogleServicesFramework.4.0.4-255454/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali	2012-05-05 23:36:49.751463819 +0200
@@ -629,7 +629,7 @@

move-object/from16 v0, v18

- iget v0, v0, Landroid/util/DisplayMetrics;->densityDpi:I
+ const/16 v0, 0xa0

move/from16 v25, v0

GoogleServicesFramework version 4.0.x DPI 240 patch:

diff -ru GoogleServicesFramework.4.0.4-255454.orig/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali GoogleServicesFramework.4.0.4-255454/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali
--- GoogleServicesFramework.4.0.4-255454.orig/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali	2012-05-05 23:32:15.000000000 +0200
+++ GoogleServicesFramework.4.0.4-255454/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali	2012-05-05 23:36:49.751463819 +0200
@@ -629,7 +629,7 @@

move-object/from16 v0, v18

- iget v0, v0, Landroid/util/DisplayMetrics;->densityDpi:I
+ const/16 v0, 0xf0

move/from16 v25, v0

GoogleServicesFramework version 4.0.x DPI 320 patch:

diff -ru GoogleServicesFramework.4.0.4-255454.orig/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali GoogleServicesFramework.4.0.4-255454/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali
--- GoogleServicesFramework.4.0.4-255454.orig/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali	2012-05-05 23:32:15.000000000 +0200
+++ GoogleServicesFramework.4.0.4-255454/smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali	2012-05-05 23:36:49.751463819 +0200
@@ -629,7 +629,7 @@

move-object/from16 v0, v18

- iget v0, v0, Landroid/util/DisplayMetrics;->densityDpi:I
+ const/16 v0, 0x140

move/from16 v25, v0

The next examples of code below try to explain how to determine what numbers to use for the variable on the patched line of code. When making changes to the code, the variable on the new line of code should match the first number directly after the iget command. When looking at a made up example of the code:

If the code looked like this:

iget v2, v10, Landroid/util/DisplayMetrics;->densityDpi:I

Then we would change the line like this (since the "v2" variable in this example is the one we want to match up on the replaced line because it is the variable that is being set by the "iget" command):

const/16 v2, 0xf0

NOTE: The version of GSF must be specific to your ROM.

Additionally, the following links contain modified versions of GSF uploaded to this thread:

http://xdaforums.com/showpost.php?p=29401924&postcount=334

http://xdaforums.com/showpost.php?p=30074336&postcount=390

http://xdaforums.com/showthread.php?t=1631070

http://xdaforums.com/showpost.php?p=26423837&postcount=161