yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] lordloki77:
So everyone is probably aware of the problem, to wit: You have a device, and you don't think that google knows best with regard to application compatibility with your preferred (and non-standard) lcd density. At present, this means you have to change it back to standard, reboot, install apps/upgrade, change back to preferred density, reboot, and go back to where you were.

i have an idea how to solve this, but I need help.

does anyone know enough about AOSP or CM7 to know how to find where in the code build.prop is called (or local.prop)? or, really, more specifically, where is ro.sf.lcd_density or qemu.sf.lcd_density called? it's possible (and probably likely) that the entire thing is loaded at once, but if it isn't, it would make it easier.

the idea is pretty simple. have two copies on hand of build.prop (one in the standard location for the market to decide what your lcd density is), and another to be called to actually change your density.

i'd estimate that there's roughly an 80% chance it will solve the problem, but depending on how build.prop or the strings within are called it might be a huge headache. also, this fix would flummox any of the apps (like android overclock, etc.) which presently allow you to modify your build.prop.

thoughts? the OBVIOUS elegant solution is for google to fix this (allow an over-ride) or someone with the code of vending.apk to find the line where it calls build.prop or local.prop and modify THAT line to pick build.prop.spoof or something instead.

but until either of the elegant options are available, this workaround could work, depending on the code complexity.

let me know!
[Android Software/Hacking General [Developers Only]] mattdb:
You really don't have to reboot etc etc. you can just uninstall the market updates, then update the apps you want. You can also freeze the market updater until the next reboot I read somewhere, but I have not done that, gunna see if I can find that now.

Edit. I just uninstalled the update and used Titanium Back up to freeze market updater...
[Android Software/Hacking General [Developers Only]] XlAfbk:
even with the old market the updates don't show under my apps but you have to search for them manually. if you have more than a handful of apps that just sucks.

i've started contacting devs, asking them to fix the apps settings to show with non-standard dpi. so far feedback has been quite good.
[Android Software/Hacking General [Developers Only]] woggy:
@lordloki77: Thats a great idea! DEVs go! :)
[Android Software/Hacking General [Developers Only]] SnoopHTC:
Hello,

+1 :) very happy with 200DPI :cool:

@++
[Android Software/Hacking General [Developers Only]] BenKranged:
Google is really dropping the ball with this issue.

Please report the "Applications missing from My Apps" bug here

http://www.google.com/support/androidmarket/bin/static.py?page=known_issues.cs
[Android Software/Hacking General [Developers Only]] naomi105813:
The OBVIOUS elegant solution is for google to fix this (allow an over-ride) or someone with the code of vending.
[Android Software/Hacking General [Developers Only]] 1xinfusion:
The google support thread for this is here: http://code.google.com/p/android/issues/detail?id=19744#makechanges

I still have this issue and if you do a web search you'll see that many still do. Reply in the support thread to raise awareness ! or if you have a workaround please share :) If you have some developing skill please help OP, perhaps we can fix this somehow.
[Android Software/Hacking General [Developers Only]] alienwolf426:
Hey guys,

After a lot of trial and error and messing around with the Market APK, I've finally managed to hack it so that the market apk THINKS the density is 240. I've basically hardcoded the value inside the apk, so no matter what you set your lcd_density in the build.prop, it will always think it is 240 and as such, everything is available on the market. it even works from online market and everything is compatible again. And as far as I can see, nothing else got effected.

I've attached the Market 3.4.4 modified apk.

Steps to install:

- Download the modified apk

- Using Root Explorer or any other file manager program go to /system/app

- Move Vending.apk to some place safe, as backup

- Copy the downloaded market app from where you downloaded it to /system/app ...

- In Root Explorer, press 'Mount R/W' to give write access to system directory

- Rename the market app to Vending.apk and set permissions to the apk ...

- In Root Explorer, long press on Vending.apk, and then press Permissions and set the permissions as in the screenshot

- Restart your phone

- Go into Settings -> Applications and find Market, and Clear Data

- Start Market ... and everything should be good

Enjoy
[Android Software/Hacking General [Developers Only]] Syco54645:
Can you provide instructions for how to hard code the value so that we can do it ourselves for future versions?
[Android Software/Hacking General [Developers Only]] XlAfbk:
nice! going to try it right now.

could you please post a diff of your changes?
[Android Software/Hacking General [Developers Only]] alienwolf426:
Hmm, ok I'll try.

- Using apktool, i decode the Market_3.4.4.apk, using the following command:

apktool d -r Market_3.4.4.apk

- this made sure to not decode the resources, as I had a lot of trouble re-building the apk if the resources were decoded

- Inside the newly generated folder, go inside the smali folder and navigate to the following path: com/google/android/finsky/utils/DeviceConfigurationHelper.smali

- Open the file in notepad or any word editor file (I use Notepad++)

- Now search for the string 'DensityDpi'. there should be only one reference and the line should look something like this:

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

- What this line is doing is getting the lcd_density from the displaymetrics, which is a builtin android library. I'm not sure what it does but it returns the value set in your build.prop. After getting the value it sets that value to the variable 'v0'

- Replace the above line with the following: const/16 v0, 0xf0

- What my line does is hardcodes 0xf0 (which is 240 in hexadecimal) to the variable 'v0'

- leave everything as is, as all the rest of the code goes by this class and whatever density you set in here will eventually propagate to the rest of the apk

- rebuild the apk using: apktool b Market_3.4.4 mod_market.apk

- resign it using SignApk

and you end up with I gave you :)
[Android Software/Hacking General [Developers Only]] Syco54645:
excellent! now we can edit the future market updates. you have no idea how happy this makes me
[Android Software/Hacking General [Developers Only]] bemymonkey:
Thanks buddy! :)

-edit- 16 updates. LOL...
[Android Software/Hacking General [Developers Only]] thunderchicken02:
Does this prevent system updates due to modifying the vending apk? I'm rooted but running stock rom.
[Android Software/Hacking General [Developers Only]] alienwolf426:
it should because the signed entity shouldn't match between the official market and my modified version ... ill try to keep this updated until Google decides to fix it or at least add an option to disable checking for apps by dpi
[Android Software/Hacking General [Developers Only]] bemymonkey:
That would be awesome. :)
[Android Software/Hacking General [Developers Only]] ErnestMBE:
This works perfectly - many thanks for your work!
[Android Software/Hacking General [Developers Only]] Tyrol:
Tried this, changed DPI via nitrality app & restarted but Vending.apk didn't stick, even though I fixed all the permissions. Will retry & see how it goes. Looks very promising, though, thanks!

Edit:

The modified Market doesn't seem to stick through 2 reboots. This is what I did. Already had DPI set to 210 via nitrality app.

1) Downloaded & renamed the Market app posted up there.

2) Mounted r/w on Root Explorer

3) Deleted old Vending.apk from /system/app & moved the modified one in

4) Fixed permissions as per screenshot

5) Rebooted, cleared Market data & checked that apps like Google Maps & JaxtrSMS didn't have the "This application is incompatible with your device" message

6) Rebooted, opened Market to check those apps again, incompatible message was there

Could be my device, so if so, I'm hoping someone can help guide me through fixing this. If not, just wondering if anyone else has faced this? I'm running CheckROM Revolution v4 with Phenomenal v2-medium kernel currently.

Thanks.

-----------------------

サンスングガラクシS II からタパトクで書いた。
[Android Software/Hacking General [Developers Only]] bemymonkey:
adb push to /system/app/Vending.apk and chmod 644 in recovery works...
[Android Software/Hacking General [Developers Only]] dertester123:
@alienwolf426

Thanks for your effort and sharing :D

It seems like a fairly "easy" change but of course it takes time to find something like this :D

Hope this wont get fixed and that you get a nice amout of thanks at least :D
[Android Software/Hacking General [Developers Only]] alienwolf426:
hehe yea ... reading smali isn't easy or fun ... even for a professional software developer like me :s
[Android Software/Hacking General [Developers Only]] Yank555:
Hi guys,

Just downloaded and installed the hacked market as described. Market asked to accept terms and started.

But I can't search anymore, I hit the button, it will highlight but won't show the textbox anymore ?!

Anyone else having this issue ?

JP.

PS: Noticed that the original vending.apk is 3.14Mb, the hacked only 2.37Mb. Normal ?

--------------- Edit :

A simple reboot / clear data fixed the search issue ;) I leave the post in case this happens to someone else.
[Android Software/Hacking General [Developers Only]] Hammerfest:
I am also interested in this, how did something get left out? or something not want to get packed back in? losing almost 1Mb is pretty big in "app/apk" terms...
[Android Software/Hacking General [Developers Only]] jerme:
I edited myself this apk from stock 3.4.4 and I got same size 2.37Mb. Don't know why size is so small. I only changed one line.

After this change I can't buy apps, but I can live whit it!

Thanks alienwolf426! Works fine after short test...
[Android Software/Hacking General [Developers Only]] alienwolf426:
Ive also noticed that sometimes the market will randomally ask you to reaccept the terms ... when that happens ... for some reason my hack disappears ... although clearing data fixes ... I have no idea why that happens.

About the size of the apk, that really bewildered me for a bit because like my original post, i only change ONE line of code ... I think it has to do with apktool decoding/encoding the apk resources ...

@jerme

I haven't bought anything ever since I've done this but I can't see why it would break ... Let me buy something and will get back at you

EDIT:

Yes, your'e right ... I'm unable to buy any app from the market ... however, buying from the online market works and is just as good ... this is probably due to the me signing it using signapk ... as opposed to using the google passkey (which i dont and cant have)
[Android Software/Hacking General [Developers Only]] dertester123:
Well i noticed:

Your market shows all the apps but you cant download. Not sure how it goes with updates so far.

I was on Recommendations with 169dpi and reckless racing was showing"not compatible with your device". After changing to 240 dpi i could use the button to install it (havent bought it yet, just the button is there now)

Not sure if there is some kind of second check:

:(
[Android Software/Hacking General [Developers Only]] BarrySumpter:
Wasn't there a test for this?

seach using the new market for Contract Killer.

If its not listed then its not working?

Its not listed for me.
[Android Software/Hacking General [Developers Only]] dertester123:
Not sure if this goes for every device, as some devices could miss other hardware specs for this particular app.

I think if its listed and installable under 240dpi and then clear market cache and change dpi and all are still installable and listed the "hack" is working.

I tested now:

1)Search Contract killer under 240 dpi -> FOUND

2)Close and kill market, clear cache.

3)Change dpi and reboot

4)Start market and search again => Found

I also got 57 apps installed total at the moment with or without 240 dpi.

I also take back my earlier post about reckless racing, for some reason its compatible now on 240 and for example 196 dpi. Dont know what it was, maby bad link from the recommended tab in market ?
[Android Software/Hacking General [Developers Only]] BarrySumpter:
It's the new Market app you're testing with?

Testing again with your suggestions.

Nope.

I'm wondering now if I hit the Apply button. LOL

---------- Post added at 09:31 AM ---------- Previous post was at 09:02 AM ----------

all kinds o combos not happening.

thanks anyways
[Android Software/Hacking General [Developers Only]] Yank555:
I have uninstalled everything Market related using TitaniumBackup (believe it was 4 apps incl. Market itself), then rebooted (a 3.4.4 market reappeared by itself out of nowhere). I then replaced and cleared data as you suggested in your initial post and rebooted.

Now I ony have a Market, no Market installer, or feedbak etc.

It's been working since then...

JP.

------------ Edit :

Nope, didn't work out, need to clear data each time before I use the market :-(
[Android Software/Hacking General [Developers Only]] GroteBozewolf:
Same issue here! At first I could find google maps without compatibility message, but after a while it disappears from the market again.

After a clear off clear the market data it is back again.
[Android Software/Hacking General [Developers Only]] kantjer:
Same here ..........
[Android Software/Hacking General [Developers Only]] YZ:
For everyone with market issues:

Couldn't find Google maps in the market either. Talked to bro's Eric Schmidt and Sergey Brin ^^ :D So I found a way to make it work, this is what I did:

First, I installed the hacked market (download link below, thanks alienwolf426)

How to:

1. Download the market
2. Rename it vending.apk
3. Replace it with the existing vending.apk in system/app
4. Chmod 777
5. Re boot

Then...

I edited this in build.prop so market recognized my phone as sgs2 (fixed incompatible issue and apps/games disappearing)

1.

ro.product.model=[B]GT-I9100[/B]
ro.product.brand=[B]samsung[/B]
ro.product.name=[B]GT-I9100[/B]
ro.product.device=[B]GT-I9100[/B]
ro.product.board=[B]GT-I9100[/B]
ro.build.product=[B]GT-I9100[/B]

2. Cleared market cache. (my dpi is 192, not 240 which is needed.. So hacked market works)

3. Re booted.

4. *badum-tss* :D

*NOTE*

If you get the "Your phone is incompatible with this item?", go to settings-application and clear the market cache ;)

***If you have tried all this, but the hacked market is still not working for you,

install the old version.

Link to the old market.

Hope this helps.
[Android Software/Hacking General [Developers Only]] khashila:
solution or work around

hey guys i found a work aroud that worked for me so i thought id share

i already had the ro.product data changed in the build.prop a while back so that wasnt the issue so basicly what you should try is:

*install hack as mentioned

*change your ro.product and the finger print in build.prop to something legit(just in case)

*set your favorite dpi ( 200 is my personal preference)

*reboot

*change ur dpi to 240 WITHOUT rebooting

*clear market data

*start market and try ur luck

worked for me hope it does for u or some of u at least

ps u might also try changing ur gsm.sim.operator.numeric just in case if app not supported in ur country

let me know how it goes.

cheers
[Android Software/Hacking General [Developers Only]] jae-v:
yz.hd i'm good following the steps up until chmod 777...how do i do that?
[Android Software/Hacking General [Developers Only]] dertester123:
If you know what this means you can use any root explorer to.change permissions to that.

Its also a command,in a terminal just type

"Chmod 777 /path/to/file"

You may need superuser rights for this command, to get them is just "su" command and allow when a window pops up

Gesendet von meinem HD2 mit Tapatalk
[Android Software/Hacking General [Developers Only]] jacksta:
thanks thanks meter..your workaround works..but after changing the build prop..the capacitive buttons stopped working at all..I reverted the buildprop and they are working again..
[Android Software/Hacking General [Developers Only]] colonel_lp:
I wonder if you could give me some advice on editing market 2.3.6.

I have decompiled it, but the file you list doesnt exist, or the value DensityDpi. The closest i could find is a file called VendingApplication.smali, that lists the following:

sget v12, Landroid/util/DisplayMetrics;->DENSITY_DEVICE:I

invoke-virtual {v11, v12}, Lcom/android/vending/model/DeviceConfiguration;->setScreenDensity(I)Lcom/android/vending/model/DeviceConfiguration;

.line 427
iget-object v11, p0, Lcom/android/vending/VendingApplication;->mDeviceConfiguration:Lcom/android/vending/model/DeviceConfiguration;

iget v12, v2, Landroid/content/pm/ConfigurationInfo;->reqInputFeatures:I

and-int/lit8 v12, v12, 0x1

if-lez v12, :cond_0

move v12, v14

how would i alter the code assuming this is the correct place?

Thanks
[Android Software/Hacking General [Developers Only]] alienwolf426:
If this is the right place, and I dont have the Market 2.3.6 apk to unpack to check, you need to change the first line: sget v12, Landroid/util/DisplayMetrics;->DENSITY_DEVICE:I

to : const/16 v12, 0xf0

From the snippet of code you sent, it seems like that is the value which is being set to the screendensity variable in your market, so just hard code the variable v12
[Android Software/Hacking General [Developers Only]] colonel_lp:
Thanks for the info. However market force closed after rebuilding/signing/permissions.

Strangely after restoring the original market from a titanium backup, all apps are available again... For how long i dont know.
[Android Software/Hacking General [Developers Only]] dangelo.davide:
Thanks and info req

Great news!!!

I hope you can update the software over time.

Thanks again for this work very useful!
[Android Software/Hacking General [Developers Only]] disconnecktie:
Do I need to freeze market updates with TiBu after doing this because I hate that the market discriminates my dpi.
[Android Software/Hacking General [Developers Only]] disconnecktie:
Modified market does what it says great work and idea. If it doesn't work after the change clear data cache.
[Android Software/Hacking General [Developers Only]] dew.man:
modified apk seems to be working fine on my nexus s running 4.0.3

note that instead of 'vending.apk', it's 'phonesky.apk'
[Android Software/Hacking General [Developers Only]] AmeriCanAndroid:
much appreciated :)
[Android Software/Hacking General [Developers Only]] ragepekr:
Thank You Soooooooooooooooooooooo Much!!

You did great job!!
[Android Software/Hacking General [Developers Only]] alienwolf426:
You shouldn't need to freeze market updates, as far as i know, the market shouldn't update anyway ... however, it doesn't hurt to do it just in case ...

I plan on keeping this updated as long as I can and I have to ... I'm not going to change my DPI to 240 and was sick and tired of having to reboot 2 times just to *see* any available updates.

Strangely enough, the market works fine at 160 dpi, but my LG optimus 2x running CM7 has really screwed up graphics at that setting ... so that is something ppl can try if they want to keep using original market
[Android Software/Hacking General [Developers Only]] lordloki77:
@alienwolf -- thanks for your coding help on this. Glad my fix idea spurred some coding innovations :)

Glad to know you'll be updating it; let me know if I can help.

I have a fairly decent but not recent coding background.

Thanks!
[Android Software/Hacking General [Developers Only]] geenyous:
has this issue now been marked as resolved?

When using alienwolfs apk, I was unable to see apps (try contract killer) and unable to buy apps. I thougt this was related to the apk and that it did not work as intended, or only once...

I went back to the stock apk as I rather reboot with 240 and be able to see and buy all apps than having a hacked market that does not fully work.

Maybe I was a bit too impatient, any recent updates on the above, is all working for you guys?
[Android Software/Hacking General [Developers Only]] dertester123:
Well "hacked" market is working fine so far. But not perfect:

-Sometimes apps appear "not supported", then you need to wipe market cache/settings in settings->apps->manage apps->market(all apps).

-Buying apps does not work, getting error when going to payment page

=>Buy the app with market.android.com and wait some time before it starts on the phone. Here i had the "feeling" that its only working after the 15minutes are over..

- You still need market enabler if some apps are restricted in your region.

But this is a lot faster than changing dpi all the time..

The app you mentioned was working for me in both cases: stock and hacked version.

Could we possibly have stock and hacked market at one phone?
[Android Software/Hacking General [Developers Only]] disconnecktie:
You could r reinstall the stock version when you want to buy an app.
[Android Software/Hacking General [Developers Only]] marshallladd:
If you don't mind alienwolf426, I made one for the Verizon Galaxy Nexus, not sure if it works for international.

Pulled the market from my phone, modded the line of code to 320 instead of 240. and re-packaged it.
[Android Software/Hacking General [Developers Only]] bemymonkey:
Unfortunately, this method doesn't seem to work any more - today I was unable to download the new imo.im beta app, so I installed the latest official Market APK and reset my LCD Density to regular, and like 10 updates popped up :(
[Android Software/Hacking General [Developers Only]] ogonzuhnina:
Same here,

plus few additional ones (for regular apss such as pefect keyboard) when changed operator to USA T-mobile via Market Enabler
[Android Software/Hacking General [Developers Only]] XlAfbk:
it's never worked for some apps for me, for others it does. non-working example is Google Maps and Plus
[Android Software/Hacking General [Developers Only]] theb1rdm4n:
I would like to point out that I have released a paid app on the market called "LCD Density Modder Pro". It is an amazing program to modify your lcd density, but one of the best features is the ability to download and install my version of the modded market directly from the app in 2 steps. For the time being, any new updates to the market will come with a new update to the app, and will REQUIRE the newer version of the app to download it.

I am pretty certain it is a permamnet mod this time, as opposed to the other market mods (including my previous attempts) because of this:

I found a value that was abstractly calculated using the dpi, and it is a value being sent to the market's servers, so i am pretty sure it is the thing that I have been missing this whole time.

My phone was at a point of non compatibility, and i installed the newest modded market (without clearing market data). When i changed google accounts the selected google account was now compatible. Usually when one account goes incompatible and you select another account it becomes incompatible also, but not in this case.

Also, there is a failsafe:

No matter whether the online market server thinks you are compatible or not, the modded market will NEVER display a message of incompatibility. I tested this by force spoofing an incompatible dpi (321). The movies section was missing, and the online market wouldn't let me install certain apps, but the modded market did let me install those incompatible apps.

http://xdaforums.com/showthread.php?t=1428830

LCD Density Modder Pro v2.0.0
[Android Software/Hacking General [Developers Only]] lordloki77:
props?

no props for coming up with the idea? :)