[Q] Spoofing DPI/Resolution for SystemUI.apk? - Android Q&A, Help & Troubleshooting

I'm trying to port this mod to the Touchpad but I am having problems with the thumbnail sizes.
I believe it is related to how SystemUI.apk detects the screen resolution and DPI, if I switch from 160dpi to 240dpi I get a larger thumbnail (still not big enough though), but at 160dpi the thumbnail size is unusable for the mod.
Because the Galaxy Nexus has a 1280x720 at 320dpi Android seems to render a larger thumbnail.
There are a bunch of smali files, the GlobalScreenshot ones look like the might have something do with with it.. But I really don't know what I'm doing in regard to editing smali files.
Example of my problem:
Any help would be appreciated!
My original post.

You could change it in the build prop but that would probably make your Android experience in all other apps awful.. What you could do is extract the app and swap out the two resolution files, the one you need and the one Android keeps using. For example, there may be an HDPI folder and an MDPI folder. You want HDPI, but Android keeps using MDPI. Switch the names or the images of the two (Trial and error is the key) and see the effect.. Now I'm pretty sure TouchPad doesn't use either HDPIor MDPI (those resolutions are 800x480 and 320x480), but find out what Android is using and swap it with the one youu want.

GazaIan said:
You could change it in the build prop but that would probably make your Android experience in all other apps awful.. What you could do is extract the app and swap out the two resolution files, the one you need and the one Android keeps using. For example, there may be an HDPI folder and an MDPI folder. You want HDPI, but Android keeps using MDPI. Switch the names or the images of the two (Trial and error is the key) and see the effect.. Now I'm pretty sure TouchPad doesn't use either HDPIor MDPI (those resolutions are 800x480 and 320x480), but find out what Android is using and swap it with the one youu want.
Click to expand...
Click to collapse
I don't think the actual thumbnail image is controlled by the xml files. I believe android detects the dpi/screen resolution and creates a thumbnail that fits properly using java.
The Touchpad seems to use something called sw600dp (not mdpi, hdpi or xdpi), I'm guessing that is for tablets.
I've been fiddling around with the smali files using overrides similar to how the market was modded to use a static DPI without luck.

Related

THINKTANK: HDPI To MDPI Port via Pixel Desnity

I know our device is considered a mid range device and that one of the main reasons we can't port other roms is due to the lack of an hd screen. What if we were to take the screen density changer from the android apps forum and incorperate that with say the evo or galaxy rom? It would allow us to use these roms without having to resize every image. I'm just thinking out loud. I pm'd CR about it hoping he could work on it, but haven't had a response back yet. Let me know.
Sent from my T-Mobile myTouch 3G Slide using XDA App
I'm not entirely sure its impossible. Can we figure out what rez the pixel density changer can get us to? If it can get us to an hdpi rez ill give it a shot.
Sent from my T-Mobile myTouch 3G Slide using XDA App
ignore my last post. Not thinking this is possible. The pixel density doesn't affect the device resolution from what I can tell. See attached screenshot. Things look smaller (appears to have higher res) however, screenshot is still the same stock res. I'll change some more build prop settings to see if i can get some different or better results. Fyi this is pixel density set @ 130.
EDIT: It does make angry birds lite fit better on the screen, gonna play with some other settings in the build prop and some hdpi apps and see if I can make something happen for you guys.
Good stuff. I know it won't change anything about the resolution, but it allows the device to mock a higher resolution on the screen. Just seems like we should be able to view bigger images on the screen. I'm gonna take an image with the mts's resolution and the same image but with the galaxy's resolution and see if they display full screen in their respective settings in the density changer. Should be a good test.
Edit: Just remembered, the netbooks running android only display icons 4 wide from the factory. Your screenshot reminded me of that. If those screens which are higher res than ours look the same as ours (the icons are bigger only because the screen is bigger) then in theory this should work.
Edit 2: Just for ****s and giggles I read through the comments on the market for lcd density changer. On the hdpi devices people are complaining about certain widgets not scaling well, but the mdpi devices are only having issues when scaling to funky non-standard resolutions... just wanted to post another reason why with a little hackage, this should work.
Sent from my T-Mobile myTouch 3G Slide using XDA App
I'm working on finalizing my DPI changer app. It should be possible because the Android specs states that pixels = density * ( dpi / 160 ) or something like that (I don't have the page pulled up right now). My program is 90% complete... the logistics are done, but it just has an error wsaving, but it's due to programmer error most likely.
So, for example to scale an image from HDPI to MDPI you take the X resolution and multiply it times 0.75 and let the image program lock the aspect ratio (e.g. don't specify the Y resolution). MDPI to HDPI is (obviously) multiplied by 1.25.
Hope that helps.
Sent from my T-Mobile myTouch 3G Slide using XDA App
nbetcher said:
I'm working on finalizing my DPI changer app. It should be possible because the Android specs states that pixels = density * ( dpi / 160 ) or something like that (I don't have the page pulled up right now). My program is 90% complete... the logistics are done, but it just has an error wsaving, but it's due to programmer error most likely.
So, for example to scale an image from HDPI to MDPI you take the X resolution and multiply it times 0.75 and let the image program lock the aspect ratio (e.g. don't specify the Y resolution). MDPI to HDPI is (obviously) multiplied by 1.25.
Hope that helps.
Sent from my T-Mobile myTouch 3G Slide using XDA App
Click to expand...
Click to collapse
THanks for the info
Anyone know where/how an apk determines its going to render in mdpi v hdpi? My guess is the build.prop, but It doesn't appear to gather that info from the pixel density. (rom manager won't cover the entire screen when lcd density is set to 130 so i'm thinking its sensing mdpi some other way) Any help would be appreciated
mobile_mogul said:
I know our device is considered a mid range device and that one of the main reasons we can't port other roms is due to the lack of an hd screen. What if we were to take the screen density changer from the android apps forum and incorperate that with say the evo or galaxy rom? It would allow us to use these roms without having to resize every image. I'm just thinking out loud. I pm'd CR about it hoping he could work on it, but haven't had a response back yet. Let me know.
Sent from my T-Mobile myTouch 3G Slide using XDA App
Click to expand...
Click to collapse
You may want to change the thread name to something like "THINKTANK: MDPI To HDPI Port via Pixel Desnity"
That way people will have a better idea what the thread is about
Changed. Also, I wasnt able to test anything last night as it got pretty late, but I have tonight and all day off tomorrow to tinker around with things.
The problem is that HDPI devices don't have MDPI drawables, so every image in every app (and then some) have to be scaled down.
I have a program on my computer called image resizer, that let's me right click on the pic in file explorer and click resize photo, the select 320x480 and it rezises it for you.
Sent from my HTC Espresso, that is apperantly a failing device using the XDA App
Whoareyou said:
I have a program on my computer called image resizer, that let's me right click on the pic in file explorer and click resize photo, the select 320x480 and it rezises it for you.
Sent from my HTC Espresso, that is apperantly a failing device using the XDA App
Click to expand...
Click to collapse
What version you using? 2.1?
It keeps aspect ratio so sometimes it doesn't resize perfectly. ie when I try to resize boot screens it converts to 296x480 instead.
That would be the purpose of the density changer. No need to resize any images. Just load the changer and it visualizes a higher resolution on the screen....
mobile_mogul said:
That would be the purpose of the density changer. No need to resize any images. Just load the changer and it visualizes a higher resolution on the screen....
Click to expand...
Click to collapse
Wouldn't that cost alot of CPU power to dynamically resize the images?
I've never used the density changer so I wouldn't know.
Ok, after chattin with IB, he provided a little insight on how the density changer works.
I just got the touchwiz ui to load no problem on the slide by changing the density to an HDPI equivalent. It's still a little "off". But im gonna keep tweaking it.
Ok, so I've been able to get pretty much anything made for the n1 to run properly on the slide. Only thing i've had issues with are when loading the touchwiz ui, it is all pushed to the left side of the screen. If I can force tw to use 5 columns it would fill the screen and we'd have an almost full port of the tw launcher.
r0man said:
Wouldn't that cost alot of CPU power to dynamically resize the images?
I've never used the density changer so I wouldn't know.
Click to expand...
Click to collapse
Sorry to triple post, but it wouldnt use any extra cpu cycles... All the res changer does is change the value in the build.prop.
mobile_mogul said:
Sorry to triple post, but it wouldnt use any extra cpu cycles... All the res changer does is change the value in the build.prop.
Click to expand...
Click to collapse
But its still displaying an HDPI image, just scaled down?
Well I installed Density Changer from the market, but it won't do any thing, it says it works nut when I reboot my phone nothing is any different, and its still at the default res, any idea on why this is????
Sent from my HTC Espresso, that is apperantly a failing device using the XDA App
http://forum.xda-developers.com/showthread.php?t=785864

Can Some one help me get iPhone icons?

I love my vibrant without a doubt. But I wish our icons were as eye catching as iphones... I keep googling for two months.. sure ive found some icons but just basic ones like phone icon, text, notepad, sms, and most of them are crappy quality because they arent original iphone icons just look a likes or remakes
Can someone help me find preferably new iphone icons from their newest firmware.... a complete set would be great.
Thank You!!!
Something like this, maybe? http://suavehd.xengi.org/
StefanB86 said:
Something like this, maybe? http://suavehd.xengi.org/
Click to expand...
Click to collapse
OMGGGGGGGGGGGGG ur the best!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
how can this work for android though.
obviously both phones run on completely different os builds, file names etc.
crazy_kat_matt said:
how can this work for android though.
obviously both phones run on completely different os builds, file names etc.
Click to expand...
Click to collapse
Icons on our phone are just png files. Any png file with the right size will do. There are various apps on the market to change icons on the home screen. If you want to change it in the app drawer too you can use apk manager to extract each apk you want to change. Swap out the icon in the res/drawables, zip it back up and sign it again.
Sent from my SGH-T959 using XDA App
What is the correct size of the png icons that would most likely resemble the iphone icons?
I feel like alot of icons I find online are too small.
JJG2 said:
What is the correct size of the png icons that would most likely resemble the iphone icons?
I feel like alot of icons I find online are too small.
Click to expand...
Click to collapse
well the default samsung messaging, gallery, video and so forth are 72x72 but I guess smaller icons would work too, even if they are a bit grainy.
Edit: The iphone icons in the above website are 120x120 so they are higher resolution than our default ones. I tested it by swapping out the calculator icon in TouchWizCalculator.apk in system/app. It works nicely.

How can we modify native samsung apps appearance?

I love LCD density changer and cannot live without it. Samsung apps do not scale well. Is there a way I can modify the files myself to make them scale instead of having fixed widths?
I'm moderately technical. If its as simple as modifying an xml file in the apk that would be easy.
sj_martin said:
I love LCD density changer and cannot live without it. Samsung apps do not scale well. Is there a way I can modify the files myself to make them scale instead of having fixed widths?
I'm moderately technical. If its as simple as modifying an xml file in the apk that would be easy.
Click to expand...
Click to collapse
It shouldn't rally need anything other then editing the pngs and editing the xml for font size
Well, there is the possibility it may require some Smali edits. If the Samsung apps were only ever intended to run on this [email protected] specific resolution/density, then the sizing of them could've been hardcoded in. Given how the Galaxy Tab Email app displays on our phone I wouldn't be surprised if this was the case. Lazy coding IMO...
Sent via XDA app on my Macnut Vibrant [R12]

[Q] layout XML, fill_parent, app-specific screen-size spoofing

Hi all,
I have a Galaxy Tab 2 10.1 with a 1280x800 display and recently enabled floating multi-window capabilities using this mod: http://forum.xda-developers.com/showthread.php?t=2449094
Now that I can have floating windows, I wanted to try and edit some games I play to not take up the whole screen and make them think I'm running on a phone with a small screen size (which I know they can, since I've played the same exact APK on a smaller screen size).
So what do I do? I download apktool, decompile the APK, and check the res/layout XML files. In this particular app's case, there are 3 XML files, and all the views are defined at layout_width and layout_height of fill_parent. I change them to something silly like 400px and 640px (to, say, run 4 of these in landscape mode on my screen).
Of course this doesn't work. Some parts are actually 400/640, but some draw at full screen size. My guess is that there are some parts that are drawn pragmatically that bypass the layout settings set in the XMLs and use calls like GetDeviceScreenSize() for dimensions or whatever. I can't find any other layout rules in the XML so I assume this is embedded in the smali files somewhere (pardon my android development nubbery here).
Now that you know the background, my question is: is there a way I can fool a particular app into thinking that my screen is smaller? I know I can change the entire devices DPI but that won't help me. I want to do this on an app-specific basis, sandbox style. Have I missed something simple other than red/layout that I can change to get this app to behave like I want it to?
If the answer to these questions is no, will I be able to achieve my goal by digging into the smali files? If so, would anyone care to share some advice?
Thanks in advance!

[HELP] Reducing entire UI size

Hello. This is probably a first, but i want to ask if anyone knows how i could resize everything on my phone, so that its a bit smaller? Lets say the statusbar is a bit thinner, then the icons on the bottom of the screen are smaller. I've seen my friend do it once, it creates the illusion of a bigger display screen, i don't know how he did it though. So far i'm using [THIS] rom.
Is this possible on the xperia go?
Basically if it were a windows computer, to do this you'd change the resolution to a bigger one, as on lets say 800x600 the icons would be big, everything would be big, and if you change it to 1280x720 it would all shrink a bit.
Add this line to /system/build.prop (a few ROMs already have it, likely set to 240, in which case obviously just change the number):
ro.sf.lcd_density=200
200/210 is the setting I'm most comfortable with (sufficiently small but keyboard still usable).
Keep in mind that a few apps like Sony's launcher don't work well with DPI changes...
Ryccardo said:
Add this line to /system/build.prop (a few ROMs already have it, likely set to 240, in which case obviously just change the number):
ro.sf.lcd_density=200
200/210 is the setting I'm most comfortable with (sufficiently small but keyboard still usable).
Keep in mind that a few apps like Sony's launcher don't work well with DPI changes...
Click to expand...
Click to collapse
thank you, that worked. The rom i'm using is using a kitkat launcher which works splendid, only thing i noticed that is buggy is the number dialer, which i'll probably just replace with a different one now. cheers

Categories

Resources