I've never had to flash a vendor image with a ROM before.
Would anyone please be kind enough to explain what the vendor image file is, and what it does?
Thanks so much.!
Sent from my Pixel using Tapatalk
pilotgav said:
I've never had to flash a vendor image with a ROM before.
Would anyone please be kind enough to explain what the vendor image file is, and what it does?
Thanks so much.!
Sent from my Pixel using Tapatalk
Click to expand...
Click to collapse
Every device needs drivers to operate components like GPS, gyro, proximity, and other sensors, right? Developers would have to account for those drivers in their software. Drivers used to be under the system partition. Every app has to locate those drivers independently. Putting device-specific drivers in vendor.img consolidates all that trouble. Plus, as an app developer, I don't have to pay somebody a license fee to use that trademarked camera or GPS. Vendor images contain device-specific hardware drivers, and universal for all apps within my smart phone or tablet. A ROM developer can create universal ROMs for multiple devices, then users can apply the appropriate vendor images for their own devices.
quangtran1 said:
Every device needs drivers to operate components like GPS, gyro, proximity, and other sensors, right? Developers would have to account for those drivers in their software. Drivers used to be under the system partition. Every app has to locate those drivers independently. Putting device-specific drivers in vendor.img consolidates all that trouble. Plus, as an app developer, I don't have to pay somebody a license fee to use that trademarked camera or GPS. Vendor images contain device-specific hardware drivers, and universal for all apps within my smart phone or tablet. A ROM developer can create universal ROMs for multiple devices, then users can apply the appropriate vendor images for their own devices.
Click to expand...
Click to collapse
Great answer. If there weren't two variants of the pixel would they just be included in the ROM?
Sent from my Pixel using Tapatalk
pilotgav said:
Great answer. If there weren't two variants of the pixel would they just be included in the ROM?
Sent from my Pixel using Tapatalk
Click to expand...
Click to collapse
Well, for the sake of accuracy, let me re-clarify what I wrote. I used the word "drivers", but the more accurate term here would be "binaries", as in device-specific binaries, how a device (brand/model/components) is identified. If there's only one device, I still would need to be able to declare those device-specific identifications, but right, only once. If I'm only licensed to create/monetize a commercial app for device A, I can't apply the same license for device B. Yes, I realize Android is open source, but not the apps or identifiers Google created for Android devices.
are there any guides on converting a nougat 7.1 rom to a treble based rom? thanks
Related
https://github.com/JackpotClavin/Android-Blob-Utility
The purpose of this program is to help AOSP-based ROM developers quickly and easily find out which proprietary blobs need to be copied into the ROM's build, or built using source. How the program works is you do a /system dump into a folder on a Linux computer. Then you make the program using the 'make' command; then you can run it.
First off, the program will ask you what the sdk version of the /system dump you pulled happens to be. For example, if your /system dump is Android 4.3, and intend port a 4.3-based ROM, then enter 18 and press enter.
When it prompts you for location of the /system dump you pulled, if the location of the build.prop of the /system dump is under:
Code:
/home/user/backup/dump/system/build.prop
then just use:
Code:
/home/user/backup/dump/system
The program will now ask you for your device's manufacturer's name, and the device's name. For my Verizon LG G2, I entered "lge" and "vs980" respectively.
The utility then will ask you how many files you wish to run through the program. In the case of my LG G2, the KitKat build requires two main proprietary camera-related libraries to run (/system/bin/mm-qcamera-daemon and
/system/lib/hw/camera.msm8974.so).
So I typed in 2 and pressed enter (because I'm running two proprietary files through the program)
Then simply typed in:
Code:
/home/user/backup/dump/system/bin/mm-qcamera-daemon
and pressed enter and it printed out *every* file needed to get /system/bin/mm-qcamera-daemon running (the file might be proprietary, or it can be built from source).
Then it asked for the final proprietary file, so I simply typed in:
Code:
/home/user/backup/dump/system/lib/hw/camera.msm8974.so
and pressed enter and it printed out *every* file needed to get /system/lib/hw/camera.msm8974.so running (the file might be proprietary, or it can be built from source).
An example usage of this program can be found here: https://raw.githubusercontent.com/JackpotClavin/Android-Blob-Utility/master/Example_Usage.txt
That's 106 proprietary blobs done in a flash!
The beauty of this program is that it's recursive, so if proprietary file 'A' needs proprietary file 'B' to run, but proprietary file 'B' needs proprietary file 'C' to run, which in turn needs 'D' to run, then simply entering proprietary file A to run will print out all A, B, C, and D nicely formatted so that you can simply copy the output and place it in a file under vendor/manufacturer/codename/codename-vendor-blobs.mk file in your AOSP build source tree's root.
Another great thing about this program is that it doesn't just catch the libraries needed to satisfy the linker, but rather, it will also print out those libraries that are called within the actual code of the library itself, like:
Code:
dlopen("libfoo.so", RTLD_NOW);
libfoo.so is not marked as a shared library, so the linker won't complain that libfoo.so is missing, and there might be no sign that libfoo.so missing and needed, but when it's time for the daemon or library to run, it won't show any sign that something is wrong, until you see that it doesn't work. This program will catch and display that libfoo.so is needed.
So basically:
1. Extract /system dump image
2. Tell program the SDK version of your /system dump
3. Tell program the location of your /system dump
4. Tell the program your device's manufacturer's name
5. Tell the program your device's codename
6. Tell program how many files you wish to run through the utility
7. Tell program the location of the file(s) you wish to run through the program.
8. Copy the output of the utility to a text file under vendor/manufacturer/codename/codename-vendor-blobs.mk
reserve
Hi,
I'm a noob and don't worry about my silly question.
I'm trying to build my first cm-rom and tested your tool. Thanks a lot for your work, it worked for me.
I'm a little bit curios about your point 5. Where can I find all the files I need for my own source-tree/device?
It would be nice if you can give me a hint.
Thanks a lot and greetings from germany
Greetings from the US
Do you mean the device folder the ROM? You can look at similar devices to your device and see what they did and make the changes to build Android.
This is the device folder for the Nexus 5 -> https://android.googlesource.com/device/lge/hammerhead
This tool is under-recognized. I think it's a really great way to find which blobs are dependencies!
Codename13 said:
This tool is under-recognized. I think it's a really great way to find which blobs are dependencies!
Click to expand...
Click to collapse
Thanks! Are you developing a ROM? Let me know if it helps!
Sent from my LG-VS980 using XDA Free mobile app
Could this be updated to Lolipop?
2GigayteSD said:
Could this be updated to Lolipop?
Click to expand...
Click to collapse
What do you mean? I added support for SDK version 20 if that's what you're asking.
Sent from my LG-VS980 using XDA Free mobile app
Does that mean I can port AOSP to any device just by getting all the necessary blobs? I'm not sure but I'm trying to port Lollipop to my device but I don't really have a clue how to do it/what's needed to do it. Will this be useful for me? Thanks.
cikoleko said:
Does that mean I can port AOSP to any device just by getting all the necessary blobs? I'm not sure but I'm trying to port Lollipop to my device but I don't really have a clue how to do it/what's needed to do it. Will this be useful for me? Thanks.
Click to expand...
Click to collapse
It helps with making ROMs for devices that don't have support (either the model is brand new or the device never gained AOSP ROM support for whatever reason)
Basically, in the early stages of porting ROMs, certain things won't work (graphics, camera, radio) and this is mostly due to not having the correct proprietary files needed for the OS to interact with the hardware. The proprietary files have dependencies (they rely on other libraries, which in turn may rely on other libraries, and so on and so forth until all proprietary libraries are satisfied).
In the case of my LG G2, there were a total of 92 proprietary files that needed to be pushed to the device in order to get just camera working. Instead of pushing one library at a time and getting a logcat or strace dump of what the daemons are calling or depend on, I wrote this program to recursively search for all proprietary libraries needed to satisfy a proprietary library (or in the case of the camera for my G2, there were two proprietary libraries needed that required those said 90 other proprietary blobs).
So rather than pushing libraries, (then gathering logs and stracing) and hoping that the one you just pushed is the one that will get your camera, radio, etc to work, you run your known proprietary daemons or libraries through this program and it will print out the necessary libraries to get it working, in a fraction of a second
Can you go through the actual "porting" process because from what I understand you have done it? If I'm correct to port a ROM you need to have working ROM from other device? If yes, does that device have to be same manufacturer? Lets say I do have working AOSPA kitkat for my device so I need to get AOSPA lollipop and exchange the certain files and then I'll able to run it? Once again if it's like that then I use your tool and get necessary blobs? I don't have a clue about this stuff, I only build ROMs but now time has come that my device is unsupported so can you give me some tips, thanks.
This is interesting. Going to have to try this out tomorrow.
cikoleko said:
Can you go through the actual "porting" process because from what I understand you have done it? If I'm correct to port a ROM you need to have working ROM from other device? If yes, does that device have to be same manufacturer? Lets say I do have working AOSPA kitkat for my device so I need to get AOSPA lollipop and exchange the certain files and then I'll able to run it? Once again if it's like that then I use your tool and get necessary blobs? I don't have a clue about this stuff, I only build ROMs but now time has come that my device is unsupported so can you give me some tips, thanks.
Click to expand...
Click to collapse
If you don't have a clue then dont do it, please! Work your way up. First step in this hypothetical is to wait for aospa 5.0
Thanks a lot for this tool
just one thing.. i cant get the blobs for my wireless (wl12xx)
Rest all done
andynoob said:
Thanks a lot for this tool
just one thing.. i cant get the blobs for my wireless (wl12xx)
Rest all done
Click to expand...
Click to collapse
Is it possible that each wl12xx library only relies on AOSP libraries (has no dependencies?)
See if they can be built from source!
Sent from my LG-VS980 using XDA Free mobile app
JackpotClavin said:
Is it possible that each wl12xx library only relies on AOSP libraries (has no dependencies?)
See if they can be built from source!
Sent from my LG-VS980 using XDA Free mobile app
Click to expand...
Click to collapse
Manufacturer hasnt provided the source code(Kernel) . Anyways thanks a lot for this tool :good: :good:
how to use it?
by reading the detailed instructions?
Sent from my LG-VS980 using XDA Free mobile app
JackpotClavin said:
by reading the detailed instructions?
Sent from my LG-VS980 using XDA Free mobile app
Click to expand...
Click to collapse
should we adb pull /system first?
*edit
I did it! but where is the directory out?
J,
You are a life saver ! Subscribed. Will add link of thread to my signature. Will dance happily for some hours! :good:
Will seek therapy. :silly:
m
If the vendor (in this case Vodafone) don't provide sources, does it mean I'm unable to create a ROM for it?
Put it another way, is it possible to create a ROM using only a running device?
The Original Leppa said:
If the vendor (in this case Vodafone) don't provide sources, does it mean I'm unable to create a ROM for it?
Put it another way, is it possible to create a ROM using only a running device?
Click to expand...
Click to collapse
Yes, if you want to build a "true" custom ROM you will need the stock source code for your device.
If you can root, you can use adb or Terminal Emulator to do a "ROM dump", or dump just a copy of your system.img, then modify that system.img and then use adb to push the modified system.img to your device. It will be considered a modified stock ROM, it won't be a "custom" ROM but you can modify it quite heavily with things like Xposed, Gravity Box, and a few other good mods and themes.
Or you can get a copy of your stock firmware(not the same as source code), then find other devices with the exact same hardware that have a better version of Android than yours, then use your stock firmware to port the better version to work on your device.
Building a true custom ROM is "possible" without stock source code but it would require VERY extensive programming and developer knowledge to do it because you'd have to do every bit of it from scratch with no resources to work with.
Sent from my SM-S903VL using Tapatalk
So, I'm screwed, in terms of porting?
The Original Leppa said:
So, I'm screwed, in terms of porting?
Click to expand...
Click to collapse
It would help if you had stock firmware for your model then you can find another device with the same hardware architecture(chipset), if they are similar enough you can port it.
It's possible to port between devices that aren't exactly the same chipset but that also requires extensive developer knowledge.
If you aren't experienced then you're pretty much out of luck.
If you want to customize android devices then you need to get less obscure devices. Next time, research the device first to see if there is a known rooting method for it and whether there is custom development available for it before you get it. Or if you get a device that just came out, get a device that you are certain that developers will support, typically a flagship/popular device.
The cheap low-mid range devices usually don't get support from developers and the ones that do get support are not supported by real develoers, they are supported by members that took it on themselves to learn how to build android just so they can update their device but their work usually isn't exactly right due to their lack of experience.
Sent from my SM-S903VL using Tapatalk
I'm trying to build Android on my machine, and everything is going well, but there is one thing I am missing, and that is the binary drivers for the OnePlus 6. The Android build guide only has the drivers for the Nexus and Pixel phones, and after doing some major Googling, I can't find them anywhere.
Since people are already releasing custom ROMs for the OnePlus 6, I assume they are out there, but I haven't been able to find a download location for them at all.
To be clear; I'm looking for the drivers that are on the phone itself, not the USB drivers you install on your PC.
i noticed when I pulled my OP6 first time, a CD gets mounted with drivers, did you see it?
jabbermacy said:
i noticed when I pulled my OP6 first time, a CD gets mounted with drivers, did you see it?
Click to expand...
Click to collapse
I'm pretty sure that is just the drivers to connect it to the PC and keep it synced with the PC. What I am talking about is the drivers for the hardware inside the phone such as the GPS chip, GPU etc.
jabbermacy said:
i noticed when I pulled my OP6 first time, a CD gets mounted with drivers, did you see it?
Click to expand...
Click to collapse
is this a joke? :laugh:
TheMuppets Repo used to be my go-to proprietary vendor repository for huge number of OEM and devices. I see that Oneplus6 isnt there yet. May be wait until they add or may be someone else might help you out to get it at the earliest
vijai2011 said:
TheMuppets Repo used to be my go-to proprietary vendor repository for huge number of OEM and devices. I see that Oneplus6 isnt there yet. May be wait until they add or may be someone else might help you out to get it at the earliest
Click to expand...
Click to collapse
Thanks for the link. I've starred the repository. I guess I'll have to wait then or investigate some of the custom ROMs to see if I can extract them by hand. That might be a little difficult for me though as I'm entirely new to Android operating system development.
Are you talking about device tree? It's not available yet, but OP promised to release it.
Also, the current roms available use oxygen OS as the base ie. Modified Oxygen OS or take advantage of treble as device tree is not needed for that.
Shouldn't there be a pull-files.sh script that pulls all the files?
That's what I did on my 3T
Actually I don't even think the source code for ROMs is available yet, I saw this article: https://www.xda-developers.com/qualcomm-snapdragon-845-kernel-source-code/
I have an old Samsung phone running on Marshmallow. I want to build android and flash it on the old phone. Many take Google Pixel to show how to do it and say it’s not possible to do it on non-Google device. Is there a way to get around it?
KrishnaD3V said:
I have an old Samsung phone running on Marshmallow. I want to build android and flash it on the old phone. Many take Google Pixel to show how to do it and say it’s not possible to do it on non-Google device. Is there a way to get around it?
Click to expand...
Click to collapse
Sure. Here's some reading material on how to build a custom Android operating system. https://www.androidauthority.com/build-custom-android-rom-720453/
If it all seems too much, you could instead install a custom Android operating system prebuilt by others. One such example is LineageOS which has its own website and installation instructions.
You will have to first determine the exact model and sub-variant of your Samsung phone.
Then determine whether it is network carrier unlocked.
Then determine whether the bootloader is allowed to be unlocked (allow oem unlocking).
LineageOS Downloads
download.lineageos.org
Thanks for the reply
Do you know how to obtain proprietary binaries for a device?
KrishnaD3V said:
Thanks for the reply
Do you know how to obtain proprietary binaries for a device?
Click to expand...
Click to collapse
Depends on the the exact device model? (Go to settings =>About phone) (or in the dialler, type *#0*# then tap on 'version'). Then search the XDA forum for that device, then spend some time scrolling through the posts to find the info you're searching for. https://forum.xda-developers.com/c/samsung.11975/
*#0*# doesn’t give any option for version. So I thought to see in settings. What ‘version’ should I look for?
Go to settings =>About phone
Look for a code which which looks similar to SM-GTI9100
KrishnaD3V said:
Thanks for the reply
Do you know how to obtain proprietary binaries for a device?
Click to expand...
Click to collapse
Either extract them from phone's Stock ROM file, or pull them out of phone.
zpunout said:
Go to settings =>About phone
Look for a code which which looks similar to SM-GTI9100
Click to expand...
Click to collapse
It’s SM-A800I running android 6.0.1 . And it’s not on the list that you sent. What can I do?
jwoegerbauer said:
Either extract them from phone's Stock ROM file, or pull them out of phone.
Click to expand...
Click to collapse
I do have the stock rom file but I can’t find guide on how to do so. I found a video where person extracts it from lineage os. Is the process going to be the same? And by the way does it matter which version of stock rom I have because the phone came with android 5 and I updated it to 6 with official update.
KrishnaD3V said:
It’s SM-A800I running android 6.0.1 . And it’s not on the list that you sent. What can I do?
Click to expand...
Click to collapse
Yeah, there's not much development on that device, I read somewhere that Samsung supposedly never released the source code. It is hard to search for, but I did find this link: https://forum.xda-developers.com/t/...al-cyanogenmod-13-for-galaxy-a800f-i.3344081/
I did find out that the nickname of your SM-A800I model is "a8hplte" which might help you in search engines.
Looks like a dead end to me though.
KrishnaD3V said:
I do have the stock rom file but I can’t find guide on how to do so. I found a video where person extracts it from lineage os. Is the process going to be the same? And by the way does it matter which version of stock rom I have because the phone came with android 5 and I updated it to 6 with official update.
Click to expand...
Click to collapse
The so-called binary blobs are kinds of hardware drivers, you can't simply extract them of a Custom ROM, you have to extract them from a phone's original Stock ROM, as I told you this already earlier.
These binary blobs typically are found under /vendor/lib(64), some also under /system, /etc and /bin.
Most of the blobs are executable files or libraries, run as independent services on phone's boot.
jwoegerbauer said:
The so-called binary blobs are kinds of hardware drivers, you can't simply extract them of a Custom ROM, you have to extract them from a phone's original Stock ROM, as I told you this already earlier.
These binary blobs typically are found under /vendor/lib(64), some also under /system, /etc and /bin.
Most of the blobs are executable files or libraries, run as independent services on phone's boot.
Click to expand...
Click to collapse
Thanks for the info
zpunout said:
Yeah, there's not much development on that device, I read somewhere that Samsung supposedly never released the source code. It is hard to search for, but I did find this link: https://forum.xda-developers.com/t/...al-cyanogenmod-13-for-galaxy-a800f-i.3344081/
I did find out that the nickname of your SM-A800I model is "a8hplte" which might help you in search engines.
Looks like a dead end to me though.
Click to expand...
Click to collapse
Not so beginner friendly I guess . I try my luck extracting the blobs as described by
jwoegerbauer.
Hello
I will perhaps keep my S22U instead of upgrading to s23u , I will then most probably root it as my warranty will soon come to an end and I won't care about knox flag. But is there any AOSP based custom rom for the S22U snapdragon ? If yes can you use Expert Raw app?
The S22 should be capable of running Generic System Images, so if you would like to try running actual AOSP, check out my guide here. Nothing is customized as these are directly from AOSP, but that also means they have zero bloat.
V0latyle said:
The S22 should be capable of running Generic System Images, so if you would like to try running actual AOSP, check out my guide here. Nothing is customized as these are directly from AOSP, but that also means they have zero bloat.
Click to expand...
Click to collapse
Thanks
Though it looks like an update thread for Pixel phones no?
vegetaleb said:
Thanks
Though it looks like an update thread for Pixel phones no?
Click to expand...
Click to collapse
I made a mistake with the link, here's the correct one:
[GUIDE] How To: Install AOSP GSI on Samsung Devices **NOT FOR BEGINNERS**
For those of you who want the AOSP experience, here is how to install generic Android system images. This -should- work on any Samsung device for which TWRP is available. A GSI is only a system image and does not include the kernel. You can use...
forum.xda-developers.com
V0latyle said:
I made a mistake with the link, here's the correct one:
[GUIDE] How To: Install AOSP GSI on Samsung Devices **NOT FOR BEGINNERS**
For those of you who want the AOSP experience, here is how to install generic Android system images. This -should- work on any Samsung device for which TWRP is available. A GSI is only a system image and does not include the kernel. You can use...
forum.xda-developers.com
Click to expand...
Click to collapse
Thanks
Do you get the new AI stuff that are in the Pixel 7 Pro ?
vegetaleb said:
Thanks
Do you get the new AI stuff that are in the Pixel 7 Pro ?
Click to expand...
Click to collapse
I don't think so - I'm pretty sure features like that are not core Android mechanics, so they wouldn't be included in AOSP. I don't know for sure. Keep in mind that the whole idea behind a GSI - Generic System Image - is that it can run on pretty much any device. Google has been using this model since the Pixel 3 - instead of having different system builds for each device, they use a generic common system image, while device specific features are contained in other partitions such as /product. This way, when they provide the monthly update for Pixels, they don't have to completely rebuild the firmware; they can just use the AOSP GSI for the "core", and any device specific changes are separate in /system_ext and /product. It's a modular design that really helps streamline the update process; it also means that devices that no longer receive updates can still potentially run the latest AOSP core.
I imagine you could extract the product.img from the Pixel 7 factory zip and flash it to /product on your device, but because it's device specific, it most likely wouldn't work properly.