Android OS Forum banner
21 - 40 of 60 Posts

·
Registered
Joined
·
304 Posts
Somehow, I thought if anyone could do this, it would be Dubi so thanks much!

When you copied the new systemui over you changed the permissions too, right? If not, you need to do that. They should be the same as the permissions on all the other files in that directory so rw-r--r--

Also check the date and file size and make sure it matches the file Dubi put up for download just to make sure the file copied over correctly.
Hehe, I guess as soon as you saw the "dirty hack"
 

·
Registered
Joined
·
304 Posts
Ummm, I can't see to reproduce any problem with that Time tablet app (of course I'm only playing with the initial menus, I don't have (or want) and account).

While digging into the apk itself, I can see that there are two main layers, one the mainframe and another the reader (which process the magazines)
Inside the reader classes I can see code like :

Code:
<br />
if ((this.f != -1) && (this.e != -1) && (this.g != -1) && (this.h != -1))<br />
	{<br />
	  com.woodwing.sharedlibrary.e.a("Issue", "Using dimensions from magazine.xml for scaling.");<br />
	}<br />
	else<br />
	{<br />
	  com.woodwing.sharedlibrary.e.a("Issue", "Using derive method for scaling for the dimensions are not in magazine.xml.");<br />
	  ...<br />
	  ...<br />
	Object localObject1 = new StringBuilder().append("requested scalingmode: ");<br />
	String str;<br />
	if (paramInt != 1)<br />
	{<br />
	  if (paramInt != 0)<br />
		str = "DISPROPORTIONATE_FIT_SCREEN";<br />
	  else<br />
		str = "FIT_WIDTH";<br />
	}<br />
	...<br />
which makes me think that it gets the format from the magazine itself (can't see any magazine.xml in my TP)
Still, it should obey the screen dimensions because those are taken in the Mainframe class (which are returned as 1024x600/600x1024 by the hack)

Code:
<br />
	DisplayMetrics localDisplayMetrics = new DisplayMetrics();<br />
	((WindowManager)getSystemService("window")).getDefaultDisplay().getMetrics(localDisplayMetrics);<br />
	localHashMap.put("width", Integer.valueOf(localDisplayMetrics.widthPixels));<br />
	localHashMap.put("height", Integer.valueOf(localDisplayMetrics.heightPixels));<br />
	localHashMap.put("dpi", Integer.valueOf(localDisplayMetrics.densityDpi));<br />
I can change the Time apk so it will always use "FIT_WIDTH" like below and built another apk, but not sure if that will work. (it's quite annoying I can't see the problem here)

Code:
<br />
	if (paramInt != 1)<br />
	{<br />
	  if (paramInt != 0)<br />
		str = "FIT_WIDTH";<br />
	  else<br />
		str = "FIT_WIDTH";<br />
	}<br />
 

·
Android Beginner
Joined
·
24 Posts
Discussion Starter · #24 ·
Somehow, I thought if anyone could do this, it would be Dubi so thanks much! When you copied the new systemui over you changed the permissions too, right? If not, you need to do that. They should be the same as the permissions on all the other files in that directory so rw-r--r-- Also check the date and file size and make sure it matches the file Dubi put up for download just to make sure the file copied over correctly.
I just installed the ZIP using CWM, I assume this set the protections correctly. I assume the issue is like Dubi said, where he built this from/for the Nightlies, and not from A2. Hopefully he can get this working for A2 also, but if not, I know I'll be installing Nightlies soon.
 

·
Registered
Joined
·
148 Posts
I just installed the ZIP using CWM, I assume this set the protections correctly. I assume the issue is like Dubi said, where he built this from/for the Nightlies, and not from A2. Hopefully he can get this working for A2 also, but if not, I know I'll be installing Nightlies soon.
Ah okay, I was thinking you manually moved the files over but if CWM installed it, it should have set the permissions correctly. Wouldn't hurt to check but yeah you're both probably right that it's the discrepencies between the systemui from A1/2 release and the nightlies.

Most of the nightlies are pretty stable but I read some people were having issues with 3/11 3/12. Haven't checked back on it for a couple of days. I'm still running 3/10 without issue.
 

·
Registered
Joined
·
304 Posts
I'm not really running nightly, I just build with the latest code (I think my current repo was done a couple of days ago) and keep that.
I think some change since the OMX hardware tweak is causing the "incompatibles" (aka. SystemUI FCs with latest mod)

I'm trying to build based on A2 but due how git works, its quite difficult to revert back to an exact point in time.
 

·
Registered
Joined
·
304 Posts
ok, I couldn't quite go back to A2, but I think I found why SystemUI fails with any file from the nighty

It blows here:

Code:
<br />
D/AndroidRuntime( 2149): Shutting down VM<br />
W/dalvikvm( 2149): threadid=1: thread exiting with uncaught exception (group=0x2b4d81f8)<br />
E/AndroidRuntime( 2149): FATAL EXCEPTION: main<br />
E/AndroidRuntime( 2149): java.lang.RuntimeException: Unable to create service com.android.systemui.SystemUIService: java.lang.RuntimeException: Tablet device cannot show navigation bar and system bar<br />
E/AndroidRuntime( 2149):     at android.app.ActivityThread.handleCreateService(ActivityThread.java:2263)<br />
E/AndroidRuntime( 2149):     at android.app.ActivityThread.access$1600(ActivityThread.java:123)<br />
E/AndroidRuntime( 2149):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1201)<br />
E/AndroidRuntime( 2149):     at android.os.Handler.dispatchMessage(Handler.java:99)<br />
So, I look at that code, and just remove that throw (which was no doing much
)

Would you guys running A2 mind to test this one?
http://www.zen24223.zen.co.uk/ShrinkWithSystemUI_forA2.zip

This has the android.policy.jar and the SystemUI.apk so make a copy just to be sure


I tested on mine (putting back the official A2) and with the first ShrinkScreen.zip I got the FC but this one works fine.
I get the ShrinkScreen and the HideBar mod (two for the price of one hehehe)
 

·
Registered
Joined
·
7 Posts
Ummm, I can't see to reproduce any problem with that Time tablet app (of course I'm only playing with the initial menus, I don't have (or want) and account).

While digging into the apk itself, I can see that there are two main layers, one the mainframe and another the reader (which process the magazines)
Inside the reader classes I can see code like :

Code:
<br />
if ((this.f != -1) && (this.e != -1) && (this.g != -1) && (this.h != -1))<br />
	{<br />
	  com.woodwing.sharedlibrary.e.a("Issue", "Using dimensions from magazine.xml for scaling.");<br />
	}<br />
	else<br />
	{<br />
	  com.woodwing.sharedlibrary.e.a("Issue", "Using derive method for scaling for the dimensions are not in magazine.xml.");<br />
	  ...<br />
	  ...<br />
	Object localObject1 = new StringBuilder().append("requested scalingmode: ");<br />
	String str;<br />
	if (paramInt != 1)<br />
	{<br />
	  if (paramInt != 0)<br />
		str = "DISPROPORTIONATE_FIT_SCREEN";<br />
	  else<br />
		str = "FIT_WIDTH";<br />
	}<br />
	...<br />
which makes me think that it gets the format from the magazine itself (can't see any magazine.xml in my TP)
Still, it should obey the screen dimensions because those are taken in the Mainframe class (which are returned as 1024x600/600x1024 by the hack)

Code:
<br />
	DisplayMetrics localDisplayMetrics = new DisplayMetrics();<br />
	((WindowManager)getSystemService("window")).getDefaultDisplay().getMetrics(localDisplayMetrics);<br />
	localHashMap.put("width", Integer.valueOf(localDisplayMetrics.widthPixels));<br />
	localHashMap.put("height", Integer.valueOf(localDisplayMetrics.heightPixels));<br />
	localHashMap.put("dpi", Integer.valueOf(localDisplayMetrics.densityDpi));<br />
I can change the Time apk so it will always use "FIT_WIDTH" like below and built another apk, but not sure if that will work. (it's quite annoying I can't see the problem here)

Code:
<br />
	if (paramInt != 1)<br />
	{<br />
	  if (paramInt != 0)<br />
		str = "FIT_WIDTH";<br />
	  else<br />
		str = "FIT_WIDTH";<br />
	}<br />
Hey dubi I don't know if this will help but I did some digging around when I used this app. The images that are downloaded to my TP are 1366x768 in resolution and it can be seen from the xml files for the individual issues.

Hopefully this helps, since I want to get this to work properly too!

Sent from my Galaxy Nexus using Tapatalk
 

·
Registered
Joined
·
304 Posts
Hey dubi I don't know if this will help but I did some digging around when I used this app. The images that are downloaded to my TP are 1366x768 in resolution and it can be seen from the xml files for the individual issues.

Hopefully this helps, since I want to get this to work properly too!

Sent from my Galaxy Nexus using Tapatalk
Is there anything like a "magazine.xml" in those files?
Maybe it will be easy to pick one and check if they have that "DISPROPORTIONATE_FIT_SCREEN" inside?
 

·
Android Beginner
Joined
·
32 Posts
There is a magazine. Xml in there but there is no disproportionate fit line.
Thanks!

Sent from my cm_tenderloin using Tapatalk
 

·
Registered
Joined
·
31 Posts
Thanks so much for initiating this, KevlarGibs, and great progress on the packaging it up, Dubi. And thanks for the helpful tip, motoki.

Dubi, I have tried new ShrinkWithSystemUI_forA2.zip from post #27 since I am on CM9 Alpha 2. I do have time tablet subscription and the initial screens looks great at Dubi pointed out. It's when it gets into the magazine issue itself that problem occurs and I get exact same pictures ruthienu posted on this thread, i.e. the page gets cut off in the middle. Another App that shows similar behavior that is free is USA Today Tablet App. You will notice that the sentences in the article gets cut off or lost in between pages. I suspect if we can get USA Today Tablet to work, it should also work on Time Magazine. Dubi, if it helps, I can share with you my Time login info, so you can test it. Let me know.

I thought the icon looked pretty good. :)

BTW, how do I uninstall this after I am done with it?
 

·
Android Beginner
Joined
·
24 Posts
Discussion Starter · #33 ·
Dubi, the new update you posted is working great! I tested it with Frontline Commando, and I can actually see the weapon stats now.

You have done an amazing job on this and I'm glad you did decide to look at it, but because I was never going to get this far.

I did want to bring the minor graphical issues I see to your attention. Not complaining, and even if you were done with the project now, I'm extremely pleased.

1. It shrunk my keyboard. I use SwiftKey, and and now it looks like this:
Computer Laptop Personal computer Office equipment Gadget Font Screenshot Software Technology Electronic device

2. When the screen "Greys out" to prompt about something, a small amount on the right/bottom side stays fully lit.
Font Screenshot Software Technology Rectangle

Keep up the good work.. I'd love to see this get integrated with the CM9 code by default. There are a lot of little situations where it could be useful.

Sent from my cm_tenderloin using RootzWiki
 

Attachments

·
Registered
Joined
·
304 Posts
Thanks so much for initiating this, KevlarGibs, and great progress on the packaging it up, Dubi. And thanks for the helpful tip, motoki.

Dubi, I have tried new ShrinkWithSystemUI_forA2.zip from post #27 since I am on CM9 Alpha 2. I do have time tablet subscription and the initial screens looks great at Dubi pointed out. It's when it gets into the magazine issue itself that problem occurs and I get exact same pictures ruthienu posted on this thread, i.e. the page gets cut off in the middle. Another App that shows similar behavior that is free is USA Today Tablet App. You will notice that the sentences in the article gets cut off or lost in between pages. I suspect if we can get USA Today Tablet to work, it should also work on Time Magazine. Dubi, if it helps, I can share with you my Time login info, so you can test it. Let me know.

I thought the icon looked pretty good. :)

BTW, how do I uninstall this after I am done with it?
Glad it works.
Didn't wanted to include the SystemUI because it's the normal place for UI mods, and if you use mine, you will loose any other you have installed (e.g: battery percent), but can't see other way to do it. Still, I hope it will not take too long before we get another "official" version so it won't be needed

Will check it out that "USA Today Tablet" app, if I can see the problem it make things a lot easier to work on.
Hope it doesn't need an account (or is not restricted to US, I'm in UK) to show the graphic glitch, but if it does I may ask for some app files.

Spends hours finding an ICON for the new ShrinkScreen, hehehehehe (hours trying to find the bloody rotate option in the viewer
)

EDIT:

If you made a copy of SystemUI.apk and android.policy.jar just replace the new files with those.
/system/app/SystemUI.apk
/system/framework/android.policy.jar
If not you can get your files from the big (108Mg) update.....fullofbugs.zip rom you used to install the version you have in the TP.
I guess there could be some way to automatically do a backup while doing the install script in recovery, but haven't look at that yet.
Because I can't build with the A2 code anymore, I can't really create the "unaltered" versions of those two files, otherwise I would have created an "flashble" uninstall.
 

·
Registered
Joined
·
304 Posts
Dubi, the new update you posted is working great! I tested it with Frontline Commando, and I can actually see the weapon stats now.
...
1. It shrunk my keyboard. I use SwiftKey, and and now it looks like this:

2. When the screen "Greys out" to prompt about something, a small amount on the right/bottom side stays fully lit.
....
I will try SwiftKey and see what you mean (sorry if I'm dumb but can't see anything wrong with those two pictures, I'm not use to SwiftKey)
And yes, I think I saw somewhere else that "shadow" problem. Need to find why
 

·
Registered
Joined
·
304 Posts
I had a play with that US Today app.

That app is crap hehehehe 8)
The issue with the truncated text (and the bad position of the "Pg 1 of 20" banner) is because the app fails to adjust the content of the HTML when it first initialize the window.

Inside the apk there is a javascript file which is the one in charge of adjusting the content of the HTML (the article)

Code:
<br />
 public void resize()<br />
  {<br />
    Log.d("GNA", "Resize : " + this.pageWidth + ", " + this.pageHeight);<br />
    if ((this.pageWidth != 0) && (this.pageHeight != 0))<br />
	  loadUrl("javascript:articleController.resize(" + this.pageWidth + ", " + this.pageHeight + ")");<br />
  }<br />
<br />
 it calls the resize javascript inside the file "articlesController.js"<br />
The problem is that the apk tries to call the resize() before it's fully initialize. The logcat trace shows the error due the articleController not been there.

Anyway, in addition to that, the apk doesn't appear to use relative values for the window dimensions, it's is full of stuff like:
Code:
<br />
  protected void onMeasure(int paramInt1, int paramInt2)<br />
  {<br />
    Display localDisplay = ((WindowManager)this.context.getSystemService("window")).getDefaultDisplay();<br />
    if ((localDisplay.getRotation() != 0) && (localDisplay.getRotation() != 2))<br />
	  setMeasuredDimension(600, 450);<br />
    else<br />
	  setMeasuredDimension(800, 600);<br />
  }<br />
}<br />
...<br />
...<br />
<?xml version="1.0" encoding="utf-8"?><br />
<FrameLayout android:id="@id/main_activity_layout" android:layout_width="fill_parent" android:layout_height="fill_parent"<br />
  xmlns:android="http://schemas.android.com/apk/res/android"><br />
    <LinearLayout android:orientation="horizontal" android:background="#ffffffff" android:layout_width="fill_parent" android:layout_height="fill_parent"><br />
	    <LinearLayout android:orientation="vertical" android:id="@id/headlines" android:background="#ffcccccc" android:layout_width="366.0dip" android:layout_height="fill_parent"><br />
		    <fragment android:id="@id/frag_branding" android:layout_width="fill_parent" android:layout_height="154.0dip" class="com.usatoday.android.tablet.news.Branding" /><br />
		    <fragment android:id="@id/list" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" class="com.usatoday.android.tablet.news.HeadlinesFragment" /><br />
	    </LinearLayout><br />
	    <fragment android:id="@id/frag_content" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" class="com.usatoday.android.tablet.news.ContentFragment" /><br />
    </LinearLayout><br />
    <ImageView android:id="@id/main_activity_overlay" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/main_activity_overlay" android:scaleType="fitXY" /><br />
</FrameLayout><br />
with hardcoded dip values, so of course it will not care about what the ActivyWindow resolution is.

I could hack the app to work properly, but to me (at least in my build) the page (web article) is correctly formatted if I switch to fullscreen and go back to the headlines.
If I do that, I will have the proper number of columns (2 in headline mode, 3 in fullscreen mode). If I switch to another tab (like from News to Tech) then it will happen again. The first article will be incorrectly formatted (3 columns) but if I go to fullscreen and back again it will look as expected.



Make sense?
 

·
Registered
Joined
·
31 Posts
If you made a copy of SystemUI.apk and android.policy.jar just replace the new files with those.
/system/app/SystemUI.apk
/system/framework/android.policy.jar
If not you can get your files from the big (108Mg) update.....fullofbugs.zip rom you used to install the version you have in the TP.
I guess there could be some way to automatically do a backup while doing the install script in recovery, but haven't look at that yet.
Because I can't build with the A2 code anymore, I can't really create the "unaltered" versions of those two files, otherwise I would have created an "flashble" uninstall.
Hi, Dubi.

You are absolutely right about going USA Tablet App. Making it full screen and going back solves the problem. :)
So it appears that the problem with this app is different from Time Magazine. Time also publishes couple other magazines, such as Fortune and Sports Illustrated, and they use same formatted app, as the problem I have with Time app shows up with those ones. Dubi, I will PM you the login info for my Time Subscription so you can take look at the problem firsthand. Thanks so much for figuring out a work around for USA Today App. I use it frequently and I was pretty frustrated with it. It is one of the highly publicized tablet formatted app, so I am surprised they were that sloppy in the programming. Do you think patching it somehow is complicated?

Concerning getting back the SystemUI.apk and android.policy.jar, I didn't make the backup before I installed your zip. If I do full (108Mg) A2 update again, will I get back those original files again? If so, would SystemUI.apk and android.policy.jar files individualized? If not, I can just reinstall and post those two files here so people can have it as a back up plan in case something goes wrong.
 

·
Registered
Joined
·
304 Posts
as you figured out
there is no need to reinstall the whole A2,
just open the 108Mg zip file, pick the two files and put it back where it belong 8)

that's the easiest way to "uninstall" a mode (right, maybe not the easiest, but the safer)
You can use a CWM backup if you don't have/know the exact version of the full (108Mgs) zip file.
 

·
Registered
Joined
·
304 Posts
ok, so I think I got that Time app running "properly"


for now it's a hack inside the app, but I will see if is possible to do it from the outside.
The good thing about the hack, is that it doesnt need the ShrinkScreen mod, it works fine in the default 768x1024 res

 

·
Registered
Joined
·
148 Posts
Good work on getting to the bottom of that Time issue. If you could get it to work outside the app that would be awesome because I'm willing to bet there are other sloppy apps like that one out there.

Since we have an unofficial device it's not likely that we will get any help from developer support.
 
21 - 40 of 60 Posts
Top