Droid 1 custom bootloader logos to replace Motorola logo

Discussion in 'Droid Labs' started by MotoCache1, Sep 6, 2010.

  1. MotoCache1
    Offline

    MotoCache1 Chief Droid Scientist

    Joined:
    Jun 30, 2010
    Messages:
    530
    Likes Received:
    1
    Trophy Points:
    0
    "Moto Droid" (a member here) approached me with a very good question about replacing the bootloader image in a Droid 1. This is not the "boot animation" image (which is the pulsing red "eye" on a stock phone), but is the white Motorola "M" logo that displays when you first boot the phone (while the bootloader is loading and handing off).

    According to the information the member had (from a guide on this site), historically the procedure to replace the bootloader image was to modify a "full flash" SBF and replace the logo (as the logo is in a code group of its own). His question was "wouldn't it make more sense to just flash the single CG with the logo rather than the whole thing?" Of course he's right -- it is silly to blow away the entire phone just to replace your bootloader logo.

    Since I have several Droid 1's running different bootloaders and different versions of the OS, I offered to prepare a "bootloader image only" SBF, regression test it, and release it. This way, those that would like to make a custom bootloader image SBF have a safe base to work from that will only replace the bootloader image, leave the rest of the phone undisturbed, and therefore be safe for any OS version on a Droid 1.

    It should be noted that the bootloader image is a 480 x 182 BMP file that only contains what appears in the center band of the screen. The areas above and below that band are filled in automatically.

    The original bootloader logo (package link in case you want to go back to stock at some point) looks like this:

    [​IMG]


    I prepared two custom ones using two DroidForums.net logos. I think they are both cool, but right now the second one is the one I have on my daily use phone.


    The first custom one I made (package link) uses this image, by TParker76:

    [​IMG]


    The second custom one I made (package link) uses this image by Dandroid and Johndroid:

    [​IMG]


    I know I'm a dork, but I really think it's cool to see something custom so early in the boot process.

    To flash these packages onto your Droid 1, grab the zip from one of the three links above, unzip it (I zip them for file integrity purposes -- these are not update.zip type files, so you do need to unzip them), and then use my SBF flashing guide to apply the package to your phone.

    Before flashing an SBF to your phone it's a good idea to do a fresh Nandroid backup just in case. If you don't know what that is, you can find it with "search" on these forums.

    Please note: The subject and purpose of this topic is the SBF packages contained herein. There are other topics on the forum that discuss how to make your own custom bootloader image and those topics are the appropriate place to support that activity. I do not wish or intend to support that process here in Droid Labs.

    Enjoy!

    Edited to add: I went ahead and made a very simple (I'm a coder guy, not a graphics guy) boot animation file to go along with the last bootloader image above. If your web browser supports animated PNG files, you can click here to see what it looks like. The idea was that if you had the "These are the Droids you are looking for" bootloader image, the phone would start with that static picture, and then when the bootloader had fully transitioned into Android booting, and the boot animation takes over, it would start with the same image, and then seamlessly continue with the flashing lights. Someone who is good with graphics certainly could come up with a cooler implementation of this -- a neat 480 x 182 static bootloader image that then transitions smoothly into a cool boot animation. If you want to try the my boot animation, just grab this file and copy it to /data/local/bootanimation.zip on your phone ("adb push MC1_TATDYLF_Boot_Animation.zip /data/local/bootanimation.zip"). If that command doesn't make any sense, Google or search here for instructions on installing and using ADB. If you want to go back to stock, just delete the file from your phone and your phone will go back to using /system/media/bootanmiation.zip.
    Last edited: Sep 6, 2010
  2. Moto Droid
    Offline

    Moto Droid New Member

    Joined:
    May 24, 2010
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    0
    "it is silly to blow away the entire phone just to replace your bootloader logo."
    Thanks MotoCache1, this makes much more sense. That's whole reason I didn't want to do it the other way was flashing a whole sbf for a logo I will see only for a second or 2.
  3. FastKatt
    Offline

    FastKatt New Member

    Joined:
    May 23, 2010
    Messages:
    489
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Cleveland, TN
    Good to hear we don't have to go back-and-forth for this
  4. MotoCache1
    Offline

    MotoCache1 Chief Droid Scientist

    Joined:
    Jun 30, 2010
    Messages:
    530
    Likes Received:
    1
    Trophy Points:
    0
    Hi FastKatt. I made a followup post in the other topic where you all are discussing making your own custom bootloader image SBF's. It sounds like you were trying to slice and dice your own SBF out of a full-flash. It's much safer to grab one of the ones above and then just replace CG42 in it. There's more in there than just the code groups. The SBF's above have been tested with numerous Android versions and bootloaders on various Droid 1's and should be perfect to use "as is" or to put your own image in. If you don't really understand what every file inside an SBF is you're playing with fire when you start deleting and changing things.
  5. DF Smod
    Offline

    DF Smod New Member

    Joined:
    Apr 23, 2010
    Messages:
    11,477
    Likes Received:
    93
    Trophy Points:
    0
    And the Lab is underway...as always thanks for the quick and easy approach to doing things that you bring to the table
  6. MotoCache1
    Offline

    MotoCache1 Chief Droid Scientist

    Joined:
    Jun 30, 2010
    Messages:
    530
    Likes Received:
    1
    Trophy Points:
    0
    OK, I'm not really a graphics guy at all -- I'm functional with image editing software, but don't really have any artistic skills at all. That said, I added a little "Edited to add" section at the bottom of the OP with a boot animation file that I made to go along with the 3rd SBF bootloader image. It looks just like the bootloader image but then adds in some animation so you seamlessly transition from bootloader image, into animation, to the OS being up. I'm hoping it will inspire the more graphically inclined folks to make a neat, static, 480x182 image to use as the bootloader image, which then transitions into a series of images (which can be up to 480x720 -- using the full screen instead of just the middle like the bootloader image does) that will be the boot animation.
  7. fish1552
    Offline

    fish1552 Premium Member Rescue Squad Premium Member

    Joined:
    Mar 16, 2010
    Messages:
    652
    Likes Received:
    16
    Trophy Points:
    0
    Location:
    Savannah area of Coastal Georgia, USA
    So I'm wondering...and that often is dangerous. :)

    It seems like you have a pretty decent grasp on the sbf files and such. I noticed in step 9 of the flashing sbf tut you mentioned:
    On your phone the screen will change to "SW Update Complete" (unless the message has been changed by the person who built the SBF) and your phone will reboot shortly thereafter.
    Do you know enough to dig into it and maybe include "SW Update Complete. Press UP on your D-pad"? Might help, IDK.

    And people keep wondering on these other threads/forums why people don't want to give up their Droid1! I love changing EVERYTHING on this to truly make it MY take on Droid!
    Last edited: Sep 6, 2010
  8. fish1552
    Offline

    fish1552 Premium Member Rescue Squad Premium Member

    Joined:
    Mar 16, 2010
    Messages:
    652
    Likes Received:
    16
    Trophy Points:
    0
    Location:
    Savannah area of Coastal Georgia, USA
    Weird, I've been trying to do that exact thing. I just keep getting either the first part or the second part working tough. Following the steps in the various tuts but something still isn't sitting right. :/
  9. MotoCache1
    Offline

    MotoCache1 Chief Droid Scientist

    Joined:
    Jun 30, 2010
    Messages:
    530
    Likes Received:
    1
    Trophy Points:
    0
    Great question and idea. Changing the various messages that are displayed during flashing is actually pretty easy. The catch is that you have to keep the format of the message the same (number of letters per line, number of lines) as the original message.

    Currently, the last message you see after a good flash, just before the phone boots is two lines:
    Code:
    SW Update
    Complete
    So that's 9 characters on the first line and 8 characters on the second.

    The best message I could come up with that fits that pattern is:
    Code:
    Hold DPad
     up NOW 
    It goes by really fast, so I'm not really sure if there is much advantage, but I like the idea. When I make my next SBF perhaps I'll have that in there. It's a pretty big pain to go and re-generate the existing SBF's, redo all the links, update all the guides to the new links, etc., so I don't know that I'll go back and redo them, but going forward it would be a clever touch.

    Thanks for the suggestion!
    Last edited: Sep 7, 2010
  10. MotoCache1
    Offline

    MotoCache1 Chief Droid Scientist

    Joined:
    Jun 30, 2010
    Messages:
    530
    Likes Received:
    1
    Trophy Points:
    0
    I'll PM you my email address and you can zip up your images and shoot them to me and I'll give it a whack and send you back some files...
  11. jlutz555
    Offline

    jlutz555 New Member

    Joined:
    Feb 10, 2010
    Messages:
    239
    Likes Received:
    0
    Trophy Points:
    0
    so have we figured out exactly what determines the overall background color yet?
  12. MotoCache1
    Offline

    MotoCache1 Chief Droid Scientist

    Joined:
    Jun 30, 2010
    Messages:
    530
    Likes Received:
    1
    Trophy Points:
    0
    On which part? On the the bootloader image it seems like it is probably picking up the color of one of the edges of the image because the original Motorola one has black edges and the top and bottom fills in black. Both of mine have white backgrounds, but due to some clipped text (in the original image I grabbed off the forum) the bottom edge isn't 100% white (there is some gray), so I'm thinking perhaps something along the lines of sample all the pixels in the top and bottom line of the image and whatever color is most common is what it uses? Just a guess. It could be deduced with enough experimentation.
  13. fish1552
    Offline

    fish1552 Premium Member Rescue Squad Premium Member

    Joined:
    Mar 16, 2010
    Messages:
    652
    Likes Received:
    16
    Trophy Points:
    0
    Location:
    Savannah area of Coastal Georgia, USA
    From the other thread, I was able to determine that the top left corner isn't where the color comes from. I used the image attached in one of the logos, and the color for the background was olive green. And the top right and bottom left corners have that color as do random edges. All the rest of mine were solid backgrounds and showed up as you would expect.
    I think tparker was having problems with one of his that looked like it was all black, but had a white background.

    I clear it up, I may have to create a logo with different colors around the outside edges and see what shows up.
  14. MotoCache1
    Offline

    MotoCache1 Chief Droid Scientist

    Joined:
    Jun 30, 2010
    Messages:
    530
    Likes Received:
    1
    Trophy Points:
    0
    Now I feel compelled to replace it 1000 times if I have to to find out what pixel or pixels it looks at to decide the fill color for the top and bottom. Fortunately, if I'm starting from a clean boot of my PC with all the USB ports 100% happy the SBF takes like 15 seconds from hitting the start button until I have "PASS". Just need to prep up like 10 SBF's and start hammering some flashes on. But I need to eat dinner first. And hopefully I'll get back and you'll have posted the answer. ;)
  15. FastKatt
    Offline

    FastKatt New Member

    Joined:
    May 23, 2010
    Messages:
    489
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Cleveland, TN
    That's dedication, right there!
    Thanks for all you do for us!
  16. fish1552
    Offline

    fish1552 Premium Member Rescue Squad Premium Member

    Joined:
    Mar 16, 2010
    Messages:
    652
    Likes Received:
    16
    Trophy Points:
    0
    Location:
    Savannah area of Coastal Georgia, USA
    Well, first attempt at making one of the new ones bombed. :) I'm bringing Simply Stunning back up right now after a fresh install after I got an error 21 when attempting to restore my latest nandroid.

    Oh well, just have to keep trying... Might have that multicolored image now to see.

    And looking at the camo image I made, none of them have that color in the very corner of the image. It's getting interesting.
    Last edited: Sep 7, 2010
  17. MotoCache1
    Offline

    MotoCache1 Chief Droid Scientist

    Joined:
    Jun 30, 2010
    Messages:
    530
    Likes Received:
    1
    Trophy Points:
    0
    I've got it almost completely isolated. No sense both of us repeatedly flashing (and risking) our phones. I've got lots of Droid 1's and am doing it on one that if it got bricked I'd be OK with it. Will have results soon.
  18. fish1552
    Offline

    fish1552 Premium Member Rescue Squad Premium Member

    Joined:
    Mar 16, 2010
    Messages:
    652
    Likes Received:
    16
    Trophy Points:
    0
    Location:
    Savannah area of Coastal Georgia, USA
    Ok, if you want to try the lined images feel free. I figure the vertical one might be the one you'll figure out the color on.
    Last edited: Mar 28, 2011
  19. MotoCache1
    Offline

    MotoCache1 Chief Droid Scientist

    Joined:
    Jun 30, 2010
    Messages:
    530
    Likes Received:
    1
    Trophy Points:
    0
    OK, I actually got it narrowed down to a single pixel with only 2 flashes, plus 1 extra for confirmation. Not bad. Total elapsed time from start to finish, 52 minutes -- including writing the completely optional SMG building script, and not including writing it up in this post.

    This is the first image:
    [​IMG]

    Basically the top line is completely orange, the bottom line is completely pink, the left line is red, then green, then blue (top to bottom), but not including the topmost or bottom-most pixel, and the right line is gold, then aqua, then gold (oops, used the same color twice) not including the topmost or bottom-most pixel. The middle is of course yellow.

    When I flashed this in, the background was orange. Yay - our pixel is on the top line.

    This is the second image:
    [​IMG]

    Now the whole image is yellow except the top line (since we only care about the top line). The upper left pixel is black, the upper right pixel is white, and then at about 80 pixels apiece the segments in between are red, orange, yellow, green, blue, and violet. Yeah, if the background had been yellow it would have been semi-ambiguous, but not really since the body seems not to matter.

    Flashed it in, booted, background was white.

    Voila -- the only thing white in that image is the upper right pixel.

    Made this 3rd image just for confirmation:
    [​IMG]

    The whole image is yellow except the upper right pixel is pink. Flashed it in, booted, background is pink. Mystery solved and confirmed.

    Final answer -- the upper right corner of the image (as saved, after mirroring, before doing all the other manipulation to it in the hex editor) is the color that will be the background.

    Also, I'm a programmer, so I got tired of hex editing files manually and dashed off a quick script to do all the hex manipulation of the BMP. Just save the BMP, feed it to this script (assuming you've got Perl on your machine) and it spits out a CG42.smg file.

    Code:
    #!/usr/local/bin/perl
    
    # MotoCache1 - take 480 x 182, 24 bit BMP file and make it into a CG42 code group
    
    use strict;
    
    my $file = $ARGV[0];
    
    die("Syntax: MakeCG42FromBMP.pl filename.bmp") unless (-e $file);
    
    open (IN,$file) or die ("No in $file. Error: $!");
    binmode IN;
    open (OUT,">$file.CG42.smg") or die ("No out $file.CG42.smg");
    binmode OUT;
    
    my $junkData;
    my $junkBytes = read(IN,$junkData,54);
    die ("Failed to read the 54 junk bytes at the beginning.") unless $junkBytes == 54;
    
    my $imageData;
    my $imageBytes = read(IN,$imageData,262080);
    die ("Failed to read the 262080 image bytes.") unless $imageBytes == 262080;
    close IN;
    
    my $pad64 = "\xFF" x 64;
    $imageBytes = reverse(split(//,$imageData)) . $pad64;
    
    print OUT $imageBytes;
    close OUT;
    
    I could make it do the mirror for you too, but that's a little tougher than the reverse and presumably everyone that has been making these is used to doing the mirror (and it takes like half a second), so I doubt I'd bother making changes at this point.

    P.S. The attachments are PNG's just to make them small -- the ones actually used in the files were of course BMPs. For anybody that has never understood what hacking is, that's hacking. Modify, observe, hypothesize, test, repeat until solved. The better (or luckier) you are, the fewer "repeat" cycles you hopefully need.
    Last edited: Sep 8, 2010
  20. Jharmon12
    Offline

    Jharmon12 New Member

    Joined:
    May 4, 2010
    Messages:
    257
    Likes Received:
    0
    Trophy Points:
    0
    wow thats exactly what i was wanting to do but i havnt been able to edit your custom sbf files to try it out :/ but this will fix my boot logo thanks for the dedication to find out the answer.
Search tags for this page
change bootloader unlocked warning to custom logo
,

logo m

,
logo motorola
,
logo motorola png
,
logo with an m
,
logo with m
,
logos m
,
logos wih a m
,
logos with an m
,
logos with m
,
m logos
,
m phone logo
,

motorola logo

,
motorola m logo
,
phone logo m