Sign in to follow this  
Followers 0
omegavesko

Changing DPI on Gingerbread?

8 posts in this topic

I've changed the DPI on CM7 via the build.prop and it works great, but the Play Store is giving me incompatibility problems. Is there a way to fix this? I've looked for a multi-DPI gapps zip for Gingerbread but I haven't found one.

0

Share this post


Link to post
Share on other sites

Have you tried the hard way? Deleting account several times on account options?

0

Share this post


Link to post
Share on other sites

What DPI did you change to? If it was 240 then you need to use baksmali.jar on the classes.dex file found inside of the Play Store APK. You'll also need smali.jar to recompile and then zipalign.exe from the Android SDK to make sure it's optimized.

Load up the following file in a text editor e.g. Notepad++

smali/com/google/android/finsky/utils/DeviceConfigurationhelper.smali
Search for:
move-result-object v15


iget v0, v12, Landroid/util/DisplayMetrics;->densityDpi:I


move/from16 v17, v0
Replace with:
move-result-object v15


const/16 v0, 0xf0


move/from16 v17, v0
You'll also need to modify GoogleServicesFramework.apk as changing just the Play Store doesn't work with Gingerbread. So like before extract classes.dex from the APK and decompile it with baksmali.jar. All you then need to do is load up the following file in Notepad++
smali/com/google/android/gsf/checkin/CheckinRequestBuilder.smali
Search for:
const/4 v2, 0x7


iget v3, v0, Landroid/util/DisplayMetrics;->densityDpi:I


invoke-virtual {v1, v2, v3}, Lcom/google/common/io/protocol/ProtoBuf;->setInt(II)V
Replace with:
const/4 v2, 0x7


const/16 v3, 0xf0


invoke-virtual {v1, v2, v3}, Lcom/google/common/io/protocol/ProtoBuf;->setInt(II)V
0xa0 = 160 DPI 0xf0 = 240 DPI 0x140 = 320 DPI Oh, and if you want to block the Play Store from automatically updating itself then go to this file:
smali/com/google/android/finsky/utils/SelfUpdateScheduler.smali
Search for:
invoke-direct {p0}, Ljava/lang/Object;-><init>()V


const/4 v0, 0x0


iput-boolean v0, p0, Lcom/google/android/finsky/utils/SelfUpdateScheduler;->mUpdateInProgress:Z
Replace with:
invoke-direct {p0}, Ljava/lang/Object;-><init>()V


const/4 v0, 0x1


iput-boolean v0, p0, Lcom/google/android/finsky/utils/SelfUpdateScheduler;->mUpdateInProgress:Z

Edited by H3ROS
1

Share this post


Link to post
Share on other sites

So, if I change the smali then the play store will act like it's at 240dpi no matter what the actual value is? I've changed mine to 200dpi, by the way.

I'll definitely have a go at this later, thanks!

0

Share this post


Link to post
Share on other sites

So, if I change the smali then the play store will act like it's at 240dpi no matter what the actual value is? I've changed mine to 200dpi, by the way.

I'll definitely have a go at this later, thanks!

Yep. If you change the result in smali then it'll force the Play Store to display in a specific way. I think that will also allow you to download some applications that it would of started to block.

If you have a hard time doing it then if you upload your GSF apk then I'll modify everything for you.

Edited by H3ROS
0

Share this post


Link to post
Share on other sites

Right, I tried modifying it but I just got completely lost in the process. Here are my GSF.apk and Vending.apk if you want to take a look.

https://dl.dropboxusercontent.com/u/17719844/GoogleServicesFramework.apk

https://dl.dropboxusercontent.com/u/17719844/Vending.apk

Also, if I took the modified APKs and put them in the gapps zip file, would they essentially become multi-DPI gapps?

0

Share this post


Link to post
Share on other sites

Well the Play Store would continue to work, no matter what you change the DPI to.

http://www.fileswap.com/dl/cgakrYUDQv/

The version of the Play Store I've modified is the newest version (4.0.27). The version you supplied was much older (3.5.19). I've also disabled automatic updates of the Play Store so that it'll continue to work.

The mod is untested, but I can tell you that before it starts to work you probably need to wipe your data and start over.

- Wipe everything as normal

- Install the ROM

- Install GAPPS - http://www.mediafire.com/?uwo04q0j0j9ghjg

- Install my zip

- Reboot

Edited by H3ROS
2

Share this post


Link to post
Share on other sites

Thank you! I'll give it a go later and see how it works.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2016. MoDaCo uses IntelliTxt technology.