Android OS Forum banner
41 - 60 of 60 Posts

·
Registered
Joined
·
31 Posts
I guess problems like this is the reason apples chooses not to make 7 inch tablets and stick with one size 10 inch iPad.

It's hard to make developers to make apps work on different resolutions.
I just learned the other day that Samsung is launching new 11.6 inch android tablet with same resolution as iPad3.
So they now they have 4.2 inch phone, 5.0 inch note, 7.0 inch tab, 7.7 inch tab, 8.9 inch tab, and 10.1 inch tab in addition to new 11.6 inch tab. Talking about trying to saturate the market. One of them is gotta hit the sweet spot for someone. The problem is Samsung hasn't learned is that unless they lower their prices, no one will be buying their devices. But they always seem to price their tablets much higher than market prices. I guess they can afford to deal with slow sales since they have cashed in with their mobile phone business and absorb the loss.

Ice Cream Sandwich app developers will have to figure out a way to deal with this, and I suspect not all new ICS tablets that is coming out will have 16:9 size Honeycomb tablets.

iOS's solution to avoid this problem is just making a single device size for tablet. We will see how Android handles this.
 

·
Android Beginner
Joined
·
32 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

It would be amazing if we could have that hack! Are you going to post it or give instructions on how to hack it?

Sent from my cm_tenderloin using Tapatalk
 

·
Registered
Joined
·
304 Posts
ok, here it goes, hope I'm not breaking any rules


this should help you to fix the aspect ratio problems on all that apps (from TI Media)

basically what you will need to do is: download the apk (or directly copy it your touchpad "/data/app") to your PC
unpack it, change one file inside and repack it again.

1. Download apk to your PC (you can use Chrome browse and the APK Downloader extension to get the apk from the market.

Code:
<br />
	com.timeinc.si-9.apk<br />
2. Download the APKTool package which will allow you to unpack/pack the APK
http://code.google.c...ndroid-apktool/

(The file is a tar.bz2, so you may need something like 7-zip to uncompress it)
Get the apktool.jar and put it somewhere

3. The APKTool is a Java application so, you will need to have JDK installed in your machine to be able to use it.
Get it from here:
http://www.oracle.co...oads/index.html
And install it in the default directory

4. After that, open a CMD and go to whatever directory you have put the android apk and the apktool.jar

This is what I have:
Code:
<br />
	d:\Android\t>dir<br />
	 Volume in drive D is Data<br />
	 Volume Serial Number is 5252-2A78<br />
<br />
	 Directory of d:\Android\t<br />
<br />
	15/03/2012  12:01	<DIR>		  .<br />
	15/03/2012  12:01	<DIR>		  ..<br />
	01/01/2012  15:37			   176 apktool.bat<br />
	08/12/2011  01:38		 3,090,514 apktool.jar<br />
	14/03/2012  20:48		 1,408,045 com.timeinc.si-9.apk<br />
				   3 File(s)	  4,498,735 bytes<br />
				   2 Dir(s)  29,073,973,248 bytes free<br />
<br />
	d:\Android\t>type apktool.bat<br />
	@echo off<br />
	set PATH=c:\Program Files (x86)\Java\jdk1.6.0_06\bin;%PATH%<br />
	"c:\Program Files (x86)\Java\jdk1.6.0_06\bin\java" -jar "%~dp0\apktool.jar" %1 %2 %3 %4 %5 %6 %7 %8 %9<br />
<br />
	d:\Android\t><br />
I've created a apktool.bat to set the PATH and call the apktool.

5. Now is time to unpack the android apk. Run the following command:

Code:
<br />
	d:\Android\t>apktool.bat d com.timeinc.si-9.apk<br />
	I: Baksmaling...<br />
	I: Loading resource table...<br />
	W: Skipping "android" package group<br />
	I: Loaded.<br />
	I: Loading resource table from file: C:\Users\Fbyte\apktool\framework\1.apk<br />
	I: Loaded.<br />
	I: Decoding file-resources...<br />
	I: Decoding values*/* XMLs...<br />
	I: Done.<br />
	I: Copying assets and libs...<br />
<br />
	d:\Android\t><br />
This will create a "com.timeinc.si-9" directory with all the resources from the apk.

Code:
	<br />
	d:\Android\t>dir com.timeinc.si-9<br />
	 Volume in drive D is Data<br />
	 Volume Serial Number is 5252-2A78<br />
<br />
	 Directory of d:\Android\t\com.timeinc.si-9<br />
<br />
	15/03/2012  12:07	<DIR>		  .<br />
	15/03/2012  12:07	<DIR>		  ..<br />
	15/03/2012  12:07			 3,157 AndroidManifest.xml<br />
	15/03/2012  12:07				99 apktool.yml<br />
	15/03/2012  12:07	<DIR>		  assets<br />
	15/03/2012  12:07	<DIR>		  res<br />
	15/03/2012  12:07	<DIR>		  smali<br />
				   2 File(s)		  3,256 bytes<br />
				   5 Dir(s)  29,062,762,496 bytes free<br />
<br />
	d:\Android\t><br />
6. To address the problem with the aspect ratio, we have to edit one of the smali files:

. Open the MainFrame.smali in notepad:
Code:
<br />
		d:\Android\t>notepad com.timeinc.si-9\smali\com\woodwing\mainframe\MainFrame.smali<br />
. Search for the word "width":
Code:
<br />
		.....<br />
		invoke-virtual {v2, v1}, Landroid/view/Display;->getMetrics(Landroid/util/DisplayMetrics;)V<br />
<br />
		const-string v2, "width"<br />
<br />
		iget v3, v1, Landroid/util/DisplayMetrics;->widthPixels:I<br />
		.....<br />
. Replace the line:
Code:
  <br />
	    iget v3, v1, Landroid/util/DisplayMetrics;->widthPixels:I<br />
for:
Code:
  <br />
	    const/16 v3,600<br />
. Save the file and go back to the cmd shell

7. Now, time to repack the apk, run the following command.
Code:
<br />
	d:\Android\t>apktool.bat b com.timeinc.si-9 si_mine.apk<br />
	I: Checking whether sources has changed...<br />
	I: Smaling...<br />
	I: Checking whether resources has changed...<br />
	I: Building resources...<br />
	I: Building apk file...<br />
<br />
	d:\Android\t><br />
This will create a new "time_mine.apk" android package.

8. You need to sign the package so it can be installed anywhere, for that you need to generate a certificate with some JDK tool:

. Create a certificate (you only need to do this once)
Code:
<br />
		d:\Android\t>keytool -genkey -v -keystore my-release-key.keystore -alias myowncert -keyalg RSA -keysize 2048 -validity 1000<br />
		Enter keystore password:<br />
		Re-enter new password:<br />
		What is your first and last name?<br />
		  [Unknown]:  who<br />
		What is the name of your organizational unit?<br />
		  [Unknown]:  cares<br />
		What is the name of your organization?<br />
		  [Unknown]:  asd<br />
		What is the name of your City or Locality?<br />
		  [Unknown]:  asd<br />
		What is the name of your State or Province?<br />
		  [Unknown]:  asd<br />
		What is the two-letter country code for this unit?<br />
		  [Unknown]:  asd<br />
		Is CN=who, OU=cares, O=asd, L=asd, ST=asd, C=asd correct?<br />
		  [no]:  yes<br />
<br />
		Generating 2,048 bit RSA key pair and self-signed certificate (SHA1withRSA) with a validity of 1,000 days<br />
				for: CN=who, OU=cares, O=asd, L=asd, ST=asd, C=asd<br />
		Enter key password for <myowncert><br />
				(RETURN if same as keystore password):<br />
		[Storing my-release-key.keystore]<br />
<br />
		d:\Android\t><br />
. Sign the "time_mine.apk"

Code:
<br />
		d:\Android\t>jarsigner -keystore ./my-release-key.keystore si_mine.apk myowncert<br />
		Enter Passphrase for keystore:<br />
<br />
		d:\Android\t><br />
9. That's it. Move apk to the TP, uninstall the previous one and install this one. It should show the pictures correctly.

It should work with most of the apps from those guys (Time-Warner)
 

·
Registered
Joined
·
2 Posts
Dubi, thanks for the great tutorial

i have done everything like you wrote (for me it is the swimsuit 2012 app)

but i can't install the patched app on android

it always says: Application not installed (Cyangenmod CM9 ALpha2 on my HP Touchpad)

any suggestions?
 

·
Registered
Joined
·
304 Posts
Dubi, thanks for the great tutorial

i have done everything like you wrote (for me it is the swimsuit 2012 app)

but i can't install the patched app on android

it always says: Application not installed (Cyangenmod CM9 ALpha2 on my HP Touchpad)

any suggestions?
Did you signed it (step 9) and uninstall the original one first?
 

·
Android Beginner
Joined
·
24 Posts
Discussion Starter · #49 ·
So, I have noticed another thing. My chrome beta looks like the phone version, without the tabs on top:
Product Font Screenshot Line Technology this happens in both landscape and portrait.
This makes me wonder if there is something in the modern that might be convincing some apps they are running on a phone? I or is there maybe some part of the mod that always "shows" the 1024x600 resolution?

Sent from my cm_tenderloin using RootzWiki
 

Attachments

·
Android Beginner
Joined
·
32 Posts
ok, here it goes, hope I'm not breaking any rules

this should help you to fix the aspect ratio problems on all that apps (from TI Media)

basically what you will need to do is: download the apk (or directly copy it your touchpad "/data/app") to your PC
unpack it, change one file inside and repack it again.

1. Download apk to your PC (you can use Chrome browse and the APK Downloader extension to get the apk from the market.

Code:
<br />
	com.timeinc.si-9.apk<br />
2. Download the APKTool package which will allow you to unpack/pack the APK
http://code.google.c...ndroid-apktool/

(The file is a tar.bz2, so you may need something like 7-zip to uncompress it)
Get the apktool.jar and put it somewhere

3. The APKTool is a Java application so, you will need to have JDK installed in your machine to be able to use it.
Get it from here:
http://www.oracle.co...oads/index.html
And install it in the default directory

4. After that, open a CMD and go to whatever directory you have put the android apk and the apktool.jar

This is what I have:
Code:
<br />
	d:Androidt>dir<br />
	 Volume in drive D is Data<br />
	 Volume Serial Number is 5252-2A78<br />
<br />
	 Directory of d:Androidt<br />
<br />
	15/03/2012  12:01			  .<br />
	15/03/2012  12:01			  ..<br />
	01/01/2012  15:37			   176 apktool.bat<br />
	08/12/2011  01:38		 3,090,514 apktool.jar<br />
	14/03/2012  20:48		 1,408,045 com.timeinc.si-9.apk<br />
				   3 File(s)	  4,498,735 bytes<br />
				   2 Dir(s)  29,073,973,248 bytes free<br />
<br />
	d:Androidt>type apktool.bat<br />
	@echo off<br />
	set PATH=c:Program Files (x86)Javajdk1.6.0_06bin;%PATH%<br />
	"c:Program Files (x86)Javajdk1.6.0_06binjava" -jar "%~dp0apktool.jar" %1 %2 %3 %4 %5 %6 %7 %8 %9<br />
<br />
	d:Androidt><br />
I've created a apktool.bat to set the PATH and call the apktool.

5. Now is time to unpack the android apk. Run the following command:

Code:
<br />
	d:Androidt>apktool.bat d com.timeinc.si-9.apk<br />
	I: Baksmaling...<br />
	I: Loading resource table...<br />
	W: Skipping "android" package group<br />
	I: Loaded.<br />
	I: Loading resource table from file: [URL=C:UsersFbyteapktoolframework1]C:UsersFbyteapktoolframework1[/URL].apk<br />
	I: Loaded.<br />
	I: Decoding file-resources...<br />
	I: Decoding values*/* XMLs...<br />
	I: Done.<br />
	I: Copying assets and libs...<br />
<br />
	d:Androidt><br />
This will create a "com.timeinc.si-9" directory with all the resources from the apk.

Code:
	<br />
	d:Androidt>dir com.timeinc.si-9<br />
	 Volume in drive D is Data<br />
	 Volume Serial Number is 5252-2A78<br />
<br />
	 Directory of [URL=d:Androidtcom.timeinc]d:Androidtcom.timeinc[/URL].si-9<br />
<br />
	15/03/2012  12:07			  .<br />
	15/03/2012  12:07			  ..<br />
	15/03/2012  12:07			 3,157 AndroidManifest.xml<br />
	15/03/2012  12:07				99 apktool.yml<br />
	15/03/2012  12:07			  assets<br />
	15/03/2012  12:07			  res<br />
	15/03/2012  12:07			  smali<br />
				   2 File(s)		  3,256 bytes<br />
				   5 Dir(s)  29,062,762,496 bytes free<br />
<br />
	d:Androidt><br />
6. To address the problem with the aspect ratio, we have to edit one of the smali files:

. Open the MainFrame.smali in notepad:
Code:
<br />
		d:Androidt>notepad com.timeinc.si-9smalicomwoodwingmainframeMainFrame.smali<br />
. Search for the word "width":
Code:
<br />
		.....<br />
		invoke-virtual {v2, v1}, Landroid/view/Display;->getMetrics(Landroid/util/DisplayMetrics;)V<br />
<br />
		const-string v2, "width"<br />
<br />
		iget v3, v1, Landroid/util/DisplayMetrics;->widthPixels:I<br />
		.....<br />
. Replace the line:
Code:
  <br />
	    iget v3, v1, Landroid/util/DisplayMetrics;->widthPixels:I<br />
for:
Code:
  <br />
	    const/16 v3,600<br />
. Save the file and go back to the cmd shell

7. Now, time to repack the apk, run the following command.
Code:
<br />
	d:Androidt>apktool.bat b com.timeinc.si-9 si_mine.apk<br />
	I: Checking whether sources has changed...<br />
	I: Smaling...<br />
	I: Checking whether resources has changed...<br />
	I: Building resources...<br />
	I: Building apk file...<br />
<br />
	d:Androidt><br />
This will create a new "time_mine.apk" android package.

8. You need to sign the package so it can be installed anywhere, for that you need to generate a certificate with some JDK tool:

. Create a certificate (you only need to do this once)
Code:
<br />
		d:Androidt>keytool -genkey -v -keystore my-release-key.keystore -alias myowncert -keyalg RSA -keysize 2048 -validity 1000<br />
		Enter keystore password:<br />
		Re-enter new password:<br />
		What is your first and last name?<br />
		  [Unknown]:  who<br />
		What is the name of your organizational unit?<br />
		  [Unknown]:  cares<br />
		What is the name of your organization?<br />
		  [Unknown]:  asd<br />
		What is the name of your City or Locality?<br />
		  [Unknown]:  asd<br />
		What is the name of your State or Province?<br />
		  [Unknown]:  asd<br />
		What is the two-letter country code for this unit?<br />
		  [Unknown]:  asd<br />
		Is CN=who, OU=cares, O=asd, L=asd, ST=asd, C=asd correct?<br />
		  [no]:  yes<br />
<br />
		Generating 2,048 bit RSA key pair and self-signed certificate (SHA1withRSA) with a validity of 1,000 days<br />
				for: CN=who, OU=cares, O=asd, L=asd, ST=asd, C=asd<br />
		Enter key password for <br />
				(RETURN if same as keystore password):<br />
		[Storing my-release-key.keystore]<br />
<br />
		d:Androidt><br />
. Sign the "time_mine.apk"

Code:
<br />
		d:Androidt>jarsigner -keystore ./my-release-key.keystore si_mine.apk myowncert<br />
		Enter Passphrase for keystore:<br />
<br />
		d:Androidt><br />
9. That's it. Move apk to the TP, uninstall the previous one and install this one. It should show the pictures correctly.

It should work with most of the apps from those guys (Time-Warner)
Sorry but these instructions are not for noobs like me. Is there any way to get idiot proof instructions for people like me?
Thanks again for all the trouble!

Sent from my cm_tenderloin using Tapatalk
 

·
Android Beginner
Joined
·
24 Posts
Discussion Starter · #52 ·
UPDATE
Dubi, I'm almost positive that there is something causing certain applications to not register the Touchpad as a tablet anymore when running this mod.

I installed the Humble Bundle android app, and with your mod installed, it tells me the tablet-only apps are incompatible. When I replace the default SystemUI.apk
and android.policy.jar, it says they are compatible, and lets me download them.
If anyone else knows of an app or way of testing the different areas that an app will check to see if it's on a tablet or a phone, please update this thread.
 

·
Registered
Joined
·
304 Posts
The framework uses the resolution and density to "detect" if its running on a phone or a tablet. That's in the Google code, and it's even in the original CM9
Most apps do the same.
The changes for the WideScreen mode return 600 rather than 768 based on the setting (which is toggle with the ShrinkScreen app)
If is off, it will behave in the same way as if it will do it without the mod.

Now, I don't quite remember what I put in that SystemUI.apk, but I think that was created just to get the mod working on a A2 system.
Anything newer than A2 (nightly build) doesnt need the SystemUI.apk and the change is really minimal.

Why not to update to some of the nighltys? That will allow you to put just the android.policy.jar and the changes there are "on/off" nothing more.
If they are "Off" it will behave exactly the same as the originals
 

·
Registered
Joined
·
148 Posts
UPDATE
Dubi, I'm almost positive that there is something causing certain applications to not register the Touchpad as a tablet anymore when running this mod.

I installed the Humble Bundle android app, and with your mod installed, it tells me the tablet-only apps are incompatible. When I replace the default SystemUI.apk
and android.policy.jar, it says they are compatible, and lets me download them.
If anyone else knows of an app or way of testing the different areas that an app will check to see if it's on a tablet or a phone, please update this thread.
I think that there is some funkiness with that Humble app's detection scheme anyhow. From what others have told me, it doesn't detect the Kindle Fire as a Tablet and I'm not sure whether that is due to the resolution (it's 1024x600 so it shouldn't be) or the OS or what. Anyhow, according to Avadon's developer the app should run on a min resolution of 1024x600 so if you download the apk straight from the url they send you in your Humble order confirmation email and not from the app it should, in theory, work.
 

·
Android Beginner
Joined
·
24 Posts
Discussion Starter · #55 ·
Why not to update to some of the nighltys? That will allow you to put just the android.policy.jar and the changes there are "on/off" nothing more.
If they are "Off" it will behave exactly the same as the originals
Well, I updated to the latest Nightly... and it fixed ALL of the stupid issues i was seeing with your mod. sorry I was such a pain... this is working awesomely now. Keep up the good work!!
 

·
Registered
Joined
·
304 Posts
haven't look at the webos version (I don't use/have a Time subscription) but I believe the black bars at each edge is to mantain the aspect ratio, otherwise it will look strdched
 
41 - 60 of 60 Posts
Top