Hi
I have successfully changed the poweroff image. But I cannot find a instruction how to change the sleep mode and boot images. Is it possible with adb?
Thanks!
Before you venture on, make sure you have a proper backup of your NST!
The boot images are packed into framework-res.apk
Here's a thread about the subject:
http://forum.xda-developers.com/showthread.php?t=1272397
Here's a specific post about modifying framework-res
http://forum.xda-developers.com/showpost.php?p=17882146&postcount=11
Sleep images are handled by the screensaver service.
Here's a thread on the subject:
http://forum.xda-developers.com/showthread.php?t=1286456
Thank you very much for your answer! In the first thread you wrote mounting a partition:
mkdir /data/local/tmp/mnt
mount -o rw -t vfat /dev/block/mmcblk0p1 /data/local/tmp/mnt
ls -l /data/local/tmp/mnt
Can I do this with adb? How can I access these files then? (Im on xp and a noob, sorry )
Thanks.
Here's another thread , and yes, its done through adb.
http://forum.xda-developers.com/showpost.php?p=20069276&postcount=8
Yes, I changed the power off image with that. Worked perfect. But how exactely can I change the boot and sleep images? They seem not included in framework-res.apk.
Thanks for your help!
Would it be something like this?:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb pull /dev/block/mmcblk0p1/charging0.pgm
then change the image and:
Code:
adb shell
mount -o remount,rw -t vfat /dev/block/mmcblk0p1
exit
adb push charging0.pgm /dev/block/mmcblk0p1/
reboot
Gogolo2 said:
Yes, I changed the power off image with that. Worked perfect. But how exactely can I change the boot and sleep images? They seem not included in framework-res.apk
Click to expand...
Click to collapse
Maybe I was a little unclear on the subject.
The first boot image is booting.pgm on the boot partition.
The other images there aren't interesting, the charging ones only gets triggered when your NST is so low on power it cannot boot.
The boot animation after the initial boot image is done by /system/bin/bootanimation and there's not much you can do about that short of writing your own service
The "sleep" images is handled by a screensaver service that pulls the images from a predefined folder. (/system/media/screensaver/*)
Thanks very much!
That means I could change the images in /system/media/screensaver/authors without a problem?
Gogolo2 said:
Thanks very much!
That means I could change the images in /system/media/screensaver/authors without a problem?
Click to expand...
Click to collapse
I haven't tested it, but yeah, I suppose you could
It was no problem changing the images, but: they dont show up. Only black screen. I checked everything, resolution, color depth, file name. Im stuck...
The original ones are fine. I even tried to copy only the image over the original, save - but no luck. As if the original ones had some flag or it looks at the creation date, I dont know.
It tries to show the images: If I have two own images and one original, it shows to times black and one time the original images in sleep mode. Why is that?
Thanks anyway
Connect your Nook to your PC, search for screensavers folder, create a new folder, name it whatever, and put your images there (600x800, grayscale).
Now on the nook settings, on screensaver, select your new folder.....
Sometimes life is that simple....
Thank you very much! Perfect!
ros87 said:
Maybe I was a little unclear on the subject.
The first boot image is booting.pgm on the boot partition.
The other images there aren't interesting, the charging ones only gets triggered when your NST is so low on power it cannot boot.
The boot animation after the initial boot image is done by /system/bin/bootanimation and there's not much you can do about that short of writing your own service
The "sleep" images is handled by a screensaver service that pulls the images from a predefined folder. (/system/media/screensaver/*)
Click to expand...
Click to collapse
You could try doing a boot animation zip like on a normal Android device
Located at:
/data/local/bootanimation.zip
A properly designed boot animation may theoretically work on the NST won't know until someone tries.
Ok, waiting for the first volunteer
Did you unzip?
Did you unzip the archive, replace the files, then zip it? I did this a few times. You can open the archive inside 7zip by just double clicking. Go where you need to, then paste in the new files. Then just push the same file back to the nook. Doing this on 1.1, I got the power off screen to show, and it will boot to the screensaver, but when I unlock it and select a chooser (ADW, home, relauncher), then the screen goes black and I have to restore.
I did not try this. with adb I changed power off screen successfully. Also screensaver works. But first screensaver when starting up isn't working. I think in the startup sequence it doesn't look in the specified folder.
Related
Wanted to get rid of the stock startup animation and sounds here is how I did it.
/system/etc/PowerOn.wav
/system/media/bootsamsung.qmg
/system/media/bootsamsungloop.qmg
I renamed those 3 files and thats all it took, killed the two boot animations and sounds. So now I get the Initial white AT&T screen a long black period followed by the lock screen.
Now if someone would decipher how to manipulate these QMG files. It looks like others have found a way around them possibly ( http://forum.sdx-developers.com/themes/bootanimation-zip-(testers-needed)/ ), not too sure.
Anyone have the stock startup and shutdown animations from the Galaxy S? I want to de-brand this as much as I can.
More data from inside the /system/bin/bootanimation2nd
debug.sf.nobootanimation 0 BootAnimation boot animation disabled %0 80 /data/local/bootanimation.zip /system/media/bootanimation.zip desc.txt descMap is null %d %d %d p %d %d %s images/android-logo-mask.png images/android-logo-shine.png SurfaceFlinger died, exiting... linkToComposerDeath failed (%s)
So it looks like we have some tinkering to do.
ok if you take the bootanimation zip files from the other forum and place them in /system/media and chmod to 644 and chown to root you can launch the bootanimation file in /system/bin remotely with adb and the animation shows on the screen of the phone. So we are on the right path. Rebooting the phone does not cause the animation to play however. Anyone who wants to lend a hand is welcome!
LOCATIONS OF SOUNDS AND ANIMATIONS
Startup sound;
/system/etc/PowerOn.wav
Startup animation;
/system/media/bootsamsung.qmg
/system/media/bootsamsungloop.qmg
/system/bin/bootanimation
/system/bin/bootaniamtion2nd
Shutdown sound;
/system/media/audio/ui/shutdown.ogg
Shutdown video (directory of .pngs);
/system/media/shutdown/
THIS IS WHAT I FOUND ON ANOTHER SIGHT
You can just delete all other files and folder so you only have fx if your bootscreen is placed like this: META-INF and system system> customize> resource>bootanimation.zip
That should be your only files and folders. Of course if you your bootscreen is placed in data/local/bootanimation.zip then that should be your only directories and files
THIS IS HOW I DID IT WHEN I HAD AN ARIA( not sure but seems like it should be same?)
1. Copy the NEW bootanimation.zip of your choice in SDK Folder
2. Open up CMD
3. cd C:\AndroidSDK\tools (or were ever you SDK files are)
4. adb remount
The filesystem is mounted read only. You need to mount it read/write.
5. adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
6. adb push bootanimation.zip /system/media/bootanimation.zip
7. adb push bootanimation.zip /data/local/bootanimation.zip
To return to read only,
8. adb shell mount -o remount,ro -t yaffs2 /dev/block/mtdblock4 /system
9. Reboot and there you go
HOPE this helps
I've renamed some of the files to see if they do anything also executed a few of the BINs.
/system/bin/bootanimation -- Displays "ANDROID" with a shine going across the text. This animation is not seen at any point during boot, renaming the file did nothing.
/system/bin/bootaniamtion2nd -- Displays "ANDROID" in plain android font. This animation is not seen at any point during boot, renaming the file did nothing.
/system/bin/playlogo -- Executing this file (atleast via the adb shell, although it does output "=============> 1" the exits after a few seconds.) did not appear to do anything. Renaming this file did not appear to change anything in the boot process.
/system/bin/playlogos1 -- Executing this file via the adbshell caused the 2 boot videos (not the "AT&T World Phone" BIOS splash image, just the ATT bars with fire balls and the galaxy S animated logo) to play. This cause similar out put to playlogo in the adb shell, except it counted to 5 and never exited. A Ctrl+C in DOS forces the adb shell to quit which causes the bin file to halt execution also.
I'm going to try and open the playlogos1 file and/or try to find a qmg player, we may just have to replace the qmg files to MOD the boot animation.
Some relevant source ( http://github.com/Dieken/SurfaceFli...rks/base/cmds/bootanimation/BootAnimation.cpp ). Its starting to look like the qmg files are raw frame buffer information.
I went through the playlogo and playlogos1 bin files again with bvi (linux app for viewing binary files) one of the legible sections before the part that points to the *.qmg file loads a decoder. The qmg files appear to be Qmage files.
See quramsoft.com/solution_e/qmage.asp
sorry cant post links yet.
kenjindomini said:
I went through the playlogo and playlogos1 bin files again with bvi (linux app for viewing binary files) one of the legible sections before the part that points to the *.qmg file loads a decoder. The qmg files appear to be Qmage files.
See quramsoft.com/solution_e/qmage.asp
sorry cant post links yet.
Click to expand...
Click to collapse
You may have nailed it on the head which is a good find, but unfortunately it looks like we will never be able to edit one of these.
So I take it no one has yet attempted to use a bootanimation.zip like on the Samsung moment http://forum.sdx-developers.com/themes/(how-to)-bootanimation-zip/
I might give this a try later today:
Rename playlogos1 -> playlogos1.orig
find sexy bootanimation.zip on the interwebs and load it into /system/media
I'll report back with my findings, even if they're depressing.
kenjindomini said:
So I take it no one has yet attempted to use a bootanimation.zip like on the Samsung moment http://forum.sdx-developers.com/themes/(how-to)-bootanimation-zip/
I might give this a try later today:
Rename playlogos1 -> playlogos1.orig
find sexy bootanimation.zip on the interwebs and load it into /system/media
I'll report back with my findings, even if they're depressing.
Click to expand...
Click to collapse
Yes I have tried several, and while you can launch them manually they do not trigger on reboot.
Yeah
I even tried to chmod the file in both data/local and system/media to mode 777 and still just a black screen.
Looks like we are waiting for a hacked kernel.
Sent from my SAMSUNG-SGH-I897 using XDA App
kenjindomini said:
Yeah
I even tried to chmod the file in both data/local and system/media to mode 777 and still just a black screen.
Looks like we are waiting for a hacked kernel.
Sent from my SAMSUNG-SGH-I897 using XDA App
Click to expand...
Click to collapse
In the meantime I am looking to see exactly how/where these are being called in the boot process.
Ok since things just didnt seem to be working here is what I did. I renamed the playlogo and playlogos1 file and replaced them respectively with renamed copies of
/system/bin/bootanimation
/system/bin/bootaniamtion2nd
then put a bootanimation.zip in both /system/media and /data/local then when I rebooted I get the plain white at&t screen. followed by a short black screen, and then the bootanimation.zip.
So this works it just has a 7 second or so black screen.
Ok, something weird is happening. I'm trying to rename /system/etc/PowerOn.wav to PowerOn.wav.bak because I have downloaded the Bootsamsung.qmg, Bootsamsungloop.qmg and PowerOn.wav from the I-9000 but every time I rename /system/etc/PowerOn.wav to *.bak using root explorer it says its renamed successfully but then if I do a view refresh, its right back to how it was originally. Same thing if I just go and try to outright delete it, it looks like its deleted until I do a view refresh then its right back there. Like I cant get rid of it at all. Anybody know whats going on??
On another note I copied the Bootsamsung.qmg and bootsamsungloop.qmg from the I-9000 to the folder /system/media and just let it overwrite the orignals. Now the flying att 3G antenna stuff is gone. It goes from the white world phone screen to a black screen then to the Galaxy S animation. But its still playing that super loud whoosh sound because I cant get rid of the original PowerOn.wav file to save my life.
The PowerOn.wav from the I-9000 is 5 seconds long, its the same as the AT&T one except it doesnt have the first two seconds that contains the really loud and annoying "Whoooosh".
I had this problem at first. Make sure you are mounted r/w. If that doesnt work move the file out of the folder. I seem to recall that one file was a pita for me too.
If you get it working let us know!
rahlquist said:
I had this problem at first. Make sure you are mounted r/w. If that doesnt work move the file out of the folder. I seem to recall that one file was a pita for me too.
If you get it working let us know!
Click to expand...
Click to collapse
HaHa, that worked great. Thanks.
I was mounted as r/w in root explorer. I tried renaming and deleting dozens of times with no success, never really thought about move. It let me move it right out of /system/etc. Then I was able to copy in the new PowerOn.wav from my sdcard. Then I could rename the original to PowerOn.wav.bak, then move it back to /system/etc just in case for the future. So now I dont hear that really loud and annoying "whoosh".
Is the /video/shutdown folder with the 60 frames of .pngs the same as the startup animation perhaps played backwards? I'm thinking of making my own custom animation and replacing those files to see how it looks.
rahlquist said:
In the meantime I am looking to see exactly how/where these are being called in the boot process.
Click to expand...
Click to collapse
If you look in the init.rc there is BOOTCLASSPATH line and it lists framework files, they are compiled java code (*.JAR) one of these files or a modified version of the android kernel would be responsible for executing the playlogos1 bin file. playlogos1 is the only file on the of the 4 in that directory that we have talked about that does anything during boot on the captivate. playlogo seems to be remnant from the older samsung androids (E.G the moment). The 2 bootanimation bin files just display the word android in green android style font 1 with a shine and 1 plain.
I've looked through almost every system file and I can think of, there is no reference to the playlogs1 file that can be viewed in plain text. It would be the very first thing to be called soon as linux begins to load. The ATT world phone splash image I would assume, just like on a pc, hides the BIOS/POST output and the boot animation is hiding all of the linux init output. though it does sadden me that renaming the files the play the boot animation does not cause all the boot text to display.
Darkeligos said:
Is the /video/shutdown folder with the 60 frames of .pngs the same as the startup animation perhaps played backwards? I'm thinking of making my own custom animation and replacing those files to see how it looks.
Click to expand...
Click to collapse
This is not the case. the playlogos1 bin file, the file responsible for launching the boot animation, loads a QMAGE decoder before loading the 2 *.QMG files. If look back to my previous post on the first page there is a link to the developer of QMAGE and its a compressed library of images that get decompressed on-the-fly.
@the guy with the I9000 boot animations and audio, Dude where did you get those? i9000 forum? link us? Attach here? Please?
kenjindomini said:
@the guy with the I9000 boot animations and audio, Dude where did you get those? i9000 forum? link us? Attach here? Please?
Click to expand...
Click to collapse
Yes, this needs to be mandatory - if you've got something good working that gets rid of the AT&T JUNK sounds and animation, then you gotta attach them on this thread and tell us the steps you took to get it going! Thanks in advance!
Hey guys.. if you like the new boot animation from Motorola XOOM, i've sort of ported it to Milestone/DROID
in fact i just modded the desc.txt resolution settings.. but it seem working pretty well
so, here you go
if you don't know how to deal with bootanimations, feel free to ask
EDIT: use sileshn's version.. this is actually portrait mode animation, not fullscreen
do i just flash this in clockwork mod recovery?
i tried, i have cm7
and it didnt take (cm7 boot screen still showing)
Landscape mode
The same bootanimation in landscape mode.
much better if you add preview here
tylerwatt12 said:
do i just flash this in clockwork mod recovery?
i tried, i have cm7
and it didnt take (cm7 boot screen still showing)
Click to expand...
Click to collapse
Just use rootexplorer to replace your existing bootanimation.zip. It should either be in /system/media or /data/local. If there is no bootanimation.zip in either directories, just place the downloaded file to /data/local.
edit : Just checked. In CM7, the bootanimation file is in /system/media.
tegezan said:
much better if you add preview here
Click to expand...
Click to collapse
http://www.youtube.com/watch?v=p8stGDoW-ZY
Better option, download the attached zip file, inside there is a mp4 file, make in run in your media player with automatic repeat.
Edit: looks much better on phone than the preview.
well... landscape animation look better for me....
Landscape mode
Aarght.. sorry guys, i thougt it'd be already in landscape. i actually tried playing it in terminal only and that somehow happened to be in landscape..probably 'cause i had my hw keyboard open
so, feel free to use sileshn's version
Hello.
I can't replace the files in /system/media...
To do this i need adb)
Sent from my Milestone using XDA App
hi... what tools that i need to make or edit bootanimation.zip...?
coz i realize there one picture in landscape animation hv wrong rotation..?
thx..
tegezan said:
hi... what tools that i need to make or edit bootanimation.zip...?
coz i realize there one picture in landscape animation hv wrong rotation..?
thx..
Click to expand...
Click to collapse
unzip the contents. The file is the part0 directory. Correct the image using any image editor and rezip it ( including desc.txt ), dont use any compression ( very important ).
marcelotorres said:
Hello.
I can't replace the files in /system/media...
To do this i need adb)
Sent from my Milestone using XDA App
Click to expand...
Click to collapse
you have to remount the /system partition as read/write in order to be able to rewrite the old one..
you can do it in Terminal Emulator..this will to the trick:
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock6 /system
nice boot animations
can have it in Live Wallpaper
I really like that honeycomb animation.
Very cool.
The only issue I would have is that it would be hard to tell if you are getting a boot loop or if it's just taking a long time to boot.
I attached one that I made which includes an "intro" to the honeycomb animation - the milestone bios/boot animation that I'm sure most of you have seen.
Edit: See post 18 below for an updated version.
Astrowe said:
you have to remount the /system partition as read/write in order to be able to rewrite the old one..
you can do it in Terminal Emulator..this will to the trick:
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock6 /system
Click to expand...
Click to collapse
If his method doesn't work, try this..
I've done a few boot animations this way.. put the bootanimation.zip on the root of your SD card (make sure it's named bootanimation.zip if you're using windows, just right click the file and "Rename". don't put .zip at the end, Windows does that for you. Not sure about Macs..), and go into Terminal Emulator (you can download one from the Market for free) and type the following, hitting enter after each line:
su
cp /sdcard/bootanimation.zip /data/local/
reboot
note that when you hit enter after the 2nd line, it may take a few secons before you get the # sign again. once you see it, type reboot and enter. and you're all set!
zeppelinrox said:
I really like that honeycomb animation.
Very cool.
The only issue I would have is that it would be hard to tell if you are getting a boot loop or if it's just taking a long time to boot.
I attached one that I made which includes an "intro" to the honeycomb animation - the milestone bios/boot animation that I'm sure most of you have seen.
Click to expand...
Click to collapse
should i rename file to work it ?
Yeah it has to be named bootanimation.zip
I always give downloaded animations descriptive names so I can tell what it is just by looking at it.
Usually, I make a copy, rename the copy, and install that.
btw I noticed a stray frame that caused a stutter so I redid it.
I also noticed that the animation was too slow at 10 fps so I sped it up a bit....
It was 10 fps because that's what the original bios animation was set at.
I bumped it up to 20.
thanks friend
very beautiful.
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?
I am very interested!!
Can u share your mod?
Well, with all the modded services.jar and various updates maybe posting the injected smali code?
Or is that too difficult/annoying?
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.
Renate NST . we are waiting !
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.
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?
marspeople said:
Would this be an easy fix?
Click to expand...
Click to collapse
Tomorrow.
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.
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.
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.)
signing / alternative to adb push
Renate,
thank you for the mods. The rotated screensaver has been irritating me for some time ;-) And I intend to put my email instead of the "slide to unlock" text..
Just 2 questions, before I do so:
1) do I need to sign the modified .jar/.apk files?
2) As I do not have ADB installed, I intend to change the files from a command line over ssh (i.e. copy, chown, chmod). My understanding is that this should be equivalend to adb push. Is this so?
Cheers
ajislav said:
1) do I need to sign the modified .jar/.apk files?
Click to expand...
Click to collapse
"Badges? Badges? We don't need no stinkin' badges."
No, if you copy in anything directly you bypass all the signing stuff.
How you get the files over is however you like.
Bootloop
Hi,
I tried to do both changes (screensaver, slider) but since the recompilation of services.jar and android.policy.jar was giving me errors (see below), I decided to go with replacing framework-res.apk
what I did was
ssh into my nook
Code:
cd /system/framework/
mount -o remount,rw /dev/block/mmcblk0p5 /system
#copy the new framework into target dir
cp /sdcard/download/framework-res.apk ./framework-res.apk.new
#fix permissions
chmod 644 framework-res.apk.new
#make a backup
cp framework-res.apk framework-res.apk.old
#replace the file
cp framework-res.apk.new framework-res.apk
now at that moment I got the bootloop screen.. however ssh was still working, so I run the following line to restore the framework:
Code:
cp framework-res.apk.old framework-res.apk
and rebooted.. I am getting bootloops ever since..
I can boot to CWM. so I tried both what I should have done in the first place, i.e. replace the file in CWM
I tried this
http://forum.xda-developers.com/showpost.php?p=24728342&postcount=22
(fixes permissions)
and this
http://forum.xda-developers.com/showpost.php?p=23607664&postcount=11
(restores the old framework and fixes permissions)
but none seem to work... still the same bootloop (nook by B&N and 5 dots going from Left to Right)..
any ideas? I'd rather not go all the way to factory restore
p.s. I also tried wiping cache and dalvik-cache in CWM.. could this cause any problems?
p.p.s. the errors I got with recompiling the jars are:
Code:
>apktool b .\Services2 services.jar
I: Checking whether sources has changed...
W: Could not find resources
I: Building apk file...
is the "Could not find resources" normal?
Let's take the easy one first.
Compiling the jars will return "No resources found", because they are just jars.
You should always check to make sure that the output is about the same size as the original.
It may be a bit bigger or smaller depending on the vagaries of compression.
Now the toughie.
Hot-swapping jars is a bit risky.
In the best of all worlds, you'd like to swap them when they are not being used.
Swapping framework-res.apk could make it crash when something can't find a resource,
but it's not code and generally if you leave the Nook sitting it won't try to access anything.
If all you did was replace one file and now you replaced it back it should be working.
I don't know how you are getting a ssh into the Nook.
I've got no port 22 or 23 open.
Hi Renate,
Compiling the jars will return "No resources found", because they are just jars.
You should always check to make sure that the output is about the same size as the original.
It may be a bit bigger or smaller depending on the vagaries of compression.
Click to expand...
Click to collapse
I did this, of course. The files are generally sightly smaller, in the case of framework-res.apk the change is relatively big: from 2,897,726 to 2,381,970 (but I am not worried about this as I get a similar size decrease even during simple decompile/recompile)
Swapping framework-res.apk could make it crash when something can't find a resource,
but it's not code and generally if you leave the Nook sitting it won't try to access anything.
If all you did was replace one file and now you replaced it back it should be working.
Click to expand...
Click to collapse
I know, and I totally agree with you!
My conclusion is that something got corrupted..
I tried removing the apk.old and apk.new files via CWM (to make sure they are not in the way)
I also tried running e2fsck -p /dev/block/mmcblk0p5 via CMW (from http://forum.xda-developers.com/showpost.php?p=21915065&postcount=59 )
.. but still the same bootloop.
Is there any way to see some logs of the failed boots?
Since I did not make a backup just before doing this change (and I know you had adviced to do so ), the only thing which I can think of now is
a) create a backup with noogie
b) mount the image and check what is actually in /system
unfortunately, I do not have access to linux so this would be kind of pain (my old laptop with WinXPSP3 is the main reason, why I dont have ADB..)
And I am not sure if this is not more complicated than reinstalling everything from scratch..
Thanks for your help, I'll probably give it a day's rest and then do the factory reset..
I don't know how you are getting a ssh into the Nook.
I've got no port 22 or 23 open.
Click to expand...
Click to collapse
I have droidSSHd installed and am able to connect easily with Putty.
Have you already tried to look at dmesg? logcat?
I am not sure how to do this (dmesg, logcat)
I was probably unclear about the ssh - I WAS able to ssh in when Nook was booting normally. Now I cannot.
Is there any way to do this from CWM? (I mean dmesg, logcat)
I was wondering how you were in a boot loop and managed to ssh.
Code:
# dmesg
.....
# logcat
.....
If you don't have a shell this is not going to do you any good.
I used noogie to get an img which I then mounted (using OSFMount and Ext2IFS) under windows..
looking at the /system partition, I see that
- my .old and .new files are gone
- the correct framework-res.apk is in place
i.e. the CWM scripts I have run did their job correctly.. so they have effectively undone any changes that I have made.. so the nook should boot up without any problems
weird....
so I guess my only options are
- restore my pre-root backup
- factory reset
Forgive me if I have a gross misunderstanding about the hardware in the NST, but in my eyes it should be possible for the Nook to sleep but retain the screen, perhaps with a small banner indicating it's in sleep state and you need to press the 'n' to wake. It just seems silly having the benefit of an e-ink display only for the screensaver to kick it when it sleeps. If it didn't do this, I could (for example) leave a map open in OsmAnd and refer to it still while the Nook is sleeping. The only 'solutions' to this I've found involved plain and simply keeping the Nook awake! A hack I can think of would be to somehow bodge something together to take a screenshot just before the nook sleeps and set it as the screensaver image. Seems silly though... I've had a search around and can't find anything related to this specifically, more either people wanting to keep the nook awake or disable the slide to unlock.
Any thoughts welcome!
I had the exact same thought,
so I'm making an app that takes a screenshot every 1:50 minutes and saves it at a screensaver,
to be displayed when the nook goes to sleep.
hopefully it will be ready this weekend so stay tuned
It should be be simple enough.
Modify /system/framework/android.policy.jar
The class is com.android.internal.policy.impl.LockScreen
What puts up the "screensaver" is updateBackgroundImage()
The layout is in /system/framework/framework-res.apk,
res/layout/keyguard_screen_gossamer_unlock.xml
I'm not sure if changing the layout to transparent and not updating the image should be enough.
Renate NST said:
It should be be simple enough.
Modify /system/framework/android.policy.jar
The class is com.android.internal.policy.impl.LockScreen
What puts up the "screensaver" is updateBackgroundImage()
The layout is in /system/framework/framework-res.apk,
res/layout/keyguard_screen_gossamer_unlock.xml
I'm not sure if changing the layout to transparent and not updating the image should be enough.
Click to expand...
Click to collapse
Oh I wish you would have said that two days ago...
It seems a far better solution than my app, maybe I'll try playing with that later.
I tried replacing updateBackgroundImage()
with a stub, but the screensaver still comes up as usual,
Only difference is the "slide to unlock" screen now has black background, so that's what this function is doing.
Time for plan B (or C, really):
If I were to modify framework-res.apk as you suggest, Will I need to resign the whole system, as here?
Update -
The function that sets the screensaver is createScreensaver(), in class com.android.server.PowerManagerService, found in /system/framework/services.jar
I modified it to make the screensaver invisible, but unfortunately it also means there's no indication that the nook sleeps.
Anyway, it's better than constantly taking screenshots, so I'll stick with that.
nivieru said:
Update -
The function that sets the screensaver is createScreensaver(), in class com.android.server.PowerManagerService, found in /system/framework/services.jar
I modified it to make the screensaver invisible, but unfortunately it also means there's no indication that the nook sleeps.
Anyway, it's better than constantly taking screenshots, so I'll stick with that.
Click to expand...
Click to collapse
How did you do that? I'm using the screenshot sreensaver app for that and I find it very useful. But the above mentioned way seems to be less power consuming. Could you explain it for somebody with very little knowledge about manipulating apk, though I know how to manipulate apk with xdaAutotool.
I don't know xdaAutotool, I use apktool but you can probably use whatever tool you like.
First you need a patched /system/framework/services.jar
the one I attached here is for firmware 1.2.1 rooted with NookManager, so it also includes the NookManager patches.
if this is your setup as well, skip to 4
if you run a different firmware or don't want the NookManager patches you will need to patch it yourself
patching /system/framework/services.jar - some vauge instructions:
you will need apktool (or XdaAutotool or whatever) and the android-sdk.
1) use apktool to decompile services.jar
2) modify createScreensaver() in file smali/com/android/server/PowerManagerService.smali according to the attached patch-services.txt
notice - this patch is for firmware 1.2.1 with NookManager patches, it might not be ready for use with other versions - not only the line numbers, also the register v6 might not be a good choice if it is used later in the code without being assigned a new value first.
3) recompile with apktool.
replacing services.jar with patched version - complete instructions:
4) making a full backup before messing with the system is good practice, although the nook is notoriously hard to brick.
you could use NookManager to do the backup.
5) connect to your device with adb
6) apply these commands:
Code:
adb push pathced-services.jar /media
adb shell stop
adb shell mount -o remount,rw /dev/block/mmcblk0p5 /system
adb shell cp /system/framework/services.jar /system/framework/services.jar.backup
adb shell cp /media/pathced-services.jar /system/framework/services.jar
adb shell chmod 644 /system/framework/services.jar
adb shell reboot
7) relax, first boot takes a few minutes, this is normal.
with this patch the screensaver is invisible, so there is no indication at all that the device is asleep.
also, there's no magic button to change behavior - if you want to the screensaver back you need to replace services.jar with original version
Thanks for that extensive description. I'll try the next days to implement it in my system which differs from yours, since I'm using the custom rom from pinguy1982.
Got it.
I compared your PowerManagerService.smali with the one in my services.jar and made the changes.
Recompiled the services.jar.
Exchanged the original classes.dex with the new compiled classes.dex in 7zip.
Signed the jar file.
Had a lot of problems with adb, which didn't recognize my device.
Lost my temper, packed it into a ZIP-file and replaced it via CWM.
Everything is working now. Thanks!
nhedgehog said:
Got it.
I compared your PowerManagerService.smali with the one in my services.jar and made the changes.
Recompiled the services.jar.
Exchanged the original classes.dex with the new compiled classes.dex in 7zip.
Signed the jar file.
Had a lot of problems with adb, which didn't recognize my device.
Lost my temper, packed it into a ZIP-file and replaced it via CWM.
Everything is working now. Thanks!
Click to expand...
Click to collapse
Hi @nhedgehog
I also use the custom rom from pinguy1982.
Can you share your zip file to flash with CWM
Thanks
tebra said:
Hi @nhedgehog
I also use the custom rom from pinguy1982.
Can you share your zip file to flash with CWM
Click to expand...
Click to collapse
Here you are:
Patch (nivieru's method) via ZIP, tested only with modded ROM from pinguy1982 and installed Nooter-Part1.zip. Install via CWM, to be safe make a backup before you do the patch.
Services-org.zip=original services.jar
Services-patch.zip=patched services.jar
Hi everyone!
I've patched the jar and now enjoy the last image in sleep mode. But, I'd like to wake app the Nook every few hours, update the page in dolphin and go back sleep. Page in dolphin has a meta refresh. But I can't wake up the Nook on interval. Is it impossible or I missing smth very important on this topic?
If anybody has some experience on topic, please comment.
Update, my solution:
Re-signed the system with personal cert and implemented an app instead of dolphin+web page.
App wakes up every few hours, updates view and throws device to deep sleep. Hope to get an uptime up to 10-15 days.
nivieru said:
I
replacing services.jar with patched version - complete instructions:
4) making a full backup before messing with the system is good practice, although the nook is notoriously hard to brick.
you could use NookManager to do the backup.
5) connect to your device with adb
6) apply these commands:
Code:
adb push pathced-services.jar /media
adb shell stop
adb shell mount -o remount,rw /dev/block/mmcblk0p5 /system
adb shell cp /system/framework/services.jar /system/framework/services.jar.backup
adb shell cp /media/pathced-services.jar /system/framework/services.jar
adb shell chmod 644 /system/framework/services.jar
adb shell reboot
7) relax, first boot takes a few minutes, this is normal.
with this patch the screensaver is invisible, so there is no indication at all that the device is asleep.
also, there's no magic button to change behavior - if you want to the screensaver back you need to replace services.jar with original version
Click to expand...
Click to collapse
I've done exactly as described in points 4-7 on NST firmware 1.2.1 , rooted with Nook Manager.
I used Root explorer for replacement and rename of patched-services.jar.
After rebooting of NST, it works as intended - the screensaver is unseen, but it appears other problem.
When i click at random .apk, nothing happens, only the screen is flickering once and that's all.
I cannot install apk-s, nor uninstall them....? WTF ?
Someone with explanation...?
gsms said:
I've done exactly as described in points 4-7 on NST firmware 1.2.1 , rooted with Nook Manager.
I used Root explorer for replacement and rename of patched-services.jar.
After rebooting of NST, it works as intended - the screensaver is unseen, but it appears other problem.
When i click at random .apk, nothing happens, only the screen is flickering once and that's all.
I cannot install apk-s, nor uninstall them....? WTF ?
Someone with explanation...?
Click to expand...
Click to collapse
Replacing services.jar while the android system is running can cause problems, that's why I suggest doing it through adb after issuing the "stop" command, which stops android while leaving the underlying linux (with adb) running.
You should try that and see if it helps.
I will try, but before that another question from me.
Is there a chance the file "patched-services.jar" to be remade as .zip file and installed thru CWM.
If this can be done, i will be glad somebody to share the .zip file, because i think it is more comfortable for installation than using adb shell....
thanks
P.S. Adb don't work correctly for me, so the only available option is obviously flashable .zip file...
...
Has anyone tried this with FW 1.2.2 yet?
jptiger said:
Has anyone tried this with FW 1.2.2 yet?
Click to expand...
Click to collapse
If the original services.jar was patched, it will break NTMM since that relies on patches. But if you can discern what the additional patches are you could patch the 1.2.2 file used in NookManager.
Edit: but if you just want to see how it might work, you can probably use the 1.2.1 jar without any problems. When I first started working on the update to NookManager I used the original 1.2.0 jars that were provided with FW 1.2.2 and saw no evidence of problems. A diff showed very minor changes. Depending on how extensive the patching is for this mod, it might be easier--if you still want the use of NTMM--to patch the file in post #8 for NTMM since the patches are well documented on github. Otherwise you have a lot of diffs to look at and sort out.
Hello,
So I'm having an issue with replacing the default boot animation. Of course i want to have the McLaren boot animation but for some reason I can't flash it. By flash it i used the first app that comes up as custom bootanimation. I can flash others but when i tried the mclaren one it just didn't work... any help?
Did you try through Magisk?
AmonRatMC said:
Hello,
So I'm having an issue with replacing the default boot animation. Of course i want to have the McLaren boot animation but for some reason I can't flash it. By flash it i used the first app that comes up as custom bootanimation. I can flash others but when i tried the mclaren one it just didn't work... any help?
Click to expand...
Click to collapse
I`m also having problems replacing it. I keep getting not enough space error when trying to copy to boot animation.
AmonRatMC said:
Hello,
So I'm having an issue with replacing the default boot animation. Of course i want to have the McLaren boot animation but for some reason I can't flash it. By flash it i used the first app that comes up as custom bootanimation. I can flash others but when i tried the mclaren one it just didn't work... any help?
Click to expand...
Click to collapse
Try this:
Name animation zip bootanimation.zip, then,
copy it go to root>system >media and paste the zip file.*
Change permission of bootanimation.zip to 644
Pro tip, before doing this, rename current animation bootanimation.bak
AmonRatMC said:
Hello,
So I'm having an issue with replacing the default boot animation. Of course i want to have the McLaren boot animation but for some reason I can't flash it. By flash it i used the first app that comes up as custom bootanimation. I can flash others but when i tried the mclaren one it just didn't work... any help?
Click to expand...
Click to collapse
Here's some things I noticed using adb shell and plain linux commands: (info: op6t, 9.0.14, no-limits 7.1a, ...)
- "df - h" shows /system as having no free space on mine now in 9.0.14, and I do get an ut of space: error if I do a "mv /sdcard/bootanimation.zip /system/media/bootanimation.zip"
- mount -o remount,rw /system seems to work OK and I can copy small other files to /system/media after I makes space by deleting a big font file in /system/media/fonts.
- Even if I successfully copy the bootanimation file I really want using either my own shell way or No-Limits selection of the zip file I put in ./xXx folder, there is no boot animation.
- Only little bootanimation.zip files like the pixel2 one work for me.
So -- something changed inside 9.0.14 having to do with /system/media (or /system) but I'm not able to see it yet. Maybe someone else can shed more light. And: After doing the things above, I just switched back to bootanimation.zip for pixel2 using both shell commands and also @xXx's profile and it worked fine.
Last note: Having no bootanimation.zip really speeds up the boot (seems pretty logical lol). I had no idea how much quicker it made it and now I like that best but I don't boot that often.
Oh yeah: I did remember to do a chmod 644 on all the tests for the bootanimation.zip file and change /system back to ro mode, so it's not that.
hachamacha said:
Here's some things I noticed using adb shell and plain linux commands: (info: op6t, 9.0.14, no-limits 7.1a, ...)
- "df - h" shows /system as having no free space on mine now in 9.0.14, and I do get an ut of space: error if I do a "mv /sdcard/bootanimation.zip /system/media/bootanimation.zip"
- mount -o remount,rw /system seems to work OK and I can copy small other files to /system/media after I makes space by deleting a big font file in /system/media/fonts.
- Even if I successfully copy the bootanimation file I really want using either my own shell way or No-Limits selection of the zip file I put in ./xXx folder, there is no boot animation.
- Only little bootanimation.zip files like the pixel2 one work for me.
So -- something changed inside 9.0.14 having to do with /system/media (or /system) but I'm not able to see it yet. Maybe someone else can shed more light. And: After doing the things above, I just switched back to bootanimation.zip for pixel2 using both shell commands and also @xXx's profile and it worked fine.
Last note: Having no bootanimation.zip really speeds up the boot (seems pretty logical lol). I had no idea how much quicker it made it and now I like that best but I don't boot that often.
Oh yeah: I did remember to do a chmod 644 on all the tests for the bootanimation.zip file and change /system back to ro mode, so it's not that.
Click to expand...
Click to collapse
I can confirm your findings, I deleted the stock bootanimation to see if I can put it back, thinking it is some kind of permission issue. But it works, so you can change the bootanimation, but only with comparable file sizes with the original ~12MB. I was trying to put the watch dogs animation which is quite large, around 45MB. If anybody can shed some light on why the sudden decrease in system space, it would be great. I mean you could delete ringtones, fonts etc., but I would rather not honestly.
I noticed too a decrease of space available on system after 9.0.14, mine is only over 5 mb free space.
hachamacha said:
Here's some things I noticed using adb shell and plain linux commands: (info: op6t, 9.0.14, no-limits 7.1a, ...)
- "df - h" shows /system as having no free space on mine now in 9.0.14, and I do get an ut of space: error if I do a "mv /sdcard/bootanimation.zip /system/media/bootanimation.zip"
- mount -o remount,rw /system seems to work OK and I can copy small other files to /system/media after I makes space by deleting a big font file in /system/media/fonts.
- Even if I successfully copy the bootanimation file I really want using either my own shell way or No-Limits selection of the zip file I put in ./xXx folder, there is no boot animation.
- Only little bootanimation.zip files like the pixel2 one work for me.
So -- something changed inside 9.0.14 having to do with /system/media (or /system) but I'm not able to see it yet. Maybe someone else can shed more light. And: After doing the things above, I just switched back to bootanimation.zip for pixel2 using both shell commands and also @xXx's profile and it worked fine.
Last note: Having no bootanimation.zip really speeds up the boot (seems pretty logical lol). I had no idea how much quicker it made it and now I like that best but I don't boot that often.
Oh yeah: I did remember to do a chmod 644 on all the tests for the bootanimation.zip file and change /system back to ro mode, so it's not that.
Click to expand...
Click to collapse
I can confirm the size problem.
Had the same issue when I wanted to replace the bootanimation zip file with one that was about 13MB.
Under System/app/ I deleted the default YouTube.apk which was about 64MB and replaced it with one from ApkMirror (dated May 2019) with is 32MB in size.
Everything is working fine and now I have around 23MB of free space on the system partition.
FLH_Sky said:
I can confirm the size problem.
Had the same issue when I wanted to replace the bootanimation zip file with one that was about 13MB.
Under System/app/ I deleted the default YouTube.apk which was about 64MB and replaced it with one from ApkMirror (dated May 2019) with is 32MB in size.
Everything is working fine and now I have around 23MB of free space on the system partition.
Click to expand...
Click to collapse
I think I mentioned ^^ that I'd deleted a huge unused font file from /system/fonts and now have ~40MB free on /system. That pretty well cleaned things up for me, but thanks for letting us know. I think it took at least 2 reboots after I cleaned off the font file before the free space registered in the 'explorers' (I was using root explorer to look) and then all the boot animations were working again.
It's tempting to do an issue report over at OP's bug site, but I'm not sure it's a bug yet. I never know what their intent was or if they just screwed up.