Help Understanding Boot/Shutdown Animations - One (M8) General

This is not a guide, a how-to, or help request thread, specifically. I am looking for any new info regarding how the stock boot animation is formatted and called by the system in my new HTC One M8. I am also familiar with creating boot animations, and am willing to share any information I can in exchange, so I encourage all discussion on the subject.
I've been doing animations for a few years for my old phone and those of others. I've never dealt with an HTC phone or KitKat, personally, so that is probably where I need the most help. I know the desc.txt basics and have familiarized myself with the addition of a few new details, with the newer versions of Android. My other sources for understanding boot animations and the desc.txt are here and here, along with my own knowledge from experimenting on my phones. Here's some observations that I've made with my new Verizon HTC M8, as well as questions regarding what I can't yet understand. My important questions are in red below, if you are anxious to help, but don't want to read all the crap. Answers are in green.
Installation - Boot Animation: Part 1
There are stock hTC_bootup_one.zip and hTC_downanimation.zip in /system/customize/resource. I am familiar with this location from dealing with others' phones. There is also a vzw_bootup.zip, which is basically Verizon's logo added to the HTC animation. When I made my first new boot animation for this phone, it was standard for me, except I was making it x1280 px, to scale up to the new 1080x1920 screen. I don't want to play along and rename my animations, so I first placed my bootanimation.zip in /system/media and it played just fine. My next step was to add sound, which required that I learn about the /system/customize/CID/default.xml. I moved the animation to /system/customize/resource, along with the sound (mp3|ogg works fine), and the /sys.../cus.../CID/default.xml was used to point to both files, without having to replace the stock animation. At this point, everything was working great, and despite new hurdles, I hadn't had any issues... yet!
Installation - Shutdown Animation: Part 1
I researched to understand the particulars about a shutdown animation, and made my first, about 7s in length, and named it downanimation.zip, and it played fine from /system/customize/resource, along with my boot animation and sound. I am really enjoying my phone at this point, and loving s-off, root, custom splash screen, etc., all within a couple of weeks of purchase. My last phone was the original Moto Droid, so unlocked bootloaders and root is all I know. I'm a spoiled brat, really. I have more on this subject coming up as well, so stick around.
Adding Sound to Shutdown Animation
I've made numerous boot animations for my old phone with sound. You know I'm itching to have audio on my shutdown animation, too. The first step is the desc.txt edit, obviously. Check. Then I placed it in the same location as the bootani+sound, but it wouldn't play the downani audio, whether I put them (downanimation+audio) in /system/media, /data/local, or placed just the audio in /system/media/audio/notifications or etc. With each move, I edited the default.xml to point to the audio file's location and each time I was met with a silent animation or even black screen. At this point, I conceded some research was in order. I knew I'd seen enough to know it was possible to have a shutdown animation with sound, but I didn't read the details until I had no other options. First question(s), is it true, as it has become apparent to me, that it is not possible to add sound to a shutdown animation without major modification (e.g., by merely adding a path to audio in the /system/customize/CID/default.xml, as works with the boot animation)? (nope, not true--see next Q) If it is possible, how? (answered by Pacattack, here) I have seen some sort of mods before, to add audio to shutdown animation, but I think it played .mp4, rather than being in a standard format.
Installation - Boot & Shutdown Animations: Part 2
There's a few simple steps I haven't tried yet, when it comes to installing a boot/shutdown animation, on this phone, that might clear up other issues.
Primarily, I haven't replaced the stock animations by name, hTC_bootup_one.zip and hTC_downanimation.zip. At first, I simply wanted to retain the stock animations in place, without renaming, plus I wanted to keep the "bootanimation.zip" I've used for years. Despite my stubbornness, I know this could help avoid issues. Foremost, this requires no editing of the /system/customize/CID/default.xml. Modifying this file from the phone can lead to easy errors, of which I've performed many, and many of which result in black screens, AOSP Android boot animation, or a simple "shutting down" text notification. If modifying this file, I recommend edits made next to a backup with a text comparison editor, like WinMerge, to be able to verify the only edits are the intended ones. Does anyone know an easy way to modify the default.xml file from a computer? I'm thinking Linux users probably use cli txt editors via adb session? Maybe busybox/vi after adb shell? What other proven benefits or limitations does this have over naming animations the standard bootanimation.zip and downanimation.zip?
I also haven't tried using PNG files, as opposed to JPGs. I figured out JPGs worked just fine, when working on my first animation, weeks after I got my first Android phone. It provides for much smaller animations, which was crucial with my old phone, and I still don't want to let go of that. That said, is this the key to more stable boot or down animations? I ran into a key issue when working on my shutdown animation. On my first try, I used 720x1280 frames, and used the desc.txt to scale it up to 1080x1920, the same as my boot animation. However, it refused to scale it up, leaving a 720x1280 animation playing in the top left corner, with unused space (360 px on the right and 640 px on the botton.) surrounding. Perhaps, just on the down animation, scaling might work with PNG, which require less decoding than JPG? I'm guessing not. Even though the ShutdownConfiguration section of the default.xml requires image_png="/path/to/downanimation.zip," JPGs work just fine.
I have tried modifying the ShutdownConfiguration section to say "image_jpg=" and (to match BootConfiguration section) "animation=" (can't remember if I tried "downanimation=") without success. I also mentioned above, I tried to add "audio="/path/to/audio.mp3|ogg" without success. Other failures include removing the path, leaving only the filename, and removing the entire BootConfiguration and ShutdownConfiguration sections, which I thought I saw in use on a custom rom for another device.
If I remember right, I used to install my animations on my Droid, from recovery, mounting /system rw and using adb to move and set permissions, avoiding the failed shutdowns/restarts and having to clear dalvik/cache. I don't remember the reasons exactly, but I've encountered numerous black-screens and quick starts when modifying the default.xml or replacing the animations, despite setting permissions, and when using archives that I know are formatted properly and worked before testing my latest creation. This is followed by entries made to the /system/dirty_file_record, which I don't remember having to bear before. I think I've read mounting system and/or sdcard, while in recovery, and interfacing with adb is not yet possible? Anyone know differently?
What has changed with KitKat?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
What wizardry is this?
When looking inside the stock animations, with RE, you can see the android folder is listed twice, with different timestamps. The contents are identical, and only one folder is visible when viewed on my pc. Is this Linux-related? Is this a bug in RE? Is this something unique to HTC's modifications? Is this somehow a feature of KitKat enhancements? The vzw_bootup.zip does not have this. The desc.txt for the hTC_bootup_one.zip doesn't offer any clues with its familiar formatting:
Code:
1080 1920 20
c 1 60 android
Looking at the desc.txt inside vzw_bootup.zip animation shows possibly a new feature I'm not familiar with:
Code:
1080 1920 15
c 1 1 android
c 1 1 vzw
n 999 1 progress
My best source thus far to explain the desc.txt has indicated,
Jelly Bean (4.1.*) did bring a few small changes. Up til now the first character of an animation section (ie. a "part") line had to be the "p" letter. From now on it can be any letter. If it's a "c", then the given part will be played (at least once) to it's end despite of the state of the boot process. If it's not a "c", then it'll behave like it did in earlier versions with the "p" letter ... i.e. it'll stop the animation when the boot process finishes.
Click to expand...
Click to collapse
That means the "n" should play like a "p" has in the past, but why use "n"? Obviously, stated to play only 999 times, they are scared of an infinite loop (0), but why not "p"? Does "n" utilize a new KitKat feature?
Another point I want to understand, with all of the stock animations, they've abandoned the use of "p" in favor of "c," I assume, because they don't want to risk your phone starting before you get to witness the beauty of their logos. Why do all parts pause/hold on at least one frame? Is this a design thing, to guarantee seemless play between parts, i.e., pause on last frame while the next part is found? I've never seen a black screen creep in-between parts, but then I've never use a white background on an animation.
I first wondered if this might also act to "kill" the part after a pause, as in pause for x number of frames, then move on or exit. Backstory: If you view your animation from your phone by opening Terminal Emulator and typing "bootanimation," your boot animation will play, in full, without rebooting your phone. Yay! I used to do this with my Droid. Oh wait, no, don't do that! The animation will pause on the final frame and not close, leaving you without a way to return to your desktop (unless you have USB debugging enabled, and can adb shell, top, then kill the process-- is there an easier way?) The safe way I know to do this is adb shell, then bootanimation, and ctrl+c when the animation is over and poof, it's gone. :TheEnd I haven't tried this with one of the stock animations or having a pause value in my animation to test if it would exit safely on its own. I assume this is dependant on the version of the bootanimation binary and Android.
Issues With Custom Animations
When I finalized my first shutdown animation, I sent it to a friend to test on his HTC One (M7). I helped him make the default.xml edit and it played fantastic. Of course, his first response was, how about sound? I spent the next 2 nights trying to get sound to play, not having done much research, but I ended with a lot of reading, which left me skeptical about my chances of getting it to work. Having tried numerous default.xml edits and downanimation.zip repacks, I also ended up skeptical about getting my shutdown animation to work cleanly, without inconsistencies. Bear with me, this will take some explaining.
The first boot animation for my M8 was quick and easy. It took me about 1-2 hours, from a 30s, 720p video to working on my phone. It was 720x1280px frames, scaled to 1080x1920 and playing at 24fps, with the desc.txt. When I first created the shutdown animation, I used the same desc.txt, and simply replaced the part folder. This played successfully, however as I mentioned earlier, it would not scale fullscreen. My second attempt used larger images, 1080x1920, and kept the 24fps, which, I thought, had just a tiny bit of lag. Next, I cut the frames in half, but I forgot to edit the desc.txt to play at 12fps, yet the animation played perfectly, I guess because I had also modified the default.xml to reflect 12fps. I've tried multiple times to get the animation working, with 12fps in both desc.txt and default.xml, without success. My only success, being the only animation I've tried so far, had the desc.txt formatted incorrectly. None of the files trip the dirty_file_record, and yet it refuses to play. Can anyone explain that?!?
As I've said, I have some more tests I can run, but it gets old after 20-30 attempts and several late nights without success. My first one was blind luck, but after work settles down, and maybe with the help of XDA, I'm going to get this process down. :laugh:

This post is to collect my questions, for easy replying by you tapatalkers.
1) First question(s), is it true, as it has become apparent to me, that it is not possible to add sound to a shutdown animation without major modification (e.g., by merely adding a path to audio in the /system/customize/CID/default.xml, as works with the boot animation)? If it is possible, how?
2) Does anyone know an easy way to modify the default.xml file from a computer? I'm thinking Linux users probably use cli txt editors via adb session? Maybe busybox/vi after adb shell? What other proven benefits or limitations does this have over naming animations the standard bootanimation.zip and downanimation.zip?
3) Perhaps, just on the down animation, scaling might work with PNG, which require less decoding than JPG? (I had noticed my shutdown animation would not scale up to fullscreen.)
4) When looking inside the stock animations, with Root Explorer, you can see the android folder is listed twice, with different timestamps. The contents are identical, and only one folder is visible when viewed on my pc. Is this Linux-related? Is this a bug in RE? Is this something unique to HTC's modifications? Is this somehow a feature of KitKat enhancements? The vzw_bootup.zip does not have this.
5) Regarding desc.txt in the (Verizon) HTC One M8's stock Verizon boot animation, the "n" should play like a "p" has in the past, but why use "n"? Obviously, stated to play only 999 times, they are scared of an infinite loop (0), but why not "p"? Does "n" utilize a new KitKat feature?
6) Another point I want to understand, with all of the stock animations, they've abandoned the use of "p" in favor of "c," I assume, because they don't want to risk your phone starting before you get to witness the beauty of their logos. Why do all parts pause/hold on at least one frame?

Some interesting stuff and questions, a bit out of my league though, I'm also trying to learn all these things. For editing I just run to Notepad++ :victory: for almost everything and .xml should be easy in it, I'm a noob what can I say lol
I'll subscribe to this thread, might get some interesting info :good:

BerndM14 said:
Some interesting stuff and questions, a bit out of my league though, I'm also trying to learn all these things. For editing I just run to Notepad++ :victory: for almost everything and .xml should be easy in it, I'm a noob what can I say lol
I'll subscribe to this thread, might get some interesting info :good:
Click to expand...
Click to collapse
NP++ is a fantastic app. I use it almost like a web browser, since I document everything for myself in txt files at home and work. I've actually made my xml edits a couple of times in np++ to get a better view of the file, but when the xml quits working, it's time to get some better comparison tools. Actually, I wouldn't be surprised if np++ has a plugin or similar feature actually built in. That app has endless features. Also, it's the best way to make desc.txt edits, if you are trying to maintain the unix line breaks on a windows box. I haven't actually had a boot animation not play because of windows/dos linebreaks, but most good tutorials tell you not to use them. Notepad doesn't acknowledge the unix linebreaks, hence the all-on-one-line appearance. If you want to revert a windows desc.txt to unix format, open in NP++ and go to Edit> EOL Conversion> UNIX/OSX Format. Unfortunately, this didn't help me in any of my animations for this phone. All of my boot/down animations with unix-formatted desc.txt files resulted in animations that black-screened (boot audio even played, but no pictures.)

Something else I forgot to mention in my late night posting, the Verizon boot animation, vzw_bootup.zip, is called using some other method than the /system/customize/CID/default.xml, so does anyone know how? I've seen other threads where other carriers have customized the boot animation, and probably in the same way? By the way, having made so many modifications, I can no longer play the verizon stock animation, I think. When I restore the default.xml to before I modified the zip path, it simply plays the hTC_bootup_one.zip, if I remember correctly. I may have to double-check that.
To illustrate the xml edits I keep referring to, here's the stock default.xml sections for boot and shutdown animations,
Code:
<BootConfiguration>
<BootAnimation animation="/system/customize/resource/hTC_bootup_one.zip" />
</BootConfiguration>
<ShutdownConfiguration>
<ShutdownAnimation image_png="/system/customize/resource/hTC_downanimation.zip" image="" fps="10" />
</ShutdownConfiguration>
and here's my current config,
Code:
<BootConfiguration>
<BootAnimation animation="/system/customize/resource/bootanimation.zip" audio="/system/customize/resource/audio.mp3" />
</BootConfiguration>
<ShutdownConfiguration>
<ShutdownAnimation image_png="/system/customize/resource/downanimation.zip" image="" fps="12" />
</ShutdownConfiguration>
I haven't figured out the usage of "image=" in the shutdown section. I think I tried to somehow force scaling by image="1080 1920", image="1080x1920", or image="jpg" and I also tried removing that reference, all with black-screen results, using my only working animation. I haven't tried image="1080,1920" or another separator, not that I'd expect it to work. Muzso explains how to learn the inner workings of the bootanimation code and even provides the code to the different versions, up to Jelly Bean. See the attachments, here. I just wish I was a programmer so I could "read" it. Also, has no dev ever sought to provide a modded or working replacement for the /system/bin/bootanimation binary itself, so that we could have more options built in?!? Shutdown audio, maybe a direct apk interface, so that we could customize it from within a gui? It's open source, so get on it wanna-be-famous devs, immediately!

I had a small breakthrough last night that may explain some of the issues I've had testing shutdown animations. As I made adjustments to the quality (fps) and attempted to add sound, I somewhere along the way made my first working animation quit working. I've had it "installed" for a couple of weeks now, but it would not play. All I was getting was a "shutting down..." popup message.
I've been meaning to compare it to the stock file on a bigger screen and finally got around to it. Using Notepad++, the only difference, other than my edits, was that the document was encoded as "ANSI as UTF-8" or UTF-8 BOM, versus the stock UTF-8 (without BOM). From Wikipedia, "the Unicode Standard neither requires nor recommends the use of the BOM for UTF-8. The presence of the UTF-8 BOM may cause interoperability problems with existing software that could otherwise handle UTF-8." Some Windows programs, including notepad will add the byte order mark at the beginning of any UTF-8 document, which I assume happened with WinMerge. I've only edited the file with Root Explorer > text editor, Notepad++, and possibly WinMerge.
So, having converted in NP++, Encoding > Encode in UTF-8 without BOM > save, I copied over to phone, rebooted into TWRP, mounted /system/, then replaced /system/customize/CID/default.xml. I'm not exactly sure what is necessary, though I also went into terminal from TWRP, chown to root, chmod to 644, then wiped Dalvik and cache. I've done all of those steps in the past, trying to fix things, so I'm fairly certain the encoding is to blame. The next reboot confirmed it worked, and my shutdown animation is restored.

This was mod I did on a ICS Sense 3.6 rom with no shutdown animation or sound ..
As Down anmiation does not use the desc.txt
The size of the images(animi) had to match the screen res.( this is not the case with Boot anim.. )
The frame rate and any sound has to be added to Default.xml in CID folder.
<ShutdownConfiguration>
<ShutdownAnimation image_png="/system/customize/resource/downanimation.zip" audio="/system/customize/resource/shutdown.mp3" useAudio="1" image="" fps="14" />
</ShutdownConfiguration>
Hope this Helps

mine is similar and I have been doing it this way since htc evo
Code:
<ShutdownConfiguration>
<ShutdownAnimation image_png="/system/customize/resource/downanimation.zip" audio="/system/customize/resource/audio_out.mp3" image="" fps="10" />
</ShutdownConfiguration>
and
Code:
<BootConfiguration>
<BootAnimation animation="/system/customize/resource/bootanimation.zip" audio="/system/customize/resource/android_audio.mp3" />
</BootConfiguration>
and have never had a problem with sound on boot or shut down sound

Pacattack said:
This was mod I did on a ICS Sense 3.6 rom with no shutdown animation or sound ..
As Down anmiation does not use the desc.txt
The size of the images(animi) had to match the screen res.( this is not the case with Boot anim.. )
The frame rate and any sound has to be added to Default.xml in CID folder.
<ShutdownConfiguration>
<ShutdownAnimation image_png="/system/customize/resource/downanimation.zip" audio="/system/customize/resource/shutdown.mp3" useAudio="1" image="" fps="14" />
</ShutdownConfiguration>
Hope this Helps
Click to expand...
Click to collapse
Thanks so much for the info! I knew the desc.txt wasn't being used, and assumed there was some sort of default.xml edit (if available) but was unable to find that info in my searches. Obviously, this has been around for a while. I was able to find mention of this from over 3 years ago... so easy to find, NOW :laugh:
I must have tried at least 20 different configurations trying to find the hidden switch to enable audio. I know I tried something similar to this, but I definitely did not have "useAudio" with cap in it.
dased14 said:
mine is similar and I have been doing it this way since htc evo
Code:
<ShutdownConfiguration>
<ShutdownAnimation image_png="/system/customize/resource/downanimation.zip" audio="/system/customize/resource/audio_out.mp3" image="" fps="10" />
</ShutdownConfiguration>
and
Code:
<BootConfiguration>
<BootAnimation animation="/system/customize/resource/bootanimation.zip" audio="/system/customize/resource/android_audio.mp3" />
</BootConfiguration>
and have never had a problem with sound on boot or shut down sound
Click to expand...
Click to collapse
This (shutdown audio) is working for you without the use of useAudio="1"? Yours was the first config edit I tried for my phone (HTC One M8) and did not work. Are you on an older HTC phone?

Yep has worked flawless on every phone i have used (using a sprint m8,m7 at the moment)
Sent from somewhere

dased14 said:
Yep has worked flawless on every phone i have used (using a sprint m8,m7 and lg g2 at the moment)
Sent from somewhere
Click to expand...
Click to collapse
I don't know why my verizon phone would be different (other than V likes to troll its customers.) Adding the path to audio, just as with the boot animation was the most obvious solution, but didn't work with the audio file located in the same directory. I also tried other locations, including /data/local/ and /system/media/, with no success.
I had a friend testing for me as well, and this didn't work on his Verizon M7.
I'll try again, without "useAudio=1" to be sure, as I was having some formatting issues from editing with Root Explorer > text editor. I figured out SwiftKey was at the root of those issues, due to auto-entry throwing random trash in the file when I tapped inside the txt file to choose where to edit. No telling how many of my blackscreen issues were due to trash characters in the file. I had to use Notepad++ twice to figure out where the unwanted characters had been thrown in there.
Edit: Ah, just saw your edit

djakrse said:
I don't know why my verizon phone would be different (other than V likes to troll its customers.) Adding the path to audio, just as with the boot animation was the most obvious solution, but didn't work with the audio file located in the same directory. I also tried other locations, including /data/local/ and /system/media/, with no success.
I had a friend testing for me as well, and this didn't work on his Verizon M7.
I'll try again, without "useAudio=1" to be sure, as I was having some formatting issues from editing with Root Explorer > text editor. I figured out SwiftKey was at the root of those issues, due to auto-entry throwing random trash in the file when I tapped inside the txt file to choose where to edit. No telling how many of my blackscreen issues were due to trash characters in the file. I had to use Notepad++ twice to figure out where the unwanted characters had been thrown in there.
I thought only HTC used the /system/customize/resource location for boot/shutdown animations, or the default.xml?
Click to expand...
Click to collapse
are you only changing that line in the default xml or both it and the vzw one
(because I'm curious to know what is the differences in sprint,vzw,att,tmo)

dased14 said:
are you only changing that line in the default xml or both it and the vzw one
Click to expand...
Click to collapse
I left the verizon and htc animations alone, and simply placed my own and modified the /system/customize/CID/default.xml.
This is my current, working animation with "useAudio=1"--my words about previous failed attempts were identical, but without the useAudio bit. I've had the animations working and sound working with the boot, but the shutdown audio was my last issue there.
Code:
<BootConfiguration>
<BootAnimation animation="/system/customize/resource/bootanimation.zip" audio="/system/customize/resource/audio.mp3" />
</BootConfiguration>
<ShutdownConfiguration>
<ShutdownAnimation image_png="/system/customize/resource/downanimation.zip" audio="/system/customize/resource/audio_down.mp3" useAudio="1" image="" fps="12" />
</ShutdownConfiguration>

djakrse said:
I left the verizon and htc animations alone, and simply placed my own and modified the /system/customize/CID/default.xml.
This is my current, working animation with "useAudio=1"--my words about previous failed attempts were identical, but without the useAudio bit. I've had the animations working and sound working with the boot, but the shutdown audio was my last issue there.
Code:
<BootConfiguration>
<BootAnimation animation="/system/customize/resource/bootanimation.zip" audio="/system/customize/resource/audio.mp3" />
</BootConfiguration>
<ShutdownConfiguration>
<ShutdownAnimation image_png="/system/customize/resource/downanimation.zip" audio="/system/customize/resource/audio_down.mp3" useAudio="1" image="" fps="12" />
</ShutdownConfiguration>
Click to expand...
Click to collapse
how many xmls are in your CID folder?

dased14 said:
(because I'm curious to know what is the differences in sprint,vzw,att,tmo)
Click to expand...
Click to collapse
For one, I'm aware that Verizon (ATT also) has a custom boot animation, which is not called by the default.xml. Verizon's is identical to the stock animation, hTC_bootup_one.zip, but adds an infinite loop with animated verizon logo, some flare on it, named vzw_bootup.zip.

dased14 said:
how many xmls are in your CID folder?
Click to expand...
Click to collapse
Just the default.xml, originally, but I have kept the stock, named "default.xml.stock," and most recent edit, "default.xml.bak" made by Root Explorer. So, technically 1 .xml files and 2 other files.

djakrse said:
For one, I'm aware that Verizon (ATT also) has a custom boot animation, which is not called by the default.xml. Verizon's is identical to the stock animation, hTC_bootup_one.zip, but adds an infinite loop with animated verizon logo, some flare on it, named vzw_bootup.zip.
Click to expand...
Click to collapse
never mind I see

dased14 said:
never mind I see
Click to expand...
Click to collapse
Yeah I never had any other files. I've wondered how the Verizon animation was called.
Sent from my Tapatalk-abusing M8

is what's in stock rom
Sent from somewhere

dased14 said:
is what's in stock rom
Sent from somewhere
Click to expand...
Click to collapse
Interesting. I assume Verizon has another way to call the animation, or perhaps I have similar files in a different location.
Sent from my Tapatalk-abusing M8

Related

[HACK] Boot Image .QMG

So I've been trying to hack into the QMG format that samsung has chosen to use for our bootimages.
I'm not having the best of luck, this thread is to discuss and work together to crack this file.
Here are some Reference Materials
SOURCE CODE: http://www.cs.cornell.edu/home/vavasis/qmg2.0/qmg2_0_home.html
I tried using the Tcl/tk method but cant seem to nmake the makefile on windows 64bit.
(will keep updating as i make progress but i have to go to class now)
I suspect that this is a completely unrelated product wich happens to have the same name...
Sent from my SAMSUNG-SGH-I897 using XDA App
Wrong QMG project.
Samsung uses Qmage to encode the boot animation.
The website is: http://quramsoft.com/solution_e/qmage.asp
This is proprietary software, there is no demo. Since no price is even listed and you have to contact the sales team to purchase the product it is most-likely extremely expensive commercial use only software.
Well thanks for letting me know i was working down the wrong path. I will now redirect my efforts @ Qmage, and its obtain-ability!
Why not try to install a more normal bootlogo player?
Sent from my SAMSUNG-SGH-I897 using XDA App
Unhelpful said:
Why not try to install a more normal bootlogo player?
Sent from my SAMSUNG-SGH-I897 using XDA App
Click to expand...
Click to collapse
Well i would use a .png or something however, Samsung has used the .qmg format, so i was going to just try to decompress, then edit , recompress and upload, and hope that my edited boot image would be there on boot.
I'm not to sure i would go about telling the kernel/os to use a different filetype all together. But you are the kernel master, so if this is possible, then we dont need to waste our time trying to break this .qmg
Unhelpful said:
Why not try to install a more normal bootlogo player?
Sent from my SAMSUNG-SGH-I897 using XDA App
Click to expand...
Click to collapse
Has anyone found this to be possible?
I've checked the kernel I didn't see anything relating to the boot loader or Qmage.
I've checked /init.rc
the only 2 lines that mention booting are "export BOOTLOADER 1" and "export BOOTCLASSPATH <insert path to several framework files>"
The AOSP port is in alpha, I wonder if they can use custom boot screens or if it's still loading the playlogos1 script thus booting the qmage file.
This was my header spec
Code:
dword - magic (QM)
word - ? (128 always?)
word - screen dimension X (480 my device)
word - screen dimension Y (800 my device)
word - unknown (always blank?)
dword - offset to last chunk (#3?) (this offset leads to two repeating file size dwords)
word - # of frames
word - current frame number
word - always blank?
word - always the same (value = 1)
dword - offset to middle data chunk or (1st chunks size)
dword - unknown only seems to have a value on the first entry of the file
Each new frame has its own QM file. So for instance in the bootsamsung.qmg there are 97 QM files in the .qmg.
The internal data is unknown, but it is split up I suspect. If you look at some of the battery charging qmgs you can see that the last 4 (there are only 5) are very small. This is because little changes in these frames. I believe the QM is broken up into segments (one would control just the background image etc).
ive read somewhere that there is a free version of the qmg software
labbu63 said:
ive read somewhere that there is a free version of the qmg software
Click to expand...
Click to collapse
I hope you remember where you read that! Cause if that's true it would allow us to get started and working on this! This qmg thing is retarded but we will get it eventually.
warri said:
Well i would use a .png or something however, Samsung has used the .qmg format, so i was going to just try to decompress, then edit , recompress and upload, and hope that my edited boot image would be there on boot.
I'm not to sure i would go about telling the kernel/os to use a different filetype all together. But you are the kernel master, so if this is possible, then we dont need to waste our time trying to break this .qmg
Click to expand...
Click to collapse
Not for all the Galaxy phones.
There are other methods that work see my thread back here http://forum.xda-developers.com/showthread.php?t=736412 it explains how some other animations can be used.
That thread gives us some help. But no one has figured it out still yet :/... I am working on a few projects atm so this is being worked on in my free time and I dont have a lot of that.
ferman said:
I hope you remember where you read that! Cause if that's true it would allow us to get started and working on this! This qmg thing is retarded but we will get it eventually.
Click to expand...
Click to collapse
well the software I'm talking about isn't made by QMG but instead it is made by some other company and their editing software is free
EDIT: wait you might want to read this thread here
ignore this post
Try installing a boot animation as you would for another android phone, then run /system/bin/bootanimation as root. I recommend doing this via adb in recovery mode, it seems you can't clear it after it runs. Going to try running it instead of playlogos next, if it works an update.zip to support standard boot animations should be easy.
Sent from my SAMSUNG-SGH-I897 using XDA App
Unhelpful said:
Try installing a boot animation as you would for another android phone, then run /system/bin/bootanimation as root. I recommend doing this via adb in recovery mode, it seems you can't clear it after it runs. Going to try running it instead of playlogos next, if it works an update.zip to support standard boot animations should be easy.
Sent from my SAMSUNG-SGH-I897 using XDA App
Click to expand...
Click to collapse
well other android phones use a bootimage.zip where as our phones use bootimage.qmg
I'm thinking we can actually tell the kernel to boot from a .zip instead of the .qmg which would bypass us having to crack into the .qmg
Yes, I'm talking about using a standard android bootanimation.zip if one is found. We already have the software needed to play one on our phones.
Sent from my SAMSUNG-SGH-I897 using XDA App
I've tried doing THIS and I can actually get the beginning of the bootanimation.zip to play... That thread has some good info.
All you really need to do to get it to start is:
Code:
1. su
2. busybox cp /sdcard/sd/bootanimation.zip /system/media/bootanimation.zip
3. cd /system/bin/
4. mv playlogos1 playlogos1BKP
5. busybox cp bootanimation playlogos1
The problem is if you look at the playlogos1 file in a hex editor you can see this:
Code:
dev.bootcomplete SurfaceFlinger SurfaceFlinger not published, waiting... BootAnimationSEC requestExitItself() is called /dev/graphics/fb0 binderDied is called SurfaceFlinger died, exiting... linkToComposerDeath failed (%s) Destructor /dev/tty0 ============> 1 /system/media/bootsamsung.qmg /system/media/bootsamsungloop.qmg ============> 2 ============> 3 ============> 4 parse frome buffer fail ============> 5 poll error ms4631 - Repeat Loop Animation
I've tried renaming bootsamsung.qmg to bootanimation.zip and removing bootsamsungloop with no luck.
So I think the problem might be kernel related afterall... or at least initramfs as stated in THIS POST
EDIT: Unhelpful, any chance you could try this in your next release?
We'll see. Where in AOSP init.rc is bootanimation started? It would need to be started explicitly since it's disabled.
My plan had been simply to wrap playlogos1 in a small program that would call bootanimation instead if a bootanimation.zip was found, but maybe that won't quite work. Simply starting bootanimation in place of playlogos1 works, but there is a very long delay with a black screen before the animation plays, and it doesn't have time to complete.
Sent from my SAMSUNG-SGH-I897 using XDA App
Maybe just put the bootanimation part where the playlogos is so that way it's called at the same time? You can look at atinm's source. He has it setup (but commented out)

Changing Froyo Boot Animation to Stock Galaxy S Help

All,
I followed the below instructions to change the Boot Animation on my Vibrant, but have run into a problem. I see the Galaxy S logo swirling, but i also see ANDROID flashing in every frame.
I even deleted the bootanimation.zip but stil i see the same thing. I have attached my inti.rc file so tat maybe someone can see if i missed something? Please help if you can!
Changing Boot Animation:
1. Stock Android is Default!
2. If you wish to Change to Nexus boot or something else.. place the .zip into /system/media/bootanimation.zip
3. Changing Back to Stock Vibrant Boot Screen Do the Following.
3.1. Adb pull /system/init.rc
3.2 Find bootanimation & change to the Following.
#service bootanim /system/bin/bootanimation
# user graphics
# group graphics
# disabled
# oneshot
3.3 Next you need to Push samsungboot.qmp & samsungbootloop.qmp into /system/media
4. Push the edited init.rc back to /system/init.rc
5. All Done, Enjoy!
I have also run into the same problem, but with a different method for changing the boot animation. When I go into change it by replacing the boot animation files in system/media, i get the same result. I also get the same result when I use one of the older flashable zip files. Does anyone know what we're missing? I didn't have this problem until recently so was something changed? I've tried it with several roms with the same results including but not limited to Onyx 5 beta, as well as froyo jk6 no bloat.
Anyone? I also want to know
You cwn get boot animations app and choose from like 100 of them..I use the android peeing on the apple!
Sent from my T-Mobile Galaxy Tab
I tried the boot animation app as well and it essentially replaced the flashing 'android' instead so something has got to have changed somewhere because it changed something else...
I would also like to know this. I actually happened to like the bootup screen for the i9000 that I had on J16.
That's because it all depends on the kernel you guys are using and what the init script for the ROM calls for.
If you searched you would also find out that bootanimations are changed in most kernel's under /data/local instead of /system/media
Still no luck.. any other ideas??
Sent from my Samsung Vibrant using XDA App

Screensave while in landscape mode

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

[Guide][How to] Dynamic Nav Bar for Nougat

I don't understand why this isn't a feature of stock Android. They did it with the notification bar, but why not the navigation bar? The main reason for doing this is to prevent the navigation bar from being burned into your screen. There are Xposed modules for Lollipop/Marshmallow that do this exact same thing, making this mod unnecessary on those versions of Android. Since there's no Xposed for Nougat (or if you don't like using Xposed on Lollipop/Marshmallow), doing this mod will make your navigation bar dynamically change color to match your notification bar.
***Please Note***
This isn't perfect. In applications like Google Messenger the navigation bar doesn't change to match the color of the contact you're texting, but it's better than nothing.
Prerequisites:
- Nexus 6 with USB debugging enabled in developer settings
- TWRP
- ADB fully setup and functional
- Text editor (gedit (Linux), NotePad++ (Windows), or whatever you like to use)
- Archive Manager (Linux) or 7Zip (Windows)
- Apktool 2.2.2 (link at the bottom of this post)
- Apktool Windows wrapper script (Windows only)
Step 1: Boot into TWRP
Step 2: Select mount, then select system
Step 3: Connect your Nexus 6 to your computer and fire up a terminal (Linux) or command prompt (Windows)
Step 4: Navigate to the folder containing ADB (platform-tools).
Step 5: Type "adb pull system/framework/framework-res.apk".
Step 6: Type "apktool if framework-res.apk" This installs the framework
Step 7: Type "apktool d framework-res.apk" This decompiles the apk
Step 8: Navigate to res, values, and open styles.xml with your text editor of choice
Step 9: Search for "navigationBar". There will be three instances of it. You only have to change the last two. Change "@colorBlack" to "?colorPrimaryDark" and save your changes
Step 10: Open colors.xml and search for "input_method_navigation_guard". Change "ff000000" to "00000000" and save the file. If you don't change this, the navigation bar will turn black when you open the keyboard
Step 11: Go back to your terminal window/command prompt and type "apktool b framework-res". This recompiles the apk
IF YOU SKIP THE FOLLOWING STEP YOU WILL END UP IN A BOOTLOOP!!!!!!!!!!
Step 12: Delete META-INF and AndroidManifest.xml from the modified framework-res.apk and copy over the ones from your original framework-res.apk
Step 13: Push the modified framework-res.apk to your device with ADB or by boot into recovery, copy it to your phone, and use the TWRP file manager to move it to /system/framework. If you do the TWRP method, be sure to set the permissions to 0644 or your​ phone will not boot.
Step 14: Boot up your Nexus 6 and test it out!
Link to Apktool
Nice tutorial. However, the reasons you're having issues "reusing" an existing modified copy of framework-res.apk are twofold.
1. You're re-signing a system app. Unless things have changed in the four years since I last modified framework-res.apk, system apps are not signed.
2. The apk can also be moved into /system/framework using a file explorer on the device. It simply cannot be done in one shot as the permissions need to be changed prior to the final move into /system/framework.
The framework is Android version dependent, so an Android 5.x framework will not work in Android 6.x or 7.x. However, replacing the framework on multiple copies of the same version of Android is certainly possible. I have to head off to work, but when I have a spare moment upon getting home I'll generate a "reusable" framework, and a flashable zip as well.
Strephon Alkhalikoi said:
Nice tutorial. However, the reasons you're having issues "reusing" an existing modified copy of framework-res.apk are twofold.
1. You're re-signing a system app. Unless things have changed in the four years since I last modified framework-res.apk, system apps are not signed.
2. The apk can also be moved into /system/framework using a file explorer on the device. It simply cannot be done in one shot as the permissions need to be changed prior to the final move into /system/framework.
The framework is Android version dependent, so an Android 5.x framework will not work in Android 6.x or 7.x. However, replacing the framework on multiple copies of the same version of Android is certainly possible. I have to head off to work, but when I have a spare moment upon getting home I'll generate a "reusable" framework, and a flashable zip as well.
Click to expand...
Click to collapse
1. The first time I did this I didn't sign the app and ended up in a bootloop. After researching the issue I came across a post that said signing the app was necessary. Signing it fixed my problem, so I've signed it ever since out of habit. Next time I do this I'll skip signing it and see what happens. If I don't get a bootloop I'll remove it from the guide. It's possible I had a permissions error or something.
2. While moving it with a file explorer is possible, I just prefer ADB, so that's why I used it in my guide.
I realize that they're version dependant. I wasn't trying to use a modified framework-res from Marshmallow on Nougat or anything like that. For example, when I tried reusing one from the November factory image on the December security update, or one from the November image on Pure Nexus, I get a bootloops, so that's why I assumed it necessary to create a new one each time. It's not like this mod is hard or takes a large amount of time, so why not redo it each time just for fun?
Face_Plant said:
It's not like this mod is hard or takes a large amount of time, so why not redo it each time just for fun?
Click to expand...
Click to collapse
Not everyone likes playing around with app mods. When I last did it, it was to enable the network location service on a Coby tablet running Android 4.0.3. That was NOT fun as it involved smali editing. At least this is only an XML edit.
Strephon Alkhalikoi said:
Not everyone likes playing around with app mods. When I last did it, it was to enable the network location service on a Coby tablet running Android 4.0.3. That was NOT fun as it involved smali editing. At least this is only an XML edit.
Click to expand...
Click to collapse
I didn't mean for all mods, just this one. Like you said, it's only simple changes to two XML files.
After getting some practice by doing this a couple of times it only takes a few minutes to complete, depending on the speed of your computer. It takes me about 30 minutes since my Ubuntu machine is an old early 2000's PC that takes about 10 minutes to decompile the app, 10 minutes to sign it, and 10 more to recompile it... I'll be able to knock 10 minutes of that time if what you're saying is correct and signing it is unnecessary.
I'll try it again after class today and remove the signing bit if all goes well [emoji106]
Great write-up, worked well OP!
You can after recompile of the framework-res folder, you can delete the AndroidManifest.xml in the new APK, and copy the AndroidManifest.xml and META-INF folder from the original framework-res.apk into the newly built APK...hopefully that makes sense.
No need to sign. That's what I did and it worked just fine, eliminates a step. I use 7zip to do all of that BTW.
RMarkwald said:
No need to sign. That's what I did and it worked just fine, eliminates a step. I use 7zip to do all of that BTW.
Click to expand...
Click to collapse
Good to hear. Those steps have been removed from the guide.
I wonder why signing it fixed my problem when I did this on Marshmallow earlier this year... I guess I screwed up something else and the second time around when I signed it I didn't screw up whatever I did wrong the first time.
Face_Plant said:
Good to hear. Those steps have been removed from the guide.
I wonder why signing it fixed my problem when I did this on Marshmallow earlier this year... I guess I screwed up something else and the second time around when I signed it I didn't screw up whatever I did wrong the first time.
Click to expand...
Click to collapse
Could depend on the app maybe? Not too sure there. I started wanting to learn modding apks (mainly making color changes, etc) by guides similar to this, the whole "I wonder if I can do that?" thing. Hopefully this will encourage those looking to try something like this that isn't too difficult to do to give it a shot and try it, just remember to have a backup of framework-res.apk handy, always can be adb pushed back via recovery if something goes south.
Thanks again for this OP, so far working great!
Awesome write up!
Not trying to hijack the thread, but for those not comfy making mods, there is "an app for that" Navbar Apps
Simple app that will dynamically change your nav bar color as well as other goodies.
recompiling it fails. i get this error on Ubuntu 16.10 I even tried using sudo
I: Using Apktool 2.2.0-dirty
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:258)
at brut.androlib.Androlib.build(Androlib.java:270)
at brut.androlib.Androlib.build(Androlib.java:263)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:105)
at brut.androlib.Androlib.readMetaFile(Androlib.java:254)
... 4 more
how do i deal with this?
i see the yml file right in the folder
kidhudi said:
recompiling it fails. i get this error on Ubuntu 16.10 I even tried using sudo
I: Using Apktool 2.2.0-dirty
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:258)
at brut.androlib.Androlib.build(Androlib.java:270)
at brut.androlib.Androlib.build(Androlib.java:263)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:105)
at brut.androlib.Androlib.readMetaFile(Androlib.java:254)
... 4 more
how do i deal with this?
i see the yml file right in the folder
Click to expand...
Click to collapse
Is Apktool installed correctly? Have you tried using Apktool 2.2.1? Maybe 2.2.0 isn't compatible for some reason? These are obviously just guesses. I'm no master at reading error logs...
ok i figured that out..
will this technique work on nitrogen version 7.1.1 because the nav bar doesnt change but when i pull the framework-res.apk the xml files are in fact altered.
---------- Post added at 09:13 PM ---------- Previous post was at 08:24 PM ----------
Face_Plant said:
Is Apktool installed correctly? Have you tried using Apktool 2.2.1? Maybe 2.2.0 isn't compatible for some reason? These are obviously just guesses. I'm no master at reading error logs...
Click to expand...
Click to collapse
no the command in the tutorial didnt work. because i was compiling a folder named framework-res and not an apk all i did was remove the .apk from the command supplied and it worked finally
also i dont know if it is an error but the push command has an lsystem for the location to be pushed. that wasnt working either.
thanks for the reply bro
Thanks face_plant. It was working the whole time. I thought I would get the pixel icons lol. My bad
Great tut thanks
kidhudi said:
Thanks face_plant. It was working the while time. I thought I would get the pixel icons lol. My bad
Great tut thanks
Click to expand...
Click to collapse
Pixel buttons are from the Substratum theme I'm using. You can get those too by being on a Nougat ROM that supports Substratum and using Pixel UI theme from the Play Store.
Just a heads up, if you're on 7.1.1 the theme won't work. It needs to be updated to support 7.1.1. Haven't tried it on 7.1, so it may or may not work.

NGL3 Screensaver Images

Hi everyone,
I have a Nook GlowLight 3. I don't like the default screensavers, so I'd like to delete them and (optionally) put in some new ones. Is this possible?
Maybe it's just a matter of getting into the Nook's file system and replacing their image files with my own (with the same filenames)?
This Nook is new. I don't mind voiding the warranty, but I'd rather not unless I know it will be worthwhile. Otherwise, I would try it myself. So I'm hoping some kind soul who has a NGL3 that they have already broken into would be willing to take a look at it for me.
Please let me know if I can help! Thank you!!
Robert
I've got too many Nooks and I'm far removed from stock.
Do you have a directory /data/sleep/
That used to have PNGs for some standby images.
Do you currently have the old, creepy authors?
I have not rooted it or anything yet, just plugged it into my Mac and looked at the default directories it comes with. There is basically nothing there– I even had to research online and experiment how to just create a directory where I could sideload a PDF. So, no, I haven't seen any directory like you mentioned. And I'm not sure what you mean about the old authors(?). The screensavers I have are Symbols and Quotes. In any case, this is my first Nook, and it's less than a week old.
So, do you think there is a good chance I could make changes to the stock screensavers?
The "old, creepy authors" were the screensavers that made the Brontë sisters look like the witches out of Macbeth.
These images are all packed away in /system/priv-app/partner.apk in res/drawable-mdpi-v4/
Code:
artboard_1.png
artboard_2.png
artboard_3.png
artboard_4.png
artboard_5.png
artboard_6.png
artboard_7.png
artboard_8.png
alexander_pope.png
chinese_proverb_00.png
cicero.png
jane_austen.png
john_wilson.png
lady_mary_montagu.png
louisa_alcott.png
robert_southey.png
thomas_jefferson.png
thomas_kempis.png
The list of images is in res/values/arrays.xml in quotes_imgs and symbols_imgs
The actual screensaver mechanism is com.nook.partner.screensaver.ScreenSaver (in partner.apk).
If you repack that all it won't have a B&N signature
I'm not sure how much that will break things.
In worst case you could resign everything.
I think that I'd just rewrite ScreenSaver to fetch PNGs from a directory like /data/sleep
That way, changing the collection would be easier.
Oh, and another thing...
As always, the sloppiness of B&N gets to me.
Those "quote" image files are ten times the size of the "symbol" image files.
Why? Because they have a very subtle dithering to the backgrounds.
It's nothing that you can see even on a regular LCD monitor, let alone on a black & white eInk panel with 16 shades.
So the file is basically trying to compress random noise. That doesn't work out well.
Below is what you get when you use the fill tool (red) in MS Paint on the image.
It leaves holes because the adjacent pixels aren't exactly the same value.
Oh, yes: I remember those goofy portraits.
OK, thank you– I really appreciate your help! I am excited to try this out when I can snag some free time. I will try to post what happened, too.
OK, I was able to pull that partner.apk file to my Mac, and unzip it. The images are there. Awesome!
So, I'm temped to create my own B&W/greyscale pngs, with the same dimensions, and give them the same file names. Then put them in the same locations, rezip (with an apk extension), and push it into place. I know it will have a different file size, etc, but do you think that will be a problem? Normally I'd just try it, but I'm trying to err on the side of caution.
Thanks!
Newtham said:
rezip (with an apk extension), and push it into place.
Click to expand...
Click to collapse
Yes, it should work.
There doesn't seem to be any problem with signatures.
I modified all my images for fun and it didn't break anything.
(Although, I've hacked so much stuff on this that the screensaver never activate. This is not my primary reading device.)
It must have some signature (the originals will do) or it won't be acknowledged as an APK.
Make sure that you keep the original file as a backup.
I'm still new to this, so basic question: what is a signature (in this case) and how do I create or modify it?
Thanks!
Newtham said:
What is a signature...
Click to expand...
Click to collapse
Signatures are the three (or more) files in the META-INF directory in the zip (apk).
If they are there, that's fine.
To learn about apk signing Google it.
@Newtham
Oh! I figured something out. I looked through the code.
If you just want to have one screensaver of your own (which you could manually change).
All you have to do is change some undocumented settings.
File: /data/data/com.nook.partner/shared_prefs/screen_saver_preference.xml
Code:
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
[color=red]<boolean name="pref_key_screen_saver_from_sdcard" value="true" />
<string name="pref_key_screen_saver_from_path">/sdcard/sleep.png</string>[/color]
<boolean name="pref_key_screen_saver_low_power" value="false" />
<int name="key_screensaver_img_index" value="8" />
</map>
OK, awesome, thanks!
About a week ago, I tried just modifying the image files, rezipping & renaming to apk, and pushing into place, but I didn't modify the signatures. So now I'm stuck on the boot screen. (I forced it off in the meantime, but since it's e-ink, its still showing the boot screen.)
I can still see it on the command line via adb, but I no longer have write permission so I can't push the original apk back into place. So that's my next task. I haven't had time to play with it since then. It's fun playing with this, I just wish I had more time.
Newtham said:
I no longer have write permission...
Click to expand...
Click to collapse
Well, you did it once, it's just a question of making /system rw:
Code:
# mount -o rw,remount /system
One of the silly things that B&N did was making the "screensaver" and the "wallpaper" the same thing.
I'll have to write some code to make them separate things.
Lol! As I dived into this I realized that I had been all over this ground before.
The stuff I wrote in https://forum.xda-developers.com/showpost.php?p=79994025&postcount=11 about using settings to disable the B&N wallpaper is true but not necessary.
You can disable all that silliness with:
Code:
# pm disable com.nook.partner/.daydream.DayDream
You can set a simple white wallpaper using my Wallpaper.apk app available in the signature
The wallpaper only appears as a background to a launcher (or any app that has no background).
The Glow3 4.7 & Glow4 5.0 both broke the Wallpaper, you need a separate patch for that, see below.
I had previously made a patch to cycle through user supplied PNGs as a lock screen.
That patch is available in the signature as nook45patch.zip
Code:
C:\> adb pull /system/framework/android.policy.jar
C:\> apktool d android.policy.jar -o AP
C:\> mergesmali /v \AP\smali Screen.smali
C:\> apktool b AP -o android.policy.jar
Then replace android.policy.jar and delete/backup/rename/whatever android.policy.odex
Then stuff your PNGs in /data/sleep
Erm, I think this mostly applies to Glow2 4.5
I'll look more closely at Glow3 4.7
glow45patch.zip works fine on the Glow3 4.7 & Glow4 5.0
So, the nook45patch.zip works fine on the Glow3 4.7
I kind of confused myself, strange things happen if you have no images in data/sleep.
I'll look into that too.
The Glow3 & Glow4 have this problem where B&N stole the functionality of wallpaper for sleep screen.
The background on launchers appears black even though the Wallpaper API changes /data/system/users/0/wallpaper correctly.
I should be able to solve this one too.
There was a minor bug in the old patch.
It would barf if you didn't have any user images.
The new glow45patch.zip is in the signature under mergesmali.
The aforementioned glow45patch.zip is a valid patch for Glow3 4.7 too.
There is also the issue of the black Wallpaper on Glow3 4.7 when using a stock Launcher.
Does anybody else have this/notice it/care?
With 4.7 B&N got rid of /system/priv-app/SystemUI.apk and put it all into /system/priv-app/partner.apk
This necessitated a change in the WallpaperManager since it's all a different package.
The actual ImageWallpaper.DrawableEngine.drawFrame() is a bit complicated.
I couldn't (be bothered to) figure out how it was supposed to work and where it was failing.
To my taste, anything other than solid white wallpaper on an eInk device is just distracting.
I wrote a small patch to make drawFrame() just drawColor() instead of scaling and rotating Wallpapers.
Is there any interest in that?
I have been working on this, but I can't get write access via adb anymore. I have tried everything I can think of, including your suggestion above. I can log in to the adb shell and run as root and make changes there. But anytime I try to push anything with adb, it tells me it is read-only. When I run rootnook.sh, it tells me I'm already rooted, but no superSU found (and then roots again, with no different results). adb root doesn't work, either.
The only major thing that's changed recently is that I installed the latest nook update, which I thought would be a good idea before I start hacking. Maybe that messed it up.
I'm stumped (which is not difficult to do...). Any suggestion on how to get back in there?
Thanks!
You probably de-rooted yourself.
Does adb shell give a # prompt?
Does the shell command "id" tell that you are root?
Does the shell command "mount" tell you that /system is rw?
Does the shell command "getprop ro.secure" say 0 (security is off)?
When in doubt, push to sdcard and then copy (cp) to where it should be.
Thanks! Moving it to sdcard did the trick.
I unpacked the apk with apktool, edited the images directly (didn't change the file names), repacked it with apktool, and then (finally, by using the sdcard directory) got it back to the Nook. And then copied it into place. But I still get the same results: the GUI gets stuck on the boot screen.
So, do you think this has to do with signing the apk file? I did a lot of research on it, but mostly what I found was how to sign your own file, not someone else's. Do you have any tips on how I can do this (if that's what's needed)? Thanks!!
(P.S. Thanks for the info on the glow45patch. I haven't had a chance to look at it too closely yet, but it looks interesting. I'd still like to mod the actual pics, though, if I can.)

Categories

Resources