Related
Hi,
Here a release of kboot.
Kboot permit to boot multiple os with different kernel.
It's based on a buildroot environment.
The source to make your own kboot filesystem are available here
The kernel source are available here
You can download the install archive :
ARCHIVE VERSIONS
0.0. Unstable release. Freeze bug. Install release ARCHIVE (Obsolete)
0.1. Fix freeze. Python bytecode generation (pyc files) is naturally not friend with squashfs. Install release ARCHIVE (Obsolete)
0.2. STABLE Release. Display timeout, migration from squashfs to initramfs. Install release ARCHIVE
The archive looks like :
zImage and initramfs.cpio.gz to flash in SDE menu
a directory kboot which contain:
conf directory : configuration file
os directory : os to boot
images directory : background menu image
Installation
Kboot directory
Copy the kboot directory on your archos in /mnt/storage/, you should have this path /mnt/storage/kboot. The path should be exactly the same otherwise kboot will not be launched
Flash zImage and initramfs.cpio.gz
Follow this link to setup SDE on your archos http://forum.xda-developers.com/showthread.php?t=930197
After Reboot
You should have the following screen. Note: after installing Kboot the device permanently reboot in Kboot.
The main menu will display the os put in os directory (see in Configuration OS boot menu to see how to include your os), advanced menu and halt.
Boot menu
OS boot menu
I have tried to make things simple. To add an OS, all you need is to create a directory in /mnt/storage/kboot/os/ and put in this newly created directory the files zImage and initramfs.cpio.gz.
Important, the name should be exactly zImage and initramfs.cpio.gz, if one file is missing or misnamed the menu item don't appear
For example, the menu above have the following content in /mnt/storage/kboot/os :
Code:
/mnt/storage/kboot/os/Android Froyo:
drwxrwxrwx 2 2000 2000 4096 Feb 27 23:42 .
drwxrwxrwx 5 2000 2000 4096 Feb 28 15:02 ..
-rw-rw-rw- 1 2000 2000 726520 Feb 27 23:39 initramfs.cpio.gz
-rw-rw-rw- 1 2000 2000 2564460 Feb 27 23:39 zImage
/mnt/storage/kboot/os/Android Honeycomb:
drwxrwxrwx 2 2000 2000 4096 Feb 27 16:46 .
drwxrwxrwx 5 2000 2000 4096 Feb 28 15:02 ..
-rw-rw-rw- 1 2000 2000 0 Feb 27 13:42 initramfs.cpio.gz
-rw-rw-rw- 1 2000 2000 0 Feb 27 13:42 zImage
/mnt/storage/kboot/os/UrukDroid 1.6:
drwxrwxrwx 2 2000 2000 4096 Feb 28 15:03 .
drwxrwxrwx 5 2000 2000 4096 Feb 28 15:02 ..
-rw-rw-rw- 1 2000 2000 2874800 Jan 3 19:41 initramfs.cpio.gz
-rw-rw-rw- 1 2000 2000 2302252 Jan 3 19:26 zImage
Note : for specific kernel you can add a file named cmdline containing kernel parameters
Advanced boot menu
Boot init : boot into android, if android kernel was uninstalled, this item didn't appear
Boot recovery : boot into recovery
Soft boot : For details about omap soft reboot see the discussion here
Configuration
There is a configuration file in kboot/conf directory named config.ini. This file is divided into 3 section
init
telnet : 1 to enable telnet, 0 to disable
usbip : set the ip address of usb ethernet interface
Code:
[init]
telnet = 1
usbip = 192.168.10.1
kboot
last_selection : enable (1) or disable (0) the boot by default of the last selectioned entry after a configured timeout
last_selection_timeout : timeout in second
softboot : enable or disable softboot menu
title_font_size : set the title font size
menu_font_size : set the menu font size
title_color : title color in r,g,b format
menu_item_color : menu unselected color in r,g,b format
menu_item_selected_color : menu selected color in r,g,b format
Code:
[kboot]
# boot last selection if no key pressed after 30 seconds
last_selection = 1
last_selection_timeout = 30
# enable soft boot menu (bootloader dev only)
softboot = 1
# some tuning
title_font_size = 36
menu_font_size = 32
# change the color, R,G,B format
title_color = 255,255,255
menu_item_color = 92,97,98
menu_item_selected_color = 0,0,255
softboot
item<n> : the boot sequence wanted
Code:
[softboot]
# put a list of items to display in Soft boot menu
# item<n> = sequence
item1 = uart,usb,mmc1,mmc2
item2 = uart,usb
item3 = mmc1,mmc2
background image
To customize the background image, just replace the file kboot/images/bkg.png with your own and adapt if necessary the size and the font color.
BUGS
Feedbacks are welcome
Cool stuff bro!
Unfortunately it's not working on the A70S, as we only have 800x480 and therefor need a diff picture.
It seems to be good.I have tested it on my A101 and it can boot both openaos and urukdroid.
Thanks.
EDIT:Sorry, Urukdroid cannot boot.It stay at the boot animationan and always show that.
fzelle said:
Unfortunately it's not working on the A70S, as we only have 800x480 and therefor need a diff picture.
Click to expand...
Click to collapse
As an early release I didn't take the time to put the different resolution. The background image have a 1500x1200 resolution, so on 101 it didn't display right too. However kboot adapt resolution for corresponding board. kboot didn't boot on 70s or display wrong the background image ?
MarsCarmen said:
EDIT:Sorry, Urukdroid cannot boot.It stay at the boot animationan and always show that.
Click to expand...
Click to collapse
I have to test urukdroid on mine.
The menu is not readable because the resolution adaption is not doing what it should do.
fzelle said:
The menu is not readable because the resolution adaption is not doing what it should do.
Click to expand...
Click to collapse
I have uploaded a new archive here.
Replace rootfs.squashfs with the new one. Fixed : resolution was wrong for 70S and 70H*.
The zImage in new archive should be flashed, it seems to fix the random freeze.
MarsCarmen said:
EDIT:Sorry, Urukdroid cannot boot.It stay at the boot animationan and always show that.
Click to expand...
Click to collapse
I have to say sorry again that Kboot can boot Urukdroid properly.It was because I copied my backup file to my archos by using MY PC.That is why I cannot boot urukdroid.Maybe I didn't find the real cause. I'm now using Kboot to boot Urukdroid and Openaos.
Really very well!!
Sorry For My Bad English
@alephzain:
Copied the whole kboot dir and flashed the new initrams and zimage.
Looks still as before.
fzelle said:
@alephzain:
Copied the whole kboot dir and flashed the new initrams and zimage.
Looks still as before.
Click to expand...
Click to collapse
. Kernel natively support usb gadget ethernet, when kboot is launched a telnetd is started, an interface usb0 is configured with ip address 192.168.10.1.
if you are on linux it should automatically detect this and on your pc an ifconfig let appear usb0 interface. On your pc type :
Code:
ifconfig usb0 192.168.10.2 netmask 255.255.255.0 up
telnet -l root 192.168.10.1
.
If you can paste a ps output, to see if it detect you board correctly.
Found a Live Linux to use in a vm.
ps output starts with :
{init} /bin/sh /init A70S 07 /dev/mmcblk1p1 /dev/mmcblk0p1
fzelle said:
Found a Live Linux to use in a vm.
ps output starts with :
{init} /bin/sh /init A70S 07 /dev/mmcblk1p1 /dev/mmcblk0p1
Click to expand...
Click to collapse
Its fixed now . Replace rootfs by this one
alephzain said:
Its fixed now . Replace rootfs by this one
Click to expand...
Click to collapse
Please adapt the first post also so that future users have the correct files.
Maybe add a version number....
---------- Post added at 04:27 PM ---------- Previous post was at 04:12 PM ----------
This may be a stupid question but why do you need a squashed fs that contains (when unsquashed) about 30Mb on files including python?
it should be possible to trim that down and put all the scripts and support libs in the initramfs so that you only need to flash the kernel and initramfs and nothing else.
Working now.
If now someone could come with the possibility for booting older stock FW,
would be great.
fzelle said:
Working now.
If now someone could come with the possibility for booting older stock FW,
would be great.
Click to expand...
Click to collapse
Not really possible because the stock firmware (initramfs) always uses the same location for the root file system.
You could do it but it needs some changes to the initramfs that is placed in the dirs.
wdl1908 said:
This may be a stupid question but why do you need a squashed fs that contains (when unsquashed) about 30Mb on files including python?
it should be possible to trim that down and put all the scripts and support libs in the initramfs so that you only need to flash the kernel and initramfs and nothing else.
Click to expand...
Click to collapse
Files on first post have been updated, but you're right a better presentation to avoid confusion is necessary.
Simply because I use python (pygame which use sdl) to code Kboot. Python lib dir is about 13M ... . A minimal filesystem (compressed initramfs) for kboot work is about 8M + ~2M for the kernel give 10M, and it's too big to flash in SDE max 8M. But if i can optimize the size ... I will do
alephzain thanks for the sources on gitorious, I hope I have some time in the weekend to try it out
divx118
@divx118:
And could you then make a initramfs.cpio.gz that direktly boots into CM7?
Hi,
im just about testing...
But sadly I can't get it to work.
Each time the menu starts up i can navigate nicely though the menues.
But whenever I select an entry - noting happens
After that I can still navigate ONCE (up or down) to the next entry and then the device freezes.
It doesn't matter wich entry i select as it seems. I tested Boot init, and my custom entries (UrukDroid and BullRC) yet. But all behave the same.
Any ideas ?
Btw: I tested it with the acutal squashfs and the one packed in the zip (even they seemed to be the same in size)
EDIT:
SOLUTION: I had usb cable attached (since flash) and that made it freeze - juts removed the cable and all is fine
Thanks and gr8 work - was looking for this since ages
fzelle said:
@divx118:
And could you then make a initramfs.cpio.gz that direktly boots into CM7?
Click to expand...
Click to collapse
Yes, no problem.
[UPDATE] For the lazy people: You do not have to follow the whole tutorial. Simply download the attached bootanimation.zip and copy it to your /system/media as you are used to. If you want to know what I modified, read the tutorial.
Hey people!
I have a Motorola Razr (Germany/EU Retail with Android 4.0.4), already rooted with EternityProject's EasyRootICS.
The standard bootanimation on EU-Razr ist boring, so I downloaded the Verizon Droid Razr animation und put it into /system/media
Problem: The sound file starts half a second after the animation and one can see that! And that is annoying the **** out of me!
My solution to that is as follows:
1. Extract bootanimation.zip to your computer.
2. Open desc.txt, this is the standard content on Droid Razr:
Code:
# 540 wide, 960 tall 15 frames per second
540 960 15
# p means we're defining a part
# first number is repeat count, 0 means infinite
# second number is delay in frames before performing the next part
# so if you are playing 15 frames a second 15 would be... one second
# string defines the directory to load files from
# files will be loaded in order but names don't matter
# s defines a sound for a part
# sounds will be loaded from /system/media
# oggs with loop points will loop automatically
# only one sound will play at a time
# timing is driven by the part, not the sounds
# if you want no sound, leave blank
# droid
p 1 7 01_droid
# mobility
p 1 0 02_mobility
s droidhd.ogg
# loop
p 0 0 03_loop
As you can see, the audio file is linked after 7 frames (at 15 frames per second that is almost half a second) have already been shown and that is why it starts that late.
3. Move up the line that begins with "s", so that the specific part at the end looks like this:
Code:
# droid
p 1 7 01_droid
s droidhd.ogg
# mobility
p 1 0 02_mobility
# loop
p 0 0 03_loop
4. Use 7-zip to create an uncompressed ZIP-file, name it bootanimation.zip. It is very important that it is uncompressed, because android cannot open compressed files as bootanimations. You can do this with 7-zip by changing the compression-level from "Normal" to "Store".
5. Copy the new bootanimation.zip to /system/media
6. Reboot and enjoy!
I uploaded my modified bootanimation.zip (as above) - the other filenames are selfexplanatory. Of course you have to unpack one of the audio-files from droidhd.zip to use it for the bootanimation.
For everyone who is interested in modding or creating bootanimations, I recommend this how to: http://www.addictivetips.com/mobile/how-to-change-customize-create-android-boot-animation-guide/
Hello, do you know why after this mod, I end up with a black screen? I just replaced my original verizon boot animation with yours
Hello Olao99,
as you perhaps can see, as a German I just own a Razr Maxx XT910 (EU/GSM) and do not know which differences there are in comparison to an XT912 (Verizon/CDMA). So far: I just followed my own instructions on this page again and it works fine for me.
Does your phone boot up and only does not show any boot animation? Or is it bricked and does not boot up at all?
Greetings
derLichtschalter
I rebooted it again, and it worked, thanks for the workaround.....
The audio is now at sync, however when booting, the animation lags a bit, making it look choppy until the end is reached. I guess is too much for it to display? I don't know, probably the fps?
In desc.txt you can see in the first line "15 frames per second". For a smooth animation there should be at least 24 frames per second, so it is normal that it looks a little bit choppy as you say.
Thanx soooooo much for this...
Being new to XDA, I originally posted this information in the General Discussion forum under Changing the XOOM Splash Screen". Having had time to dig around more and read, I think this information is better suited here in the "Chef" area.
I have searched the web and many forums regarding this issue and found many many discussions on how to use utilities to do this and that to the Motorola XOOM Splash Screen. Most of which involved cropping the image to 256x320. This seemed a bit odd on 2 levels. First, no one ever seems to what to explain the process or the whys and wherefores, and second with a 1280x800 screen, having such a small splash screen just seemed odd.
So starting with the utility in :
http://forum.xda-developers.com/showthread.php?t=1410040
and found I was randomly able to change my splash screen. I say randomly as it did not always seem to succeed, even though it appeared it had. As there was no feed back to indicate success or failure, one must presume it worked. So I did a bit of digging on how it worked and found that the image is an RGBA image with a depth of 8 for the XOOM. Additionally the image is simple stored on the partition pointed to by :
/dev/block/platform/sdhci-tegra.3/by-name/logo
This is simply a link to /dev/block/mmcblkXp4 (where the 'X' is 0 or 1 depending on if and when the external SD card was mounted). I therefore INSIST that the long path to the logo name be used to reference this partition as it will always point to the proper partition as mounted.
Another note -- sdhci-tegra.3 is the internal SD card while sdhci-tegra.2 is the external SD card.
Also, I found that the link above and the utility are only partly accurate. The utility requires you to crop an image to 256x320 before applying it the splash. This is actually not accurate. You can use an image up to 1280x800. The full size of the XOOM sxcreen. As long as you know the secret, and the BIN file isn't over 4M (4,194,304 bytes), which I am going to show you. For some reason I can find a lot of information on special tools to do this, but no one seems to want to just give away the format details. If you're like me, tools are nice, but you like to know what they are doing.
The best tool I found for converting an image to the RGBA format needed is ImageMagicK. If you used the utility I mentioned before, then you already have it installed. I think it's best because of the many features and simplicity. Plus the price is right. To modify the splash as I describe or use the tools I have attached below, you need to have ImageMagicK installed. With it you can do a convert of any image to the proper RGBA format by using the following command:
convert -size <W>x<H> -depth 8 <FILE> <RGBA>
Where <W> is the width of the image. Up to 1280.
<H> is the image height. Up to 800.
<FILE> is the image file (jpg, png, tiff, etc)
<RGBA> the name of the output rgba file, MUST have rgba as the file extension
This will create the RGBA file of the image needed to create the BIN file. This is where the utility in the other post fails out. The RGBA file must be converted to a "BIN" file. Which is basically nothing but the RGBA file with 20 extra bytes at the front. These bytes are:
ID - "SOL:"
xOffset - Offset from the left side of the screen (Being in landscape mode), up to 1280
yOffset - Offset from the top of the screen, up to 800
Width - Image width
Height - Image height
All values are in big endian format. Meaning that the value for 256 would be x'00000100' as opposed to the PC storage mode of little endian which would produce x'00010000'. I am including a windows program as an attachment that will make the BIN file. It is a command line program, and if you run it with no options, you get :
USAGE: MakeBIN.exe <input> <output> <width> <height>
Where -- <input> is the rgba file to be converted to bin
<output> is the name of the bin file to create
Note that for flashing to XOOM logo, the output BIN file
cannot be more than 4 meg in size.
If the width and height of the image are not specified to the MakeBIN utility, it defaults to 256x320. Additionally, the offsets are dynamically calculated to center image on the XOOM.
With this header in the front of the image, you are ready to "flash" the new splash screen. All you have to do for this is use ADB. First push the new file over to the XOOM using something like:
adb push mysplash.bin /data/local/.tmp
Once the file is there, you flash it. Again turning to ADB:
adb shell
This will put you at the command line on the XOOM. From there perform the following:
cd /data/local/tmp
dd if=mysplash.bin of=/dev/block/platform/sdhci-tegra.3/by-name/logo
exit
When you return to the command line, you are ready to go. Just reboot the XOOM your preferred way and enjoy your new splash screen. I like to do :
adb reboot
I hope this information has been helpful to others looking to make a bigger splash with the XOOM.
Oh. Two other things to keep in mind. The default background is black. So unless you're going full screen, you want to be sure you're using a black background. Or the second thing comes in handy - Transparency works. As the image is an RGBA format image, the attribute information for the pixel is supplied allowing transparency.
Now. I usually like to back up things before I do changes like this. If you do as well, simply perform the following prior to writing the above image out. This will create a 4M copy of the splash partition. Not all of the partition contains the existing image, but it doesn't hurt to have it all.
adb shell
cd /data/local/tmp
dd if=/dev/block/platform/sdhci-tegra.3/by-name/logo of=backup_splash.bin
exit
adb pull /data/local/tmp/backup_splash.bin
You can always reimage it to the partition by following the steps above.
I have attached a Apple image I used as a test. As it is 1280x800, the full screen was presented with my image. It's really an awesome site to see your full screen splash for the first time.
Further, I decided to make things easy. I developed a simple batch script for the Windows command like that will perform all the steps addressed above. It first verifies that the tools it needs are available, the creates the image and will flash it. Each sequence of steps it reported to the command window and you are prompted to perform each block. A "N" or empty response to the continuation questions causes the script to exit. So you could generate the BIN file without flashing it.
This is a very basic script. I could have developed a Windows application, and hidden all these steps so only I knew how to do it. Or even developed a XOOM app that would do it so you'd never know what I was doing. But I think the best way for others to learn about their systems is to know where things are and how they are used.
With that in mind, I have included the batch file in the zip.
Lastly, some information about partition sizes. I mentioned above that the partition size for the XOOM logo partition is 4M. That is to say it is 4,194,304 bytes in length. Why is this important? Because it will hold a full size 1280x800 image. When converted, a 1280x800 image using a depth of 8-bits is calculated as follows:
Size = Width x Height x 4
Why '4'? Because this is an RGBA file. The type says it all. As there is a depth of 8 bits, each color representation is 1 byte in length. 1 for Red, 1 for Green, 1 for Blue, and 1 for the attribute. That makes 4 bytes per pixel on the screen.
We then have to add the 20 byte header that tells the loader where to place the image and how big it is.
In total, the most a full screen splash will EVER be is : 4,096,020 bytes
This leaves 98,284 bytes as a buffer in case someone makes a boo boo.
Following the steps and using the tools I have documented in this thread, you will never make a boo boo and you will have lots of fun putting any image you like as your splash screen. (I'm using a photo of my family).
Thanks for taking the time to read my ramblings.
Thanks for the info! Nice work my friend.
Hello Everyone!
After i managed to change the boot animation, i started researching some ways to change the boot logo or the splash screen that appears before the boot animation.
Boot animations and splash screens are two different things. The splash screen is the first static frame that you see the moment you turn on your phone. It is displayed before boot animation and it is usually much harder to change.
To change your boot animation, view my post at: http://forum.xda-developers.com/honor-7/help/how-to-change-boot-animation-huawei-t3247851
Back to the splash screen, so far I know the following:
1. The image file must be stored in RGB565 format. Photoshop and Paint.Net (with a plugin) are capable of saving in this format. In Photoshop, you can find it from the advanced options of .bmp.
2. There is a file called "oemlogo.mbn" which i think is responsive for the boot logo. After changing it though, it did not have any affect on the boot logo or splash screen.
If someone knows which file is responsive for the splash screen or he/she can point out a way to change that, it would be greatly appreciated.
Thanks in advance for your help!
Best Regards,
Ken
Here is the solution
All the credits goes to Ziolek67 and Kostyan_nsk, I just made the zip to revert back to our stock logo, and made his guide compatible to our device. Thanks to @kenshiwara for helping me.
**TAKE NANDROID BACKUP VIA TWRP RECOVERY BEFORE DOING THIS**
1. Install adb and fastboot in your PC.
2. Dump your "oeminfo" partition by executing this command
Code:
adb shell su -c "dd if=/dev/block/platform/hi_mci.0/by-name/oeminfo of=/sdcard/oeminfo"
this will be saved in your internal storage as "oeminfo". Saving this to PC is recommended. To do that execute this command
Code:
adb pull /sdcard/oeminfo oeminfo
3. Now, Ziolek67 mentioned to edit the pulled "oeminfo" but in our case I tried and got error "resolution mismatch", so I pulled out his provided stock "oeminfo" of Huawei Ascend P7, which works fine, the sizes are also same of both the "oeminfo". Download this tool, extract and save it to the folder having adb and fastboot.
4. Make your own image with extension *.bmp. The resolution of the image should match your device resolution (1080x1920 pixels). Put it to adb folder.
5. Download OEMinfo.zip extract it and put "oeminfo" in adb folder.
6. Put your *.bmp image in "oeminfo" by executing this command.
Code:
OEM_logo.exe oeminfo *your_logo.bmp*
7. Push new "oeminfo" to your internal storage by executing this command
Code:
adb push oeminfo /sdcard/oeminfo
8. Put new "oeminfo" with new logo in your device by executing this command
Code:
adb shell su -c "dd bs=32768 if=/sdcard/oeminfo of=/dev/block/platform/hi_mci.0/by-name/oeminfo"
**UPDATED THE ABOVE COMMAND, THANKS TO @sminki
9. Now reboot your device to see your changed logo.
10. To revert back to stock Honor logo simply flash this file using TWRP recovery.
You can get more info here thanks to Kostyan_nsk.
How to make a compatible *.bmp image
Create a new file in Adobe Photoshop with these parameters:
Width: 1080 pixels
Height: 1920 pixels
Resolution: 72 pixels/inch
Color Mode: RGB Color, 8-bit
Click to expand...
Click to collapse
After making your image save it with these parameters:
Extension: *.bmp
File Format: Windows
In "Advanced Options"
Select R5 G6 B5 from 16-bit depth options.
Click to expand...
Click to collapse
The Android Hero Of Today! ~ Amazing guide. Thank you very much!
Thank you @kenshiwara
it should be noted that in the wrong hands dd can brick your device, you are writing directly to the block device and dd does not care what you are doing.. especially if you do not add bs and/or count
I don't think adding bs would do any good, as dd automatically stops when the input of blocks runs out, in our case that is 32768, it can't go forever . Hope this was what you were pointing out, if no then please explain, I don't know much about other attribs and if the commands need any improvements then please suggest it so that I can add it.
Thank you
no it's fine, just giving general advice
when i said "you" i didn't mean you
you never know who is reading these things and what they might do, dd can be very dangerous, as you (DigiGoon) know... Man that was confusing
Oh, Okay
I have just written a clearer version of your solution, at my post here:
http://forum.xda-developers.com/honor-7/general/guide-beginners-how-to-root-update-fix-t3255452
Everything is the same, i just made it bit more organized for the absolute beginners to understand.
Thank you @DigiGoon and @sminki for writing and updating this guide.
Anytime buddy @kenshiwara
Hey folks, thanks to @iElvis sharing his or her logo 'data' from the OP6. I have adapted my previous OnePlus programs that let you change the splash screen to work with the OP6. This means that the encoding of the data structure and the encoding of the image data are done. I do not have a OP6 and can not test certain things like where to put the modified file. In the past, flashing was always easy (and always has been especially with the OnePlus models).
My holdup and why I need the XDA/OP6 community support is to find out where to exactly put this modified file. In the past I haphazardly made a super fast in-memory program for altering the splash screen for the Nexus 6p that was (and is currently) at a roadblock for one reason. That reason was Google used ELFs to populate partitions (not short people with pointy ears and green clothing), and at that time utilized separate partitions that the ELFs populate. Not all were ELF generated, but that is outside of the scope of what I do because to a certain point the ones that I wanted to change were generated that way.
This concept of splitting partitions, back then, was just trying to grab a footing on seamless upgrades initially from what I have read up until this newer style. I have put some research into some things involving this, but Google is kind of bland in it's description of what this all means. This is different than the Nexus 6P that I mentioned previously, and if you read that last link, it may be just as easy as flashing it to both partitions logo_a & logo_b. One partition is always active and has two different statuses, which make the device 'ideally' always bootable after an OS update.
Most of my research was done through reading a lot of the open source code put out by the AOSP for "fastboot". You can learn more than you can ever derive from documentation in this realm. I hope to hear some feedback of attempts so that I can delete all of this up above
Please read below so you can better understand this type of encoding being used:
What Is A Raw Image?
A raw image, whether it be a file or an image in memory, is simply pixel data. There is no extra information like width, height, name, end of line... Absolutely nothing, just pixel data. If you have an image that is raw and the resolution is 1080x1920 and you are using a typical RGB24 or BGR24 (like the ones used here), then your exact filesize or size in memory will be 1080x1920x3! We use 3 here because there is one byte for the R or red component, one for the G (green), and one for the B(blue).
What Is A Run Length Encoded Image?
A run length image encoding uses a count ;usually a single byte (char), 2 bytes (short int), or 4 bytes (long int); and then the pixel components. So instead of writing out 300 bytes of '0's to make a line of 100 black pixels. Black is RGB(0,0,0). You could encode this as 100, 0, 0, 0. And only use 4 bytes of data to get the exact same image as the 300 byte raw image. All the run length encoding I've found, except the Motorola style which is a little different, use a run length encoding that is pixel-oriented like this.
Now I've found this new one and it is a byte-oriented run length encoding. This is for runs of bytes, not pixels. You may think, well whats the big deal? When you add a little area of color, you increase the run length encoded image in you logo.bin immensely! You use 6 bytes per pixel if there aren't any runs of color data. If you had an image that was a 1080x1920 black image with a 25 pixel horizontal line in the middle. The encoder would be doing runs of black data efficiently until it reached the red area.
.....0 255 0 255 0 255 0 255 0 255 0 133 /// we've reached the top left corner of the red line /// 13 1 30 1 255 1 // << that was just one red pixel!! in bgr color order (13, 30, 255) <<// And it keeps going through the rest of the red pixels on that line using 6 bytes per pixel, which is the opposite of compression. Before reaching the red line the encoding was decoding to 255 zeros over and over, until finally 133 zeros. 255 zeros is 85 black pixels stored in just 2 bytes!
This type of encoding is ONLY good for grey scale images. It is not good with color, but it still will handle color of course. In grey scale, the Red, Blue, and Green data components are always the same values. All the way from black (0,0,0) to white (255, 255, 255); including every shade of grey in between>>>(1,1,1) (2,2,2) (3,3,3)....(243, 243, 243) (254, 254, 254)<<<
One other difference in this method of run length encoding is that the color byte is before the count, which is backwards from all of the other methods.
The attachment contains the executable that was compiled using mingw32 on a 64 bit Windows 10 PC. The awesome PNG library that I used for generating the pngs is LodePng, the source can be found here.
To use the OnePlus 6 Logo Injector:
Decode your logo.bin:
Code:
OP6Logo -i logo.bin -d
All the PNG 's will be extracted from logo.bin. Edit the PNG(s) that you want to change...
Note:
Your original "logo.bin" file is never changed, it is just read. If the file you try to load isn't a logo file, or a different style, then the program will tell you and exit.
Inject the image(s) back in to the logo.bin:
Code:
OP6Logo -i logo.bin -j fhd_oppo fhd_at
To list whats in your logo file:
Code:
OP6Logo -i logo.bin -l
For a more detailed list:
Code:
OP6Logo -i logo.bin -L
If the colors are messed up use the "-s" switch while decoding.
Code:
OP6tLogo -i logo.bin -d -s
If you had to use the "-s" switch to decode properly, you'll have to use it to inject also:
Code:
OP6Logo -i logo.bin -j image_name -s
Note:
You can put as many names after "-j" as you want, and it's not case sensitive. You also don't have to put the whole name. If you just put "-j fhd" every image in the logo.bin that starts with "fhd" will be injected. There has to be a PNG with the name in the directory though
The size of your modified.logo.bin will displayed along with the original size, if everything went good. The 'splash' partition is 16 MB on the OP6. If you use too much color on too many of the images you will easily go over 16 MB. The program will tell you and delete the "modified.logo.bin" that was created. If for some strange reason you would like to keep it, use the "-B" flag on the command.
The last step is to flash the modified logo file via fastboot with the command
Code:
fastboot flash LOGO modified.logo.bin
Use this at your own risk.
Always make backups.
Always.
Source
Source:
I haven't had a chance to work up a custom splash and flash it just yet, in part because I realized that on this phone, the splash screen only shows up for a split second before it's replaced by the "Your phone is unlocked and insecure, don't put sensitive files on it blah blah" warning. So I'm not sure this is going to do a whole lot for us. I'm going to try later tonight or this weekend and report back. Pretty sure "flash logo" should work fine, but it will flash only to the active partition. We may need to "flash logo_a" and "flash logo_b" to get it on both partitions.
Also, thanks for posting the source. I'm going to see if I can get this to compile in Xcode so we have an OSX version.
Edit 6/10: I can't get it to compile in Xcode, but I'm sure it's something I'm doing wrong.
Anyone tested it splash screen
Okay, welp, I'm throwing in the towel on this one. The bootloader warning is not in text like it was on the HTC phones I've modded to remove it. On those phones, the text showed up in the bootloader file in a hex editor, and could be replaced with empty spaces to remove it.
I pulled the boot file from /dev/block/bootdevice/by-name/ and searched through it. None of the text in the warning can be found with a simple search. As I suspected, that warning screen looks like it's a function coded into the boot process, which means removing it is probably impossible.
work Fine !
file :
lodepng.h
lodepng.c
OP6Logo.c
# gcc lodepng.c -c
# gcc OP6Logo.c -c
# gcc *.o -o OP6_prog OR # gcc lodepng.o OP6Logo.o -o OP6_prog
# ./adb shell
# su
# cd /dev/block/bootdevice/by-name
# ls --color --all
lrwxrwxrwx 1 root root 16 1970-01-06 04:29:20.549999999 +0100 LOGO_a -> /dev/block/sde20
# dd if=LOGO_a of=/sdcard/LOGO_a
exit
# ./adb pull /sdcar/LOGO_a ./
# OP6_prog -i LOGO_a -d
MODIFY YOUR PICTURE .....
# ./OP6logo -i LOGO_a -j fhd_
you have modified.logo.bin
Just dd if of and work fine !
And for the Real Splash :
./adb pull /system/media/bootanimation.zip ../
God bless
gao0309 said:
file :
lodepng.h
lodepng.c
OP6Logo.c
# gcc lodepng.c -c
# gcc OP6Logo.c -c
# gcc *.o -o OP6_prog OR # gcc lodepng.o OP6Logo.o -o OP6_prog
# ./adb shell
# su
# cd /dev/block/bootdevice/by-name
# ls --color --all
lrwxrwxrwx 1 root root 16 1970-01-06 04:29:20.549999999 +0100 LOGO_a -> /dev/block/sde20
# dd if=LOGO_a of=/sdcard/LOGO_a
exit
# ./adb pull /sdcar/LOGO_a ./
# OP6_prog -i LOGO_a -d
MODIFY YOUR PICTURE .....
# ./OP6logo -i LOGO_a -j fhd_
you have modified.logo.bin
Just dd if of and work fine !
And for the Real Splash :
./adb pull /system/media/bootanimation.zip ../
God bless
Click to expand...
Click to collapse
Way to remove bootloader unlocked warning?
NO
Please create flashable zip. Of splash screen
I'm trying this on linux on a 6T boot splash screen but I get a segmentation fault:
Code:
__________________________________________________________-_-
OP6 Logo Injector v1
Written By Makers_Mark @ XDA-DEVELOPERS.COM
_____________________________________________________________
FILE: logo.bin
_____________________________________________________________
RGB is the color order. Use "-s" switch to change it to BGR.
#01: Offset:0
Header=SPLASH!!
Width=1080
Height=1920
Data Length=81798
Special=1
Name=
Metadata=
Segmentation fault
Any idea why?
foobar66 said:
I'm trying this on linux on a 6T boot splash screen but I get a segmentation fault:
Any idea why?
Click to expand...
Click to collapse
For 6T, maybe you need look at this thread
https://forum.xda-developers.com/oneplus-6t/development/tool-splash-screen-modification-t3874158
Sent from my ONEPLUS A6000 using XDA Labs
I tried to report that the error memory could not be read under Windows 10 and wimdows7. Then I executed the following instructions under Linux and still reported the error. What can I do, oneplus 6, Android 9.0?
gcc lodepng.c -c
gcc OP6Logo.c -c
gcc *.o -o a.out
./a.out -i logo.bin -d
The following are the results of implementation:
__________________________________________________________-_-
OP6 Logo Injector v1
Written By Makers_Mark @ XDA-DEVELOPERS.COM _____________________________________________________________
FILE: logo.bin _____________________________________________________________
BGR is the color order. Use "-s" switch to change it to RGB.
#01: Offset:0
Header=SPLASH!!
Width=1080
Height=1920
Data Length=77716
Special=1
Name=
Metadata=
Segmentation fault
Code:
C:\Users\denie\Documents\logo>OP6Logo -i logo.bin -d
__________________________________________________________-_-
OP6 Logo Injector v1
Written By Makers_Mark @ XDA-DEVELOPERS.COM
_____________________________________________________________
FILE: logo.bin
_____________________________________________________________
BGR is the color order. Use "-s" switch to change it to RGB.
#01: Offset:0
Header=SPLASH!!
Width=1080
Height=1920
Data Length=81798
Special=1
Name=
Metadata=
C:\Users\denie\Documents\logo>
Any ideas?
Does this work?
Prakyy said:
Does this work?
Click to expand...
Click to collapse
There's no way to hide the Google warning about unlocked bootloaders, if that's what you mean.
iElvis said:
There's no way to hide the Google warning about unlocked bootloaders, if that's what you mean.
Click to expand...
Click to collapse
Really... This is what I've been searching all over for for my 6t... Get rid of the stupid bootloader unlock warning. On all my other devices we always used a custom made boot-logo.bin and installed it on slot a and slot b using fastboot.. I guess if it could be covered up it definitely would have by now. ?
Edit added: I just read the thread. From what I've gathered basically this device (6&6t) is designed different and that's why we can't tamper with/cover up the bootloader warning message.
flash713 said:
Really... This is what I've been searching all over for for my 6t... Get rid of the stupid bootloader unlock warning. On all my other devices we always used a custom made boot-logo.bin and installed it on slot a and slot b using fastboot.. I guess if it could be covered up it definitely would have by now. ?
Edit added: I just read the thread. From what I've gathered basically this device (6&6t) is designed different and that's why we can't tamper with/cover up the bootloader warning message.
Click to expand...
Click to collapse
I gave up after a lot of experimenting. I'm not aware of anyone managing it.
iElvis said:
I gave up after a lot of experimenting. I'm not aware of anyone managing it.
Click to expand...
Click to collapse
You should get an award for your XDA signature. ?? It's funny because it's real and oh so true! The way some people comment on things never ceases to blow me away. I see some posts and I think to myself, "what the hell?" "Who raised this person!?" There are definitely many different types of humans out there in the world that's a fact. I try and stay out of it as much as possible. ? lol.
It sucks we can't just make a ton of boot logos and cover that up. Oh well the 6 & 6t are awesome devices!! Usually whenever I end up on down the road selling my phone and purchasing another one from eBay or swappa things similar to this begin to be solved and then 15 custom roms all drop outa nowhere all at once. ? Happens every...single...time...haha!! Thanks for giving it a shot! :good: