Repacked boot.img is half the size of stock boot.img - Samsung Galaxy S20 / S20+ / S20 Ultra Questions &

Hi everyone,
I'm having trouble generating a boot.img using Android Image Kitchen to be the same size as the stock boot.img that I first unpacked! The stock boot.img is 69.1MB and if I unpack that and immediately repack it reduces to 39.1MB.
Specs
Samsung S20 Ultra 5G (G988B)
Android 10
PDA: G988BXXU4BTH5 (August 2020)
What I've Done So Far
I've compiled a custom kernel using source straight from Samsung's open source repo. For testing purposes I have made no changes and simply compiled with the relevant toolchains.
To take my compiled kernel and package it up into a boot.img I can flash with Odin, I have followed this guide how-to-unpack-and-edit-android-boot-img using osm0sis' Android Image Kitchen tools (AIK)
I have done the following:
Download custom firmware (PDA: G988BXXU4BTH5) and extract boot.img from AP archive
Unpack boot.img using AIK
Bash:
unpackbootimg -i ./boot.img
Construct arguments for mkbootimg based on above step's output
Run mkbootimg with arguments:
Bash:
#!/bin/bash
set -e
set -x
./bin/linux/x86_64/mkbootimg \
--kernel ./boot.img-kernel \
--ramdisk ./boot.img-ramdisk.gz \
--dtb ./boot.img-dtb \
--cmdline "$(cat ./boot.img-cmdline)" \
--base "$(cat ./boot.img-base)" \
--kernel_offset "$(cat ./boot.img-kernel_offset)" \
--ramdisk_offset "$(cat ./boot.img-ramdisk_offset)" \
--tags_offset "$(cat ./boot.img-tags_offset)" \
--dtb_offset "$(cat ./boot.img-dtb_offset)" \
--os_version "$(cat ./boot.img-os_version)" \
--os_patch_level "$(cat ./boot.img-os_patch_level)" \
--board "$(cat ./boot.img-board)" \
--pagesize "$(cat ./boot.img-pagesize)" \
--header_version "$(cat ./boot.img-header_version)" \
--hashtype "$(cat ./boot.img-hashtype)" \
--output ./new-boot.img \
For some reason the resulting boot.img file is 39.1MB whereas the stock boot.img is 69.1MB
To confirm it wasn't my custom kernel, I simply unpacked the stock boot.img and then repacked the extracted files. The output is again 39.1MB. This leads me to believe that AIK is either not extracting all the required files from the stock boot.img or is not packing all the required files into the generated boot.img
I came across this post in which someone successfully built a Samsung S21 boot.img, without size issues, using a fork of AIK however all projects I've used to generate boot.img give me the exact same size inconsistency.
I tried seeing what would happen if I flashed the 39.1MB boot.img on anyway and after succesfully flashing, I got a boot error:
ODIN MODE (DT Load Fail)!
[DTH] dt table header check Fail: FDT_ERR_BADMAGIC
[UFDT] DTB LOAD FAIL
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Does this suggest AIK is not packaging the dtb file correctly? Given boot.img-dtb is only 340.1KB, it must be missing more than just this.
I seem to be at an impasse and would be deeply appreciative if the smart people on XDA could lend some advice!
Thank you!
Update #1:
I was able to flash 39.1MB boot.img (with both stock and custom kernel) on and avoiding above DTB Load Fail by:
1. Ensuring name/dir structure is boot.img inside boot.img.tar
2. Using stock dtb file
It then bootloops until I am presented with recovery and error:
From this post it seems like repacking changes hash leading to 'integrity_failed' error above.
Update #2:
I managed to successfully load generated boot.img with custom kernel. I had to disable Android Verified Boot by flashing vbmeta_disabled.tar in the UserData tab in ODIN. This disables integrity checking in the bootloader sequence when the ROM bootloader passes control to the kernel in boot.img
I hope this helps others!

i have the same problem
I created custom kernel as I couldn't provide selinux permissions,but now i have error [DTH] dt table header check Fail: DFT_ERR_BADMAGIC
[UFDT] DTB LOAD FAIL.
-- phone properties --
Samsung Note 20 (exnos990)
Can you please help me? ^^

Please read the Forum Rules before posting.
Questions belong in the Questions and Answers section.
15. Keep threads / posts on-topic
Whilst a minor amount of off-topic posting may be overlooked, the general rule is that your posts / threads must be relevant to the Forum / thread in which you are posting.
General Forums - For news and announcements relating to your device.
Q&A Help & Troubleshooting Forums - For all question / request threads and posts. If there is no Q&A Help & Troubleshooting forum, use the General Forum of the relevant device
Accessories Forum - For posts related to accessories relevant to the device
Development Forums (ones with the word development in the title) - For Developers to post release threads e.g. ROMs and Kernels including modifications to kernels, bootloaders, ROMs, etc., as well as R&D development discussion threads designed with an end goal
Themes and Apps Forums - For the posting of Themes and / or Apps as well as announcements & discussions including modifications made to Themes and Apps.
Click to expand...
Click to collapse
Thread moved.

Related

[GUIDE] dsixda's Android Kitchen - Now with SGS2 I9100 support (Windows/Linux/Mac)

dsixda's Android Kitchen - Now for Samsung Galaxy SII GT-I9100
Compatible with Windows (Cygwin) / Linux / Mac OS X
The following is a guide to assist you with creating your own Samsung Galaxy S2 custom ROMs with the kitchen. This is NOT a guide to help you become Cyanogen or do fancy things with AOSP, but it may be your springboard to bigger things in the future.
For the benefit of other readers and to prevent confusion, please stay on topic and only discuss Samsung Galaxy S2 in this thread!
Some of you already know about the Android Kitchen. It is a project I started on back in February 2010 to help newbies create their own custom ROMs and learn more about Android. The kitchen has been designed almost exclusively for HTC devices, although many people have had success using it with other manufacturers' ROMs. Recently I bought a Samsung Galaxy S2, and of course, I wanted to take control and create my own custom ROMs. However, ROMs for this device are totally different from those that I had worked on before, and so I decided to take on the project of supporting this device in the Android Kitchen. So, as of version 0.175, you can now create your own ROMs with the kitchen.
First, I'd like to thank pulser_g2 of Villain ROM for voluntarily helping me during his vacation to get started on this SGS2 project. Secondly, a big thanks to Noonski for testing and providing feedback.
[MAIN PAGE] [RELEASE NOTES] [FAQ - page 1] [FAQ - page 2]
​
PROCEDURE
IMPORTANT: For this guide to work, you need one of the original Exynos-based Galaxy S2 variants, including the Galaxy Note GT-N7000. Unfortunately this means there is no support for the I9100G, since it uses a different chipset. For the Qualcomm-based AT&T Skyrocket, T-Mobile SGH-T989, Telus Galaxy S2 X (SGH-T989D) and other variants, please follow this thread instead.
First, you need a rooted Samsung Galaxy S2 with a ClockworkMod custom recovery.
Visit the Android Kitchen thread to download the kitchen. Then, follow the link to the FAQ which will show you how to install it on Windows, Linux or Mac OS X. Ensure you read the FAQ carefully.
IMPORTANT: To verify your variant of the Galaxy S2 works in the kitchen, read this post.
Put your base ROM(s) under the original_update folder. For the Samsung Galaxy S2, there is support for the following formats which can be placed in that folder (you can place multiple ROMs there):
Stock firmware:
factoryfs.img, cache.img, zImage, hidden.img (if it exists), and modem.bin (optional)
TAR file containing factoryfs.img, cache.img, zImage (and optional modem.bin)
TAR.MD5 file - Same as above but must be renamed *without* the MD5 part in the file name
ZIP file containing factoryfs.img, cache.img, zImage (and optional modem.bin)
Custom ROM:
ZIP file created by the kitchen from the stock firmware (other ROMs such as CyanogenMod may use a different file structure that is incompatible with the kitchen!)
Nandroid backup from ClockworkMod recovery
system.img and boot.img
system.ext4.tar and boot.img
Here are some basic steps to creating your first ROM after you have your base of files under original_update (more options are available in the kitchen):
Start the kitchen with: ./menu
Create a working folder (by choosing your base ROM)
If you used a stock factoryfs.img but then didn't include the cache.img, then you have the option to add a cache.img later using the Extract CSC script in the Advanced menu's 'Plugins' section.
Optional: Add a rooted kernel (zImage) to the base of your working folder
If your working folder currently has the stock kernel (zImage), you should replace it with the CF-Root kernel (or any other custom rooted kernel) which must match the stock ROM's Android OS version. Just replace the stock zImage with this zImage any time before you build the ROM. Otherwise, if you keep the stock kernel you will lose access to ClockWorkMod recovery!
OR, you can create a ROM without a zImage and thus keep the existing kernel on your device, although you must ensure the kernel is compatible with the ROM!
Optional: Add a modem.bin to the base of your working folder, or remove the existing modem.bin if you don't want it. You can flash the ROM with or without a modem.bin.
Root your ROM (Not required if you are using the CF-ROOT zImage)
Add Busybox (Not required if you are using the CF-ROOT zImage)
Disable boot sounds (if you find the Samsung starting sound a bit annoying)
In the Advanced options menu: De-odex your ROM
If you have trouble deodexing the leaked 4.0.3 ROMs, read this post for help.
Build ROM
The ROM is built into a ZIP file meant for flashing from the custom recovery menu. No Odin.
Some notes:
Just select the defaults whenever you are asked about something in the kitchen and are unsure whether to type 'y' or 'n'.
There are lots of questions answered in the FAQ in Posts 3 and 4 of the main Android Kitchen thread. So please go through that first if you have any issues.
Direct your questions to this thread, please do not PM me for tech support. Most of all, have patience, take your time and enjoy!!
USEFUL LINKS
Chainfire's CF-Root download thread
Infratech's official firmware thread
jazzor's guide for unpacking *.img in Linux
sicopat's guide for creating a ROM in Windows
mistadman's script for unpacking the initramfs (ramdisk) from the zImage
RyanZA's discussion thread on unpacking and re-packing the initramfs
Reserved...
Reserved For something Fun.....
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
All the hiccups I had where because I was to anxious to read.
For Real Newbs setting up Sygwin on Windows is harder then baking the rom, I enjoyed myself thanks for that and thanks for your hours of work on this project since the beginning it already gave me great hours with my desire.
Enough with the ass kissing
Preserved...
Thankyou!...many thanks bro...nice job!
sure i will try...
Big thanks man
wow....welcome dsixda......finally
thanks for your hard work man!!!
Wonderful news, I always wanted to learn some cooking and you have made my life simpler by showing me the way. thanks a lot man
Cooking time
Hi guys, I have updated the kitchen to version 0.176, with a few changes related to the SGS2. Please see the release notes in post #2 of the kitchen thread.
Does this mean I still need to replace the update binary?
Noonski said:
Does this mean I still need to replace the update binary?
Click to expand...
Click to collapse
The correct update-binary was already in 0.175, no need to replace it. In the release notes the mounting stuff is in reference to the sysro script which had the wrong mount points in earlier kitchens.
I've now uploaded version 0.177 of the kitchen, which takes care of a few issues that came up while adding the SGS2 updates to the kitchen. Please visit the main kitchen thread to download the latest version. Release Notes are found in Post #2 of that thread.
Enjoy
I used xxkh3 stock firmware removed all bloat ware removed all crap I didn't Ned as ringtones and wallpapers. Added my own ringtones/wallpapers/transition effect and jkay themes . Removed ugly yellow triangle in boot logo added my personal logo and made a ugly dock for the launcher..
I used about one hour .
I've been using this kitchen since I got my N1 and it's the best ROM kitchen no discussion..
thanks Dsixda.
been waiting
Thank you Dsixda!
You made us chef!
Hope the restaurant goes on
By the way, to verify your Samsung Galaxy S2 variant works with the kitchen, open your device's /system/build.prop file and check the ro.product.device value. If the value doesn't exist under the kitchen's tools/samsung_files/sgs2_variants/ folder then just create a file there with same name.
dsixda said:
By the way, to verify your Samsung Galaxy S2 variant works with the kitchen, open your device's /system/build.prop file and check the ro.product.device value. If the value doesn't exist under the kitchen's tools/samsung_files/sgs2_variants/ folder then just create a file there with same name.
Click to expand...
Click to collapse
Hi dsixda,
Thanks to see here. i was used your ROM for HTC ELFin..
I am very happy ..
Now i have created a ROM for SG II, Where i will remove/add application in this kitchen.
Thanks this worked perfectly

[HOW TO] Change/Modify Secondary Splash Screen Initrd/logo.rle

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I cant bellieve how hard it was to find any info on this topic
I was working on my rom and wanted to change the secondary splash screen image.
I searched around, asked devs and had no success finding a step by step tutorial on how to do this.
Finally after much research I did it! so here i bring you my experience.​
Click to expand...
Click to collapse
Boot order
​
1. To modify/change the first boot image go here:
http://forum.xda-developers.com/showthread.php?t=895089
2. To modify/change the bootanimation go here for some examples:
http://forum.xda-developers.com/showthread.php?t=1129705
Click to expand...
Click to collapse
First we need to establish where this splash image is located,
the image file is called logo.rle and is located here:
(i used 7-zip to view but don't use it to modify)
This is the file we need to change/modify, you can extract it with 7-zip.
Now we need to be able to convert this logo.rle to .png and back to a logo.rle
​
To do this go here:http://forum.xda-developers.com/showthread.php?t=1140406​
Code:
1.run command promt
a.browse to folder with those bat files
-type:cd \users\you\desktop(if located on desktop)
-copy logo.rle to this folder
b.to conver rle to png type: Convert_rle_to_image.bat logo.rle
c.to convert back to rle type: Convert_image_to_rle.bat logo.png
Click to expand...
Click to collapse
If you have your logo.rle ready now we need to replace the one that came in your initrd.gz
this is harder than i thought, because initrd.gz is a image file it cant be modified with 7-zip
first you will need to be running linux (im running ubuntu on a virtual machine)
once you get linux create a new folder on the desktop called "temp" copy
the initrd.gz to this folder, open applications/accesories/terminal
and browse to the temp folder with the initrd.gz file(mine is "cd /home/isidro/Desktop/temp)
now type
Code:
gunzip -c ./initrd.gz | cpio -i
now in the temp directory you have unpacked initrd.gz. Replace logo.rle then when you're done still in the temp directory type:
Code:
find ./ | cpio -H newc -o | gzip > ./initrd.gz
this will replace the initrd.gz with the modified logo.rle
​
Click to expand...
Click to collapse
Now just Copy/Replace the modified initrd.gz to your Rom's boot folder and Test!
This worked for me on the HD2 but I would assume it works on any android Rom. Keep in mind this is the best way I could do it, if you know of a better way please share.​
nice compilation...thanks bro
nice work bro
really
but I hope there i some easier way to do it
cuz this involves linux and virtual machines and I dont think many of us have this
Been looking for this for a while now, thank you very much !
very clear! i search for this a long time
THX bro
nice to see some dev sharing their knowledge ...thanks bro
If anybody cant get this to work at all!!!
send me your initrd.gz and your new image and ill give it a go.
thanks for taking so much time for making this excellent article. thanks added.
Excellent tutorial!! Very time consuming process for changing just one image but definitely easy when given step by step instructions.
Thank you for all your hard work and effort!
Ok, please tell me what am I doing wrong- I want to replace the logo.rle from one initrd.gz to another initrd.gz
I extract both with gunzip -c ./initrd.gz | cpio -i into their own separate folders
I copy the logo.rle I want over the logo.rle I want to replace
I do find ./ | cpio -H newc -o | gzip > ./initrd.gz after ensuring the old initrd is not there in the folder
I flash it on my phone, and it wont boot - if I flash same the initrd.gz without replacing the logo.rle, all is fine. I have tried this so many times
works perfect
10x
works nice. thanks.
you know what's nicer?
removing the logo.rle completely.
and what's even nicer than that?
finding the way to do it to clk boot.img
(how to patch it's initrd.gz or kernel)
then what you get is the First Boot Screen (HSPL) and then boot animation directly.
I can find a way to unpack the boot.img and repack it successfully.
If you find this out, that would be great.
Should be possible to do on linux, but I get a corrupted boot.img every time i try.
Is there any way of changing this after the ROM is installed? Unfortunately the ROM I use requires that you flash a kernel .zip after installing it, which then resets the second splash screen.
ellisbodds said:
Is there any way of changing this after the ROM is installed? Unfortunately the ROM I use requires that you flash a kernel .zip after installing it, which then resets the second splash screen.
Click to expand...
Click to collapse
open the update_kernel.zip with 7zip
replace the initrd.gz with the one with the new image, now just flash
the kernel and that's it
There is guide for change it use Window OS:
http://forum.xda-developers.com/showthread.php?t=1140406
isidromxz said:
open the update_kernel.zip with 7zip
replace the initrd.gz with the one with the new image, now just flash
the kernel and that's it
Click to expand...
Click to collapse
Unfortunately though, that doesn't seem to work. It's got a boot.img, so I had to extract that first in Linux, then I replaced logo.rle and recompiled boot.img. I then replaced the old boot.img in the kernel zip file and attempted to flash it, and I can't remember what happened. Either I got a message about update-script being deprecated and was told that installation was aborted, it flashed fine but didn't work, or it stopped my phone working.
tl;dr: I've spent far too long trying to figure out that one little image and in the end decided to just change the first splash screen to match the second one that flashes with the kernel.
Sent from my HTC HD2
I've follow all your staff and when I repack the initrd.gz with ubuntu I get this message error ( in french the message error so I try to translate) : cpio : the file ./initrd.gz is bigger, 163840 new bytes does not have been copied
That is the problem
BoBaN75 said:
I've follow all your staff and when I repack the initrd.gz with ubuntu I get this message error ( in french the message error so I try to translate) : cpio : the file ./initrd.gz is bigger, 163840 new bytes does not have been copied
That is the problem
Click to expand...
Click to collapse
Yeah I know it says it's not copied but it is just test the initrd after that
I found a guide to do it on window.
I will check and post here if I can find it on my Laptop
Sent from my GT-I9100 using xda premium
I Have tried it and it didn't work. When I tried to flash my phone via clk via rebuild rom installion aborted. Can explain how to put back the moded file on the phone
Sent from my HTC HD2 using xda premium

[Tut] How to change kernel logo (1st boot srceen) [COMPLETED]

We have 3 major works here... So I gonna to make it seperated
-1st post is HOW TO EXTRACT kernel.img (boot.img)
-2nd post is HOW TO CONVERT PICTURE FILE to BOOT.RLE
-3rd post is HOW TO REPACK THE KERNEL PAKAGE into boot.img
Requiredment
-Window machine
-installed cygwin
-the full boot.img/kernel (some kernel won't work because there is no full pakage/ i mean we can't)
-bootimg.zip (tool for UNPACK and REPACK kernel)
-boot_screen_logo_creation_package.rar
Thank and Credit
i- Credit to DooMLoRD Recognized Developer over most of XPERIA devices for his own tool and tutor that I learned before
ii- Credit to jimbo77 Senior Member for his tutorial that I used and learned and tool for unpack and repack
ii- Don't forget to give them a thanks meter
=============================================================================
Here we go
1-This section I will show u how to unpack and repack the boot.img
just see from original thread by jimbo77 from here and download the UNPACK and REPACK tool by him HERE
this is a fast guide from me:-
1-extract the bootimg-tools.zip into new folder (name it 'boot' folder)
2-move it into cygwin directory (cygwin/boot)
3- move your fav kernel into same directory
4-run cygwin.bat
cd /boot
Click to expand...
Click to collapse
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
5-Now, unpack your boot.img by running the following command:
./extractboot boot.img
Click to expand...
Click to collapse
If your output looks like this, then the extraction has worked correctly! Note that the Command Line string has also been read from the source file, this will be used later when you go to re-pack your file.
Your script folder should now look like this:
boot.img-kernel is the compiled kernel blob that was inside the source boot.img, if you want to replace the kernel with another compiled kernel image, you can replace this file with another one (but leave the file name the same)
boot.img-ramdisk.gz is the gzipped ramdisk image which has been split from the boot.img, you should leave this file alone.
The “out” folder contains the EXTRACTED ramdisk, and this is where you should make your changes to the ramdisk.
Important Note!
Remember, when editing files in the ramdisk through Windows, such as init.rc, Windows notepad will not format the files correctly, making them almost impossible to read, wheras Wordpad will LOOK like it is formatting the files correctly, if you save one of these files from the Wordpad application it will BREAK the file and it will no longer be able to be read correctly by Android. To edit these files you MUST use an editor such as Notepad++ which you can download for free.
AGAIN...
Special thanks/credit to jimbo77 for his excellent guide
So.. NEXT step to change a kernel logo is here
Requiredment
1-a picture what are u like to look into the 1st boot screen (kernel logo) (make sure it size/resolution same your device resolution)
2-boot_screen_logo_creation_package.rar
3-some infos and knowledges here
4-window machine like i explained on 1st post
My quick guide
-extract the tool.rar
-move extracted files into new folder (name it 'rle' folder without quote)
-move into cygwin folder (to make it easy to follow my simple guide)
-copy your own logo.png (a picture u want to use on a kernel) into same rle folder
(for 4 steps above it shold look like tis)
-now launch cygwin.bat
cd /rle
Click to expand...
Click to collapse
./convert_image_to_rle.bat logo.png
Click to expand...
Click to collapse
Ah...my mistake..don't forget to move/copy/replace new logo.rle into
C/cygwin/boot/out/ramdisk/here
if you done good...follow next step on next post (to repack your moded kernel)
Last step before you flash a new look kernel (boot.img) is
Repack your moded kernel
./packboot
Click to expand...
Click to collapse
One thing to note that people may mention in other guides, is that when packing boot.img files, you will usually have to declare a base address, and a command line to the packaging tool. This set of scripts reads the existing command line and base address from the boot.img file you originally provided at the time of repacking, so always make sure you leave your original source boot.img file in the folder and do not re-name it after extraction, your newly created boot.img file will be named boot_new.img and will NOT overwrite the original.
Done! If your screen looks like the image above, then you should now have a freshly created boot_new.img file, ready to be flashed to Android for testing, you can now go ahead and flash it through FASTBOOT one thing I'll recommend though is to first do
I need this for an extra (extra thanks..)
(may U?)
Thanks a lot man, i'm looking for it.
thanks a lot my friend
now i can make may own kernal boot animation:silly:
Thanks! Subscribed to this thread, will try my best to do this soon.
and how to extract kernel.elf? ^^
jimRnor said:
and how to extract kernel.elf? ^^
Click to expand...
Click to collapse
Actually that's the same question I have lol
I think i can't do it with bootloader locked?
Thanks!
Thank you so much!
Working very talented!
R: [Tut] How to change kernel logo (1st boot srceen) [COMPLETED]
If you are on a linux distro, you can use championswimmer's kitchen
Sent from my LT26i using xda app-developers app
how to change the boot logo of the acro s?
I can't find any boot.img file in the rom.ftf
all I can see is KERNEL.SIN
I can extract it.
but how to repack ?
I just want to change the boot logo in this acro s kernel with the new logo.rle that is attached with,
pleaaaaaseeee
help me
Anyone could help me ??
No reply?
prob here is how can i find boot.img for stock rom
thanks
How can I extract elf kernel....
Sent from my LT26ii using Tapatalk 2
Why it says:
Android Magic not found in ./boot.img ????
phil1405 said:
Why it says:
Android Magic not found in ./boot.img ????
Click to expand...
Click to collapse
are you extracting kernel.elf?
this tut was not working on kernel.elf, or maybe your cygwin got problem
No i tried with a boot.img :/
Currently I'm trying to install the perl and cpio packages...

[Help Thread][ Moto G7 Play ](2019) Ask Any Question, Noob Friendly

[SIZE=+2]This thread has been created
for
Questions & Answers/Troubleshooting[/SIZE]​[SIZE=+2]Specific to[/SIZE]
Moto G7 Play
2019​
Please feel free to share issues, questions and offer help. Noob questions are welcomed.
It is always best to use the Thanks button , in lieu of simply posting "Thank you".
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Please keep discussion focused, on questions pertaining to this Device
List of supporters...
...
...
...​To those seeking help: Please don't bombard the supporters with PMs asking for help. Instead, ask your question here in the thread so others can benefit from the solution to your problem as well. If you want to be sure someone particular gets notified of your question, put his / her username directly after an @.
If you have ROM related questions, post in the relevant ROM Q&A thread (if there is one) or directly in the ROM development thread. Thank you!
Supporters: If you want to be put on or off the list, just make a request here in the thread!
Before posting anything, I strongly advise you to read
Forum Rules
[GUIDE] - XDA New User Guide - Getting started on XDA
XDA Tour
[Index]Motorola Flashing Utilities, Firmware, and more
Index for Device Thread Link
Please look for a similar thread when visiting another device forum.
If you would like to create a [Help Thread] please Click Here.
​
Frequently asked Questions
Models:
XT195-2 Dual-sim
Countries or regions available: Brazil.
XT1952-3 Single-sim
Countries or regions available: USA.
XT1952-4 republic wireless
I'm not planning on adding every Rom or Mod,
but if you have a suggestion for other links
Please post them here.
FAQs
UnLocking the Bootloader
ReLocking the Bootloader
[Fixing] Baseband <not found> / IMEI=0 / No Network After Flash / Issues
Fixing your Moto stuck in Qualcomm QHSUSB_Bulk or qloader mode
successful blankflash on xt1952-4 by goesham2
Using Lenovo's MOTO Smart Assistant to Update/Repair/Backup
Custom Roms/Recovery/Root/
Firmware
Guide][Channel][Stock]Moto g7 play Factory Firmware Images by lexiyuri
https://mirrors.lolinet.com/firmware/moto/
[Index]Motorola Flashing Utilities, Firmware, and more
News, specs...
https://www.xda-developers.com/moto-g7-moto-g7-play-moto-g7-plus-moto-g7-power-forums/
https://help.republicwireless.com/hc/en-us/articles/360021389773-Moto-G7-Play-Tech-Specs
https://www.phonemore.com/models/motorola/moto-g7-play/
.
Trying to root my phone
rodneyb1966 said:
Trying to root my phone
Click to expand...
Click to collapse
I'm sure you will need to unlock the bootloader, and install a custom recovery first.
Sent from my Atom using XDA Labs
How long will it take to get root? it is very bad to use a non-root device.
I guess maybe this model is out somewhere in the world, but the G7 was released today March 1st 2019 from Motorola in the USA. The G7 Play is expected to be released around March 20 2019.
Can the front LED flash be used as a notification light?
I have a problem
I unlocked the bootloader and I can not lock it again.
after unlocking, always when the phone turns on, the screen is all black and "bad key" appears in the upper left corner.
I tried relocking the bootloader, reinstalling the stockrom, but it does not work. the bootloader remains locked. The message "check 'allow oem unlock' in android settings" appears.
Does anyone know how I can relock the bootloader?
Marcondes BR said:
I unlocked the bootloader and I can not lock it again.
after unlocking, always when the phone turns on, the screen is all black and "bad key" appears in the upper left corner.
I tried relocking the bootloader, reinstalling the stockrom, but it does not work. the bootloader remains locked. The message "check 'allow oem unlock' in android settings" appears.
Does anyone know how I can relock the bootloader?
Click to expand...
Click to collapse
The bad key screen is normal for an unlocked Moto phone
Sent from my sailfish using XDA Labs
sd_shadow said:
The bad key screen is normal for an unlocked Moto phone
Sent from my sailfish using XDA Labs
Click to expand...
Click to collapse
Yeah, I know. That does not even bother me.
I just want to relock the bootloader and I can not.
Marcondes BR said:
Yeah, I know. That does not even bother me.
I just want to relock the bootloader and I can not.
Click to expand...
Click to collapse
Motorola devices are notorious bad at relocking the bootloader.
Sent from my PH-1 using XDA Labs
i activated the usb debug and now when my phone is not plugged VIA USB it shuts down and when i try to turn it on it starts restarting again and again. it had been working perfect prior to this
Rooting G7 Play should be similar with G7.
I successfully rooted two G7 using Magisk patching boot.img method. However, it's recommended to download full ROM just in case.
I posted root method for G7 in general discussion.
Currently recovery is not available because stock recovery is missing. It's possible recovery is fused into boot.img.
Make sure you unlock bootloader before proceeding
mingkee said:
Rooting G7 Play should be similar with G7.
I successfully rooted two G7 using Magisk patching boot.img method. However, it's recommended to download full ROM just in case.
I posted root method for G7 in general discussion.
Currently recovery is not available because stock recovery is missing. It's possible recovery is fused into boot.img.
Make sure you unlock bootloader before proceeding
Click to expand...
Click to collapse
I unlocked the bootloader and patched the boot.img with magisk, and flashed the patched_boot.img with fastboot, but It did nothing lol
Maybe something related with It having both boot_a and boot_b ? Any tips?
Junior lage said:
I unlocked the bootloader and patched the boot.img with magisk, and flashed the patched_boot.img with fastboot, but It did nothing lol
Maybe something related with It having both boot_a and boot_b ? Any tips?
Click to expand...
Click to collapse
Does Magisk Manager show any error?
mingkee said:
Does Magisk Manager show any error?
Click to expand...
Click to collapse
it does not. magisk log >>
Code:
- Copying image to cache
- Device platform: armeabi-v7a
- Downloading zip
... 0%
- Boot image is signed with AVB 1.0
1038+1 records in
1038+1 records out
1063528 bytes transferred in 0.013 secs (81809846 bytes/sec)
- Unpacking boot image
MagiskBoot v18.1(18100) (by topjohnwu) - Boot Image Modification Tool
Parsing boot image: [/data/user_de/0/com.topjohnwu.magisk/install/boot.img]
HEADER_VER [1]
KERNEL_SZ [10005694]
RAMDISK_SZ [7746596]
SECOND_SZ [0]
EXTRA_SZ [0]
RECOV_DTBO_SZ [0]
OS_VERSION [9.0.0]
PATCH_LEVEL [2018-12]
PAGESIZE [2048]
NAME []
CMDLINE [console=ttyMSM0,115200,n8 androidboot.console=ttyMSM0 androidboot.hardware=qcom user_debug=30 msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 earlycon=msm_hsl_uart,0x78af000 firmware_class.path=/vendor/firmware_mnt/image androidboot.usbconfigfs=true vmalloc=300M loop.max_part=7 printk.devkmsg=on androidboot.hab.csv=1 androidboot.hab.product=channel androidboot.hab.cid=50 buildvariant=user veritykeyid=id:b640f6ee9102b88daa3450b13ef25fc9eb143d63]
CHECKSUM [ad29965b4c6d3c2ae7e4f885ec014a6fa91c2e5f]
DTB [303582]
KERNEL_FMT [raw]
RAMDISK_FMT [gzip]
- Checking ramdisk status
MagiskBoot v18.1(18100) (by topjohnwu) - Boot Image Modification Tool
Loading cpio: [ramdisk.cpio]
- Stock boot image detected
- Backing up stock boot image
MagiskBoot v18.1(18100) (by topjohnwu) - Boot Image Modification Tool
Compressing to [stock_boot_825eefb2020fd276640da7d3e95730814d41acd1.img.gz]
- Patching ramdisk
MagiskBoot v18.1(18100) (by topjohnwu) - Boot Image Modification Tool
Loading cpio: [ramdisk.cpio]
Add entry [init] (0750)
Patch with flag KEEPVERITY=[true] KEEPFORCEENCRYPT=[true]
Loading cpio: [ramdisk.cpio.orig]
Backup mismatch entry: [init] -> [.backup/init]
Add entry [.backup/.magisk] (0000)
Dump cpio: [ramdisk.cpio]
MagiskBoot v18.1(18100) (by topjohnwu) - Boot Image Modification Tool
MagiskBoot v18.1(18100) (by topjohnwu) - Boot Image Modification Tool
MagiskBoot v18.1(18100) (by topjohnwu) - Boot Image Modification Tool
- Repacking boot image
MagiskBoot v18.1(18100) (by topjohnwu) - Boot Image Modification Tool
Parsing boot image: [/data/user_de/0/com.topjohnwu.magisk/install/boot.img]
HEADER_VER [1]
KERNEL_SZ [10005694]
RAMDISK_SZ [7746596]
SECOND_SZ [0]
EXTRA_SZ [0]
RECOV_DTBO_SZ [0]
OS_VERSION [9.0.0]
PATCH_LEVEL [2018-12]
PAGESIZE [2048]
NAME []
CMDLINE [console=ttyMSM0,115200,n8 androidboot.console=ttyMSM0 androidboot.hardware=qcom user_debug=30 msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 earlycon=msm_hsl_uart,0x78af000 firmware_class.path=/vendor/firmware_mnt/image androidboot.usbconfigfs=true vmalloc=300M loop.max_part=7 printk.devkmsg=on androidboot.hab.csv=1 androidboot.hab.product=channel androidboot.hab.cid=50 buildvariant=user veritykeyid=id:b640f6ee9102b88daa3450b13ef25fc9eb143d63]
CHECKSUM [ad29965b4c6d3c2ae7e4f885ec014a6fa91c2e5f]
DTB [303582]
KERNEL_FMT [raw]
RAMDISK_FMT [gzip]
Repack to boot image: [new-boot.img]
HEADER_VER [1]
KERNEL_SZ [10005694]
RAMDISK_SZ [7993310]
SECOND_SZ [0]
EXTRA_SZ [0]
RECOV_DTBO_SZ [0]
OS_VERSION [9.0.0]
PATCH_LEVEL [2018-12]
PAGESIZE [2048]
NAME []
CMDLINE [console=ttyMSM0,115200,n8 androidboot.console=ttyMSM0 androidboot.hardware=qcom user_debug=30 msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 earlycon=msm_hsl_uart,0x78af000 firmware_class.path=/vendor/firmware_mnt/image androidboot.usbconfigfs=true vmalloc=300M loop.max_part=7 printk.devkmsg=on androidboot.hab.csv=1 androidboot.hab.product=channel androidboot.hab.cid=50 buildvariant=user veritykeyid=id:b640f6ee9102b88daa3450b13ef25fc9eb143d63]
CHECKSUM [eb27d967baf70b37301b36d9a422435b5b54dc]
MagiskBoot v18.1(18100) (by topjohnwu) - Boot Image Modification Tool
Cleaning up...
- Signing boot image with test keys
****************************
Patched image is placed in
/storage/emulated/0/Download/patched_boot.img
****************************
- All done!
Junior lage said:
it does not. magisk log >>
Click to expand...
Click to collapse
Did you install Magisk Manager after flashed patched boot?
mingkee said:
Did you install Magisk Manager after flashed patched boot?
Click to expand...
Click to collapse
I did, and it shows that magisk isn't installed...
Did I miss anything ?
I did flash the stock rom and patch it again for a whole day, and did not get it to work.
This phone is just stubborn...
I'll repeat it a couple more times to log everything and hope i missed something basic and get root to work within the day
Did you find boot a & b in the ROM?
It looks strange but it may be G7 Play issue
If I do a
Code:
fastboot boot patched_boot.img
It wont boot, And the bootloader logs says It is an incomplete boot image..
But when I use :
Code:
fastboot flash boot patched_boot.img
It only gives me a warning that the image is smaller then It should be, but flahing is successful. Magisk wont work tho...
I'll try something else for now... Thank you for your help

Install official AOSP GSI using Odin

Hi,
I have the latest stock ROM (G960FXXSFFUB3) on my Galaxy S9 (SM-G960F, Exynos) and my goal is to install official AOSP Android 11 GSI using Odin. I pretty much succeed, but I got bootloop as a result. Can you please help me to resolve this problem?
Steps to reproduce:
1. OEM Unlock [source, by @georgeburduli ]
1.1. Connect your phone to the Internet
1.2. Navigate to "Settings" -> "General management" -> "Date and time"
1.3. Disable "Automatic date and time"
1.4. Click on "Set time"
1.5. Select any date from the previous month
1.6. Navigate to "About phone" -> "Software update"
1.7. Disable "Auto download over Wi-Fi"
1.8. Click on "Download and install"
1.9. Navigate to "About phone" -> "Software information"
1.7. Tap on "Build number" 7 times to activate "Developer options"
1.8. Navigate to "Settings" -> "Developer options"
1.9. Disable "Auto update system"
1.10. Enable "OEM Unlock". If there are no "OEM Unlock" option in "Developer options", then try to repeat steps 1.1 - 1.10.
2. Prepare building tools [source, by @kkoo ]
2.1. Install 7zip
2.2. Create a new folder "tools"
2.3. Create a new folder "tools\bin"
2.4. Download the following files
- coreutils-8.26-2.tar.xz
- cygwin-3.2.0-0.1.tar.xz
- libattr1-2.4.48-2.tar.xz
- libgcc1-9.3.0-2.tar.xz
- libiconv2-1.16-2.tar.xz
- libintl8-0.19.8.1-2.tar.xz
- tar-1.33-1.tar.xz
2.5. Using 7zip open each *.tar.xz file and extract the following files and place them inside "tools\bin":
- cygattr-1.dll
- cyggcc_s-seh-1.dll
- cygiconv-2.dll
- cygintl-8.dll
- cygwin1.dll
- ls.exe
- md5sum.exe
- mv.exe
- tar.exe
2.6. Create file "tools\batch.bat"
Spoiler: tools\batch.bat
Code:
@echo ---------------mkh.mourad batch script
rem Setup ENV
SETLOCAL ENABLEDELAYEDEXPANSION
rem // Delete Previous Folder
RMDIR /S /Q temp-folder
MKDIR temp-folder
call set curentDir="%cd%%"
FOR /f "delims=" %%G in ('DIR /S /A:-D /B *.lz4') do (
call cd %%~dpG
call !curentDir!\BIN\tar --create --format=gnu -b20 --quoting-style=escape --owner=0 --group=0 --totals --mode=644 -f %%~nG.tar %%~nxG
xcopy %%~nxG !curentDir!\temp-folder\
)
cd !curentDir!
rem Build the TAR File
cd temp-folder
call !curentDir!\BIN\ls *.lz4 > temp-file.txt
call !curentDir!\BIN\tar --create --format=gnu -b20 --quoting-style=escape --owner=0 --group=0 --totals --mode=644 -f AP_TAR_MD5_CUSTOM_FILE_ODIN.tar -T temp-file.txt
del /Q temp-file.txt
cd !curentDir!
rem Create the MD5 Final File:
FOR /f "delims=" %%G in ('DIR /S /A:-D /B *.tar') do (
call cd %%~dpG
call !curentDir!\BIN\md5sum -t %%~nxG >> %%~nxG
call !curentDir!\BIN\mv %%~nxG %%~nxG.md5
)
cd !curentDir!
rem Cleaning Files
FOR /f "delims=" %%G in ('DIR /S /A:-D /B *.lz4 *.md5 ^| FINDSTR /v /i "\AP_TAR_MD5_CUSTOM_FILE_ODIN.tar.md5$"') do del /Q "%%G"
3. Build the AP file to use with Odin [source, by @kkoo ]
3.1. Download lz4_win64_v*_*_*.zip
3.2. Using 7zip extract lz4_win64_v*_*_*.zip to "lz4_win64_v1_9_3"
3.3. Download vbmeta.img
3.4. Place vbmeta.img into "lz4_win64_v1_9_3/bin" and run the following command:
Code:
lz4.exe -B6 --content-size vbmeta.img vbmeta.img.lz4
3.5. Download the latest aosp_arm64_ab ROM and using 7zip extract system.img, vendor.img and cache.img into "lz4_win64_v1_9_3/bin"
3.6. Run the following command:
Code:
lz4.exe -B6 --content-size system.img system.img.lz4
lz4.exe -B6 --content-size vendor.img vendor.img.lz4
lz4.exe -B6 --content-size cache.img cache.img.lz4
3.7. Download your phone latest Official Stock ROM (I got my using Samsung Smart Switch)
3.8. Extract the downloaded file (you'll have the BL, AP, CP, CSC, HOME_CSC .tar.md5 files)
3.9. Using 7zip extract the following files from AP_*.tar.md5 into the "tools" folder from step 2.2:
- boot.img.lz4
- dqmdbg.img.lz4
- recovery.img.lz4
- userdata.img.lz4
- vendor.img.lz4
3.10. Move vbmeta.img.lz4, system.img.lz4 and cache.img.lz4 from the "lz4_win64_v1_9_3/bin/" into the "tools" folder
3.11. Double click on the "tools/batch.bat" file
3.12. Once it finishes go to the "tools/temp-folder". Inside you will find the AP_TAR_MD5_CUSTOM_FILE_ODIN.tar.md5
4. Flash the ROM
3.1. Install SAMSUNG_USB_Driver_for_Mobile_Phones.exe
3.2. Download Odin3-v3.14.1.zip
3.3. Extract the downloaded file
3.4. Run Odin3 v3.14.1.exe
3.5. Flash the BL, CP, HOME_CSC from your Stock ROM and AP (using AP_TAR_MD5_CUSTOM_FILE_ODIN.tar.md5)
Result: Bootloop
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I heard that many users have issue get GSI running in their S9. Endless Bootloops.
Don't users could fix it flashing stock firmware.
Others by doing a factory reset.
Others by flashing TWRP recovery:
[RECOVERY][OFFICIAL] TWRP for Galaxy S9 (Exynos)
Thread moved to https://forum.xda-developers.com/galaxy-s9/samsung-galaxy-s9--s9-cross-device-development/twrp-exynos-t3763464.
forum.xda-developers.com
Hope that your can find a way to get your device up and running again.
I got an s9 too, but it got stuck into a bootloop but I can't access anything and it won't allow me to completely power on the the device. It took to Samsung service centers and they get an error called "binary corrupted" the device was already setup with twrp but by the time it got in the loop a thief who had snatched it was trying to flash it after I locked it with my "Samsung find my device"

Categories

Resources