Hi,
I've downloaded the latest Android 10 image for the S20, which works great on my phone.
I've then extracted the boot.img from the AP tar, and used unpackbootimg & mkbootimg to pack it right back (without changing anything).
I've made sure all the parts were packed (Including the ramdisk), but after flashing the device always boot to Download Mode with :
dt table header check fail: FDT_ERR_BADMAGIC
DTB LOAD FAIL
I've seen the same error in:
https://forum.xda-developers.com/t/question-building-a-custom-kernel-for-g980f-exynos.4122853/
Where he claims to have solved it by supplying the ramdisk parameter, but I've already did.
Any idea how to solve this?
Thanks!
Related
i extracted the boot.img from my desire and run this script on it.
but it returns:
Code:
./unpack-bootimg.pl boot.img
Found a secondary file after the ramdisk image. According to the spec (mkbootimg.h) this file can exist, but this script is not designed to deal with this scenario.
i've been searching the internet for two days now and i cant find any other script that does that, only a tutorial for manually doing it with a hex editor, but that still doesn't cover that last file the script is complaining about.
any ideas?
p.s.: i need to modify boot.img because i'm trying to set up dual boot - android + android - for testing purposes, will post if successful
update:
i managed to extract kernel and ramdisk
first i tried booting kernel from fastboot, worked like a charm
then i tried booting kernel+ramdisk from fastboot - hangs on htc logo
i also tried compiling kernel+ramdisk into boot.img instuctions - again hangs on htc bootscreen
adb says no devices, fastboot detects it, but shows no ID, just ??????????
so apparently the last file in boot.img is important
any ideas?
i'm using cyangenmod7 btw
This is a short tutorial on how to compile and flash a (customized) Linux kernel on your G800F.
Note that this tutorial is only for the G800F as G800H/M/Y/... have a totally different architecture (SoC,...).
Toolchain
First of all get a decent toolchain (gcc,...). There are some prebuilt ones at android.googlesource.com.
If you have git installed fetch the arm-eabi-4.6 toolchain with:
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6
Other toolchains might work but I had no luck with a Linaro toolchain optimized for the Cortex-A7 (ARM-architecture of the Exynos 3470) - the kernel did not boot at all.
Also the arm-eabi-4.8 toolchain from android.googlesource.com aborted with a compile error, so use the 4.6 version.
Fetch the Linux Kernel sources
Now you have to fetch the kernel sources. At the moment there are only the official sources from Samsung's open source server.
http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=SM-G800F
Select a source package:
The source packages at this server contain the kernel sources (Kernel.tar.gz), some part of the Android system (Platform.tar.gz) and some build instructions (README_*). There are multiple versions of the source packages. You can find an explanation of the versioning scheme here: samsung-firmware-version-number.html
For example the version part of a source package G800FXXU1ANG1 is NG1 which stands for N=2014, G=July, 1=1st release.
G800FXXU1ANJ2 is N=2014, J=October, 2nd release.
In addition Samsung adds country code post-fixes like "_MEA" which might contain regional adaptions. See http://forum.xda-developers.com/showpost.php?p=57410625&postcount=5 for an explanation and list of country codes. For example MEA probably stands for "MIDDLE EAST ASIA".
So the newest source packages are G800FXXU1ANG1 and G800FXXU1ANG4 (MEA). I compared the kernel sources of both packages and found no difference. Seems as if only the Android part was changed. Both are from July so not very up-to-date. At least they are based on a 3.4.39 kernel which matches the kernel version of G800FXXU1ANL1.
Mirror:
Note that downloading a source package from Samsung's Open Source server takes a lot of time as the download speed is very poor. It took 12-24 hours for me.
You can also download the sources from my github repository:
https://github.com/tobigun/samsung-kernel-smg800f
At the moment the master contains the G800FXXU1ANG1 kernel sources but might be updated as soon as a newer kernel source is released.
Compile the Kernel
Prepare the build by applying the S5 Mini kernel config:
Code:
ARCH=arm CROSS_COMPILE=<PATH_TO_TOOLCHAIN>/bin/arm-eabi- make kminilte_00_defconfig
If you want to change the config now, you can do this with:
Code:
ARCH=arm CROSS_COMPILE=<PATH_TO_TOOLCHAIN>/bin/arm-eabi- make menuconfig
After you have done some changes to the kernel sources you can build it with:
Code:
ARCH=arm CROSS_COMPILE=<PATH_TO_TOOLCHAIN>/bin/arm-eabi- make -j4
If you do not want to build with multiple CPUs you can remove the "-j4" from the command line (which also is handy if an error occurred).
In either case the resulting kernel image will be in "arch/arm/boot/zImage".
Note that kernel module support is disabled in the S5 mini config so everything you need (all drivers, ...) is in the zImage. There is no need to copy additional kernel modules to the filesystem.
Flashing the Kernel
Almost done. It is not possible to flash the kernel image directly. Instead you have to put the kernel image and a ramdisk together into a flasable boot.img. The easiest way to get such a boot.img is to use an existing boot.img and replace just the kernel image.
1. Get a decent boot.img
There are at least two ways:
a) Download the current firmware image from SamMobile (http://www.sammobile.com/firmwares/database/SM-G800F/) and extract the boot.img. With 7-zip there will be an error message if you extract the .tar.md5 inside the zip - just ignore the message and extract the boot.img file.
b) Extract the current boot.img from the device's flash with (root required):
Connect to the device (with "adb shell" or ssh).
Then copy the contents of the boot-partition to a file:
Code:
dd if=/dev/block/mmcblk0p9 of=boot.img
2. Replace kernel image
For this step AIK (Android Image Kitchen) is required.
Download it at http://forum.xda-developers.com/showthread.php?t=2073775. Probably you want AIK-Linux-v1.7-ALL.tar.gz (or newer).
Extract the files.
Now unpack the boot image, replace the kernel image and repack it (with the original ramdisk) to a new boot.img:
Code:
./unpackimg.sh boot.img
cp <KERNEL_BUILD_DIR>/arch/arm/boot/zImage split_img/boot.img-zImage
./repackimg.sh --original
Note that the zImage name inside split_img might differ from boot.img-zImage.
The new boot.img is "image-new.img". Rename it to boot.img and flash it.
3. Flash new boot.img
Important notice:
- You flash this image at your own responsibility. I am not responsible for any damage that might be caused by flashing this image (bricked device, lost data, ...)
- Flashing this kernel image will trigger the KNOX counter, so your warranty will be void.
- The image is only for S5 Mini SM-G800F (Exynos)
- The kernel might be instable, crash your device, drain your battery, or even might damage your smartphone
- Backup your data before flashing
- Make sure you have the current firmware of your device (e.g. from SamMobile) so you can flash it back in case something goes wrong.
There are multiple ways to flash the boot.img to your device:
a) From recovery with an update.zip
b) Using Odin
c) Directly with dd
a) From recovery with an update.zip
TODO
b) Using Odin
Create tar.md5:
At least some versions of Odin3 (e.g. v3.07) need a tar.md5 instead of a "simple" tar file. Although a simple tar-file can be selected in Odin, the image will not be flashed correctly.
Download tar-Tool_Odin3-v3.07_by_mkh.mourad.zip
Extract it.
On windows copy the boot.img file into the tar-Tool folder first and then drag and drop the boot.img on ImgToTar.MD5.bat. Alternatively you can also pass the filename as a command line parameter to ImgToTar.MD5.bat.
Now you should have a boot.tar.md5.
Flash tar.md5:
Download Odin (for example Odin3-v3.07 contained in CF-Auto-Root)
Reboot your device into Odin mode: turn off your device, then press Volume-Down + Home + Power button at the same time and release them. Confirm the following message with the Volume-Up button.
Connect your device to your PC via USB
Make sure the device driver's are installed on your PC
Start Odin
Select PDA and select the kernel image (boot.tar.md5)
Check that only "Auto Reboot" and "F. Reset Time" is set
Click on "Start": the kernel image should be flashed now and the device should reboot afterwards
c) Directly with dd
Connect to the device (with "adb shell" or ssh).
Then copy the contents of the boot.img file to the boot-partition:
Code:
dd if=boot.img of=/dev/block/mmcblk0p9
Reboot
Done
You can now check in "Settings - Device Info - Kernel-Version" if your kernel is used.
Reserved
This is a short tutorial on how to compile and flash a (customized) Linux kernel on your G800H.
Note that this tutorial is only for the G800H as G800F/M/Y/... have a totally different architecture (SoC,...).
Toolchain
First of all get a decent toolchain (gcc,...). There are some prebuilt ones at android.googlesource.com.
If you have git installed fetch the arm-eabi-4.6 toolchain with:
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6
Fetch the Linux Kernel sources
Now you have to fetch the kernel sources. At the moment there are only the official sources from Samsung's open source server.
http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=SM-G800H
Select a source package:
The source packages at this server contain the kernel sources (Kernel.tar.gz), some part of the Android system (Platform.tar.gz) and some build instructions (README_*). There are multiple versions of the source packages. You can find an explanation of the versioning scheme here: samsung-firmware-version-number.html
For example the version part of a source package G800HXXU1ANGG is NGG which stands for N=2014, G=July, G=release G.
In addition Samsung adds country code post-fixes like "_LA" which might contain regional adaptions. See http://forum.xda-developers.com/showpost.php?p=57410625&postcount=5 for an explanation and list of country codes
SER: RUSSIA
SWA: SOUTH WEST ASIA
MEA: unknown (maybe MIDDLE EAST ASIA?)
LA: unknown (could be ATLANTIC, as kernel config for G800H LA is named: msm8228-sec_atlantic3geur_defconfig)
SKZ = KAZAKHSTAN
As every source package for the G800H has a different country code it is hard to determine which one to use. Probably the regional differences only concern the Android system but not the kernel. According to the versioning scheme the last release should be G800HXXU1ANGG (LA).
Mirror:
Note that downloading a source package from Samsung's Open Source server takes a lot of time as the download speed is very poor. It took 12-24 hours for me.
You can also download the sources from my github repository:
https://github.com/tobigun/samsung-kernel-smg800h
At the moment the master contains the G800HXXU1ANGG kernel sources but might be updated as soon as a newer kernel source is released.
Compile the Kernel
Prepare the build by applying the S5 Mini kernel config:
Code:
ARCH=arm CROSS_COMPILE=<PATH_TO_TOOLCHAIN>/bin/arm-eabi- make msm8226-sec_defconfig VARIANT_DEFCONFIG=msm8228-sec_atlantic3geur_defconfig
If you want to change the config now, you can do this with:
Code:
ARCH=arm CROSS_COMPILE=<PATH_TO_TOOLCHAIN>/bin/arm-eabi- make menuconfig
After you have done some changes to the kernel sources you can build it with:
Code:
ARCH=arm CROSS_COMPILE=<PATH_TO_TOOLCHAIN>/bin/arm-eabi- make -j4
If you do not want to build with multiple CPUs you can remove the "-j4" from the command line (which also is handy if an error occurred).
In either case the resulting kernel image will be in "arch/arm/boot/zImage".
Flashing the Kernel
Almost done. It is not possible to flash the kernel image directly. Instead you have to put the kernel image and a ramdisk together into a flasable boot.img. The easiest way to get such a boot.img is to use an existing boot.img and replace just the kernel image.
1. Get a decent boot.img
Download the current firmware image from SamMobile (http://www.sammobile.com/firmwares/database/SM-G800H/) and extract the boot.img. With 7-zip there will be an error message if you extract the .tar.md5 inside the zip - just ignore the message and extract the boot.img file.
2. Replace kernel image
For this step AIK (Android Image Kitchen) is required.
Download it at http://forum.xda-developers.com/showthread.php?t=2073775. Probably you want AIK-Linux-v1.7-ALL.tar.gz (or newer).
Extract the files.
Now unpack the boot image, replace the kernel image and repack it (with the original ramdisk) to a new boot.img:
Code:
./unpackimg.sh boot.img
cp <KERNEL_BUILD_DIR>/arch/arm/boot/zImage split_img/boot.img-zImage
./repackimg.sh --original
Note that the zImage name inside split_img might differ from boot.img-zImage.
The new boot.img is "image-new.img". Rename it to boot.img and flash it.
3. Flash new boot.img
Important notice:
- You flash this image at your own responsibility. I am not responsible for any damage that might be caused by flashing this image (bricked device, lost data, ...)
- Flashing this kernel image will trigger the KNOX counter, so your warranty will be void.
- The image is only for S5 Mini SM-G800H (msm8228)
- The kernel might be instable, crash your device, drain your battery, or even might damage your smartphone
- Backup your data before flashing
- Make sure you have the current firmware of your device (e.g. from SamMobile) so you can flash it back in case something goes wrong.
There are multiple ways to flash the boot.img to your device:
a) From recovery with an update.zip
b) Using Odin
a) From recovery with an update.zip
TODO
b) Using Odin
Create tar.md5:
At least some versions of Odin3 (e.g. v3.07) need a tar.md5 instead of a "simple" tar file. Although a simple tar-file can be selected in Odin, the image will not be flashed correctly.
Download tar-Tool_Odin3-v3.07_by_mkh.mourad.zip
Extract it.
On windows copy the boot.img file into the tar-Tool folder first and then drag and drop the boot.img on ImgToTar.MD5.bat. Alternatively you can also pass the filename as a command line parameter to ImgToTar.MD5.bat.
Now you should have a boot.tar.md5.
Flash tar.md5:
Download Odin (for example Odin3-v3.07 contained in CF-Auto-Root)
Reboot your device into Odin mode: turn off your device, then press Volume-Down + Home + Power button at the same time and release them. Confirm the following message with the Volume-Up button.
Connect your device to your PC via USB
Make sure the device driver's are installed on your PC
Start Odin
Select PDA and select the kernel image (boot.tar.md5)
Check that only "Auto Reboot" and "F. Reset Time" is set
Click on "Start": the kernel image should be flashed now and the device should reboot afterwards
Done
You can now check in "Settings - Device Info - Kernel-Version" if your kernel is used.
The topic is wrong: the G800H does not have an exynos SoC but a msm8228. Unfortunately I cannot change the topic name.
Reserved
hennymcc said:
This is a short tutorial on how to compile and flash a (customized) Linux kernel on your G800H.
Note that this tutorial is only for the G800H as G800F/M/Y/... have a totally different architecture (SoC,...).
Toolchain
First of all get a decent toolchain (gcc,...). There are some prebuilt ones at android.googlesource.com.
If you have git installed fetch the arm-eabi-4.6 toolchain with:
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6
Fetch the Linux Kernel sources
Now you have to fetch the kernel sources. At the moment there are only the official sources from Samsung's open source server.
http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=SM-G800H
Select a source package:
The source packages at this server contain the kernel sources (Kernel.tar.gz), some part of the Android system (Platform.tar.gz) and some build instructions (README_*). There are multiple versions of the source packages. You can find an explanation of the versioning scheme here: samsung-firmware-version-number.html
For example the version part of a source package G800HXXU1ANGG is NGG which stands for N=2014, G=July, G=release G.
In addition Samsung adds country code post-fixes like "_LA" which might contain regional adaptions. See http://forum.xda-developers.com/showpost.php?p=57410625&postcount=5 for an explanation and list of country codes
SER: RUSSIA
SWA: SOUTH WEST ASIA
MEA: unknown (maybe MIDDLE EAST ASIA?)
LA: unknown (could be ATLANTIC, as kernel config for G800H LA is named: msm8228-sec_atlantic3geur_defconfig)
SKZ = KAZAKHSTAN
As every source package for the G800H has a different country code it is hard to determine which one to use. Probably the regional differences only concern the Android system but not the kernel. According to the versioning scheme the last release should be G800HXXU1ANGG (LA).
Mirror:
Note that downloading a source package from Samsung's Open Source server takes a lot of time as the download speed is very poor. It took 12-24 hours for me.
You can also download the sources from my github repository:
https://github.com/tobigun/samsung-kernel-smg800h
At the moment the master contains the G800HXXU1ANGG kernel sources but might be updated as soon as a newer kernel source is released.
Compile the Kernel
Prepare the build by applying the S5 Mini kernel config:
Code:
ARCH=arm CROSS_COMPILE=<PATH_TO_TOOLCHAIN>/bin/arm-eabi- make msm8226-sec_defconfig VARIANT_DEFCONFIG=msm8228-sec_atlantic3geur_defconfig
If you want to change the config now, you can do this with:
Code:
ARCH=arm CROSS_COMPILE=<PATH_TO_TOOLCHAIN>/bin/arm-eabi- make menuconfig
After you have done some changes to the kernel sources you can build it with:
Code:
ARCH=arm CROSS_COMPILE=<PATH_TO_TOOLCHAIN>/bin/arm-eabi- make -j4
If you do not want to build with multiple CPUs you can remove the "-j4" from the command line (which also is handy if an error occurred).
In either case the resulting kernel image will be in "arch/arm/boot/zImage".
Flashing the Kernel
Almost done. It is not possible to flash the kernel image directly. Instead you have to put the kernel image and a ramdisk together into a flasable boot.img. The easiest way to get such a boot.img is to use an existing boot.img and replace just the kernel image.
1. Get a decent boot.img
Download the current firmware image from SamMobile (http://www.sammobile.com/firmwares/database/SM-G800H/) and extract the boot.img. With 7-zip there will be an error message if you extract the .tar.md5 inside the zip - just ignore the message and extract the boot.img file.
2. Replace kernel image
For this step AIK (Android Image Kitchen) is required.
Download it at http://forum.xda-developers.com/showthread.php?t=2073775. Probably you want AIK-Linux-v1.7-ALL.tar.gz (or newer).
Extract the files.
Now unpack the boot image, replace the kernel image and repack it (with the original ramdisk) to a new boot.img:
Code:
./unpackimg.sh boot.img
cp <KERNEL_BUILD_DIR>/arch/arm/boot/zImage split_img/boot.img-zImage
./repackimg.sh --original
Note that the zImage name inside split_img might differ from boot.img-zImage.
The new boot.img is "image-new.img". Rename it to boot.img and flash it.
3. Flash new boot.img
Important notice:
- You flash this image at your own responsibility. I am not responsible for any damage that might be caused by flashing this image (bricked device, lost data, ...)
- Flashing this kernel image will trigger the KNOX counter, so your warranty will be void.
- The image is only for S5 Mini SM-G800H (msm8228)
- The kernel might be instable, crash your device, drain your battery, or even might damage your smartphone
- Backup your data before flashing
- Make sure you have the current firmware of your device (e.g. from SamMobile) so you can flash it back in case something goes wrong.
There are multiple ways to flash the boot.img to your device:
a) From recovery with an update.zip
b) Using Odin
a) From recovery with an update.zip
TODO
b) Using Odin
Create tar.md5:
At least some versions of Odin3 (e.g. v3.07) need a tar.md5 instead of a "simple" tar file. Although a simple tar-file can be selected in Odin, the image will not be flashed correctly.
Download tar-Tool_Odin3-v3.07_by_mkh.mourad.zip
Extract it.
On windows copy the boot.img file into the tar-Tool folder first and then drag and drop the boot.img on ImgToTar.MD5.bat. Alternatively you can also pass the filename as a command line parameter to ImgToTar.MD5.bat.
Now you should have a boot.tar.md5.
Flash tar.md5:
Download Odin (for example Odin3-v3.07 contained in CF-Auto-Root)
Reboot your device into Odin mode: turn off your device, then press Volume-Down + Home + Power button at the same time and release them. Confirm the following message with the Volume-Up button.
Connect your device to your PC via USB
Make sure the device driver's are installed on your PC
Start Odin
Select PDA and select the kernel image (boot.tar.md5)
Check that only "Auto Reboot" and "F. Reset Time" is set
Click on "Start": the kernel image should be flashed now and the device should reboot afterwards
Done
You can now check in "Settings - Device Info - Kernel-Version" if your kernel is used.
Click to expand...
Click to collapse
====================================
Hi.. Im from Venezuela.. And i need help.. I have a S5 mini SM-G800H in QHSUSB-DLOAD.. I need the debrick.img for AOS 6.0 please.. Thank you so much for your help..
Please tell u, how I can build a custom kernel for the build LineageOS-14 for S5 mini SM-G800H?
Heya,
So I downloaded the stock kernel for the S20 and made a few adjustments.
I compiled the kernel as instructed and got the kernel "Image" file.
I then used mkbootimg to create the proper complete kernel image with the appropriate configurations (I didn't supply anything for dtb file, dtb-offset and dt file.
It flashes just fine, but for a reason unknown to me, I can't get the kernel to boot.
I keep getting the phone to boot to download mode with the error - DTB LOAD FAILED, FDT_ERR_BADMAGIC
I took a working boot.img file, unpacked it and packed it again using the kernel I made, but still I keep getting the same error.
What am I doing wrong?
EDIT: Solved, did not reboot because I forgot to repack ramdisk.
Hi all
I'm trying to flash and old kernel (boot.img) and system (super.img) to a S20 z1s exynos - SM-G980F/DS with a SW REV. higher than I would like...
I flashed TWRP sucessfully, this tripped knox, so I don't care at all about unsigned code running.
So I tried to:
1. disable AVB using a prebuilt vbmeta.img from here: https://forum.xda-developers.com/t/...root-s20-series-and-upgrade-firmware.4079353/
2. unpacking and then re-packing the stock firmware using "superr"s kitchen, but this produced a zip with which twrp was not happy with, even fixing a lot of updater-script errors... then again I think it does not help that my TWRP thinks the device is a z3s (no other twrp build available)...
3. flashing via ODIN obviously failed due to the device vs binary SW REV. difference.
4. flashing boot and super "by hand" in twrp -> error about SW REV. mismatch (DEVICE: X BINARY: X-1)
I have so many Questions to which I am unable to find answers, just suspicions/opinions....
Qs:
1. Can I simply disable all boot verification somehow?
2. how are vbmeta images created? do I need to fakesign my images? (vbmeta.img and vbmeta_samsung.img)
Thanks a lot for some clarifications
Defekkt said:
Hi all
I'm trying to flash and old kernel (boot.img) and system (super.img) to a S20 z1s exynos - SM-G980F/DS with a SW REV. higher than I would like...
I flashed TWRP sucessfully, this tripped knox, so I don't care at all about unsigned code running.
So I tried to:
1. disable AVB using a prebuilt vbmeta.img from here: https://forum.xda-developers.com/t/...root-s20-series-and-upgrade-firmware.4079353/
2. unpacking and then re-packing the stock firmware using "superr"s kitchen, but this produced a zip with which twrp was not happy with, even fixing a lot of updater-script errors... then again I think it does not help that my TWRP thinks the device is a z3s (no other twrp build available)...
3. flashing via ODIN obviously failed due to the device vs binary SW REV. difference.
4. flashing boot and super "by hand" in twrp -> error about SW REV. mismatch (DEVICE: X BINARY: X-1)
I have so many Questions to which I am unable to find answers, just suspicions/opinions....
Qs:
1. Can I simply disable all boot verification somehow?
2. how are vbmeta images created? do I need to fakesign my images? (vbmeta.img and vbmeta_samsung.img)
Thanks a lot for some clarifications
Click to expand...
Click to collapse
For these and other reasons, I quickly grew frustrated with SuperR's Kitchen and ultimately ended up rolling my own purpose-built solution that peels the layers of the onion of the Samsung package, gets to the point of mountable filesystem images, performs the desired transforms, and then packs everything back up into Odin-flashable .tar.md5 files. It's rough and minimalistic, but it works.
I'm not familiar with the error you mention, but usually those sorts of errors come from flashing a bootloader in Odin that is below the level of the one residing on the device. I haven't done much flashing via TWRP since I'm producing Odin-flashable output and I don't know why you'd have issues on boot.img or super.img. For my own sanity I don't regularly flash bootloader images. boot.img doesn't contain the booatloader though: it's the kernel and initramfs.
vbmeta.img files are generated with avbtool. I created one with a null signature which is identical to the ones floating around on the forum. I also cleaned up my fstab and manifests using the techniques of ianmacd's multidisabler.
sjevtic said:
For these and other reasons, I quickly grew frustrated with SuperR's Kitchen and ultimately ended up rolling my own purpose-built solution that peels the layers of the onion of the Samsung package, gets to the point of mountable filesystem images, performs the desired transforms, and then packs everything back up into Odin-flashable .tar.md5 files. It's rough and minimalistic, but it works.
I'm not familiar with the error you mention, but usually those sorts of errors come from flashing a bootloader in Odin that is below the level of the one residing on the device. I haven't done much flashing via TWRP since I'm producing Odin-flashable output and I don't know why you'd have issues on boot.img or super.img. For my own sanity I don't regularly flash bootloader images. boot.img doesn't contain the booatloader though: it's the kernel and initramfs.
vbmeta.img files are generated with avbtool. I created one with a null signature which is identical to the ones floating around on the forum. I also cleaned up my fstab and manifests using the techniques of ianmacd's multidisabler.
Click to expand...
Click to collapse
Thank you for your reply!
1. any chance you could list the steps you used to re-package a samsung rom?
2. is there a guide on how to create null-sigged vbmetas? can you use avbtool or do I need to manually edit the vbmeta file(s) ?
I did not try to downgrade the bootloader, just boot.img (kernel) and super (system, etc.).
Thanks in advance and best regards!
Sorry for the delay. I am on vacation and have not been regularly checking the forum.
To give you a conceptual overview of the workflow, here is the debug output my script generates for each step when trivially unpacking/repacking a Samsung firmware archive:
Extracting source zip.
Extracting .tar.md5 files.
Unlz4ing, unsparsing, and copying images.
Unpacking super.img.
Unpacking boot.img and up_param.bin.
Mounting filesystem images.
Applying main transforms.
Unmounting and checking filesystem images.
Repacking up_param.bin and boot.img.
Repacking super.img.
Sparsing, lz4ing, and copying images.
Archiving .tar.md5 files.
The real magic, of course, is in the transforms that are performed along the way, of which there are many. Most (notably those that are operations against the filesystem images) are performed during step 7, though some are performed before or after other steps by necessity. At some point I'll probably document this process a bit more and release the scripts since it is nontrivial.
Here is how I created my null vbmeta image:
Code:
avbtool make_vbmeta_image --flags 2 --padding_size 256 --output "${STEP_03_DIR}/BL/vbmeta.img"