What's new
DroidForums.net | Android Forum & News

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Droid 1 custom bootloader logos to replace Motorola logo

@jlutz555 looks like the last .sbf doesn't work i tried about 15 times on two computers. at the moment i'm unrooted/droidless(serviceing) so it may take awhile depending on how slow verizon wants to be this month
 
@jlutz555 looks like the last .sbf doesn't work i tried about 15 times on two computers. at the moment i'm unrooted/droidless(serviceing) so it may take awhile depending on how slow verizon wants to be this month


Try redownloading it, i just tried downloading it from my link and it worked fine.

I'll have the other one done some time tonight.
 
Last edited:
Here's an image for one of the geniuses here...:)

logo.jpg
Try these two...

http://dl.dropbox.com/u/9691744/Droid/Boot Logos/Yankees/JL5_Boot-Logo-Only-Yankees.zip

http://dl.dropbox.com/u/9691744/Droid/Boot Logos/Yankees 2/JL5_Boot-Logo-Only-Yankees_2.zip
 
@jlutz555 again thanks man. the new one worked perfect first shot,still dunno what happened with the other one but no biggie this is what the girl wanted so i'm happy
 
Damn. Was just about to take a crack at this, only to read through the thread to find out it wasn't a full screen image. To bad. Wanted to flash this image attached bellow :(

Lol, just noticed that the max size is 620 x 280 for bmp files on here. converted it to a .png.
 
Well a few pages back and possibly on another line of posts the Droid X was mentioned. Does this work on the X and is the sizing the same for the image?

Thanks,
Swiss
 
might be a stupid question but the hex code on the end of the CG42.smg...whats it for? andf what could happen if you changed it? does anybody have a bootlooder only .sbf or .zip whichever is necessary...i would like a clean start so to speak, but would prefer not to have to go back to stock/unrooted and re-update/re-root


@jlutz555 no need to hold onto that file...i may not get a chance to try again for a couple days and i gave you the wrong pirate she wanted one with a hat and peg leg

MotoCache posted a clean & working standard logo only sbf file in the thread about replacing your default boot image:
http://www.droidforums.net/forum/dr...m-bootloader-logos-replace-motorola-logo.html
 
Hi all. Well, I fell off the planet again for awhile -- very distracted with another mission at the moment. Catching up a little here.

First order of business is to post the completed CG42 maker script that I wrote (and mentioned) awhile back, but just finally got tested and finalized. This is an expansion and improvement of the more basic script I originally posted in the middle of this post.

Rather than attaching as a file I'll just make a CODE block and paste it. It's only like 121 lines. Copy this text to a text editor on your machine (notepad, gedit, etc.) and save as "MakeCG42FromBMP2.pl" (at least that is the name that the syntax screen will reference).

This script will take a normal, unmodified 480 x 182, 24 bit BMP file, remove the first 54 bytes (clip), mirror it left to right (mirror), flip it top to bottom (flip), and pad 64 bytes of 0xFF to the end (pad). These are the things that you normally have to do to the file manually to make it show correctly on the phone.

The script does some basic checking to make sure the input file is the right size based on the switches you use.

I tested and validated it and it works well for me. If you find any bugs, please let me know and I'll correct this post.

To use:

On Windows (at a command prompt, with Perl installed, with the script and the .bmp in the same directory you are presently "in"):
perl MakeCG42FromBMP.pl yourfile.bmp
On Linux (in a terminal window - be sure to adjust the shebang in the first line to point to your copy of Perl):
./MakeCG42FromBMP.pl yourfile.bmp
The Code

Code:
#!/usr/local/bin/perl
# MotoCache1 - take 480 x 182, 24 bit BMP file and make it into a CG42 code group
#
# Syntax: 
#    MakeCG42FromBMP.pl filename.bmp [/noclip] [/nomirror] [/noflip]
#
# Ordinarily the BMP file needs to have the first 54 bytes removed (clip), 
# the image needs to be mirrored (mirror), the image needs to be flipped (flip), 
# and 64 bytes of 0xFF needs to be padded to the end (pad). If any of these 
# steps have already been done to the supplied file, use the appropriate 
# switch to tell script not to do it again.
#
use strict;
my $file = shift(@ARGV);
my %switches = map {lc($_)=>1} @ARGV;
print "\nMakeCG42FromBMP v.2.0 - MotoCache1\n\n";
if (not -e $file) {
 print "Make Droid1 CG42 from a 480 x 182, 24 bit BMP file.\n\n";
 print "Syntax: MakeCG42FromBMP.pl filename.bmp [/noclip] [/nomirror] [/noflip]\n\n";
 print "        /noclip - first 54 bytes of BMP already removed, don't do it\n";
 print "        /nomirror - image already mirrored (or you want it to appear backwards)\n";
 print "        /noflip - image already flipped (or you want it to appear upside down)\n\n";
 exit;
}
print "Processing $file...\n\n";
# The most likely source of trouble would be if the input file isn't right, so we're going 
# to spend some code to make sure it is, and try to give useful messages if it is not.
# Fle size check
if ($switches{'/noclip'}) {
 # File should be 262080 bytes
 if (-s $file == 262134) {
  print "You specified the /noclip switch, but your file is 262134 bytes which means\n";
  print "it needs to be clipped. Cannot continue.\n\n";
  exit;
 } elsif (-s $file != 262080) {
  print "You specified the /noclip switch. A file that has already been clipped should\n";
  print "be 262080 bytes, but the your file is " . (-s $file) . " Cannot continue.\n\n";
  exit;
 } else {
  # File is good for /noclip - nothing special to do
 }
} else {
 # File should be 262134 bytes
 if (-s $file == 262080) {
  print "You did not specify the /noclip switch, but your file is 262080 bytes which means\n";
  print "it should not be clipped. Cannot continue.\n\n";
  exit;
 } elsif (-s $file != 262134) {
  print "An appropriate 480 x 182, 24 bit BMP should be 262134 bytes. Your file is \n";
  print (-s $file) . " bytes. Cannot continue.\n\n";
  exit;
 } else {
  # File is good
 }
}
print "   File $file is correct size (262134 bytes).\n";
# Open source file and read in binary mode
open (IN,$file) or die ("Can't open $file for input. Error: $!");
binmode IN;
# Open target file and write in binary mode
open (OUT,">$file.CG42.smg") or die ("Can't open $file.CG42.smg for output. Error: $!");
binmode OUT;
my ($imageData,$bytesRead);
if (not $switches{'/noclip'}) {
 print "   Clipping...\n";
 $bytesRead = read(IN,$imageData,54); # clip
}
# Read image data
$bytesRead = read(IN,$imageData,262080);
close IN;
if ($bytesRead == 262080) {
 print "   Read 262080 image bytes.\n";
} else {
 die ("\nFailed to read 262080 image bytes. Cannot continue.");
}
unless ($switches{'/nomirror'}) {
 print "   Mirroring...\n";
 $imageData = mirrorImage(3,480,182,\$imageData);
}
unless ($switches{'/noflip'}) {
 print "   Flipping...\n";
 $imageData = reverse(split(//,$imageData));
}
print "   Padding...\n";
$imageData .= "\xFF" x 64;
print "   Writing output file $file.CG42.smg...\n";
print OUT $imageData;
close OUT;
print "\nDone!\n\n";
sub mirrorImage {
 my $bytesPerPx = shift;
 my $widthPx = shift;
 my $heightPx = shift;
 my $imageRef = shift; # Reference to scalar holding image
 
 my $lineBytes = $bytesPerPx * $widthPx;
 
 my @array = unpack("(a$lineBytes)$heightPx", $$imageRef);
 for (my $row=0; $row <= ($heightPx-1); $row++) {
  $array[$row] = pack("(a$bytesPerPx)$widthPx",reverse(unpack("(a$bytesPerPx)$widthPx", $array[$row])));
 }
 $$imageRef = pack("(a$lineBytes)$heightPx",@array);
}
 
This is progressing great and many thanks for all of your hard work and passion! Question, does the Droid X use the same 480x182 image size? Will this program change work correctly for the X?

Thanks,
Swiss
 
This is progressing great and many thanks for all of your hard work and passion! Question, does the Droid X use the same 480x182 image size? Will this program change work correctly for the X?

Thanks,
Swiss

The image size is the same and this script will function as designed to create a suitable CG42. However currently the only options for a custom boot logo for the Droid X are here:

http://www.droidforums.net/forum/dr...m-bootloader-logos-replace-motorola-logo.html

Have a read here:

http://www.droidforums.net/forum/droid-labs/79211-hacking-erroneous-output-sbf-codec.html

The problem of SBF Codec creating wrong checksums when the sbf contains only a single code group still exists. Until we develop a way to calculate the correct checksum or until I get a Droid X to test on, someone else with an X is going to have to take the reins on creating boot logos for the X. The latter of which is not likely to happen unless someone wants to give me a Droid X.
 
Back
Top