What Is DTB And How Do I Generate It? - Android Q&A, Help & Troubleshooting

I have manged to get TWRP to compile without errors for my device (ZTE Nubia Z11 Mini - NX529J).
I generated the mk files and the pre-built kernel by extracting the boot.img with dd and running mkvendor.sh on it.
I then fixed up the files manually until it compiled.
However, I can't get it to boot.
Code:
~/android/twrp $ sudo fastboot boot out/target/product/NX529J/recovery.img
downloading 'boot.img'...
OKAY [ 0.394s]
booting...
FAILED (remote: dtb not found)
What are dtb files and how do I generate them?
If I use this repo for my device it compiles and boots fine.
However, it has a dt.img and a mkbootimg.mk file that I don't have.
I don't see these files mentioned in the compile guide by @Dees_Troy or this other step by step guide.
What is dtb and how do I generate it?

Related

custom kernel booting and debugging

Hello.
I've built a custom kernel for Dell Streak.
When I try to boot it I get a message:
Code:
$ ./fastboot-linux -i 0x413c -c 'root=/dev/mmcblk0p2 rw rootfs=ext2 init=/sbin/init rootwait noinitrd' boot arch/arm/boot/zImage
creating boot image...
creating boot image - 2144256 bytes
downloading 'boot.img'... OKAY
booting... FAILED (remote: invalid command)
Does this mean that Streak fastboot does not support booting custom kernel?
- -
Anyway, I flashed it with:
Code:
$ ./fastboot-linux -i 0x413c -c 'root=/dev/mmcblk1p2 rw rootfs=ext2 init=/sbin/init rootwait noinitrd' flash:raw boot arch/arm/boot/zImage
creating boot image...
creating boot image - 2144256 bytes
sending 'boot' (2094 KB)... OKAY
writing 'boot'... OKAY
After booting I have a "Dell logo reboot loop".
Is there a way of getting kernel messages somehow, to see why is it failing?
Sent from my Dell Streak using XDA App
I`d love to know more about this as well. Did some Dev`ing many years ago in a galaxy far far away.
I was talking to defet at #modaco, and apparently ARM kernel needs board specific files in arch/arm/mach-msm/ that describe the hardware board name/id, features and memory layout.
Without this, there is no way of running a kernel on Streak board, because kernel just is unaware of the board features. The kernel checks the board name on boot and if it is not compiled for this exact board it just stops booting.
So, without kernel sources from Dell, we are totally screwed.
You may want to support http://forum.xda-developers.com/showthread.php?t=761856 because without this you may as well dream of running Linux or Froyo on Streak.

Xperia Z Ultra Hot Boot with DTB?

Hi,
I'm fairly green when it comes to Android devices, but my understanding is that when using "fastboot," I ought to be able to select "hot boot" a kernel and ramdisk using the "boot kernel <ramdisk.gz> command. However, for my Xperia Z Ultra, I'm finding that when I attempt this, I am told:
"FAILED (remote: dtb not found)"
A bit of research indicates that this probably refers to a "device tree blob", something which I understand is used to inform the kernel as to how to access devices (http://xillybus.com/tutorials/device-tree-zynq-1). However, I can't find any information pertaining to the inclusion of a "dtb" when using fastboot.
In my probing of various "sin" files, I've managed to extract the kernel.sin for the HK 461 amd 471 ROM versions. They present me with an elf file. This elf file, in turn, can be extracted into three files. The kernel image, the ramdisk gzip and a ".3" file, which I can only assume is the dtb.
My question is whether it is possible to reassemble these files into an elf, and subsequently a sin file so that I can then put this back into the original ROM ftf. Failing this, I'd like to be able to simply hotboot the kernel and a modified ramdisk (that leaves / and /system mounted as rw and runs adb as "root" rather than "shell").
I'm not asking for a handout or a painstakingly written HOWTO, just a pointer in the right direction, if possible.
Interestingly, if I try to simply "hot boot" the extracted elf, it seems to upload perfectly to the phone, but then the phone hangs when trying to boot:
Code:
C:\adt-bundle-windows-x86_64-20130729\sdk\platform-tools>fastboot.exe -i 0x0fce boot D:\kernel-461.elf
creating boot image...
creating boot image - 8663040 bytes
downloading 'boot.img'...
OKAY [ 0.283s]
booting...
FAILED (status read failed (Too many links))
finished. total time: 413.509s
The "FAILED" is reported after I simply unplug the phone. At this point, the phone is very much locked up with the blue LED illuminated. After a few panicked moments, I realised that Vol-Up + Power is a force-reset key combination (it causes the vibration motor to pulse three times, then reboots).
For completeness, here's what happens when I try "hot booting" the extracted kernel and my custom ram disk:
Code:
C:\adt-bundle-windows-x86_64-20130729\sdk\platform-tools>fastboot.exe -i 0x0fce boot D:\kernel-461.elf.Image D:\ramdisky.gz
creating boot image...
creating boot image - 8329216 bytes
downloading 'boot.img'...
OKAY [ 0.274s]
booting...
FAILED (remote: dtb not found)
finished. total time: 0.322s
Chinese, all i see here i chinese One thought though, wouldn't the guys over at the Xperia Z forum be at any assistance? They are working with Sony hardware after all, and maybe they can give you some tips and ideas? I'm just thinking here though
Anywho, keep it up. It's only a matter of time until you crack the code!
ShALLaX said:
Hi,
I'm fairly green when it comes to Android devices, but my understanding is that when using "fastboot," I ought to be able to select "hot boot" a kernel and ramdisk using the "boot kernel <ramdisk.gz> command. However, for my Xperia Z Ultra, I'm finding that when I attempt this, I am told:
"FAILED (remote: dtb not found)"
A bit of research indicates that this probably refers to a "device tree blob", something which I understand is used to inform the kernel as to how to access devices (http://xillybus.com/tutorials/device-tree-zynq-1). However, I can't find any information pertaining to the inclusion of a "dtb" when using fastboot.
In my probing of various "sin" files, I've managed to extract the kernel.sin for the HK 461 amd 471 ROM versions. They present me with an elf file. This elf file, in turn, can be extracted into three files. The kernel image, the ramdisk gzip and a ".3" file, which I can only assume is the dtb.
My question is whether it is possible to reassemble these files into an elf, and subsequently a sin file so that I can then put this back into the original ROM ftf. Failing this, I'd like to be able to simply hotboot the kernel and a modified ramdisk (that leaves / and /system mounted as rw and runs adb as "root" rather than "shell").
I'm not asking for a handout or a painstakingly written HOWTO, just a pointer in the right direction, if possible.
Interestingly, if I try to simply "hot boot" the extracted elf, it seems to upload perfectly to the phone, but then the phone hangs when trying to boot:
Code:
C:\adt-bundle-windows-x86_64-20130729\sdk\platform-tools>fastboot.exe -i 0x0fce boot D:\kernel-461.elf
creating boot image...
creating boot image - 8663040 bytes
downloading 'boot.img'...
OKAY [ 0.283s]
booting...
FAILED (status read failed (Too many links))
finished. total time: 413.509s
The "FAILED" is reported after I simply unplug the phone. At this point, the phone is very much locked up with the blue LED illuminated. After a few panicked moments, I realised that Vol-Up + Power is a force-reset key combination (it causes the vibration motor to pulse three times, then reboots).
For completeness, here's what happens when I try "hot booting" the extracted kernel and my custom ram disk:
Code:
C:\adt-bundle-windows-x86_64-20130729\sdk\platform-tools>fastboot.exe -i 0x0fce boot D:\kernel-461.elf.Image D:\ramdisky.gz
creating boot image...
creating boot image - 8329216 bytes
downloading 'boot.img'...
OKAY [ 0.274s]
booting...
FAILED (remote: dtb not found)
finished. total time: 0.322s
Click to expand...
Click to collapse
yes, same thing in here (it seems newer kernel with dtb)
how to extract them correctly and re-pack to work?
http://forum.xda-developers.com/showthread.php?t=2428117
hkfriends said:
yes, same thing in here (it seems newer kernel with dtb)
how to extract them correctly and re-pack to work?
http://forum.xda-developers.com/showthread.php?t=2428117
Click to expand...
Click to collapse
Why extract it at all? Sony has released the kernelsourcecode and we can create a dtb from scratch. Btw dtb and kernel are corresponding, so better not always use 475 dtb for ever!
So you guys better grab the kernel opensource and compile it sourself instead breaking heads on howto extract.
See our repos custombootimg.mk for the mkbootimg parameters once you compiled dt.img
Regards
Gesendet von meinem C6833 mit Tapatalk 4
I wasn't looking at how to extract it, but how to include it in the ELF. I'll take a look at the mk file, got a link?
Sent from my GT-I9500 using xda app-developers app

Kindle fire hdx 7 starts in fastboot mode wrong boot/corrupted recovery image?

Hey all i ran into a problem yesterday i downgraded my fire hdx tablet to 13.3.2.8 and everything went fine except that my boot image and recovery partitions got messed up so now when i turn it on it goes straight into fastboot mode i have the 32 GB model 2013 edition which is a 7 inch thor based tablet i heard someone was able to flash fastboot via linux but i cant get it to work on windows 7 64 bit so im going to try flashing a new boot image and recovery partition via linux to see if that will fix the problem but i would appreciate the assistance. Thanks
blue9a said:
Hey all i ran into a problem yesterday i downgraded my fire hdx tablet to 13.3.2.8 and everything went fine except that my boot image and recovery partitions got messed up so now when i turn it on it goes straight into fastboot mode i have the 32 GB model 2013 edition which is a 7 inch thor based tablet i heard someone was able to flash fastboot via linux but i cant get it to work on windows 7 64 bit so im going to try flashing a new boot image and recovery partition via linux to see if that will fix the problem but i would appreciate the assistance. Thanks
Click to expand...
Click to collapse
There is no known (or at least widely recognized) recovery from a catastrophic 3.2.8 boot failure. As the bootloader remains locked (and hence fastboot crippled) I do not believe you will have success restoring recovery or flashing a new boot image. Sorry - I'm afraid you now own a brick.
Davey126 said:
There is no known (or at least widely recognized) recovery from a catastrophic 3.2.8 boot failure. As the bootloader remains locked (and hence fastboot crippled) I do not believe you will have success restoring recovery or flashing a new boot image. Sorry - I'm afraid you now own a brick.
Click to expand...
Click to collapse
im testing it on ubuntu linux 14.04 LTS its reporting failure unknown command then ready so i guess thats something
blue9a said:
im testing it on ubuntu linux 14.04 LTS its reporting failure unknown command then ready so i guess thats something
Click to expand...
Click to collapse
Believe response would be similar regardless of host. With a locked bootloader only a few fastboot commands work - none of them useful. Maybe you'll find a workaround!
Davey126 said:
Believe response would be similar regardless of host. With a locked bootloader only a few fastboot commands work - none of them useful. Maybe you'll find a workaround!
Click to expand...
Click to collapse
python3 /home/jeremy/Desktop/cuberHDX.py 0x45202b1325
File "/home/jeremy/Desktop/cuberHDX.py", line 64
print 'Usage: %s [boot.img|serial]' % path.basename(argv[0])
^
SyntaxError: invalid syntax
hmm not sure if i did this right
[email protected]:~$ fastboot -i 0x1949 oem device-info
...
(bootloader) Device tampered: true
OKAY [ 0.036s]
finished. total time: 0.036s
[email protected]:~$ -i 0x1949 oem unlock 0x45202b1325
-i: command not found
[email protected]:~$ /fastboot -i 0x1949 devices
bash: /fastboot: No such file or directory
[email protected]:~$ fastboot -i 0x1949 devices
D0FCA0A03523013E fastboot
[email protected]:~$ fastboot -i 0x1949 flash unlock unlock.signed
target reported max download size of 536870912 bytes
error: cannot load 'unlock.signed': No such file or directory
[email protected]:~$ fastboot -i 0x1949 flash boot '/media/jeremy/MULTIBOOT/boot.img'
target reported max download size of 536870912 bytes
sending 'boot' (6884 KB)...
OKAY [ 0.290s]
writing 'boot'...
FAILED (remote: flashing not allowed for locked hw)
finished. total time: 0.341s
[email protected]:~$ fastboot -i 0x1949 flash unlock '/media/jeremy/MULTIBOOT/unlock.img'
target reported max download size of 536870912 bytes
sending 'unlock' (0 KB)...
OKAY [ 0.084s]
writing 'unlock'...
FAILED (remote: Unlock code is NOT correct)
finished. total time: 0.141s
[email protected]:~$ python cuberHDX.py 45202b1325
python: can't open file 'cuberHDX.py': [Errno 2] No such file or directory
[email protected]:~$ python cuber.py 45202b1325
python: can't open file 'cuber.py': [Errno 2] No such file or directory
[email protected]:~$ '/media/jeremy/MULTIBOOT/cuber.py' 45202b1325
bash: /media/jeremy/MULTIBOOT/cuber.py: Permission denied
[email protected]:~$ '/home/jeremy/Desktop/cuber.py' 45202b1325
bash: /home/jeremy/Desktop/cuber.py: Permission denied
[email protected]:~$ python '/home/jeremy/Desktop/cuber.py' 45202b1325
Usage: cuber.py [bits] [<data] [>sig]
[email protected]:~$ python /home/jeremy/Desktop/cuberHDX.py 45202b1325
Traceback (most recent call last):
File "/home/jeremy/Desktop/cuberHDX.py", line 7, in <module>
from gmpy2 import iroot, mpz
ImportError: No module named gmpy2
[email protected]:~$ python /home/jeremy/Desktop/cuberHDX.py 45202b1325
Traceback (most recent call last):
File "/home/jeremy/Desktop/cuberHDX.py", line 7, in <module>
from gmpy2 import iroot, mpz
ImportError: No module named gmpy2
[email protected]:~$ python /home/jeremy/Desktop/cuberHDX.py 45202b1325
Traceback (most recent call last):
File "/home/jeremy/Desktop/cuberHDX.py", line 7, in <module>
from gmpy2 import iroot, mpz
ImportError: No module named gmpy2
[email protected]:~$ python /home/jeremy/Desktop/cuberHDX.py 45202b1325
Your unlock code is in '45202b1325.unlock'.
[email protected]:~$ fastboot -i 0x1949 flash unlock '/home/jeremy/45202b1325.unlock'
target reported max download size of 536870912 bytes
sending 'unlock' (0 KB)...
OKAY [ 0.085s]
writing 'unlock'...
FAILED (remote: Unlock code is NOT correct)
finished. total time: 0.142s
[email protected]:~$ /cuber_unlockbl --sign ./'/home/jeremy/Desktop/unlock.img' ./ '/home/jeremy/45202b1325.unlock'
bash: /cuber_unlockbl: No such file or directory
[email protected]:~$ python ./cuber_unlockbl --sign '/home/jeremy/Desktop/unlock.img' '/home/jeremy/Desktop/45202b1325.unlock'
python: can't open file './cuber_unlockbl': [Errno 2] No such file or directory
[email protected]:~$ python cuber.py ./cuber_unlockbl --sign '/home/jeremy/Desktop/unlock.img' '/home/jeremy/Desktop/45202b1325.unlock'
python: can't open file 'cuber.py': [Errno 2] No such file or directory
[email protected]:~$ python cuber.py --sign '/home/jeremy/Desktop/unlock.img' '/home/jeremy/Desktop/45202b1325.unlock'
python: can't open file 'cuber.py': [Errno 2] No such file or directory
[email protected]:~$ python /home/jeremy/Desktop/cuberHDX.py ./cuber_unlockbl --sign ./home/jeremy/Desktop/unlock.img ./home/jeremy/Desktop/45202b1325.unlock
Usage: cuberHDX.py [boot.img|serial]
[email protected]:~$ python /home/jeremy/Desktop/cuber.py ./cuber_unlockbl --sign ./home/jeremy/Desktop/unlock.img ./home/jeremy/Desktop/45202b1325.unlock
Usage: cuber.py [bits] [<data] [>sig]
[email protected]:~$ python /home/jeremy/Desktop/cuber.py --sign ./home/jeremy/Desktop/unlock.img ./home/jeremy/Desktop/45202b1325.unlock Usage: cuber.py [bits] [<data] [>sig]
[email protected]:~$ python /home/jeremy/Desktop/cublock.py --sign ./home/jeremy/Desktop/unlock.img ./home/jeremy/Desktop/45202b1325.unlock
Usage: cublock.py manfid serial
[email protected]:~$
well i added a txt file that contains my device info if you can get a .unlock and .img file that would really help me btw my fire os was 13.3.2.8
blue9a said:
well i added a txt file that contains my device info if you can get a .unlock and .img file that would really help me btw my fire os was 13.3.2.8
Click to expand...
Click to collapse
Can't unlock bootloader versions >3.2.3.2; can't flash with a locked BL. Your device is bricked.

Temporarily booting self compiled kernel with 'fastboot boot' has no effect

Hi,
I wanted to test if I could build and run a kernel (unmodified).
These were my steps:
Install image on device (LineageOS 15.1 in my case)
Get kernel sources
Cloned the kernel repository that the developer of the image provided.
Build kernel
Try and run kernel directly with 'fastboot boot' (failed)
Modify boot.img from installed image with self compiled kernel
Try to run the modified boot.img with 'fastboot boot'
Code:
downloading 'boot.img'...
OKAY [ 0.589s]
booting...
OKAY [ 0.019s]
finished. total time: 0.608s
My problem is now that, although fastboot reports success and the device boots from fastboot mode a few seconds after issuing the command on the host(not before printing 'Booting downloaded image' on the top of the bootloader screen), the kernel didn't seem to have changed (judging from 'Kernel version' in the 'About' device dialog).
What could have gone wrong? Is my workflow ok?
Could anyone point me in the right direction?
Thanks in advance!
Device: Nexus7 / grouper
Resources used:
Image: https://forum.xda-developers.com/nexus-7/development/rom-lineageos-15-1-t3975207
Kernel: https://github.com/surblazer/android_kernel_nvidia_tegra3
mkbootimg_tools: https://github.com/xiaolu/mkbootimg_tools

Can't flash system images in fastboot - FAILED (remote: 'sparse flash write failure')

Hi, i am trying to install a system.img to the system partition using fastboot using
Code:
fastboot flash system C:\Users\user\Desktop\system.img
but when i run the command i get this error:
Code:
Sending sparse 'system' 1/7 (460796 KB) OKAY [ 13.966s]
Writing 'system' FAILED (remote: 'sparse flash write failure')
fastboot: error: Command failed
i don't know if this is related to this other issue https://forum.xda-developers.com/t/...-cannot-flash-images-to-file-systems.4535981/
but i can't flash system images neither from recovery nor from fastboot (i have tried also other images).
it doesn't seem to be a memory issue because i have also used the -S option to split the image and it still doesn't work.
Help
Don't put your img file on desktop screen.Move the img file on the C drive and flash again with the right command.Hope it will be solved.
shaon121$ said:
Don't put your img file on desktop screen.Move the img file on the C drive and flash again with the right command.Hope it will be solved.
Click to expand...
Click to collapse
It still doesn't work as administrator and with the image in the C drive root.
Change your img file and try again..or download again... What is your phone model?
shaon121$ said:
Change your img file and try again..or download again... What is your phone model?
Click to expand...
Click to collapse
I have already tried different images, the phone is a Huawei P Smart FIG-LX1.
useless double posts
Can't flash system.img in TWRP - E:Cannot flash images to file systems
I am trying to install a custom ROM on a Huawei P Smart FIG-LX1. I have a system.img that i should flash to the system partition. So when i try to flash the image i have two system partitions: Ona named "System" and one named "System Image". If...
forum.xda-developers.com
Size of image is larger than the target device in TWRP
Hi, I am trying to flash a system image in TWRP. When i try flashing the system.img to the System Image partiton i get this error: Size of image is larger than target device How can i solve this error? I tried the resize partition option on the...
forum.xda-developers.com
slx23 said:
Hi, i am trying to install a system.img to the system partition using fastboot using
Code:
fastboot flash system C:\Users\user\Desktop\system.img
but when i run the command i get this error:
Code:
Sending sparse 'system' 1/7 (460796 KB) OKAY [ 13.966s]
Writing 'system' FAILED (remote: 'sparse flash write failure')
fastboot: error: Command failed
i don't know if this is related to this other issue https://forum.xda-developers.com/t/...-cannot-flash-images-to-file-systems.4535981/
but i can't flash system images neither from recovery nor from fastboot (i have tried also other images).
it doesn't seem to be a memory issue because i have also used the -S option to split the image and it still doesn't work.
Help
Click to expand...
Click to collapse
[Solved] Fastboot flash super error - FAILED (remote: 'failed to check sparse crc')
Hi, I'm getting an error trying to install stock rom from xiaomirom.com via fastboot. D:\Downloads\vili_eea_global_images_V12.5.21.0.RKDEUXM_20220224.0000.00_11.0_eea>fastboot flash super...
forum.xda-developers.com

Categories

Resources