Jump to content


Photo

Changing DPI on Gingerbread?

- - - - -

  • Please log in to reply
7 replies to this topic

#1
omegavesko

omegavesko

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,275 posts
  • Gender:Male
  • Location:Subotica, Serbia
  • Devices:ZTE Skate
  • Twitter:@omegavesko
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
Posted Image
ZTE Skate // CM7.2 // 2.3.7
ZTE Crescent (P736E) // CM9 // 4.0.4
Alcatel OT-990 // MIUI // 2.3.7 Sold!

#2
warimation

warimation

    Regular

  • Members
  • PipPip
  • 66 posts
  • Devices:zte skate
Have you tried the hard way? Deleting account several times on account options?

  • 0

#3
H3ROS

H3ROS

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,779 posts
  • Gender:Not Telling
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, 08 June 2013 - 03:06 AM.

  • 1
BNqXLPC.pnghIMMF2y.png
If you like my ROM's then please consider a donation. A lot of time and effort went into them. Thank you.

My blog website: codeshed.co.uk

#4
omegavesko

omegavesko

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,275 posts
  • Gender:Male
  • Location:Subotica, Serbia
  • Devices:ZTE Skate
  • Twitter:@omegavesko
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
Posted Image
ZTE Skate // CM7.2 // 2.3.7
ZTE Crescent (P736E) // CM9 // 4.0.4
Alcatel OT-990 // MIUI // 2.3.7 Sold!

#5
H3ROS

H3ROS

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,779 posts
  • Gender:Not Telling

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, 08 June 2013 - 02:04 PM.

  • 0
BNqXLPC.pnghIMMF2y.png
If you like my ROM's then please consider a donation. A lot of time and effort went into them. Thank you.

My blog website: codeshed.co.uk

#6
omegavesko

omegavesko

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,275 posts
  • Gender:Male
  • Location:Subotica, Serbia
  • Devices:ZTE Skate
  • Twitter:@omegavesko
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.dropboxus...esFramework.apk
https://dl.dropboxus...844/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
Posted Image
ZTE Skate // CM7.2 // 2.3.7
ZTE Crescent (P736E) // CM9 // 4.0.4
Alcatel OT-990 // MIUI // 2.3.7 Sold!

#7
H3ROS

H3ROS

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,779 posts
  • Gender:Not Telling
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...uwo04q0j0j9ghjg
- Install my zip
- Reboot

Edited by H3ROS, 21 June 2013 - 10:38 PM.

  • 2
BNqXLPC.pnghIMMF2y.png
If you like my ROM's then please consider a donation. A lot of time and effort went into them. Thank you.

My blog website: codeshed.co.uk

#8
omegavesko

omegavesko

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,275 posts
  • Gender:Male
  • Location:Subotica, Serbia
  • Devices:ZTE Skate
  • Twitter:@omegavesko
Thank you! I'll give it a go later and see how it works.

  • 0
Posted Image
ZTE Skate // CM7.2 // 2.3.7
ZTE Crescent (P736E) // CM9 // 4.0.4
Alcatel OT-990 // MIUI // 2.3.7 Sold!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users