[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:

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!

Show Accepted Answer

Guest Quick Reply (No URL, BBcode or HTML)

Last post by delilah.hill
3 hours ago
Last post by lemke.krystal
4 hours ago
Last post by adams.kaylie
3 hours ago
[Q] need help
Started by xpollich
Last post by mike.baumbach
4 hours ago
Last post by dach.myah
2 hours ago
Last post by oran.dach
3 hours ago
Last post by trace87
50 minutes ago
Last post by braun.luis
3 hours ago
Last post by vhowell
2 hours ago
Last post by balistreri.destiney
2 hours ago
Last post by nhammes
4 hours ago
Last post by estokes
17 minutes ago
Last post by tiana51
2 hours ago
Last post by dibbert.creola
1 hour ago
Last post by katlynn94
13 minutes ago
Last post by monte03
3 hours ago