[Tutorial] Custom boot logo on 8227L head units - Android Head-Units

Greetings,
I'm new to these forums, but have been into the Android development/customization scene since the original Motorola Droid. I recently purchased one of the (in)famous Chinese 8227L head units and have started doing some things to it. I was surprised to find that there are a lot more people out there with questions than answers when it comes to these things. So I figured I'd introduce myself with a quick tutorial, a small utility release for now. I have work in progress on a ROM release for these things. There are quite a few issues to get past as well as different boards to account for, so stay tuned for that sometime in the coming weeks. For now, let's get started with customizing the boot screen.
One of the simplest, yet most satisfying modifications one can do to any Android device is changing logo image that is displayed when the unit boots. For units like ours, running MediaTek hardware there are a couple of extra steps involved, but the process is still very simple. I was able to find a few different utilities that could be downloaded online to do this, but none of them seemed to work for these head units. I suspect our units use a slightly different header than the MediaTek phones those utilities are designed for, but that is a technical issue beyond the scope of this tutorial.
Disclaimer: These steps have been tested repeatedly on my device, and it's my assumption that they will work on any head unit based on the ac8227l, but I have obviously not tested every single one of them. There is always an inherent risk when you modify the software on any device that you own. This risk is your own, and I am not responsible for any damage you do to your device by following this tutorial!
Your unit does not need to be rooted to do this mod, but you will need to have the bootloader unlocked.
Pre-requisites:
logo.bin file from your ROM backup (You DO have a backup, don't you?)
Ability to read and follow directions
Access to a Linux command line OR the ability to run python applications on your system
SP Flash Tool or one of its equivalents, or a custom recovery installed, such as TWRP.
The boot logo is contained in the logo.bin file from your ROM. More accurately, the logo.bin file IS the boot logo for your ROM, with a 512 byte header attached to it. We need to separate the two in order to change the image that gets displayed.
This can be done very simply from the linux command line via the following command:
Code:
dd if=logo.bin of=logo.bmp skip=1
This command simply reads in the logo.bin file and writes it back out after skipping the first 512 bytes. dd has an optional argument bs= which stands for block size. It defaults to 512 bytes. So the skip=1 is simply
telling dd to skip the first 512 bytes when it writes the file back out. The result is a 1024x600 pixel bitmap image. However, we're going to need that header in a later step, so write it out to its own file using:
Code:
dd if=logo.bin of=header.bin count=1
This command simply writes the first block (remember block size is 512 bytes by default) out to a file and then stops, so we have our 512 byte header saved for later.
Now, you can either edit the logo.bmp file or replace it with your own image file. However you do it, just ensure that you end up with a 1024x600 pixel bitmap image in 8-bit RGB color. The following steps assume we have generated such an image in the same directory we were just working in, and named it newlogo.bmp. To join the header file to your new image, use the following command:
Code:
cat header.bin newlogo.bmp > newlogo.bin
This command concatenates (puts together) the two files back into one file. The order is important. The header needs to be at the start of the resulting file, so it must be the first argument you pass to cat! The resulting newlogo.bin is ready to be flashed to your head unit. Congratulations, enjoy your new boot screen! If you save the header.bin file, you can always use it to make more boot logos later.
Alternative method for Windows users or Linux users who would prefer to have a utility:
I have written a simple command line utility in python to do this process for you. You will need to have python installed to utilize it. It's written in python 3.8 but will work on some earlier versions, I think. You can get it from my github repository at https://github.com/threadreaper/logobin.git or from your command prompt using the PyPi repository through pip3. pip3 should be installed automatically when you install python 3. Use this command to fetch the utility:
Code:
pip3 install logobin
If you've elected to clone the git repository instead of using PyPi, you need to cd to the directory you downloaded it to (this should be the directory with the setup.py file) and install using:
Code:
pip3 install .
Whichever method you used, if everything went correctly, the "logobin" utility should now be available to you from your command line. To unpack an existing logo.bin image:
Code:
logobin -u logo.bin
And to pack an image with a header file back into a flashable bin file:
Code:
logobin -p header.bin logo.bmp (filename)
The filename argument above is optional and defaults to logo.bin if you don't select one. The utility can also be used to check a file for the presence of a valid header, using the -c switch:
Code:
logobin -c logo.bin
In this manner, you can check your stock logo.bin file to make sure it will work with this method before you start. You can also use it to check an extracted header to make sure it's correct, and you may also want to use it to verify that your logo.bin file has been packed correctly before you flash it to your phone.
I have attempted to make both the utility and this tutorial as simple to follow as possible, but if you have any questions, feel free to ask.

Excellent tutorial? I have a non rooted Enon 8227 unit and I’m having problem with it, could you be so kind to point me to a tutorial to make a rom backup please? all the stuff in my unit are blocked and I can t almost change anything.
Thank you.
Sent from my iPhone using Tapatalk Pro

Good day sir.
Could you guide me as to how to extract the logo.bin file please? I couldn't really find it.
I have a PX6 STM32 device.
Thanks!

arturojgt said:
Excellent tutorial? I have a non rooted Enon 8227 unit and I’m having problem with it, could you be so kind to point me to a tutorial to make a rom backup please? all the stuff in my unit are blocked and I can t almost change anything.
Thank you.
Sent from my iPhone using Tapatalk Pro
Click to expand...
Click to collapse
I'm planning to do a full tutorial on this too, but the short version is as follows:
Get SP Flashtool, and find a scatter file that will work for your device. That can be difficult sometimes, as there is a quite a bit of variance between units. Fortunately, to make your initial backup the only info you need in your scatter file is for the preloader, and as far as I know that is always the same. So if you don't already have a scatter file copy this:
Code:
#########################################__WwR_MTK_2.50__###################################################
#
# General Setting
#
#########################################__WwR_MTK_2.50__###################################################
- general: MTK_PLATFORM_CFG
info:
- config_version: V1.1.2
platform: MT3367
project: 8227l_demo
storage: EMMC
boot_channel: MSDC_0
block_size: 0x20000
############################################################################################################
#
# Layout Setting
#
############################################################################################################
- partition_index: SYS0
partition_name: preloader
file_name: preloader_8227l_demo.bin
is_download: true
type: SV5_BL_BIN
linear_start_addr: 0x0
physical_start_addr: 0x0
partition_size: 0x40000
region: EMMC_BOOT_1
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: BOOTLOADERS
is_upgradable: true
empty_boot_needed: false
reserve: 0x00
And save it as scatter.txt
Select this file as your scatter file in SP Flashtool, and click on the memory test tab. Uncheck all the options under memory test except for RAM test. Remove external power from the unit entirely, click start on the memory test, and then connect the 4 pin usb to your PC. It should sync up and do the memory test. Once the memory test is complete you will have the sizes of BOOT_1, BOOT_2 and EMMC_USER. Use these values with the readback option to make your backup. Use 0x0 as the start address each time, and the size value you got from the memory test. Back up BOOT_1, BOOT_2 and EMMC_USER and save them somewhere. This is the most basic backup that you can always use to go back to stock. Using tools like MTK Droid Tools and WWR MTK it is possible to split EMMC_USER backup into all of your separate partition backups.
Good luck, and keep an eye out for a more detailed walkthrough coming up soon!

kingdew11 said:
Good day sir.
Could you guide me as to how to extract the logo.bin file please? I couldn't really find it.
I have a PX6 STM32 device.
Thanks!
Click to expand...
Click to collapse
See my reply above about making a backup of your device. You get your logo.bin file from the extracted backup.

Please add your PayPal account to your xda so we can buy you some beer for the amazing work you're doing
Sent from my MI 9 using Tapatalk

zetlaw01 said:
Please add your PayPal account to your xda so we can buy you some beer for the amazing work you're doing
Sent from my MI 9 using Tapatalk
Click to expand...
Click to collapse
I don't drink beer, but you can always buy me a coffee

Thanks for information.
I want to backup with Flastool or similar program, is that possible?
and how do I root.
thank you

bicer79 said:
Thanks for information.
I want to backup with Flastool or similar program, is that possible?
and how do I root.
thank you
Click to expand...
Click to collapse
I posted instructions on backing up a unit two posts above your reply ^^. To root, find a compatible twrp image and flash it, then install magisk from twrp. I will be doing more detailed tutorials on these steps in the near future, but as I mentioned there is a crash course on SP-flashtool backup in this very thread, and the root process is pretty much the same for these units as it is for many others, assuming you find a working twrp image for your particular device, so you shouldn't have too much trouble finding a walkthrough if you need one.

threadreaper said:
Greetings,
I'm new to these forums, but have been into the Android development/customization scene since the original Motorola Droid. I recently purchased one of the (in)famous Chinese 8227L head units and have started doing some things to it. I was surprised to find that there are a lot more people out there with questions than answers when it comes to these things. So I figured I'd introduce myself with a quick tutorial, a small utility release for now. I have work in progress on a ROM release for these things. There are quite a few issues to get past as well as different boards to account for, so stay tuned for that sometime in the coming weeks. For now, let's get started with customizing the boot screen.
One of the simplest, yet most satisfying modifications one can do to any Android device is changing logo image that is displayed when the unit boots. For units like ours, running MediaTek hardware there are a couple of extra steps involved, but the process is still very simple. I was able to find a few different utilities that could be downloaded online to do this, but none of them seemed to work for these head units. I suspect our units use a slightly different header than the MediaTek phones those utilities are designed for, but that is a technical issue beyond the scope of this tutorial.
Disclaimer: These steps have been tested repeatedly on my device, and it's my assumption that they will work on any head unit based on the ac8227l, but I have obviously not tested every single one of them. There is always an inherent risk when you modify the software on any device that you own. This risk is your own, and I am not responsible for any damage you do to your device by following this tutorial!
Your unit does not need to be rooted to do this mod, but you will need to have the bootloader unlocked.
Pre-requisites:
logo.bin file from your ROM backup (You DO have a backup, don't you?)
Ability to read and follow directions
Access to a Linux command line OR the ability to run python applications on your system
SP Flash Tool or one of its equivalents, or a custom recovery installed, such as TWRP.
The boot logo is contained in the logo.bin file from your ROM. More accurately, the logo.bin file IS the boot logo for your ROM, with a 512 byte header attached to it. We need to separate the two in order to change the image that gets displayed.
This can be done very simply from the linux command line via the following command:
Code:
dd if=logo.bin of=logo.bmp skip=1
This command simply reads in the logo.bin file and writes it back out after skipping the first 512 bytes. dd has an optional argument bs= which stands for block size. It defaults to 512 bytes. So the skip=1 is simply
telling dd to skip the first 512 bytes when it writes the file back out. The result is a 1024x600 pixel bitmap image. However, we're going to need that header in a later step, so write it out to its own file using:
Code:
dd if=logo.bin of=header.bin count=1
This command simply writes the first block (remember block size is 512 bytes by default) out to a file and then stops, so we have our 512 byte header saved for later.
Now, you can either edit the logo.bmp file or replace it with your own image file. However you do it, just ensure that you end up with a 1024x600 pixel bitmap image in 8-bit RGB color. The following steps assume we have generated such an image in the same directory we were just working in, and named it newlogo.bmp. To join the header file to your new image, use the following command:
Code:
cat header.bin newlogo.bmp > newlogo.bin
This command concatenates (puts together) the two files back into one file. The order is important. The header needs to be at the start of the resulting file, so it must be the first argument you pass to cat! The resulting newlogo.bin is ready to be flashed to your head unit. Congratulations, enjoy your new boot screen! If you save the header.bin file, you can always use it to make more boot logos later.
Alternative method for Windows users or Linux users who would prefer to have a utility:
I have written a simple command line utility in python to do this process for you. You will need to have python installed to utilize it. It's written in python 3.8 but will work on some earlier versions, I think. You can get it from my github repository at or from your command prompt using the PyPi repository through pip3. pip3 should be installed automatically when you install python 3. Use this command to fetch the utility:
Code:
pip3 install logobin
If you've elected to clone the git repository instead of using PyPi, you need to cd to the directory you downloaded it to (this should be the directory with the setup.py file) and install using:
Code:
pip3 install .
Whichever method you used, if everything went correctly, the "logobin" utility should now be available to you from your command line. To unpack an existing logo.bin image:
Code:
logobin -u logo.bin
And to pack an image with a header file back into a flashable bin file:
Code:
logobin -p header.bin logo.bmp (filename)
The filename argument above is optional and defaults to logo.bin if you don't select one. The utility can also be used to check a file for the presence of a valid header, using the -c switch:
Code:
logobin -c logo.bin
In this manner, you can check your stock logo.bin file to make sure it will work with this method before you start. You can also use it to check an extracted header to make sure it's correct, and you may also want to use it to verify that your logo.bin file has been packed correctly before you flash it to your phone.
I have attempted to make both the utility and this tutorial as simple to follow as possible, but if you have any questions, feel free to ask.
Click to expand...
Click to collapse
did you build twrp from source or port it for your device?

I was able to build TWRP from source, but I haven't released it due to some rather annoying bugs I haven't had time to sort out with it just yet.

threadreaper said:
I was able to build TWRP from source, but I haven't released it due to some rather annoying bugs I haven't had time to sort out with it just yet.
Click to expand...
Click to collapse
which bugs?

I am so delighted to see someone hitting on the hot iron. Looking forward to the detailed tutorial to take backup, unlock bootloader, customize my radio.

Related

[Guide] [Root] Change your boot ***SPLASH*** screen (Sbkv2)

Since going on a little adventure with this, and successfully changing my boot Splash screen, (The ASUS + Nvidia logo before the standard boot animation) I decided to post a guide on how I accomplished this myself.
Thanks: This would not have been possible without the wonderful work of rayman86 for his blobtools, whirleyes for his splash patcher, and gee one for putting up with my total noob questions while I stumbled through this :3
The usual Disclaimer applies here, I'm not responsible for bricks, and if you're trying this with Sbkv2 (Like I did) and mess up, quite frankly you are FOUBAR SOL OCSA!! Be.. Careful. May the force be with you.
This guide was run on a Windows 7 (x64) machine, I was going to use linux, but I couldn't get Blobtools source to compile into something working (since I'm functionally retarted), the commands are pretty much exactly the same though, if you can get blobtools working.
Required files:
1. The latest ASUS update firmware from their site for your region: (I used US .24 firmware) link
2. Rayman84's (Give him thanks!) Blobtools (don't need boottools for just a splash screen change) [Attached] Original thread: link
3. A hex editor, I used xvi32 (you just need to be able to read and compare blobs) link
4. Three Images that you want to patch the splash screen with, the sizes need to be exactly 300x100 (asus logo) 300x90 (below) and 300x30 (Nvidia logo)
Note: Due to the nature of how the image is stored (In the freaking bootloader I might add -_-) these sizes need to be Correct, the bootsplash patcher should help you with this.
5. whirleye's (Give him thanks!) Boot Splash Patcher windows app. (Complete with shiny GUI) link
6. 3 pinches of ground unicorn horn, eye of newt, and hog's blood (extremely important ! ) Link
7. ???
8. Profit
*Make yourself a mental note of the disorganized location of these files as you scatter them throughout your documents/desktop/downloads folders.*
The Process:
1. Unzip the asus update, inside it is another zip, which you unzip. (Okay ASUS, you likes your zips) Inside there is a blob file, don't be alarmed, it will not attempt to absorb you into it's blobbiness, it stands for a Binary Large OBject file.
2. Put blobunpack into the same directory as the blob. (for easy cmd command)
3. MOD4+R (Windows key+R) to open run box, type 'cmd' This doesn't stand for central machine decimator.
4. Navigate to the directory with your blob, it was getting pretty lonely without you anyway. Ex: cd C:/users/username/downloads/blob
5. type blobunpack blob, your blob will now split itself into a multitude of blobs each with its own suffix. You now have to say Blob sr. and blob jr. when addressing them, it's only proper.
5a. You will (should) get:
blob.header (Oddly, I didn't actually get this, but we don't need it so don't worry about it.)
blob.app (huge file, the actual update system.img) [Don't Need]
blob.ebt (bootloader) [Need this blob]
blob.lnx (boot.img) [Don't Need]
blob.sos (recovery) [Avoid like the plague, unless you like losing cwm :3]
Note: The file extentions are 'false', they're just a way of separating the blob into manageable sections, they're all just blobs topped with a fancy-schmancy file extension.
6. Now that the blob has lost some extra poundage, it's time to patch it, Backup the blob.ebt and open the blob.ebt with whirleye's patcher!
7. Use your keyboard (This be old school) to load the images into the blob.ebt, shortcuts are at bottom and the tool is easy to use.
8. Save as patched_bl.bin, this should enable save as blob. (I had to do this for whatever reason, just don't question the gods)
At this point, you *Should* have a ready to patch bootloader with your new fancy image! If you like having a device that doesn't double as a very fancy paperweight, you'll keep going and check with a Hex editor.
9. Open your blob with the hex editor, the first line should be MSM-Radio-Update, followed by some 0s, then it should say EBT at the beginning. This marks which partitions are contained in the blob and will be flashed. Make sure none of the other (.SOS.LNX..etc) are in the blob, as then it would overwrite you. (shouldn't be there if you unpacked properly, and the filesize should be around 1.4KB)
9a. Search for whirleye's watermark, this shows the patcher worked, says "splash patcher by whirleyes"
9b. 9b is a terrorist and was deported by the TSA, move on to 9c. (bad hex joke)
9c. Open the backed up Asus blob.ebt you unblobbed, and compare the two files a tad, they should be nearly identical in length and code, except for the patched image section. If everything checks out you should be ready to flash your shiny new boot splash!
10. Now take your blob.ebt and De-knight it, stripping it of it's file extension. It is now just a 'blob' again.
11. Connect your tf and put it somewhere on your internal or external SD using adb or mass storage or whichever (I used /Removable/MicroSD/blob9000/blob)
12. --
gee one said:
to flash using the staging partition- you need either terminal or adb access.
the commands are:
su
dd if=/your/blob/here of=/dev/block/mmcblk0p4 # the last chars are zero pee four
reboot
Use adb or file manager or magic to save your blob somewhere on your transformer.
As it reboots, you should see a blue progress bar to indicate that it is flashing. It will reboot again and hopefully you will see your new splash screen.
Click to expand...
Click to collapse
13. ???
14. Profit!
Attached files:
Blobunpack.exe (zipped)
The Blob.ebt (zipped) finished product I made. For the US .24 update ONLY RAHHHHHH!!!!(Portal gun, aperture logo, mizore-kun. LD)
The blob.ebt.asus (zipped) original unblobbed .ebt part From the US .24 update (For all dem 'muricans)
Chuck Morris.png (A picture of a trollface, yes.) [Zipped]
Any questions? Let me know if this works out for you, worked wonderfully for me!
Link to my Q&A thread, may help with a little understanding, also has pic of my patched screen: link
If I helped, hit yo' self some thanks button. :3
Looks like you're fully explained how to do it and where to get the tools (which can often be harder than finding the how to info) but I've got to ask. Isn't that tons of work just to change something that shows for like a minute once a month whenever you reboot your tablet? I guess I don't understand why to do this but am trying to.
Sent from my PG41200 using Xparent Purple Tapatalk 2
Well, it's more of a, BAHAHAHAHAHAH I DID IT IN YO FACE! Sort of thing, and a neat challenge if you want to mod your tab a bit more. I did it more for the challenge of doing it than anything else. I also hated having everything EXCEPT splash completely customized. Just a proof of concept, and like a 30-40 min thing, not terrible. Let me know if you give it a shot
This is the complete open source evolution- ask some questions, do some research, flash something cool, and then write the guide. All you need now is the t-shirt. Congrats! We need more people willing to explore and ask questions.
sent while running with scissors
It's been a while since I made the discoveries.
Back then, I even made an android app to change the splash easily, but I never upload it to public.
Bump this thread if anyone interested.
I think I still have the source code buried deep inside my pc.
That'd be neat, the current method works but may be a tad confusing for some. I'll test out if you'd like
Has anyone done this successfully?
Flawless!
Works perfectly for me on:
TF101-A1 (16GB) B70
Android 4.0.4
Megatron ROM 1.1.6 (ricardopvz)
I don't think those last two matter, since this is a bootloader, but I thought I'd include it just in case.
I cannot express my thanks enough. If I had any skill, I'd create a CWM flashable template for this mod to make the flashing process a little easier.
I could do that, but that would encourage laziness, and noone would learn the Process behind it all. Which is the real whole point of this experiment :]

[GUIDE] How to build a Linux kernel and flash it to the phone [SonyEricsson]

The folks over at Sony Ericsson have released something a bit useful if you’ve been wondering lately how to build Linux Kernels for your phone. Sony Ericsson’s Developers has laid out a detailed process on how to build a new Linux kernel and flash it to your Android device. We’ve pasted the info below for you so you don’t have to hop around. Below you’ll find Sony Ericsson’s how-to in its entirety for your convenience with respective links and all. If you’ve been wanting to tinker and dive into the world of Linux and flashing kernels on mobile devices, we’d say now is the time. Follow the expert step by step process and toss us a note or two in the comments below if this works out for you. However, keep in mind, even though the article is written by experienced Sony Ericsson developers, nothing is guaranteed to work the way it’s supposed to. So be very diligent while following and performing these tasks. In other words, do your research first.
How to build a Linux kernel and flash it to the phone.​
Since the launch of the unlock boot loader site, Sony Ericsson have received a lot of really great feedback. The Sony Ericsson Developer Program wants to continue to build on this open dialogue with external developers.
Developers and advanced users can now unlock the boot loader, which is the first step to be able to flash your own image. Where developers run into problems when building their own image, and and trying to flash the image using Fastboot.
Before moving on, I like to remind you again that there is no turning back when unlocking the boot loader. You may void the warranty of the phone, and you will not be able to revert the phone to a locked or original state if you unlock it.
What is the Linux kernel?
The Xperia™ line of smartphones run on the Android™, the mobile operating system based on the Linux kernel. Though it is only a small part of the operating system, the kernel ensures that all other processes in the system are synchronized to work together properly.
Why rebuild the kernel?
Rebuilding the kernel enables end users to make modifications to their devices that are normally not intended by the device manufacturer, such as theming the device by changing system icons and removing/modifying system components. Please note that Sony Ericsson is not recommending this.
Considerations before building your own kernel and reflashing your device
As mentioned in the beginning of this article, the first step is to unlock the boot loader. When the boot loader is unlocked, the sensitive data is removed, such as DRM certificates, and the user partition of the file system is wiped out. But all other functionality, such as the camera and other drivers, is left intact. Please note that content, like music files, that require the DRM certificate will not be accessible any more. But most importantly, you may void the warranty of your phone if you decide to unlock it. Aside from the considerations mentioned above, the functionality is there, just waiting for you to take advantage of it. So, if you’re ready, here’s how to get started.
Building the kernel
It takes a few main steps to build the kernel. Below we’ll show you how to build a Linux kernel and flash it onto the device.
Step A – Download the necessary software
Download the following software to get started:
The kernel source code can be downloaded from the copyleft archives on Sony Ericsson Developer World. You can use the file called ex. 3.0.A.2.181_182.tar.bz2 for our Android™ Gingerbread devices. This is the source code for the Linux kernel as used in the Xperia™ PLAY.
The Fastboot client which is part of the Android SDK. This is the standard Android flashing utility. This allows you to flash the image you are about to create onto the device.
The Init RAM disk. The initial RAM disk (also known as the initrd) is the initial filesystem that the kernel will mount and start running processes off. You can configure the Init RAM disk to grant root access. How you create or download your own Init RAM disk is beyond the scope of this article.
The ARM cross-compiler. A cross-compiler is used to build ARM binaries on a different architecture, such as x86. This allows you to compile software (such as the kernel) into a format that the device can run. We recommend getting the CodeSourcery Lite compiler, especially the GNU/Linux variant, as you’ll need that if you want to build binaries for a full-blown Linux system on the device later. However, any EABI ARM compiler capable of compiling the Linux kernel should be enough for this step.
Step B – Building the kernel
To build the kernel, you first need to unpack the kernel. Once you’ve unpacked the kernel, you need to configure it, and then build it. The example below is based on you using the file called 3.0.A.2.181_182.tar.bz2.
1. Go into the kernel directory:
cd kernel
2. Configure the kernel:
ARCH=arm CROSS_COMPILE=/opt/arm-2010q1/bin/arm-none-eabi- make semc_zeus_defconfig
Note: Replace /opt/arm-2010q1 with where you installed your cross-compiler. Also, this example is for Xperia™ PLAY. Replace defconfig with the following values depending on what device you want to configure it for:
Xperia™ PLAY semc_zeus_defconfig
Xperia™ arc semc_anzu_defconfig
Xperia™ neo semc_hallon_defconfig
3. Build the kernel:
ARCH=arm CROSS_COMPILE=/opt/arm-2010q1/bin/arm-none-eabi- make
Replace /opt/arm-2010q1 with where you installed your cross-compiler. Once done, you should have a compressed kernel-image in arch/arm/boot/zImage.
Step C – Getting a RAM disk
The RAM disk is the initial filesystem the kernel will mount before transferring control to userspace. How you create your own root filesystem is beyond the scope of this article, but you can use the following instructions to pack/unpack the file.
Unpacking (you have to ramdisk.img, and weant to create a directory of files out of it):
gzip -d – < ramdisk.img > cpio -idm
Packing (You have directory of files, and want to create ramdisk.img from it):
find . | cpio –quiet -H newc -o | gzip > ramdisk.img
Step D – Assembling the boot.img
Now that we have all the parts we need to create a flashable file. The next stop is to package the parts. To do this, you’ll need the program mkbootimg, which is part of the standard Android tree. If you don’t feel like compiling all of Android to get this tool, it is available to download from various trusted sites on the Internet.
Once you have the tool, this is the command to combine your kernel and RAM disk into a flashable file:
mkbootimg –base 0×00200000 –kernel kernel/arch/arm/boot/zImage –ramdisk ramdisk.img -o boot.img
Step E – Flashing the file
You should flash the file using Fastboot. If you’ve unlocked the boot loader on your device, you already have Fastboot.
1. To flash the boot.img file, use the following the command
fastboot –i 0x0fce flash boot boot.img
2. Now, it will prompt you to connect your device. To do so, follow these simple steps:
Make sure your device is powered down.
Hold down the Search button (Xperia™ PLAY only) or the Back button (all other Xperia™ devices). The device’s notification light should shine blue to confirm it’s inFastboot mode.
Connect the USB cable.
Flashing should now start and complete.
3. As a last step in the process, you need to reboot the device. You can either remove the USB cable and battery to power the device down. If you prefer, you can instead issue the following command (either method will work):
fastboot –i 0x0fce reboot
Important information!
Additional information for experienced Linux kernel experts
The kernel is pretty standard, all the regular things you’re used to is there, and available to use. Things that are different are the memory config and the kernel commandline. The memory config is hardcoded (i.e., ATAGs aren’t used for this). It’s set in the board-file for your target, such as kernel/arch/arm/mach-msm/board-semc_zeus.c in the function msm7x30_fixup. The kernel commandline is also not fetched from the boot.img file, but compiled into the kernel (CONFIG_CMDLINE). Some arguments are also added from the boot loader.
Additional information if porting non-Linux format files to the device. The boot loader will accept any reasonably formatted boot.img file.
For example, at the Android Kernel Git, you will see the format of the boot.img file. This allows you to create a boot.img file containing two loadable files (kernel+ramdisk), which will get loaded into RAM. Once the boot loader is loaded, it passes the control to the first instruction of the loaded kernel image. After control is passed, the kernel can rely on the data contained in the RAM disk already being loaded.
Guide by Karl-Johan Dahlström

Downloaded Motorola's Google Drive from XT1585 fastboot IN FULL. Good or boring?

https://accounts.google.com/signin/...dSession#folders/0B9t5VvCjiCO-Qm9Bb29PdzdHajQ
That's the link. You get the shortcode link when trying to flash the Turbo 2 using fastboot Linux command line. I first found some other cool tricks I have never seen mentioned about the fastboot oem command and some certain characters, but I suspect it is not related.
I got in, I noticed they just did an update to all the files, I downloaded everything, aa zip of all of it, and promply lost access. I have a spreadsheet open in google docs describing the updates. You can see at the top that it says that permissions have changed.
binwalk: Did I really find a boot img? Also: Legal advice?
Here's what binwalk just found (edit's mine til I know legal deal):
Code:
1###1#0 0x1#ABC# Android bootimg, kernel size: 1871876996 bytes, kernel addr: 0x###4#F#E, ramdisk size: 1953406600 bytes, ramdisk addr: 0x6###6##0, product name: "reating boot image..."
1##6##0 0x10#ABC Unix path: /../../target/product/%s/%s
The hexadecimals (mem addrs?) are actuallly there. I have adjusted the sizes, but if you know them you could figure out they are legit and my edits were simple.
can you please upload this onto this post or zippyshare or some other place. dumbass google made it so you have to have a Motorola email address to login

Creating updater.zip for TWRP from partitions or images

Utility to create ROM from images of partitions, partitions themselves, or all this mixed up.
For arm/arm64 devices
(For x86 / x64 devices I will do if there are requests for creation)
For experienced users only who can create and restore backups.
It does not have an interface (work with the command line).
Starting from the terminal emulator in the Android OS (you need a root) or the TWRP terminal.
You can quickly create the installer of partitions: TWRP, boot, edited GSI, vendor + boot for GSI, modem, etc.
Supports sparse images.
USAGE:
Help is invoked by running the utility with no arguments, with the -h --help switches, or appears along with an error message. Content:
Code:
Usage:
romi [<comp>] <out_file> <block or file> [<block or file> ...] [<banner>]
<comp> may take the following values:
--fast faster but bigger size
--norm default with no arg's
--good better compression but longer
--high it takes a very long time
<banner> may take the following values:
--sban=<text file> adds text from the specified file to the beginning of the ROM installation
--eban=<text file> adds text from the specified file to the end of the ROM installation
At least two arguments - the result file (output) and the base file (incoming). And in that order. Example:
Code:
romi /sdcard/twrp-installer.zip /sdcard/recovery.img
If you want to change the default compression level for a session, use one of the keys suggested in the quick reference. Example with minimal compression:
Code:
romi --fast /sdcard/twrp-installer.zip /sdcard/recovery.img
There can be as many objects included in the package in ROM as there is enough space for the selected drive and device capacities to create the resulting file. Example:
Code:
romi /sdcard/stock-mod-installer.zip /sdcard/boot.img /dev/block/bootdevice/by-name/vendor system
In the last example, I will try to explain the "smart" principles of sampling.
As you can see, three objects were transferred for processing: the image file of the drive partition, the drive partition, and the "mask" of the drive partition.
The utility will check for the presence of the file and whether there is a block device of the same name; when creating the ROM, boot.img itself is used.
Check for the presence of a block device and use it when creating a ROM.
Check the "mask" of the partition and, if it finds a block device corresponding to it, add this block to ROM.
Adding banners that will be displayed at the beginning and/or at the end of the installation of the generated ROM:
Code:
romi --fast /sdcard/twrp-installer.zip /sdcard/recovery.img --sban=/sdcard/start-message.txt --eban=/sdcard/end-message.txt
You can add only the initial banner, you can add only the banner to complete the installation, you can both, you can add nothing.
XDA:DevDB Information
romi, Tool/Utility for all devices (see above for details)
Contributors
nonamer1990
Source Code: https://drive.google.com/open?id=12gEApT6yk-5R8p8ymOIOL-5PJSiQa1p-
Version Information
Status: Stable
Current Stable Version: 1.0
Stable Release Date: 2020-05-19
Created 2020-05-19
Last Updated 2020-05-19

How to dump your own image

First, to clarify, the last time I rooted anything was a Galaxy S3 back in the day. I'm by no means an expert, I just figured I'd help out folks like me that haven't touched all these new tools, well, ever.
Just did this myself earlier today attempted to get Magisk root, but alas, I got stuck in a boot loop. Luckily I had muddled through getting the image first, otherwise I'd still be stuck in said boot loop. I figured I'd post this for anyone else trying to root these things just to make sure you have a backup you can trust (I generally don't trust rando images that folks post online). All of the instructions below are assuming you're on Windows 10 and using PowerShell just because that's the default these days. Without further adieu.
Download ADB/fastboot (on your Windows machine)
I downloaded adb/fastboot from google directly: https://developer.android.com/studio/releases/platform-tools
Just extract and browse to the platform-tools directory in Windows Explorer until you can see adb.exe and a bunch of other tools
Download the latest SP Flash Tool
I just grabbed it from here: https://spflashtools.com/
Please let me know if there's an "official" place to find SP Flash Tool, cause everything surrounding all the download sites seems a bit sus...
Enable USB Debugging (on the tablet)
Go to settings -> About tablet
Tap the Build number 10 times (until debugging mode unlocks)
Hit back and go to System
Click Advanced and then Developer Options
Enable USB Debugger
I also enabled OEM unlocking because the whole point of this is for me to run either AOSP or Lineage someday. I honestly don't know if unlocking the bootloader is needed for dumping your own images, but I highly suspect it's not.
Plug the tablet into your computer
You'll likely see a prompt on your tablet about allowing your computer to debug your tablet. I just checked the box and hit accept so I wouldn't see it again.
Get your scatter file (on your Windows machine)
I tried several things to get the scatter file (I guess this is like a partition table based on the contents I saw) but in the end, by far the easiest way was to just download the scatter file from the file system.
In the Windows Explorer window from before (platform-tools), hold down shift while left clicking and click on Open PowerShell window here
Now type the following to get a shell on your:
.\adb.exe shell
This will get you into the shell environment. Now type the following to verify your scatter file is there:
ls -al /system/data/misc/
In here you should see something like:
-rw-r--r-- 1 root root 13893 2008-12-31 19:00 MT8168_Android_scatter.txt
Now that we have the name, just type exit to get out of the shell
Download the scatter file
.\adb.exe pull /system/data/misc/MT8168_Android_scatter.txt
Open up the scatter file in your favorite text editor (for me, Notepad++)
Now you can see the partition layout, offsets, etc, etc
Dump your image(s) (on your Windows machine)
Now open SP Flash Tool (flash_tool.exe)
On the Download tab, make sure the Download-Agent is MTK_AllInOne_DA.bin
Now click Choose for the Scatter-loading file and browse to the scatter file you just downloaded
This should be in your platform-tools folder unless you moved it
Once the scatter file is loaded, the partition table should fill up with a bunch of partitions
Click on the Readback tab
Click Add
Double-click on the new entry
Navigate to where you want to save your image, and give it a name (in this case I'm starting with boot.img)
Remember how you opened the scatter file in a text editor? Search in the scatter file for boot.img
Make sure the region matches (should be EMMC_USER) between the scatter file and SP Flash Tool
Copy/paste the value for start_addr in the scatter file to Start Address in SP Flash Tool
Copy/paste the value for partition_size in the scatter file to Length in SP Flash Tool
Now do the same thing for recovery.img and any other images you'd like
If you want a full ROM backup, name the file something like ROM_0, then use Start Address of 0x0 and length as the start_addr for the second-to-last entry in the scatter file (in my case, it was 0xc1a80000, just make sure it doesn't start with f's)
Note: I don't know for sure if this is accurate or not, I'm still playing with it, but so far it appears to be. Probably?
Poking around in WwR MTK 2.51, it looks like for this particular device (100011885) I wanted a total dump of 0x73A000000. It looks like this number is derived from the first 8Mb of the EMMC_USER dump, so I'm not sure of an easier way than throwing WwR MTK at it for the moment.
Once you've got all the entries for what you'd like to dump, make sure to disconnect the tablet from your computer and power it off
Now click on Download in SP Flash tool
Once things grey out, then plug the tablet in. After a few seconds, you'll see the images start dumping.
Congrats, you have a boot.img (and whatever other images you wanted). Like I said, from here I tried using Magisk to patch the boot file, but when I flashed it in fastboot, after enabling OEM unlocking in Developer Options, it just kept popping up the initial Onn graphic along with the Orange State warning without getting to the "fancy" Onn graphic and the rest of the boot process. I was able to flash the original boot.img back and it once again booted properly again.
Also, for anyone interested, I've posted my dumped files for the 100011885 in my google drive: https://drive.google.com/drive/folders/17LtLtjKg4JJU9EJdIXPsyNjen0H-ilMX?usp=sharing
Maybe someone will have pity on me and figure out why Magisk isn't working?
Whenever I get a moment, I'll dump my 100003562 as well.
First, thanks a ton for this. I have been trying to pull a full system dump since I bought the tablet and had resorted to single pulls by name(very long and involved) I don't know if this will work for you, but on both of my 7 inch Gen 2 tablets, I just sideloaded Magisk Manager and then opened it (this was after unlocking the tablet) When I first opened MM it just said it needed to download some additional files for my environment. I clicked okay, it downloaded and installed the additional files. Once it rebooted, I open MM again and clicked install Magisk. On the next screen, I clicked direct install and let it do it's thing. After rebooting, root checker showed I had root, but I still can't get it to pass safetyNet. Root access does work as I have installed a few modules and busy box.

Categories

Resources