Чем открыть splash img
Предупреждение: данные действия вы выполняете на свой страх и риск! Неправильные действия могут привести к неработоспособности вашего устройства!
Сегодня озадачился сменой загрузочных картинок в Android.
При загрузке андроида последовательно используется 3 экрана:
1) Splash (обычно логотип фирмы-производителя)
2) Logo (по умолчанию зелёный робот)
3) Анимация
На рутованном девайсе заменить анимацию -- самое простое (это файл bootanimation.zip, состоящий из серии зипованных PNG файлов).
Но я хотел получить п. 1 и п. 2 без перепрошивки и пересборки ядра. Как ни странно, оказалось, что заменить п. 1 проще.
Нужен SSH доступ к девайсу. Смонтированные ROM-имиджи находятся в папке /dev/mtd. Чтобы узнать какой из них за что отвечает пишем в шеле:
cat /proc/mtd
Мой медиаплеер Iconbit Toucan Nano выдаёт что-то вроде (ненужное опущено):
mtd0: logo
mtd1: boot
mtd2: system
mtd3: cache
mtd4: userdata
mtd5: ubootenv
Далее через SFTP (я использовал обычный Far Manager с установленным WinSCP плагином) копируем "файл" mtd0 в компьютер. У меня получился файл размером ровно 4 мб внутри которого безо всяких заголовков тупо лежал 24-битный стандартный BMP файл с логотипом Iconbit, а лишнее пространство было просто заполнено нулями (ну это же всё-таки дамп флэша).
Открыв файл в Фотошопе я не меняя разрешения отредактировал его так как хотелось и сохранил в формате 24 бит. Получилось около 1 мб. При помощи утилиты hiew заполнил пустое место нулями.
Для прошивки флэша из командной строки Андроида (т.е. линукса) используется утилита flash_image. В моём девайсе её не оказалось, но я нашёл её в инете и она чудным образом у меня заработала. )) Утилита во вложении.
flash_image имя_раздела путь/имя_файла
Записываемый файл нужно залить сначала на девайс, затем его и указываем, например:
flash_image logo /sdcard/logo/logo1.img
У меня была какая-то непонятность с записью во флэш. Если просто указываешь эту команду, она выполняется, но старые данные не стираются. Однако, если указать в качестве параметра какой-то короткий файл (например 600 кб), то утилита выдаёт ошибку, что файл якобы не найден (хотя он там есть), а в "файле" /dev/mtd/mtd0 после этого оказываются нули. Вот теперь уже можно записывать нужный нам файл. После записи можно проверить результат снова скопировав /dev/mtd/mtd0 на компьютер, там уже должны быть новые данные.
Далее пишем в шеле reboot и наслаждаемся новым Splash-экраном. ))
Часть 2 (лого) находится во втором разделе (boot), но там свой формат, его нужно сначала распаковать, а затем корректно пересобрать. Если это сделать неправильно, можно превратить девайс в "кирпич".
Decker's Blog · Об IT и не только .
четверг, 6 октября 2016 г.
Редактируем Splash Screen в смартфонах на Qualcomm.
Давненько я не писал интересных исследовательских статей, и вот недавно появился очередной повод к проведению такого исследования. Речь пойдет о редактировании Splash Screen'ов для смартфоном на базе Android с чипсетами от Qualcomm. Сразу скажу что статья носит скорее исследовательский характер, воспользовавшись рекомендациями приведенными в ней можно будет отредактировать splash на вашем собственном устройстве или написать ПО для упрощения такого редактирования, однако, уровень подготовки читателя должен быть чуть выше среднего. Т.е. здесь вы не найдете готовых решений в стиле нажмите туда-то, кликните там-то и ваш splash screen поменяется. Однако, если вы попробуете хотя бы немного разобраться в теме, как это сделал я, то безусловно у вас все получится.
Небольшая предыстория . что такое Splash Screen думаю многие представляют (не стоит путать его с boot animation), это как раз та картинка, которая появляется на вашем аппарате сразу после включения, также, отдельные splash screen'ы могут быть встроены в ваш телефон для различных событий, например, при разряженной батарее, переходе аппарата в download mode и т.п. Например в Alcatel Idol 3 6045Y (да и в Alcatel Idol 4 6055K) в прошивке встроены несколько таких splash screen'ов, вот они (всего их 4, правда здесь я привел только 3 картинки):
Давайте разберемся где же они хранятся в аппарате, как их извлечь и как заменить. Общеизвестно что на аппаратах построенных на базе Qualcomm (ну по крайней мере на большинстве) существует определенный раздел на eMMC Flash, который как раз и называется splash. Давайте извлечем этот раздел с аппарата (сделать это можно, например, при наличии root-прав) и попробуем разобраться с его внутренней структурой:
На скриншоте дамп раздела splash открытый в hex-редакторе Hacker's View. Как мы видим, раздел начинается с заголовка SPLASH!!, а дальше уже идут какие-то данные. При этом сигнатура SPLASH!! встречается в файле несколько раз из чего можно сделать вывод что каждая картинка в разделе (в нашем с вами примере их 4) состоит из некоего заголовка, начинающегося с этой сигнатуры и непосредственно данных.
В разборе структуры заголовка мне существенно помог скрипт генерации лого - logo_gen.py с CodeAurora. Начнем с заголовка, если использовать C, то описать его структура можно следующим образом:
В рассматриваемом нами примере width = 1080 (0x0438), height = 1920 (0x0780), тип изображения - 1, т.е. RLE24 Compressed Image и количество блоков - 226 (0xE2). Размер блока при этом равен - 512 байтам (1 сектор), а сам заголовок тоже занимает 512 (0x200 байт). Отлично. Теперь мы знаем куда больше, чем изначально. Теперь настало время познакомиться с тем что такое RLE и почерпнуть немного теоретической информации. Сделать это можно здесь:
-
- Простейшие алгоритмы сжатия: RLE и LZ77 (теория) - [GUIDE] How to Create Custom Boot Logo (splash.img) for Snapdragon Devices - [GUIDE][TOOL][v1.2]-=Solved=-The Google Splash Sceen & Bootloader Graphics
Основное здесь - это статья на Хабре про алгоритм RLE, в Qualcomm'овских девайсах применяется примерно такой же алгоритм (различия очень незначительные), если вы поняли смысл, то без труда поймете и отличия.
Теперь немного практики, т.к. многие не понимают как и чем можно открыть даже несжатое RLE RAW RGB24 изображение, немного расскажу об инструментарии. Первое что мы делаем это ставим x86 или x64 версию IrfanView и обязательно все плагины к нему (!), без плагинов raw изображение у вас не откроется. Далее вырезаем в HIEW (или любом другом hex-редакторе) блок бинарных данных из дампа раздела splash, начиная со смещения 0x200 (т.е. 512 байт заголовка splash мы пропускаем) и вплоть до следующей сигнатуры SPLASH!! в файле и сохраняем получившийся блок как image.rle.raw. Далее берем IrfanView и пробуем открыть в нем изображение как RAW - File -> Open AS . -> RAW File и выставляем следующие параметры:
Это из-за RLE кодирования. Используем python скрипт или доработанную мной утилиту rleimager.exe для декодирования, запускаем:
И получаем файл image.raw, который еще раз пробуем открыть в IrfanView способом который уже описан выше и получаем то, что и должны:
Отлично, не так ли? Собрать все это дело назад можно закодировав RAW RGB24 изображение с помощью RLE, затем добавить корректный заголовок и, если картинок в образе раздела splash несколько, просто объединить блоки разных картинок в раздел и прошить в телефон. Подготовка образа splash.img - это уже "задание на дом".
Специальных утилит для редактирования splash.img для Qualcomm, к сожалению нет (для MTK в свое время написали LogoBuilder, который позволяет перепаковывать logo.bin), но основываясь на полученных знаниях вы вполне можете создать нечто подобное. Или же использовать модифицированный python скрипт для сборки splash.img от GokulNC, например, отсюда (естественно, что перед тем как использовать, нужно разобраться как он работает и модифицировать под свою модель устройства). Также, вы можете добавить корректное RLE кодирование в утилиту rleimager (я дописал только декодирование) и использовать ее в повседневной работе.
Ну и естественно статья была бы не полной без демонстрации работоспособности всего описанного на реальном аппарате. Для примера я нарисовал такое лого, давайте посмотрим как оно будет смотреться на реальном аппарате:
Надеюсь что статья была полезной для вас. Ну а вариантов применения подобной кастомизации можно найти массу, начиная от простого получения удовольствия от новой красивой картинки при загрузке телефона и заканчивая различными полезными функциями персонализации, например, на splash logo можно поместить логотип собственной компании в целях поддержания корпоративного стиля (особенно если все сотрудники пользуются одинаковыми моделями аппаратов), или разместить там информацию о том, куда можно обратиться нашедшему ваш телефон и т.п. Здесь уже все зависит от вашей фантазии.
Im using a Redmi 6 pro (just 6 pro, not note) running DerpFest 10(Sakura-20200914). I've attached the stock MIUI splash screen below, a splash tool for my phone would be really really cool!
Attachments
zubair1836
Senior Member
Attachments
dracinn
Senior Member
I have an LG G8X (G850UM AT&T)
32.64 MB file on MEGA
realpapz
Member
What is splash.img ?
splash.img (or splash.bin or logo.img or logo.bin) is the raw file in which the boot logo (splash screen - the picture displayed when the device is booted) is stored.
It is stored under the partition: splash or logo in many Snapdragon devices (might vary for devices)
How can I know if my device uses splash.img ?
This splash.img is found mostly in Snapdragon devices (atleast as far as I have seen) (except Samsung devices).
To check if your device uses it, just go to the directory '/dev/block/bootdevice/by-name/' and see if there's a partition block named 'splash' or 'logo'.
Or else you can also check your stock ROM (or stock firmware) to see if it contains the splash.img or logo.img or logo.bin (Qualcomm Devices only)..
Where should I get the stock splash.img from?
It can be dumped to your storage by the command:
(Similarly for logo.img or logo.bin)
(You may also find it in your factory images (stock ROM))
How do I edit/modify/create the splash.img ?
Leave a reply in this thread by attaching your splash.img (along with device name) so that I can see what format it is and I'll try to create a tool for your device.
TOOLS for DEVICES SUPPORTED as of now:
(Do not use the tool created for some other devices in your device, it may brick your device)
Click here for very old HTC devices.
Here's an universal splash maker (works only for few devices; I don't know. Your risk) [NOT FOR ALL DEVICES!]
What about Mediatek devices ?
For MTK devices, you might have a different partition for that called 'logo'.
Browse in /dev directory to find out where that is present.
After you have found out, dump the logo.bin file by:
After editing, you can reflash it by:
DEVICE : Xiaomi Mi Mix 2 (Chiron)
BOARD : msm8998 snapdragon 835
Here my splash, take a look please. I hope that file is the right one. Just found it on stock fw file.
Would be nice if you can make a tool for ours eol device . . .
Attachments
shawonshaon2846
New member
dtingley11222
Senior Member
You are probably
Going to laugh at me, but could you make the Light Phone 2 part of the supported phones?
Attachments
Haxlyy
New member
Attachments
F1Xdeveloper
New member
Attachments
Senior Member
I am wondering if anyone knows how to edit boot logo on Snapdragon Samsung Galaxy Note 20 Ultra 9860? There are not splash or logo partitions there unfortunately.
dimoksa777
New member
Hello dear developer ! Thank you for your useful work for all of us ! Please make a tool for repacking splash. img for the Lenovo s5 (k520) smartphone, thank you in advance !
Attachments
Matamboy
New member
Maybe someone can help me, i have an Android Navigation System. As this is really an OEM there is not much information about it, all i have is that is has a Snapdragon 625 msm8953 SoC,Android 10 installed and a Display resolution of 1920*720 pixel (landscape).
I want to create my own Boot Logo , the factory one does not look nice.
I noticed that it can be changed via the splash.img , but i haven`t found out which configuration / format the splash.img is to create a new one
Can someone please help me how to create a new file that will fit ?
i also attached a thumbnail how the logo does look now.
Attachments
Beigua87
New member
Attachments
Aballamis
Senior Member
ZTE Zmax Pro: ZTE Z981 (MetroPCS)
UPDATE:
- I was able to change the bootsplash of ZTE Z981 (Zmax Pro/Metro) with instructions on OP for last device(other ZTE):
• Use dumped file or mine attached and open with Microsoft Paint.
• *PASTE* (NOT OPEN) - file of your choice in 1080x1920(recommend PNG but I used JPG)
• SAVE *(as "splash.img" - make no other changes)
• Using *OrangeFox Recovery* - push INSTALL, push "Install Image", select "splash.img", select "Boot Logo", then swipe to install
•
* I would imagine that this method would work for any/all/many Snapdragon devices with a "splash.img"(or logo.img, logo.bin, etc. using same directions but appropriate filename), especially those able to dump the splash.img file from /dev/. However, the difference would be that if the device's custom recovery(s) do not have a "Boot Logo" or similar .img file flash option, simply use fastboot to flash the "splash.img". The only reason I did not for the Z981 is that it does not have a working unlocked bootloader partition. It is rooted & flash recovery with a Windows program thru "edl" mode. Therefore fastboot commands are, to my knowledge, unavailable. Just got lucky the OrangeFox Recovery Project devs have the "Boot Logo" option for .img file Install.
What is splash.img ?
splash.img (or splash.bin or logo.img or logo.bin) is the raw file in which the boot logo (splash screen - the picture displayed when the device is booted) is stored.
It is stored under the partition: splash or logo in many Snapdragon devices (might vary for devices)
How can I know if my device uses splash.img ?
This splash.img is found mostly in Snapdragon devices (atleast as far as I have seen) (except Samsung devices).
To check if your device uses it, just go to the directory '/dev/block/bootdevice/by-name/' and see if there's a partition block named 'splash' or 'logo'.
Or else you can also check your stock ROM (or stock firmware) to see if it contains the splash.img or logo.img or logo.bin (Qualcomm Devices only)..
Where should I get the stock splash.img from?
It can be dumped to your storage by the command:
(Similarly for logo.img or logo.bin)
(You may also find it in your factory images (stock ROM))
How do I edit/modify/create the splash.img ?
Leave a reply in this thread by attaching your splash.img (along with device name) so that I can see what format it is and I'll try to create a tool for your device.
TOOLS for DEVICES SUPPORTED as of now:
(Do not use the tool created for some other devices in your device, it may brick your device)
Click here for very old HTC devices.
Here's an universal splash maker (works only for few devices; I don't know. Your risk) [NOT FOR ALL DEVICES!]
What about Mediatek devices ?
For MTK devices, you might have a different partition for that called 'logo'.
Browse in /dev directory to find out where that is present.
After you have found out, dump the logo.bin file by:
After editing, you can reflash it by:
GokulNC
Senior Member
derYASIN
Senior Member
I can't find "splash.img"
I have a SM-A500FU with snapdragon 410 msm8916
Sent from my SM-A500FU using XDA-Developers mobile app
sub77
Senior Member
I can't find "splash.img"
I have a SM-A500FU with snapdragon 410 msm8916
derYASIN
Senior Member
Sent from my SM-A500FU using XDA-Developers mobile app
BlueReptile
Senior Member
GokulNC
Senior Member
Please report if there's any bug or if something's wrong
Hugo Tai 100
Member
Requesting for Xiaomi MI3
I've attached a splash.img for my Xiaomi Mi3 but this file is huge
possible to create a tool for it?
Attachments
heliusjing
Senior Member
GokulNC
Senior Member
Sorry, but the splash.img you provided seems to contain the bootloader or something important along with the splash image..
Though I can create a tool, there might arise issues..
It seems quite dangerous, so I'm not doing this
BlackSoulxxx
Senior Member
Attachments
GokulNC
Senior Member
This file seems to be empty completely..
Just open it using any Hex Editor, you'll know it yourself..
How did you get the splash.img ?
Using 'dd' command ?
BlackSoulxxx
Senior Member
This file seems to be empty completely..
Just open it using any Hex Editor, you'll know it yourself..
How did you get the splash.img ?
Using 'dd' command ?
Saw*it, and yup. Dd if command via terminal on phone, rooted
Not*sure why its empty, tried to dump again and still empty.
edwaine
Senior Member
What is splash.img ?
splash.img is the raw file in which the boot logo (splash screen - the picture displayed when the device is booted) is stored.
It is stored under the partition: /dev/block/bootdevice/by-name/splash in many devices (might vary for devices)
How can I know if my device uses splash.img ?
This splash.img is found mostly in Snapdragon devices (atleast as far as I have seen) (except Samsung devices).
To check if your device uses it, just go to the directory '/dev/block/bootdevice/by-name/' and see if there's a partition block named 'splash' or 'logo'.
Or else you can also check your stock ROM (or stock firmware) to see if it contains the splash.img or logo.img or logo.bin (Qualcomm Devices only)..
Where should I get the stock splash.img from?
It can be dumped to your storage by the command:
(Similarly for logo.img or logo.bin)
(You may also find it in your factory images (stock ROM))
How do I edit/modify/create the splash.img ?
(It's a quite lengthy process, I'll explain it in detail soon..)
As of now, you can reply in this thread by attaching your splash.img (along with device name) so that I can see what format it is and I'll create a tool for your device.
TOOLS for DEVICES SUPPORTED as of now:
(Do not use the tool created for some other devices in your device, it may brick your device)
Type 1 splash.img: (RAW RGB24 format)
Type 2 splash.img: (RLE encoded RAW RGB24 format)
Type 3 splash.img: (CM-SPLASH based)
What about Mediatek devices ?
For MTK devices, you might have a different partition for that called 'logo'.
Browse in /dev directory to find out where that is present.
After you have found out, dump the logo.bin file by:
Hello. My Phone is Phonemax M1S, is Qualcomm and Android 10, and here is the splash.img. I don't know how to open or edit this file, or instead change the boot logo, please, tell me how to make my own splash.img with my own image for flashing.
THANK YOU VERY MUCH.
Attachments
Adamant12
Member
Thread still alive? If so, if possible, i would like a tool for my realme 5 too, i would really appreciate it. TIA
Attachments
Adamant12
Member
Hello friend. Can we do something for the redmi note 9s? A clean boot screen without the unlocked icon would be enough for me. Thank you..
Adamant12
Member
Hello sir, can you 4ward or attached here the tool you used to generate the splash.img? I would really appreciate it. TIA
TechnicalHamid
Member
TechnicalHamid
Member
Bontersoft
Member
Splash maker for redmi 7 please.
here my stock splash.img :
Attachments
Md Gulam
Member
What is splash.img ?
splash.img (or splash.bin or logo.img or logo.bin) is the raw file in which the boot logo (splash screen - the picture displayed when the device is booted) is stored.
It is stored under the partition: splash or logo in many Snapdragon devices (might vary for devices)
How can I know if my device uses splash.img ?
This splash.img is found mostly in Snapdragon devices (atleast as far as I have seen) (except Samsung devices).
To check if your device uses it, just go to the directory '/dev/block/bootdevice/by-name/' and see if there's a partition block named 'splash' or 'logo'.
Or else you can also check your stock ROM (or stock firmware) to see if it contains the splash.img or logo.img or logo.bin (Qualcomm Devices only)..
Where should I get the stock splash.img from?
It can be dumped to your storage by the command:
(Similarly for logo.img or logo.bin)
(You may also find it in your factory images (stock ROM))
How do I edit/modify/create the splash.img ?
Leave a reply in this thread by attaching your splash.img (along with device name) so that I can see what format it is and I'll try to create a tool for your device.
TOOLS for DEVICES SUPPORTED as of now:
(Do not use the tool created for some other devices in your device, it may brick your device)
Click here for very old HTC devices.
Here's an universal splash maker (works only for few devices; I don't know. Your risk) [NOT FOR ALL DEVICES!]
What about Mediatek devices ?
For MTK devices, you might have a different partition for that called 'logo'.
Browse in /dev directory to find out where that is present.
After you have found out, dump the logo.bin file by:
Читайте также: