Post Reply

Screensave while in landscape mode

21st April 2012, 01:13 PM   |  #1  
Renate NST's Avatar
OP Recognized Contributor / Recognized Developer
Boston
Thanks Meter: 807
 
1,995 posts
Join Date:Joined: Feb 2012
If you use applications in landscape mode, you may have noticed this already.
When your Nook sleeps or is sent to sleep your normal portrait screensaver appears rotated, squished and with black borders.
Clearly, the Nook developers never anticipated that people would be using landscape mode.

I have a mod to /system/framework/services.jar to fix this.
If the graphic is either 600 x 800 or 800 x 600 it will put it in the orientation that fits.
If the graphic is 800 x 800 it will put it in the current orientation, centered at a scale of 1:1.

Since a lot of people seem to use a moded system.jar already it would have to be integrated in.

Is there interest in this?
The Following 2 Users Say Thank You to Renate NST For This Useful Post: [ View ]
21st April 2012, 03:53 PM   |  #2  
Member
Thanks Meter: 31
 
51 posts
Join Date:Joined: Mar 2011
I am very interested!!
Can u share your mod?
21st April 2012, 06:15 PM   |  #3  
Renate NST's Avatar
OP Recognized Contributor / Recognized Developer
Boston
Thanks Meter: 807
 
1,995 posts
Join Date:Joined: Feb 2012
Well, with all the modded services.jar and various updates maybe posting the injected smali code?

Or is that too difficult/annoying?
21st April 2012, 08:23 PM   |  #4  
Senior Member
Thanks Meter: 19
 
147 posts
Join Date:Joined: Jan 2012
sounds great! but still I would prefer no-screen-saver mod. i.e. you can see you launcher widgets (calendar, task, time, battery) all the time. These s.s. pictures are quite antiproductive.
21st April 2012, 10:57 PM   |  #5  
Member
Flag Anzali
Thanks Meter: 5
 
37 posts
Join Date:Joined: Dec 2011
More
Renate NST . we are waiting !
22nd April 2012, 12:05 AM   |  #6  
Renate NST's Avatar
OP Recognized Contributor / Recognized Developer
Boston
Thanks Meter: 807
 
1,995 posts
Join Date:Joined: Feb 2012
Ok, here goes. My apologies if this is complicated.
I didn't want to distribute B&N code or presume what mods where already in your services.jar

Code:
adb pull /system/framework/services.jar
apktool d services.jar \Services
Edit \Services\smali\com\android\server\PowerManagerSer vice.smali

parta.txt replaces 3 lines in the original that have to do with parse / move / setImageURI

Delete those lines and insert the file where the .line statements match.

You can leave both the comments in parta.txt and the .line statements there.

partb.txt gets inserted at the end of the file.

Code:
apktool b \Services services.jar
adb push services.jar /system/framework/
You probably want to clear the cache and reboot at that point.
Note: If you are using the standard slide unlock, the image placement code for that is in android.policy.jar
That defaults to portrait orientation. It is not affected by this mod.

Please tell me if this works for you.
Last edited by Renate NST; 23rd April 2012 at 12:55 PM.
The Following 2 Users Say Thank You to Renate NST For This Useful Post: [ View ]
23rd April 2012, 02:34 AM   |  #7  
Member
Thanks Meter: 98
 
69 posts
Join Date:Joined: Jul 2011
This is a nice idea. However, when you use book cover as screensaver via Cool Reader most of them aren't 800x600 images. The B&N default behavior is to resize to fit the screen (keep aspect ratio), but with your mod the picture appears at 1:1 scale (normally cropped). Would this be an easy fix?
23rd April 2012, 03:20 AM   |  #8  
Renate NST's Avatar
OP Recognized Contributor / Recognized Developer
Boston
Thanks Meter: 807
 
1,995 posts
Join Date:Joined: Feb 2012
Quote:
Originally Posted by marspeople

Would this be an easy fix?

Tomorrow.
23rd April 2012, 12:55 PM   |  #9  
Renate NST's Avatar
OP Recognized Contributor / Recognized Developer
Boston
Thanks Meter: 807
 
1,995 posts
Join Date:Joined: Feb 2012
It's tomorrow.

I hope that I covered all the cases because more variants will require user configuration somewhere.
  • If the image is 600 x 800, 800 x 600 or an aspect ratio of 3:4 or 4:3 it will fit exactly.
  • If the image has another aspect ratio it will fit inside with side strips in white.
  • If the image is exactly square it will use the current orientation and overfill the screen.
In all cases the aspect ratio will be preserved and at least one axis will fit exactly.

When the lock screen with the slider pops up the image will not be consistent.
This is because B&N handled the screensaver image there separately.
I will be releasing a mod for android.policy.jar to fix that soon.
(Or you could switch to another screen locker.)

Install procedure same as above.
Last edited by Renate NST; 23rd April 2012 at 05:57 PM.
The Following 2 Users Say Thank You to Renate NST For This Useful Post: [ View ]
23rd April 2012, 06:01 PM   |  #10  
Renate NST's Avatar
OP Recognized Contributor / Recognized Developer
Boston
Thanks Meter: 807
 
1,995 posts
Join Date:Joined: Feb 2012
Ok, here's the one that fixes the lock screen too.

parta.txt and partb.txt are the same as they were.

partc.txt and partd.txt are for LockScreen inside android.policy.jar

Code:
adb pull /system/framework/android.policy.jar
apktool d android.policy.jar \Policy
Edit \Policy\smali\com\android\internal\policy\impl\Loc kScreen.smali

partc.txt replaces the entire updateBackgroundImage method.

partd.txt gets inserted at the end of the file.

Code:
apktool b \Policy android.policy.jar
adb push android.policy.jar /system/framework/
As always, be careful and backup.

(This is also in the readme file.)

Warning: This is only for Nook 1.12 and older, not for Nook 1.2 and newer.
Attached Files
File Type: zip LandMod.zip - [Click for QR Code] (4.2 KB, 31 views)
Last edited by Renate NST; 23rd January 2013 at 12:58 AM.

The Following 3 Users Say Thank You to Renate NST For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Tags
landscape, screensaver
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Nook Touch General by ThreadRank