Related
Could anyone help me plz?
this is what i did:
Code:
nbsplit -kaiser os.nb
RomMaster -x -w 5 OS.nb.payload -s 0x320000 -o xip.bin
dumprom xip.bin -5 -d XIP
nbsplit is from imgfs tools 2.1rc2 vesion.
but i can not get xip folder and dump folder.
i think there's no problem of this
Code:
nbsplit -kaiser os.nb
and
dumprom xip.bin -5 -d XIP
and i think the problem is in this:
Code:
RomMaster -x -w 5 OS.nb.payload -s 0x320000 -o xip.bin
many many thanks in advance.
see attchment with which tool i used if it is helpful.
qooqoo said:
Could anyone help me plz?
Click to expand...
Click to collapse
What are the output for every command? do you see any error on the screen?
Cheers.
jcespi2005 said:
What are the output for every command? do you see any error on the screen?
Cheers.
Click to expand...
Click to collapse
thank you~
this is what i see
Code:
dumprom xip.bin -5 -d XIP
unable to determine loading offset for xip.bin
i think xip.bin isn't correct.
qooqoo said:
thank you~
this is what i see
Code:
dumprom xip.bin -5 -d XIP
unable to determine loading offset for xip.bin
i think xip.bin isn't correct.
Click to expand...
Click to collapse
What happen if you try this one...
RomMaster.exe -x -w 5 OS_03.nb.payload -o xip.bin
jcespi2005 said:
What happen if you try this one...
RomMaster.exe -x -w 5 OS_03.nb.payload -o xip.bin
Click to expand...
Click to collapse
with this:
RomMaster.exe -x -w 5 OS_03.nb.payload -o xip.bin
i got same result:
dumprom xip.bin -5 -d XIP
unable to determine loading offset for xip.bin
qooqoo said:
with this:
RomMaster.exe -x -w 5 OS_03.nb.payload -o xip.bin
i got same result:
dumprom xip.bin -5 -d XIP
unable to determine loading offset for xip.bin
Click to expand...
Click to collapse
And one stupid question i forgot to do before, do you have an XIP folder created inside this one you are? If not, make one writing "md XIP" and try again the dumprom command...
jcespi2005 said:
And one stupid question i forgot to do before, do you have an XIP folder created inside this one you are? If not, make one writing "md XIP" and try again the dumprom command...
Click to expand...
Click to collapse
yes i did that, i use code like this:
Code:
mkdir XIP
dumprom xip.bin -5 -d XIP
there is nothing in xip folder.
qooqoo said:
yes i did that, i use code like this:
Code:
mkdir XIP
dumprom xip.bin -5 -d XIP
there is nothing in xip folder.
Click to expand...
Click to collapse
Where did you get the OS.NB file?
jcespi2005 said:
Where did you get the OS.NB file?
Click to expand...
Click to collapse
i tried several roms,
Dutty_s_hybrid_Rom_Build_18533_beta_2_fixed
Helmi_Kaiser_1.57.00.02_AKU.0.7.0.Cooked
HTC_TyTNII_FRA_1.56.406.5_22.45.88.07_1.27.12.17_Ship
Kaiser_HTC_WWE_1.56.405.5_radio_sign_22.45.88.07_1.27.12.11_Ship
kaiser_dopodasia_wwe_1.81.707.0_radio_sign_22.45.88.07_1.27.12.11_ship
they all like this
qooqoo said:
i tried several roms,
Dutty_s_hybrid_Rom_Build_18533_beta_2_fixed
Helmi_Kaiser_1.57.00.02_AKU.0.7.0.Cooked
HTC_TyTNII_FRA_1.56.406.5_22.45.88.07_1.27.12.17_Ship
Kaiser_HTC_WWE_1.56.405.5_radio_sign_22.45.88.07_1.27.12.11_Ship
kaiser_dopodasia_wwe_1.81.707.0_radio_sign_22.45.88.07_1.27.12.11_ship
they all like this
Click to expand...
Click to collapse
Let me try with one of this OS files and see what happen.
jcespi2005 said:
Let me try with one of this OS files and see what happen.
Click to expand...
Click to collapse
many many thanks for your answers, and wait for your result
qooqoo said:
many many thanks for your answers, and wait for your result
Click to expand...
Click to collapse
There are some problem with the extracted xip.bin file, and don't know why fail.
The size for dumped XIP from live Kaiser have different size with this xip.bin file from NB file. I can extract the XIP folder from dumped XIP (3.584Kb) but the same tool fail with the extracted from NB file XIP (3.038Kb). So seems the RomMaster.exe is not doing the work fine, but don't know why.
The good news is you can use a part01.raw from any device to get the XIP and extract the content. If you look for dumped ROMs on the forum, you couldfind many.
Cheers.
jcespi2005 said:
There are some problem with the extracted xip.bin file, and don't know why fail.
The size for dumped XIP from live Kaiser have different size with this xip.bin file from NB file. I can extract the XIP folder from dumped XIP (3.584Kb) but the same tool fail with the extracted from NB file XIP (3.038Kb). So seems the RomMaster.exe is not doing the work fine, but don't know why.
The good news is you can use a part01.raw from any device to get the XIP and extract the content. If you look for dumped ROMs on the forum, you couldfind many.
Cheers.
Click to expand...
Click to collapse
thank you very much, i got it, it was caused by the vesion of rommaster, a friend give me the right rommaster, and it works fine.
i upload the new tool here, hope it can help other guys
qooqoo said:
thank you very much, i got it, it was caused by the vesion of rommaster, a friend give me the right rommaster, and it works fine.
i upload the new tool here, hope it can help other guys
Click to expand...
Click to collapse
Great finding, man. Sure this helps more ppl...
Many thanks for sharing this version of rommaster (and thanks to your frined too, of course...)
I'll give a try later...
EDIT: Yes, works fine... One strange thing is dumped XIP is bigger than extracted from NB ship... just strange... who knows.
The mistake...
I beleave i found the mistake...
I your first post you have this line...
RomMaster -x -w 5 OS.nb.payload -s 0x320000 -o xip.bin
And in your last post the line was
RomMaster.exe -x -w 5 -b 0x320000 OS.nb.payload -o xip.bin
Can you see the difference? Yes, the -s instead -b....
I compare the version of RomMaster you posted, and my version, and are the same, so the big deal is the -b instead -s
Cheers.
jcespi2005 said:
I beleave i found the mistake...
I your first post you have this line...
RomMaster -x -w 5 OS.nb.payload -s 0x320000 -o xip.bin
And in your last post the line was
RomMaster.exe -x -w 5 -b 0x320000 OS.nb.payload -o xip.bin
Can you see the difference? Yes, the -s instead -b....
I compare the version of RomMaster you posted, and my version, and are the same, so the big deal is the -b instead -s
Cheers.
Click to expand...
Click to collapse
i found that but with old rommaster, -d don't work, there are some differences between these two, i think.
for cooking magician's rom, there is also a rommaster, but these three is also different.
the old rommaster i post in the first page, with that one, there is no problem during dumping hermes's xip.
qooqoo said:
i found that but with old rommaster, -d don't work, there are some differences between these two, i think.
for cooking magician's rom, there is also a rommaster, but these three is also different.
the old rommaster i post in the first page, with that one, there is no problem during dumping hermes's xip.
Click to expand...
Click to collapse
I thought that I already told you the correct command for dumping kaiser xip is:
Code:
RomMaster -w 5 OS.nb.payload -x -b 0x320000 -o xip.bin
thats all.. -b is the key (ROM begin at)..
helmi_c said:
I thought that I already told you the correct command for dumping kaiser xip is:
Code:
RomMaster -w 5 OS.nb.payload -x -b 0x320000 -o xip.bin
thats all.. -b is the key (ROM begin at)..
Click to expand...
Click to collapse
thank you very much helmi_c, the problem is the vesion of rommaster i have is different from yours, i used -b, it said that the parametre is incorrect.
now it works fine, thanks for your help
@qooqoo: My RomMaster version is 2.3. What is the old one you used? I was looking in my computer for all RomMaster.exe files, and all are the same version...anyway, thanks to helmi_c for helping here
I think was a good idea to put this ussefull info about extracting the XIP from NB file in the Wiki... any volunteer?
Cheers.
Hello there!
This is a G1 / Magic tool to easily convert images in splash screen ones.
This tool is based upon ffmpeg and you need it installed on your system before proceeding (it will prompt you about the program missing in any case)
REQUIREMENTS
ffmpeg installed on your system
a 320x480 image
a 320x480 device (i.e. G1 / Magic) with engineering SPL
USAGE
Code:
./file [--help][-h]
Prints out how to use the script
Code:
./file your_image_file
Converts your image into a flashable splash screen, if you want the script will continue flashing the file directly.
NOTE: if you wish to make this script work with the Nexus One or any other device which doesn't share the same 320x480 resolution, just change these two variables:
Code:
size_check=307200
size_desc="320x480"
size_check is in bytes, size_desc is just a descriptive string.
I ASSUME NO RESPONSABILITY ABOUT THE USAGE OF THIS SCRIPT. USE IT "AS IS", LOOK AT THE OUTPUTS AND YOU'LL AVOID BRICKS!
Please, if you wish to redistribute this script, give the right credits and don't change the prog_header please (maybe link this discussion in a text file)!
Here the code is, just slap it in a text file, give it the executive permission (chmod +x filename) and use it!
Code:
#!/bin/bash
prog_header() {
echo "###############################"
echo "####### EleGoS's FFMPEG #######"
echo "# G1/Sapphire/MyTouch3G/Magic #"
echo "### Splash Screen converter ###"
echo "###############################"
echo "version 1.0"
echo ""
}
if [ "$1" == "--help" ] || [ "$1" == "-h" ]; then
prog_header
echo "Usage"
echo "$0 your_image_file"
exit 0
fi
warning() {
printf "\e[0;31m$1\e[0m \n"
}
check_ok() {
printf "\e[0;32m$1\e[0m \n"
}
ffmpeg_check=$(which ffmpeg)
size_check=307200
size_desc="320x480"
if [ "$ffmpeg_check" != "" ]; then
OUTPUT=$(echo "$1" | cut -d'.' -f1).raw565
clear
prog_header
ffmpeg -i $1 -f rawvideo -pix_fmt rgb565 $OUTPUT
clear
prog_header
FILESIZE=$(cat $OUTPUT | wc -c)
if [ $FILESIZE -eq $size_check ]; then
check_ok "$OUTPUT is ready to be flashed."
else
rm $OUTPUT
warning "$OUTPUT filesize mismatches! Wrong image size ($size_desc)? Aborted."
exit 0
fi
echo "In order to flash this image you have to plug your phone in fastboot mode."
read -p "Flash it now? (y/n) "
if [ "$REPLY" == "y" ] || [ "$REPLY" == "Y" ]; then
fastboot devices | grep -q "fastboot"
if [ $? -ne 0 ]; then
warning "The USB cable is not plugged, or the device is not in fastboot mode."
echo "To flash the splash screen, manually execute this command once in fastboot mode:"
echo "fastboot flash splash1 $OUTPUT"
exit 0
else
fastboot flash splash1 $OUTPUT
fi
else
echo "To flash the splash screen, execute this command once in fastboot mode:"
echo "fastboot flash splash1 $OUTPUT"
exit 0
fi
else
warning "ffmpeg not found! Please install it before running this script!\ni.e. (DEBIAN) apt-get install ffmpeg / (OSX) sudo port install ffmpeg"
fi
Some ready-to-flash raw565 images (link on the images):
Thanks, this simplifies the process Works great on my Mac OSX SL.
Where can i download it for the Mac would love to create my own Splash Screen..
You need:
- MacPorts installed
- ffmpeg installed via macports (sudo port install ffmpeg)
- Open the terminal -> nano splash_creator
- copy / paste the code
- [CTRL]+O, then [ENTER]. [CTRL]+X
- chmod +x splash_creator
- Put the image you want as splash screen in a folder where the script is (it is actually in your home)
- Open terminal -> cd your/folder/here
- ./splash_creator your_image_here.whatever
great tools
really great tools man .. works really nice on my ubuntu ..
anyway, have any idea how to create the boot animation?
nope, I only know it's in /system/media/bootanimation.zip (at least in the latest cyanogenmod), but I haven't figured out how's supposed to be created =\
splash
Thank you guys.
The best/simple guide to change boot splash screen in 1 minute!
I've only added "sudo" to my ubuntu terminal to run it!
my own splash
{
"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"
}
Thanks!
Wow, thanks, works like a charm.
For anyone who happens to like Jeanne d'Arc (Joan of Arc), here is my splash screen, feel free to use it:
And an associated boot animation
(I wrote my undergrad thesis about her)
Thanks again!
ok where is the link lol?
elegos said:
You need:
- MacPorts installed
- ffmpeg installed via macports (sudo port install ffmpeg)
- Open the terminal -> nano splash_creator
- copy / paste the code
- [CTRL]+O, then [ENTER]. [CTRL]+X
- chmod +x splash_creator
- Put the image you want as splash screen in a folder where the script is (it is actually in your home)
- Open terminal -> cd your/folder/here
- ./splash_creator your_image_here.whatever
Click to expand...
Click to collapse
You don't necessarily need to download macports. Just grab an ffmpeg binary from wherever (included in lots of software distributions on Mac, like the KMTTG TiVo file decoder, Handbrake, etc) and just do it from the command line.
ffmpeg -i mygraphic.jpg -f rawvideo -pix_fmt rgb565 mygraphic.raw656
elegos said:
size_check=307200
size_desc="320x480"
Click to expand...
Click to collapse
I have an EVO the size is 480x800 the size _desc= would be 480x800 what would be the size_check=
Not sure how to calc the value
thanks
@mplaines: for 480x800 it needs to be 768000
Works great for my Desire, thanks for the script!
Very nice and useful, thanks a bunch, I will definately keep the header and credits. Also you may want to add to your OP to install ffmpeg just do $ sudo apt-get install ffmpeg
The low-dough ghetto version
I have a Mac and found an interesting way to work around...
Get an image editor (I used Gimp) and create a 320 x 480 BMP of your splash image.
Flip it vertically so that it looks upside down and backwards.
Save it as a bitmap (.bmp) and select the 565 setting.
Use a hex editor to strip off the first 70 bytes of the header. That's 70 in decimal, not hex! To confirm, the resulting file size should be 307,200 bytes exactly.
Flash away!
If you are flashing a 480 x 800 image to an HDPI device, the file size will be 768,000 bytes and not a nibble more.
gee one said:
I have a Mac and found an interesting way to work around...
Get an image editor (I used Gimp) and create a 320 x 480 BMP of your splash image.
Flip it vertically so that it looks upside down and backwards.
Save it as a bitmap (.bmp) and select the 565 setting.
Use a hex editor to strip off the first 70 bytes of the header. That's 70 in decimal, not hex! To confirm, the resulting file size should be 307,200 bytes exactly.
Flash away!
If you are flashing a 480 x 800 image to an HDPI device, the file size will be 768,000 bytes and not a nibble more.
Click to expand...
Click to collapse
I didn't have to mess around in gimp and rotate things, just us the script and you'll have no problems
Repost?
I have reposted this for the G1 section, just kept the OP from here the same as there and gave you all credits. Also here are my splash screens, more to come!
I'd really like if this would work on the Nexus One too... haven't found anything about!
if i read correctly what this does. it changes the UGLY green mytouch3g logo before the boot animation? if so i'm interested.. where can i get linux copies of fastboot and Adb?
Very Nice work .. Good instructions
A2sd installation
First and foremost you need to either edit the boot.img you have or grab one from a rom that has it enabled already.
For the purpose of editing the boot.img>
unpack , there will be two new files kernel + ramdisk
then unpack ramdisk to find init.rc, these are the edits needed.
Below this “setprop net.tcp.buffersize.wimax4096,87380,110208,4096,16384,110208”
add this
Code:
start a2sd
on property:cm.filesystem.ready=1
class_start default
below this “install-recovery.sh”
add this
Code:
service a2sd /system/bin/logwrapper /system/bin/sh /system/bin/a2sd
disabled
oneshot
then repack.
Download the 2.7 update one, unpack and copy the system folder to the system folder of your rom.
Next is the update script, you need to add this
# a2sd
set_perm 0 0 0777 SYSTEM:bin/a2sd
set_perm 0 0 0777 SYSTEM:bin/fixa2sd
set_perm 0 0 0777 SYSTEM:bin/boota2sd
set_perm 0 0 0777 SYSTEM:bin/chka2sd
set_perm 0 0 0777 SYSTEM:bin/setupa2sd
set_perm 0 0 0777 SYSTEM:bin/starta2sd
set_perm 0 0 0777 SYSTEM:bin/bash
set_perm 0 0 0777 SYSTEM:bin/e2fsck
set_perm 0 0 0777 SYSTEM:bin/busybox.a2sd
set_perm 0 0 0777 SYSTEM:bin/apps2sd
set_perm 0 0 0777 SYSTEM:xbin/a2sd
set_perm 0 0 0777 SYSTEM:xbin/apps2sd
set_perm 0 0 0777 SYSTEM:etc/init.d/04apps2sd
set_perm 0 0 0777 SYSTEM:xbin/e2fsck
set_perm 0 0 0777 SYSTEM:bin/zipalign
set_perm 0 0 0777 SYSTEM:bin/aligna2sd
If I missed anything please let me know and I will update it ASAP
Thanks again
Your welcome, for as many request as I had to post info on this you where the only on to reply, LOL....
Hope this helps everyone...
I just don't think that it's release was very what's the word i'm looking for?
are you using avabox (found here ) to decompile your boot.img
I'm using a Perl script caleld split_bootimg.pl to separate the kernel and the ramdisk from the boot.img. The modifications required to get A2SD working on a rom are in the ramdisk portion of boot.img.
thatguythatdid said:
I just don't think that it's release was very what's the word i'm looking for?
are you using avabox (found here ) to decompile your boot.img
Click to expand...
Click to collapse
Well I just learned something and I hope that it helps someone. If your using avabox to split a boot.img into the kernel and ramdisk the first time u use it. Run the activeperl exe. then go to all programs and run the activeperl program and give it a sec to do it's things.
Then cd to the the boot sripts folder using command prompt and type
Code:
perl split_bootimg.pl boot.img
that will split your boot img now to figure out how to read it?
never mind I used 7zip to extract it then extract the next folder now i can see it in english
How do I repackage it?
See, I run Ubuntu Linux. The procedures are different for me.
To repackage, I run a program called mkbootimg (it's a linux binary...there may be an equivalent one in Windows). That creates a new boot image.
But, first, you have to gzip your ramdisk again. Once you do that, I run the following command:
mkbootimg --kernel <kernel segment of boot.img> --ramdisk <newly compressed ramdisk> --cmdline "no_console_suspend=1 console=null" -o <name of new boot image> --base 0x19200000
For me:
./mkbootimg --kernel boot.img-kernel --ramdisk newramdisk.gz --cmdline "no_console_suspend=1 console=null" -o newboot.img --base 0x19200000
boot.img-kernel is the kernel segment of the boot.img I separated.
newramdisk.gz is a gzip file containing the new ramdisk I modified
newboot.img is the image file I'm creating that has the old kernel and new ramdisk.
thatguythatdid said:
Well I just learned something and I hope that it helps someone. If your using avabox to split a boot.img into the kernel and ramdisk the first time u use it. Run the activeperl exe. then go to all programs and run the activeperl program and give it a sec to do it's things.
Then cd to the the boot sripts folder using command prompt and type
Code:
perl split_bootimg.pl boot.img
that will split your boot img now to figure out how to read it?
never mind I used 7zip to extract it then extract the next folder now i can see it in english
How do I repackage it?
Click to expand...
Click to collapse
I tried doing this to a HTC Boot.img and it didn't work, it would just never boot up.
Could there be something im doing wrong? Im using the perl scripts on a ubuntu box.
The four parameters are vital, especially the base address.
If the base address is wrong, it won't boot.
If the ramdisk isn't ran through cpio first, then gzipped, then it won't boot (or at least I don't think it will)
There are also other factors...but the most common is a wrong base address. The one in the example is for the Sprint Hero. Evo is different...so is Eris. Nexus One is the same as the Evo, but still different from our phones. Not sure about the rest since I can't seem to find base addresses for them.
t2noob said:
I tried doing this to a HTC Boot.img and it didn't work, it would just never boot up.
Could there be something im doing wrong? Im using the perl scripts on a ubuntu box.
Click to expand...
Click to collapse
I've unpacked and saw: 'The fu** ... is already there.'
ATM I try to build up a2sd for the desire-sense-2.2 ROM.
But ... when I say with the ... uh, what was it?
[A2SD] Darktremor Apps2SD 2.7.5 Preview Fix 3 Test 2 (07-07-2010)
This one.
When I now say: a2sd check
It says following:
[X] Ext partition found, but not mounted.
Your rom may not be setup to run A2SD.
Check with your rom developer if the boot image
is programmed to run A2SD.
Where I stucked? Maybe other suggestions for A2SD?
DarkMio said:
I've unpacked and saw: 'The fu** ... is already there.'
ATM I try to build up a2sd for the desire-sense-2.2 ROM.
But ... when I say with the ... uh, what was it?
[A2SD] Darktremor Apps2SD 2.7.5 Preview Fix 3 Test 2 (07-07-2010)
This one.
When I now say: a2sd check
It says following:
[X] Ext partition found, but not mounted.
Your rom may not be setup to run A2SD.
Check with your rom developer if the boot image
is programmed to run A2SD.
Where I stucked? Maybe other suggestions for A2SD?
Click to expand...
Click to collapse
That means that the init.rc in the ramdisk isn't patched or for some reason it isn't executing at boot.
So I dualbooted with ubuntu 10.04 good read.
so I'm having problems with cpio the ramdisk. I used split_bootimg.pl to split the boot.img of darches boot.img and then again on the tmo mytouch 32b froyo boot.img. I used the mkbootimg to combine the kernel and the ramdisk and flashed it to my phone that worked. Then I wanted to change the r.o secure to 0 so I unzipped the ramdisk changed it and then re-cpio using this command
Code:
find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
and then I zipped it and ran the mkbootimg and flashed that to my phone. But it didn't work
this is what i also changed in the default prop
Code:
ro.secure=0
ro.allow.mock.location=0
ro.debuggable=0
persist.service.adb.enable=1
any ideas what I'm doing wrong?
I'm running ubuntu 10.04 64bit
does mkbootfs recpio it?
I am simply reposting this from the mytouch thread by elegos, who is the creator of this script, I take no credit for this whatsoever.
Hello there!
This is a G1 / Magic tool to easily convert images in splash screen ones.
This tool is based upon ffmpeg and you need it installed on your system before proceeding (it will prompt you about the program missing in any case)
REQUIREMENTS
ffmpeg installed on your system
Code:
$ sudo apt-get install ffmpeg
a 320x480 image
a 320x480 device (i.e. G1 / Magic) with engineering SPL (S-OFF)
USAGE
Code:
./file [--help][-h]
Prints out how to use the script
Code:
./file your_image_file
Converts your image into a flashable splash screen, if you want the script will continue flashing the file directly.
NOTE: if you wish to make this script work with the Nexus One or any other device which doesn't share the same 320x480 resolution, just change these two variables:
Code:
size_check=307200
size_desc="320x480"
size_check is in bytes, size_desc is just a descriptive string.
I ASSUME NO RESPONSABILITY ABOUT THE USAGE OF THIS SCRIPT. USE IT "AS IS", LOOK AT THE OUTPUTS AND YOU'LL AVOID BRICKS!
Please, if you wish to redistribute this script, give the right credits and don't change the prog_header please (maybe link this discussion in a text file)!
Edit: I have added a already to use script for 320x480 devices only! Or you can make your own script using elegos's code. The script should already be marked as executable, if not then make executable:
http://www.mediafire.com/?wz83iff1eg3fv38
Usage for this script:
Code:
$ ./splash_creator fileimagename.whatever
Here the code is, just slap it in a text file, give it the executive permission (chmod +x filename) and use it!
Code:
#!/bin/bash
prog_header() {
echo "###############################"
echo "####### EleGoS's FFMPEG #######"
echo "# G1/Sapphire/MyTouch3G/Magic #"
echo "### Splash Screen converter ###"
echo "###############################"
echo "version 1.0"
echo ""
}
if [ "$1" == "--help" ] || [ "$1" == "-h" ]; then
prog_header
echo "Usage"
echo "$0 your_image_file"
exit 0
fi
warning() {
printf "\e[0;31m$1\e[0m \n"
}
check_ok() {
printf "\e[0;32m$1\e[0m \n"
}
ffmpeg_check=$(which ffmpeg)
size_check=307200
size_desc="320x480"
if [ "$ffmpeg_check" != "" ]; then
OUTPUT=$(echo "$1" | cut -d'.' -f1).raw565
clear
prog_header
ffmpeg -i $1 -f rawvideo -pix_fmt rgb565 $OUTPUT
clear
prog_header
FILESIZE=$(cat $OUTPUT | wc -c)
if [ $FILESIZE -eq $size_check ]; then
check_ok "$OUTPUT is ready to be flashed."
else
rm $OUTPUT
warning "$OUTPUT filesize mismatches! Wrong image size ($size_desc)? Aborted."
exit 0
fi
echo "In order to flash this image you have to plug your phone in fastboot mode."
read -p "Flash it now? (y/n) "
if [ "$REPLY" == "y" ] || [ "$REPLY" == "Y" ]; then
fastboot devices | grep -q "fastboot"
if [ $? -ne 0 ]; then
warning "The USB cable is not plugged, or the device is not in fastboot mode."
echo "To flash the splash screen, manually execute this command once in fastboot mode:"
echo "fastboot flash splash1 $OUTPUT"
exit 0
else
fastboot flash splash1 $OUTPUT
fi
else
echo "To flash the splash screen, execute this command once in fastboot mode:"
echo "fastboot flash splash1 $OUTPUT"
exit 0
fi
else
warning "ffmpeg not found! Please install it before running this script!\ni.e. (DEBIAN) apt-get install ffmpeg / (OSX) sudo port install ffmpeg"
fi
Edit:
elegos said:
- Open the terminal -> nano splash_creator
- copy / paste the code
- [CTRL]+O, then [ENTER]. [CTRL]+X
- chmod +x splash_creator
- Put the image you want as splash screen in a folder where the script is (it is actually in your home)
- Open terminal -> cd your/folder/here
- ./splash_creator your_image_here.whatever
Click to expand...
Click to collapse
Also feel free to post your splash screens here as well
Splash screens
So here's one that mjybarr made, and one I'm using right now, both very nice splash screens
Works like a dream! Thanks for providing this tut.
I was pretty excited to start messing around with building my own ROMS, and after I compiled CM10 from source for my GNex, I decided I wanted to tweak it somehow. I started messing around with the boot animations, and then had a really tough time getting it to work on my phone.
There are a lot of great tutorials on XDA about creating boot animations I mostly used this one: http://forum.xda-developers.com/showthread.php?t=1212555 ), but almost all of them assume a Windows environment. This is not important until it comes to creating the bootanimation.zip, which must be stored only and not compressed.
In order to execute the zip correctly on Ubuntu, the command must be given with the following form:
Code:
zip -0 ../bootanimation.zip desc.txt part0/* part1/* part2/*
This command assumes that you are inside the directory that holds your desc.txt file, and that the directories listed in the desc.txt are subdirectories of the current directory, named part0, part1 and part2. Obviously, you can modify this command as needed, but this will create a ZIP file that Android can read. This is where I finally found the instruction on how to create the ZIP:
http://www.modaco.com/topic/338623-...nimationzip-futurama-bender-bootanimationzip/
By the time I had figured out the correct zip command, I had put together my boot animation countless times. To speed up this process, I wrote a script to do it. By the time I was done, I had a pretty full featured script for changing CM10 boot animations, so I decided to share it.
What this script does not do
This script does not help with the graphical design. It assumes you have a working directory of 1200x1200 jpgs, that are already number correctly. It assumes that you have created a valid desc.txt for those jpgs.
What this script does
This script takes your baseline 1200x1200 jpgs, and scales them for each of the resolutions that CM10 uses. It then (optionally) places them in the directory that CM10 pulls from when it creates a ROM from source.
Why this useful
I wanted to take the baseline CM10 boot animation and tweak it. Using this script, I can create the full boot animation I want at 1200x1200, execute, and then it will automatically drop the correct scaled boot animation for each resolution that CM10 uses. Plus, it automatically creates archives of all your work, date and time stamped, along the way. It can handle any number of parts, with any names.
It does not create the desc.txt automatically.
Of course, this script can be tweaked for your own needs. I hope this is helpful to someone.
Code:
#!/bin/bash
#This script assumes that a directory called 1200 has the template files to use
#It will blow away any files in the other directories!
#In the GRAPHDIR variable, put the location where the graphics are located
#This script assumes that the base images are jpgs and are 1200x1200
#If $GRAPHDIR has any spaces in the path, this script will not work.
# $WORKDIR is the directory that holds the originals, and must be a subdirectory of $GRAPHDIR
GRAPHDIR="/home/jbk/androiddev/bootanimgraphics"
CMGRAPH="/home/jbk/androiddev/Source/vendor/cm/prebuilt/common/bootanimation"
WORKDIR="working"
PARTDIR=""
TAIL='/*'
#First, figure out the names of the part directories and store for later
for f in $(find "$GRAPHDIR/$WORKDIR/" -maxdepth 1 -mindepth 1 -type d -print)
do
b=$(basename $f)
PARTDIR="$PARTDIR $b$TAIL"
done
#now, create a set of images and desc.txt for each resolution used by CM10,
#then zip them without compression
#next, delete the working directory
for RESOL in 240 320 360 480 540 600 720 768 800
do
if [ -d $GRAPHDIR/$RESOL ]; then
rm -rf $GRAPHDIR/$RESOL
fi
cp -r $GRAPHDIR/$WORKDIR $GRAPHDIR/$RESOL
find $GRAPHDIR/$RESOL -name *.jpg -execdir convert {} -resize "$RESOL"x"$RESOL" {} \;
sed -i -e "s/1200/$RESOL/g" $GRAPHDIR/$RESOL/desc.txt
cd $GRAPHDIR/$RESOL
zip -0 ../$RESOL.zip desc.txt $PARTDIR
cd -
rm -rf $GRAPHDIR/$RESOL
done
#Now, create the zip for the template images
cd $GRAPHDIR/$WORKDIR
zip -0 ../1200.zip desc.txt $PARTDIR
cd -
#Determine if the CM boot animation directory is valid
if [ -d $CMGRAPH ]; then
#If the CM boot anim dir is valid, tarball all the zips there back at the base dir
cd $GRAPHDIR
tar -cvzf CMBOOTBK_`date +%Y%m%d_%H%M%S`.tar.gz $CMGRAPH/*.zip
#Delete the old zips from the CM dir
rm $CMGRAPH/*.zip
#Store the new zips in the CM dir
cp *.zip $CMGRAPH/
cd -
fi