vendor blobs - Xiaomi Poco X2 Questions & Answers

Anyone got the vendor blobs for this device ?
Btw how do i extract the vendor blobs ? Looked up tutorials where it said to run extract files.sh but no such script exists. Anyone if you know how to extract vendor please help this noob
Thanks in advance ?

Related

Stuck Forking device’s proprietary vendor files

I have been following the XDA Guide on porting roms found here: http://xda-university.com/as-a-developer/porting-aosp-roms-using-source-code
I am stuck at the point where I am supposed to fork the device's proprietary vendor files.
What I am trying to do is Port Omnirom for the international S3 to the US (d2lte).
This is my first attempt at a port. I can not find the the proprietary vendor files on the CM github as labelled in this guide. Have they changed the format or am I missing something now that there are unified builds?
Any help appreciated as I am clueless how to proceed without being able to fork the proprietary vendor files.
Thanks
TheMuppets is the place to look:
https://github.com/themuppets

[8/3/2019]Updated Android IMG Tools[Upto Android 9.0]

Since These tools are outdated there has been little movement with the tools since, @rkhat has made a source available to be built for linux, however im unable to get a compile.
So i decided to gather sources and make some modifications to get them compiling in cygwin and works upto android 8.1
Install cygwin in the default directory with the following packages.
libpcre1, zlib-devel, cmake, make, automake, gcc-core, gcc-g++, libgcc1, libstdc++6, cpio, flex, bison, cygwin32-gcc-core, patch, libintl
Source code
Prebuilt binaries
To build simply download and extract the source, open CMD and
Code:
path=%path%C:\cygwin64\bin;
cd to each directory and execture
Code:
make
To build e2fsprogs
Open cygwin
cd to the directory
Code:
mkdir build
cd build
../configure
make
Original Sources
Sparse utillities based on sources https://github.com/anestisb/android-simg2img
mkbootimg based on sources https://github.com/osm0sis/mkbootimg
mkbootfs based on sources https://github.com/osm0sis/mkbootfs
make_ext4fs based on sources https://github.com/jamflux/make_ext4fs
sefcontext_decompile based on sources https://github.com/wuxianlin/sefcontext_decompile
dtc based on sources https://github.com/dgibson/dtc
e2fsprogs based on sources https://github.com/tytso/e2fsprogs
Generates -
append2simg.exe
cpio.exe
dtc.exe
gzip.exe
img2simg.exe
make_ext4fs.exe
mkbootfs.exe
mkbootimg.exe
sefcontext_decompile.exe
simg2img.exe
simg2simg.exe
unpackbootimg.exe
mke2fs.exe
Contributors
SuperR, anestisb, rkhat2, osm0sis, jamflux, wuxianlin, Xannytech, CarmineRovito
Doing God's work I see.
Repo was on private, fixed it now
https://github.com/anpaza/make_ext4fs
I1V1A1N said:
https://github.com/anpaza/make_ext4fs
Click to expand...
Click to collapse
Thats a newer build, i may use it, thanks
Repository has been updated for partial 9.0 support
dose it support pie use make_ext4fs?
Nightmare_MYS said:
dose it support pie use make_ext4fs?
Click to expand...
Click to collapse
Unpacking yes but repacking not at the moment, i havent had time to look into mk2efs and the new e2fsdroid source code, the source for these are in the e2fsprogs repository, mk2efs already has a windows port in cygwin and the e2fsdroid sourcw code is in the contrib/android directory, i have built mk2efs correctly but i havent attempted e2fsdroid yet because i have been busy, maybe @osm0sis may be able to give it a shot
Ricky Divjakovski said:
Unpacking yes but repacking not at the moment, i havent had time to look into mk2efs and the new e2fsdroid source code, the source for these are in the e2fsprogs repository, mk2efs already has a windows port in cygwin and the e2fsdroid sourcw code is in the contrib/android directory, i have built mk2efs correctly but i havent attempted e2fsdroid yet because i have been busy, maybe @osm0sis may be able to give it a shot
Click to expand...
Click to collapse
i have no idea,i checked a lot of method,mke2fs just can creat a new null img,i still don't know e2fsdroid's effect,i had used ClassyKitchen to repack my pie,it working,but ClassyKitchen just a single exe file,
Nightmare_MYS said:
i have no idea,i checked a lot of method,mke2fs just can creat a new null img,i still don't know e2fsdroid's effect,i had used ClassyKitchen to repack my pie,it working,but ClassyKitchen just a single exe file,
Click to expand...
Click to collapse
thats quite odd, from looking into classy kitchen it seems that it does use make_ext4fs?
however i dont know how he has got it working, he tries hiding the functionallity of his tools quite abit, im guessing this is because of licensing issues preventing him to sell whats included in the tools and to stop other people from making a free version, the binaries are unpacked to %tmp%/BIN folder when processing a firmware, check it out
Ricky Divjakovski said:
thats quite odd, from looking into classy kitchen it seems that it does use make_ext4fs?
however i dont know how he has got it working, he tries hiding the functionallity of his tools quite abit, im guessing this is because of licensing issues preventing him to sell whats included in the tools and to stop other people from making a free version, the binaries are unpacked to %tmp%/BIN folder when processing a firmware, check it out
Click to expand...
Click to collapse
the free of classy kitchen just can build new img,if i know its working space,i maybe know it in Disk C,but i can't find it and dont't know the binaries unpacked where,i tryed to use make_ext4fs to build my pie img,it is not working,i sure Classy Kithen can,
Nightmare_MYS said:
the free of classy kitchen just can build new img,if i know its working space,i maybe know it in Disk C,but i can't find it and dont't know the binaries unpacked where,i tryed to use make_ext4fs to build my pie img,it is not working,i sure Classy Kithen can,
Click to expand...
Click to collapse
the binaries are in the %tmp%\BIN folder
Anyway this can be made to support Amazon boot images?
Sent from my MotoG3 using XDA Labs
DragonFire1024 said:
Anyway this can be made to support Amazon boot images?
Sent from my MotoG3 using XDA Labs
Click to expand...
Click to collapse
Please upload the boot image and ill see if i can do this, ill also update the sources soon because i made a utillity to split the MTK header from an MTK ramdisk
Ricky Divjakovski said:
Please upload the boot image and ill see if i can do this, ill also update the sources soon because i made a utillity to split the MTK header from an MTK ramdisk
Click to expand...
Click to collapse
Awesome. Thank you. I'll upload one as soon as I get home
Sent from my MotoG3 using XDA Labs
I'm trying to use img2sing.exe and getting "cygz.dll was not found" error. Is that file supposed to be in the zip?
zxcv888 said:
I'm trying to use img2sing.exe and getting "cygz.dll was not found" error. Is that file supposed to be in the zip?
Click to expand...
Click to collapse
that will be in your cygwin bin directory, either copy it from there to the same folder as the exe or or add the cygwin bin directory to your path environment variable
Ricky Divjakovski said:
the binaries are in the %tmp%\BIN folder
Click to expand...
Click to collapse
i didn't find that,
Nightmare_MYS said:
i didn't find that,
Click to expand...
Click to collapse
you have to run the progran and repack for it to appeart, as soon as its repacked the folder gets deleted
Ricky Divjakovski said:
Please upload the boot image and ill see if i can do this, ill also update the sources soon because i made a utillity to split the MTK header from an MTK ramdisk
Click to expand...
Click to collapse
here is the boot.img from the Amazon Fire HD 10, 2017, firmware version update-kindle-40.6.0.5_user_605485120.bin. Thank you so much. Let me know if you need anything else. Just extract the .img from the zip.

Help creating a device tree from scratch

Hello,
I'm trying to learn how to create a device tree from scratch without copying stuff from other device trees. So far I have gathered device info and I have a rough idea of the makefiles that are required (Android. mk, BoardConfig.mk, etc). I understand that shared libraries are extracted from the vendor image/partition and go into /vendor/manufacturer/device and then referenced in the device tree?
Vendor config files (.xml) are copied from the vendor image/partition to the device tree?
I have seen in many device trees there's some source code (.cpp, .h) files, where's this from and how do I know if I need it?
Also, is there a full list of possible variables for the makefiles? Right now all I can seem to do is look at other device trees and try to set similar variables. I'm thinking the variables should match the props from the stock rom?
Another thing I've been wondering is why, especially for treble devices, we need to copy vendor files at all? can't we just keep the stock vendor image and flash a custom system image? are shared vendor libraries referenced and required to build the system image?
Lastly, is there any reading material you would recommend that is up-to-date (for treble devices and android 10+)?

Question regarding Pixel3 (blueline)

note: Google removed "BOARD_BUILD_SYSTEM_ROOT_IMAGE" and added "ro.boot.dynamic_partitions=true" to bring back ramdisk for blueline.
note: the device tree blob is inside the boot img.
if im editing the boot.img, do i have to unpack it with vbmeta.img?
Im working with firmware: blueline-qp1a 190711.020
The phone im targeting G50 Plus by BLU
maybe i dont understand fully

Issues with finding device tree blob (.dtb) file on Moto G72 running Android 12.1

Hi everyone,
I'm currently having trouble finding the device tree blob (.dtb) file on my Motorola phone running Android 12. I've tried unpacking the boot image file using various tools, but I haven't been able to locate the .dtb file.
Here are the steps I've taken so far:
I've rooted my phone and have access to all system files.
I've unpacked the boot image using the Android Image Kitchen and other tools, but I can't seem to find the .dtb file.
I've checked the "firmware" and "by-name" folders, but I couldn't find the .dtb file there either.
I've even tried using the dtc (Device Tree Compiler) utility to convert the device tree blob to a human-readable text file, but the resulting file was empty.
I'm at a loss as to what to do next. I need the .dtb file to make some modifications to the device tree information, but I can't seem to find it anywhere.
Has anyone else experienced this issue with a Motorola phone running Android 12? Does anyone know where the .dtb file might be located, or have any suggestions for other tools or techniques I could try?
Thanks in advanced for any help or advice you can provide!
afaik separate dtbo partition
alecxs said:
afaik separate dtbo partition
Click to expand...
Click to collapse
Isn't dtbo just an overlay?
@FiniteCode post the boot image and I'll check it for DTB.
I'm really sorry but i don't get what you guys wanna say, Actually it's my first time developing rom so you see...
Renate said:
Isn't dtbo just an overlay?
@FiniteCode post the boot image and I'll check it for DTB.
Click to expand...
Click to collapse
Thank you a lot for your support!
Thank you everyone saw your answers put them to ChatGPT understood some New Concepts and Voila! Thank you a lot everyone.... Special Thanks to @alecxs.7285913 and @renate.4474482
FiniteCode said:
Thank you everyone saw your answers put them to ChatGPT understood some New Concepts and Voila! Thank you a lot everyone.... Special Thanks to @alecxs.7285913 and @renate.4474482
Click to expand...
Click to collapse
Hmmm...
That's an Android header version 4 which only has a kernel and a ramdisk.
See: https://source.android.com/docs/core/architecture/bootloader/boot-image-header#header-v4
There appears to be no DTB tacked onto the kernel.
Also weird, the ramdisk is CPIO, but they didn't even bother to gzip it.
That dtbo has three DTBs in it, preceeded by that new 128 byte header.
It appears to all be overlays. I don't know much about that.
Code:
000000 Android header
000080 Header
0000b8 / {
0000c0 [email protected] {
0000d8 target-path = "/";
0000e8 __overlay__ {
Edit: If you want the kallsysms (using my tools):
Code:
C:\>imgutil /x boot.img payload
C:\>kallsyms /b8 payload boot.sym
Renate said:
Hmmm...
That's an Android header version 4 which only has a kernel and a ramdisk.
See: https://source.android.com/docs/core/architecture/bootloader/boot-image-header#header-v4
There appears to be no DTB tacked onto the kernel.
Also weird, the ramdisk is CPIO, but they didn't even bother to gzip it.
That dtbo has three DTBs in it, preceeded by that new 128 byte header.
It appears to all be overlays. I don't know much about that.
Code:
000000 Android header
000080 Header
0000b8 / {
0000c0 [email protected] {
0000d8 target-path = "/";
0000e8 __overlay__ {
Edit: If you want the kallsysms (using my tools):
Code:
C:\>imgutil /x boot.img payload
C:\>kallsyms /b8 payload boot.sym
Click to expand...
Click to collapse
yup... i tried to open the dtbo.img i came up with one error on every software/method i tried (bad magic number)
FiniteCode said:
yup... i tried to open the dtbo.img i came up with one error on every software/method i tried (bad magic number)
Click to expand...
Click to collapse
Lop off the first 128 (0x80) bytes (of the Android non-standard header) and you'll see the signature, bigend 0xd00dfeed.
There are three concatenated DTB(O)s.
Renate said:
Lop off the first 128 (0x80) bytes (of the Android non-standard header) and you'll see the signature, bigend 0xd00dfeed.
There are three concatenated DTB(O)s.
Click to expand...
Click to collapse
Could you attach them If possible. I've been having a hard time with getting them
@FiniteCode Oh, alright.
Renate said:
@FiniteCode Oh, alright.
Click to expand...
Click to collapse
Thank you so much can't explain my happiness like seriously thank you a lot
FiniteCode said:
Thank you so much can't explain my happiness like seriously thank you a lot
Click to expand...
Click to collapse
Don't get too excited. Each of those dtbo's are only ~100k.
A real dtb is more like 300k and upwards.
Moreover, those three are all variants of each other, they are 75%+ the same.
And since they are all actually overlays we still don't know where the base dtb is.
Edit: Oh, I forgot that I had posted my dtbview.exe (in the sig).
If you do Windows it can dump dtb & dtbo (also wacky Android header).
Code:
C:\>dtbview dtbo.img > big.txt
Some new devices with header version 4 has more in the vendor_boot.img like kernel-dt so that not in the boot.img (only kernel).
But I made attempt to extract dtbo.img & dtb. Not know if help.
UPD
Okay. Again my friend @lopestom updated me on Header V4 information.
I used the correct tools on Linux and now it seems to be much better than before. Well it looks like you have a Mediatek phone.
Attached pictures "dddd".png and unziped_dtbo.zip
Thank you all for help I'll try if this works in my custom rom
FiniteCode said:
Thank you all for help I'll try if this works in my custom rom
Click to expand...
Click to collapse
Or else, the last resort might be contacting Motorola which I don't think should help out, I don't have any hopes from Motorola...
FiniteCode said:
Or else, the last resort might be contacting Motorola which I don't think should help out, I don't have any hopes from Motorola...
Click to expand...
Click to collapse
I not search in total but has very dts and dtc files.
GitHub - AbzRaider/kernel_moto_vicky: Kernel Tree for MediaTek MT6789 Based Motorola G72 ( Vicky )
Kernel Tree for MediaTek MT6789 Based Motorola G72 ( Vicky ) - GitHub - AbzRaider/kernel_moto_vicky: Kernel Tree for MediaTek MT6789 Based Motorola G72 ( Vicky )
github.com
GitHub - theh0riz0n/android_kernel_motorola_vicky: Kernel sources for Motorola G72 DS XT2255-1
Kernel sources for Motorola G72 DS XT2255-1. Contribute to theh0riz0n/android_kernel_motorola_vicky development by creating an account on GitHub.
github.com
Kernel sources for Motorola G72 DS XT2255-1
Using which tools were you guys able to extract the boot.img I'm unable to do that actually I need to extract the ramdisk and kernel please do attach if you can
AIK is the only tool I use. maybe you have separate vendor_boot partition

Categories

Resources