[PROJECT] Get Full Market In 240x320 Resolution - ** SOLVED **

Search This thread

myn

Retired Senior Recognized Developer
Nov 15, 2007
2,679
3,985
Lets use our community and collaborate around achieving a solution to a full market with all applications available for download with no restrictions based upon our current resolution.

Spawned from discussion from this thread


A Primer From jnadke

It's a problem with the Android SDK.

Starting with 1.6, Google introduced screen sizes: Small, Medium, and Large. Our devices have Small Screens (along with the HTC Tattoo). The G1/Dream has a Medium screen, and the Droid/Nexus a Large screen.

The problem is the SDK defaults to Medium and Large screens. It's up to the application developer to test the application for Small screens and proactively add the indicator for Small screen support.

Most developers never bother to indicate the app can run on Small screens, so it gets excluded from your view.

I'm not sure if the small screen thing is linked to the /data or your Google user account. If I knew which, I'd figure out some way to spoof it, so we can get the full market on small screens. If it's on the /data somewhere, then that's a much easier fix.

The fact that clearing your /data and booting up a 480x320 fixes it, seems to indicate it's a value in the /data. It'd be interesting to do a dump of two /data directories with only the market resolution changed and see how they differ on a binary level. Then perhaps we can add a patch to the menu of NoMoRootfs (or a patch that's applied every bootup... or lock down the file that's modified).

If it's on the account, then either you'd have to intercept the Market App's data packet that indicates screen size and modify it proactively, or you'd have to change parts of the SDK to report the screen size as larger than it really is (this would be hard to do because apps use that interface too... you'd have to be able to detect if the request is coming from the Market App).



Here is the original 1.6 Vending.apk and de-compiled BakSmali source.

For those not familiar with smali/baksmali here is a short tutorial:

Download the baksmali/smali tools here

Make your changes in the source than recompile the changes back into the Vending.apk by doing the following:

1.) Make changes to files in source and use smali to re-assemble file:
# java -Xmx512M -jar smali.jar -o classes.dex out/*


2.) Then add classes.dex back into the APK with your favorite archive tool (Winzip, Winrar, etc) or via command line like this:
# zip Vending.apk classes.dex


3.) Push the new Vending.apk back out to your device and test out the Vending application.
# adb shell mount -o remount,rw /system
# adb push Vending.apk /system/app
# adb shell mount -o remount,rw /system


Ready set go!


EDIT: This has now been solved by moneytoo in the Tattoo forums :)

Links:
Link to moneytoo's thread on Tattoo forum
Mirror
 

Attachments

  • Vending_1.6-Smali-Src.zip
    731.9 KB · Views: 104
  • Vending.apk
    752.7 KB · Views: 167
Last edited:

drewden123

Senior Member
Mar 8, 2008
661
11
Lets use our community and collaborate around achieving a solution to a full market with all applications available for download with no restrictions based upon our current resolution.

Spawned from discussion from this thread


A Primer From jnadke





Here is the original 1.6 Vending.apk and de-compiled BakSmali source.

For those not familiar with smali/baksmali here is a short tutorial:

Download the baksmali/smali tools here

Make your changes in the source than recompile the changes back into the Vending.apk by doing the following:

1.) Make changes to files in source and use smali to re-assemble file:
# java -Xmx512M -jar smali.jar -o classes.dex out/*


2.) Then add classes.dex back into the APK with your favorite archive tool (Winzip, Winrar, etc) or via command line like this:
# zip Vending.apk classes.dex


3.) Push the new Vending.apk back out to your device and test out the Vending application.
# adb shell mount -o remount,rw /system
# adb push Vending.apk /system/app
# adb shell mount -o remount,rw /system


Ready set go!

Excited to see this solved! I know the brainpower is in this community to do it. Also, if this is solved I bet it could somehow be replicated/ported for tattoo or other qvga androiders and the vogue-android community would get a lot of praise for this.
 

jnadke

Senior Member
Jul 17, 2008
831
165
Before someone chimes in, this is about getting the market to work without the 320x480 trick. The 320x480 trick tends to reset after a few days (which may help debugging if we can figure out why).
 

tatnai

Senior Member
Jul 17, 2008
2,186
234
Ann Arbor, USA
Before someone chimes in, this is about getting the market to work without the 320x480 trick. The 320x480 trick tends to reset after a few days (which may help debugging if we can figure out why).
interestingly, after using the 320x480 trick about a month ago, my market has not reset. I did it with plemen's evolution donut, an earlier version that had experimental settings in the build.prop which broke google voice (the program would not even run with that build for some reason). been using the same data.img, but various builds since then, and I have FULL market the whole time.
 

myn

Retired Senior Recognized Developer
Nov 15, 2007
2,679
3,985
interestingly, after using the 320x480 trick about a month ago, my market has not reset. I did it with plemen's evolution donut, an earlier version that had experimental settings in the build.prop which broke google voice (the program would not even run with that build for some reason). been using the same data.img, but various builds since then, and I have FULL market the whole time.

hrm.. Very interesting indeed..
 

jnadke

Senior Member
Jul 17, 2008
831
165
interestingly, after using the 320x480 trick about a month ago, my market has not reset. I did it with plemen's evolution donut, an earlier version that had experimental settings in the build.prop which broke google voice (the program would not even run with that build for some reason). been using the same data.img, but various builds since then, and I have FULL market the whole time.

Can you post the build.prop?

I was initially unaware of what the "temporary fix" was. It sounds a lot more like it's a server-side account flag that's being set.

I plan on making a temporary solution, until I can figure out what flag is being set and how to fix it.
 

tatnai

Senior Member
Jul 17, 2008
2,186
234
Ann Arbor, USA
Can you post the build.prop?

I was initially unaware of what the "temporary fix" was. It sounds a lot more like it's a server-side account flag that's being set.

I plan on making a temporary solution, until I can figure out what flag is being set and how to fix it.

i don't know if the build.prop was the only thing that was changed on that build, but i think so. can't get to it tonight though, work is killing me, gotta dig through my stuff.
 

jnadke

Senior Member
Jul 17, 2008
831
165
Just an FYI for you guys, the market/app size limitation is set by lcd.density.

Are you sure? What's your basis for thinking this? If you do a lcd_density of 140 @ 320x480 do the apps go away?

http://d.android.com/guide/practices/screens_support.html
from
http://market.android.com/support/bin/answer.py?hl=en&answer=165590

This page indicates that it's resolution-dependent.

Now, it's possible for certain apps to be missing due to density constraints:

The platform supports a set of resource qualifiers that let you provide size- and density-specific resources, if needed. The qualifiers for size-specific resources are large, normal, and small, and those for density-specific resources are hdpi (high), mdpi (medium), and ldpi (low). The qualifiers correspond to the generalized densities given in Table 1, above.

The platform also provides a <supports-screens> manifest element, whose attributes android:largeScreens, android:normalScreens, and android:smallScreens let you specify what generalized screen sizes your application supports. A fourth attribute, android:anyDensity, lets you indicate whether or not your application includes built-in support for multiple densities.

In 320x480 we use a lcd_density of 160.

The rubric says a 320x480 device should be 3.0" to 3.5". That means lcd_density of 164 - 192. You may be missing apps that require "mdpi" (unless the range is a little softer and 160 is in the "mdpi" range).

I could be that changing the density triggers an update to the market. If you cross a density threshold, you might trigger an update from "mdpi" to "ldpi", and it updates resolution as well. Perhaps that's why tatnai's change stuck for so long. He booted up in 320x480 at "ldpi" and when he changed to 240x320 he remained in "ldpi".
 
Last edited:

myn

Retired Senior Recognized Developer
Nov 15, 2007
2,679
3,985
Just an FYI for you guys, the market/app size limitation is set by lcd.density.

That actually makes 100% sense.

As most know I've been working on an app to change LCD Density and a few other things. One of the things I've noticed and the the Android SDK makes pretty clear for compatibility sake is the three different types of display targets all of which are linked back to density: http://developer.android.com/guide/practices/screens_support.html

The DisplayMetrics class also reflects this too:

http://developer.android.com/reference/android/util/DisplayMetrics.html

Code:
Constants
public static final int DENSITY_DEFAULT
Since: API Level 4

The reference density used throughout the system.
Constant Value: 160 (0x000000a0)
public static final int DENSITY_HIGH
Since: API Level 4

Standard quantized DPI for high-density screens.
Constant Value: 240 (0x000000f0)
public static final int DENSITY_LOW
Since: API Level 4

Standard quantized DPI for low-density screens.
Constant Value: 120 (0x00000078)
public static final int DENSITY_MEDIUM
Since: API Level 4

Standard quantized DPI for medium-density screens.
Constant Value: 160 (0x000000a0)

I can confirm tonight but if someone wants to now, try running 240x320 in 160 density confirming full market is supported.
 

cp0020

Senior Member
Sep 2, 2009
1,523
4
atlanta
I noticed that in 320×480 there are some apps I cannot find. Like an app says there are skins on the market so I click on it and it takes me to the market but it says it cannot be found. Running 320×480 lcd 160, want me to change my density to 164-192. Somewhere in there?
 
Last edited:

jnadke

Senior Member
Jul 17, 2008
831
165
I noticed that in 320×480 there are some apparel I cannot find. Like an app says there are skins on the market so I click on it and it takes me to the market but it says it cannot be found. Running 320×480 lcd 160, want me to change my density to 164-192. Somewhere in there?

public static final int DENSITY_MEDIUM
Since: API Level 4

Standard quantized DPI for medium-density screens.
Constant Value: 160 (0x000000a0)


According to Myn, 160 should work, but you can give it a try.


Keep in mind the skin may be for high-density screens, like the DROID.
 

jnadke

Senior Member
Jul 17, 2008
831
165
That actually makes 100% sense.

As most know I've been working on an app to change LCD Density and a few other things. One of the things I've noticed and the the Android SDK makes pretty clear for compatibility sake is the three different types of display targets all of which are linked back to density:

I can confirm tonight but if someone wants to now, try running 240x320 in 160 density confirming full market is supported.

It's linked to density and resolution, in my opinion.

Unfortunately, running 320x240 at 160 doesn't work all that great, I've tried it a long time ago as a test for fixing the market. The home screen gets all bunched up (the applications are all on top of each-other), and there's no app tray.
 

cp0020

Senior Member
Sep 2, 2009
1,523
4
atlanta
Wait, how can it be lcd density controlling the market? For the full market trick when people flash the 320×480 nbh and sign in they are still using there build with lcd density of 110-120. You see what I'm saying? Sorry I might not have a clue what I'm talking about lol
 

myn

Retired Senior Recognized Developer
Nov 15, 2007
2,679
3,985
I noticed that in 320×480 there are some apps I cannot find. Like an app says there are skins on the market so I click on it and it takes me to the market but it says it cannot be found. Running 320×480 lcd 160, want me to change my density to 164-192. Somewhere in there?

The applications themselves define in their manifest the supported resolutions:

Code:
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

  <supports-screens
          android:largeScreens="true"
          android:normalScreens="true"
          android:smallScreens="true"
          android:resizable="true"
          android:anyDensity="true" />
  </manifest>


With appear to again correspond with the density:

Low density (120), ldpi
Medium density (160), mdpi
High density (240), hdpi