Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,770,562 Members 37,686 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
myn
Old
(Last edited by myn; 17th March 2010 at 05:19 PM.)
#1  
myn's Avatar
Senior Recognized Developer - OP
Thanks Meter 4002
Posts: 2,658
Join Date: Nov 2007

 
DONATE TO ME
Default [PROJECT] Get Full Market In 240x320 Resolution - ** SOLVED **

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

Quote:
Originally Posted by jnadke View Post
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
Attached Files
File Type: zip Vending_1.6-Smali-Src.zip - [Click for QR Code] (731.9 KB, 98 views)
File Type: apk Vending.apk - [Click for QR Code] (752.7 KB, 160 views)
 
drewden123
Old
#2  
drewden123's Avatar
Senior Member
Thanks Meter 13
Posts: 660
Join Date: Mar 2008

 
DONATE TO ME
Quote:
Originally Posted by myn View Post
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.
Romans 10:11
 
jnadke
Old
#3  
Senior Member
Thanks Meter 158
Posts: 786
Join Date: Jul 2008
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).
 
Roll Fizzlebeef
Old
#4  
Roll Fizzlebeef's Avatar
Junior Member
Thanks Meter 0
Posts: 18
Join Date: Feb 2010
Fixing this Market/resolution issue is at the top of my wish.
 
tatnai
Old
#5  
tatnai's Avatar
Senior Member
Thanks Meter 208
Posts: 2,131
Join Date: Jul 2008
Location: Ann Arbor, USA

 
DONATE TO ME
Quote:
Originally Posted by jnadke View Post
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.
[ LG Mako Nexus 4 ][ TWRP 2.7.1.0 ][ many Android 4.4 custom roms thx atl4tis, DariosF, AOSPA, and others ]

[ LG Hammerhead Nexus 5 ][ stock - wife's phone ]

Retired:[ HTC Jewel EVO 4G LTE ][ water damage by wife ]
Retired:[ HTC Shooter EVO 3D ][ water damage by wife ]
Retired:[ HTC Supersonic EVO 4G ][ still works (because I didn't let my wife use it) ]
Retired:[ HTC Vogue Touch ]
[ resold ]
 
myn
Old
#6  
myn's Avatar
Senior Recognized Developer - OP
Thanks Meter 4002
Posts: 2,658
Join Date: Nov 2007

 
DONATE TO ME
Quote:
Originally Posted by tatnai View Post
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
Old
#7  
Senior Member
Thanks Meter 158
Posts: 786
Join Date: Jul 2008
Quote:
Originally Posted by tatnai View Post
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
Old
#8  
tatnai's Avatar
Senior Member
Thanks Meter 208
Posts: 2,131
Join Date: Jul 2008
Location: Ann Arbor, USA

 
DONATE TO ME
Quote:
Originally Posted by jnadke View Post
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.
[ LG Mako Nexus 4 ][ TWRP 2.7.1.0 ][ many Android 4.4 custom roms thx atl4tis, DariosF, AOSPA, and others ]

[ LG Hammerhead Nexus 5 ][ stock - wife's phone ]

Retired:[ HTC Jewel EVO 4G LTE ][ water damage by wife ]
Retired:[ HTC Shooter EVO 3D ][ water damage by wife ]
Retired:[ HTC Supersonic EVO 4G ][ still works (because I didn't let my wife use it) ]
Retired:[ HTC Vogue Touch ]
[ resold ]
 
mssmison
Old
#9  
Retired Forum Moderator
Thanks Meter 231
Posts: 1,647
Join Date: Apr 2008
Just an FYI for you guys, the market/app size limitation is set by lcd.density.
 
jnadke
Old
(Last edited by jnadke; 11th March 2010 at 04:09 PM.)
#10  
Senior Member
Thanks Meter 158
Posts: 786
Join Date: Jul 2008
Quote:
Originally Posted by mssmison View Post
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...s_support.html
from
http://market.android.com/support/bi...&answer=165590

This page indicates that it's resolution-dependent.

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

Quote:
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".

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Navigate to Your Favorite Places with LocationDetector

If you’re enjoying an active way of life, you probablytravel a lot, go fishing, … more

LifeStats Automatic Journal Keeps Tabs of Your Day

Most of us live very active lives. This is after all why we’re fans of mobile … more

Android App Review: Hide Your Files with Androignito – XDA Developer TV

Stop right now, look at your phone, and see how many pictures, … more

BrightNotes Makes Cloud Notes Simple and Easy

There are literally thousands of note taking apps available on Android, with practically every … more