Android App Review: Manage Your Connections Automagically – XDA TV

Material Design is all the buzz in the Android world right now. … more

Official TWRP Recovery Lands on Micromax Canvas Magnus

With the recent release of Android One, Micromax and MediaTek released fully buildable … more

Update Overload: SuperSU Heavily Updated

There are apps and apps out there. Very few can reach the level of popularity required to stay at … more

Lollipop Leak Available for the Sprint Galaxy S5

Since the Android 5.0Lollipop’s official release not too long ago, we’ve seen … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP myn

4th March 2010, 12:35 AM   |  #1  
myn's Avatar
OP Senior Recognized Developer
Thanks Meter: 4,002
 
2,658 posts
Join Date:Joined: Nov 2007
Donate to Me
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

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)
Last edited by myn; 17th March 2010 at 06:19 PM.
4th March 2010, 03:45 AM   |  #2  
drewden123's Avatar
Senior Member
Thanks Meter: 13
 
660 posts
Join Date:Joined: Mar 2008
Donate to Me
More
Quote:
Originally Posted by myn

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.
4th March 2010, 04:20 AM   |  #3  
Senior Member
Thanks Meter: 161
 
788 posts
Join Date:Joined: Jul 2008
More
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).
10th March 2010, 08:14 AM   |  #4  
Roll Fizzlebeef's Avatar
Junior Member
Thanks Meter: 0
 
21 posts
Join Date:Joined: Feb 2010
Fixing this Market/resolution issue is at the top of my wish.
10th March 2010, 12:25 PM   |  #5  
tatnai's Avatar
Senior Member
Flag Ann Arbor, USA
Thanks Meter: 218
 
2,154 posts
Join Date:Joined: Jul 2008
Donate to Me
More
Quote:
Originally Posted by jnadke

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.
10th March 2010, 01:01 PM   |  #6  
myn's Avatar
OP Senior Recognized Developer
Thanks Meter: 4,002
 
2,658 posts
Join Date:Joined: Nov 2007
Donate to Me
Quote:
Originally Posted by tatnai

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..
10th March 2010, 04:13 PM   |  #7  
Senior Member
Thanks Meter: 161
 
788 posts
Join Date:Joined: Jul 2008
More
Quote:
Originally Posted by tatnai

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.
11th March 2010, 03:06 AM   |  #8  
tatnai's Avatar
Senior Member
Flag Ann Arbor, USA
Thanks Meter: 218
 
2,154 posts
Join Date:Joined: Jul 2008
Donate to Me
More
Quote:
Originally Posted by jnadke

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.
11th March 2010, 03:01 PM   |  #9  
Retired Forum Moderator
Thanks Meter: 231
 
1,647 posts
Join Date:Joined: Apr 2008
Just an FYI for you guys, the market/app size limitation is set by lcd.density.
11th March 2010, 04:55 PM   |  #10  
Senior Member
Thanks Meter: 161
 
788 posts
Join Date:Joined: Jul 2008
More
Quote:
Originally Posted by mssmison

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".
Last edited by jnadke; 11th March 2010 at 05:09 PM.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes