Screensave while in landscape mode

Search This thread

ajislav

Senior Member
Apr 1, 2011
412
212
Ok, so I used eded's Touch-Formatter (erase NST + install 1.1) http://xdaforums.com/showthread.php?t=1475613 to speed up the process a little
Took me about 2hrs in total..

I installed all the mods via CWM
I guess that's the 2 lessons I learned:
a) CWM is better than working with the live filesystem (especially since I dont use ADB)
b) need to get more SD cards (ideally 3: Noogie, CWM and a regular one for data)

in the end your mods for fine, Renate, thanks again
 

Renate

Recognized Contributor / Inactive Recognized Dev
Time to resurrect this thread.

The 1.2 and 1.2.1 change a few things.
The EpdController stuff is all different.
There is that stupid tag line that it puts at the bottom of your screensaver when sleeping.

I've got my the new patches to work on my Nook.
I'll be releasing a new patching system in a day or two.
It uses a slightly modified scheme from the old one and is more robust.

The new mergesmali.exe works with new smali patches.
(None of this is uploaded yet.)

You do something like this:
  • apktool d
  • mergesmali
  • apktool b
  • adb push
For jars you don't even have to sign.
 

Renate

Recognized Contributor / Inactive Recognized Dev
I'll be releasing a new patching system in a day or two.
Um, did I say day or week?
I got a bit carried away with the new version of mergesmali.
It is more robust and supports lots of error checking.

The procedure for patch developers has changed a bit.
I'll document that in a later post.

The procedure for patch users has changed a bit.
Now you only specify the directory for where the stock smali is, not the whole path of the class file.

If you have been using mergesmali.exe or wish to, please download the new version in the signature.
The requirements and checks on the patches has been made more stringent.

There are 4 new patches for version 1.2 Nook Touch & Nook Glow.
The purpose of the patches is documented in comments at the top of the smali file.

To allow the use of external dictionaries (like Lookup.apk):
Code:
apktool d ReaderRMSDK.apk \Reader
mergesmali /v \Reader\smali ReaderMainView.smali
apktool b \Reader ReaderRMSDK.apk
[i]jarsigner whatever
zipalign[/i]
To fix screensavers and arrow keys when in landscape mode:
Code:
apktool d services.jar \Services
mergesmali /v \Services\smali KeyInputQueue.smali PowerManagerService.smali
apktool b \Services services.jar
To fix the lockscreen when in landscape mode:
Code:
apktool d android.policy.jar \Policy
mergesmali /v \Policy\smali LockScreen.smali
apktool b \Policy android.policy.jar
 

domi.nos

Senior Member
Jan 5, 2011
490
89
Warszawa
Odp: Screensave while in landscape mode

It helps only against that screensaver issue?

Wysłane z mojego GT-I5700 za pomocą Tapatalk 2
 

Renate

Recognized Contributor / Inactive Recognized Dev
I've rolled all the patches for Nook 1.2.1 into a zip.
You can just download the one zip and unzip the patches somewhere.
There is a readme.txt file inside too that documents things.
The individual smali files also have documentation comments at the head.

The modification procedure is still the same as in http://xdaforums.com/showpost.php?p=37386768&postcount=23

Make sure that you have the latest mergesmali.exe and patches from the signature below.
 
  • Like
Reactions: Kramar111
N

NOOK!E

Guest
It's on the mergesmali project page in the signature.

Ah. Thanks.

By the way, when I replaced LockScreen.smali from your zip into my android.policy.jar, repacked the .jar, and replaced it in /system/framework, when I rebooted I got a weird half-bootloop. Fixed it (see below), but I'd like to know what happened there.


I'd made a backup, of course, but not a completely recent one. So instead of doing it the "easy" way (restoring the old backup) and losing my recent data, I got the stock android.policy.jar from the fresh update.zip B&N provides, re-patched it with the DPAD rotator mod (kudos to you for that!), and made a CWM .zip for it. Booted my Nook into CWM (which I have installed on it), installed the .zip from sdcard, rebooted, and boom. Back to regular boot sequence, regular lockscreen, regular usage.

The reason I shared this with you is because I thought you might be happy with me for not taking a "Super Duper Nooter" (those are your own words!) style shortcut to fix an issue, since I know you're an activist in not automating every single thing, as am I.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    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\LockScreen.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.
    2
    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?
    2
    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\PowerManagerService.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.
    2
    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.
    1
    Oh, and if you're tired of dragging to unlock your NOOK™,
    place the extracted files in /res/drawable-mdpi/ inside /system/framework/framework-res.apk

    Just to be clear, this doesn't change the manner of unlocking, just the look.

    (The folks at B&N made the graphics shorter by making the top 30 pixels transparent.
    That was an unnecessary hack, as long as all four graphics are the same height it works fine.)