Getting Device Tree And Vendor Blobs For Less-Used Device - Android Q&A, Help & Troubleshooting

I had made a thread about creating a custom ROM for Android over here: http://forum.xda-developers.com/general/xda-assist/building-custom-android-rom-t3526514#post70277383 and Art Vanderlay suggested I post here, so here it is.
I own the BLU Energy X 2, and I am in need of the Device Tree and Vendor Blobs for the phone to create a custom ROM based off of CyanogenMod. My device currently has CyanogenMod on it, however it's an unofficial port for the BLU Studio Selfie. I am not sure how the dev of that ROM got these files, however the Infinix Hot 2 is a "clone" of that device, so he may have just ported it from there, or it may have not even needed porting at all Anyways, for me to create a custom ROM based off of CyanogenMod, I need the Device Tree and Vendor Blobs. I do have the ProjectConfig file if that helps.
These files are usually somewhere on GitHub, but due to the development community for BLU devices in general being almost non-existant, these files are nowhere to be found. So, how can I get these files for my device to start building a custom ROM? Thanks
If you need any other information, please reply.
Device Specs:
BLU Energy X 2
Model #: E050U
Android Version: 5.1 Lollipop
Kernel Version: 3.10.74+
Chipset: MT6580

Use Device and Vendor trees from similar devices, change names and other stuff like your device in the configs...
I'm noobie too, but this is how people make it for MTK devices

Audriuskins said:
Use Device and Vendor trees from similar devices, change names and other stuff like your device in the configs...
I'm noobie too, but this is how people make it for MTK devices
Click to expand...
Click to collapse
Ok, thanks, I'll look for some similar devices. Will any similar MTK device work? What needs to be similar? OS versions? Chipset? Kernel version?
What do I need to look for?
Thanks

NateDev473 said:
Ok, thanks, I'll look for some similar devices. Will any similar MTK device work? What needs to be similar? OS versions? Chipset? Kernel version?
What do I need to look for?
Thanks
Click to expand...
Click to collapse
Must be on the same chipset from my experience, Kernel and OS doesn't matter.

Audriuskins said:
Must be on the same chipset from my experience, Kernel and OS doesn't matter.
Click to expand...
Click to collapse
So all I need to do is find a device with similar specs, and same chipset that has device tree and vendor blobs already created? And then I just modify it to fit my specific device?

NateDev473 said:
So all I need to do is find a device with similar specs, and same chipset that has device tree and vendor blobs already created? And then I just modify it to fit my specific device?
Click to expand...
Click to collapse
Something like that, you should look up :
http://forum.xda-developers.com/showthread.php?t=2274332

Audriuskins said:
Something like that, you should look up :
http://forum.xda-developers.com/showthread.php?t=2274332
Click to expand...
Click to collapse
Do the devices need to be officially CM supported, to get the device tree and vendor blobs? Because I found a couple of devices like the ZenFone Go that has an unofficial version of CM, but I can't find the device tree for that device.

These come from the oem. While the directions posted sometimes work it is dirty hacking at best and never stable. This is why developers stay away from mtk devices and they are really only used in cheap devices.

NateDev473 said:
Do the devices need to be officially CM supported, to get the device tree and vendor blobs? Because I found a couple of devices like the ZenFone Go that has an unofficial version of CM, but I can't find the device tree for that device.
Click to expand...
Click to collapse
Search on Github

Audriuskins said:
Search on Github
Click to expand...
Click to collapse
Ok, so I've discovered that the Infinix Hot 2 has mostly the same specs as my device, and that it's basically a clone of the Studio Selfie, which is the device that I used to unofficially port CyanogenMod to my device, so that's a good sign. Anyways, CyanogenMod was built for the Infinix Hot 2 from source, and they provided links to GitHub. It does say though that the Infinix Hot 2 is Android One. Is that a big problem?
Thanks

NateDev473 said:
Ok, so I've discovered that the Infinix Hot 2 has mostly the same specs as my device, and that it's basically a clone of the Studio Selfie, which is the device that I used to unofficially port CyanogenMod to my device, so that's a good sign. Anyways, CyanogenMod was built for the Infinix Hot 2 from source, and they provided links to GitHub. It does say though that the Infinix Hot 2 is Android One. Is that a big problem?
Thanks
Click to expand...
Click to collapse
No idea x)
I guess you can try xd

Audriuskins said:
No idea x)
I guess you can try xd
Click to expand...
Click to collapse
Ok, thanks

Audriuskins said:
No idea x)
I guess you can try xd
Click to expand...
Click to collapse
I found this on GitHub, is that what I am looking for in terms of the vendor files and stuff like that? http://imgur.com/a/KUcxC

NateDev473 said:
I found this on GitHub, is that what I am looking for in terms of the vendor files and stuff like that? http://imgur.com/a/KUcxC
Click to expand...
Click to collapse
Clone whole tree, rename everything to yours.
In device tree check if configs are like your device

Audriuskins said:
Clone whole tree, rename everything to yours.
In device tree check if configs are like your device
Click to expand...
Click to collapse
Ok, I will. If some of the configs are different for my device, I can just replace the values with the ones that work for my device right? Also in that other device's lib volder, they have a lot less stuff then my stock ROM lib folder, is that fine?

NateDev473 said:
Ok, I will. If some of the configs are different for my device, I can just replace the values with the ones that work for my device right? Also in that other device's lib volder, they have a lot less stuff then my stock ROM lib folder, is that fine?
Click to expand...
Click to collapse
I can't help you very much, because I'm new in MTK development ://

Audriuskins said:
I can't help you very much, because I'm new in MTK development ://
Click to expand...
Click to collapse
Would it be possible to then just upload my own files? Because on my phone I have all those files that are there for the other device. That would be better, I think, because they would be specific to my phone... If you don't know it's fine

NateDev473 said:
Would it be possible to then just upload my own files? Because on my phone I have all those files that are there for the other device. That would be better, I think, because they would be specific to my phone... If you don't know it's fine
Click to expand...
Click to collapse
I dont know

Related

[DEV][WIP] K900 cm10.1 device tree

K900 Device Tree project
hi folks, a couple of months ago i decided it was time to create a working device tree at least to build cwm, since lenovo is very bad at opensource with us, it is nearly impossible to build a working cyanogen. Fortunately cwm doesn't need too much to be build so i grabbed the motorola razr i device tree from @hazou and wrote a new device tree for us. But unfortunately we still need a developer firmware from lenovo to flash recovery.img's. However, cwm builds well and i want to share my work to any interested developer who are willing to help.
Click to expand...
Click to collapse
in this github you will find all needed repos and info --> https://github.com/lenovo-k900
Click to expand...
Click to collapse
Its true, thanks for your effort QuBeX. I hope it works. I will follow.
Great job! I am also interested in hacking my K900 to enable kvm kernel module to run VMs on it.
The issue was always their stupid secure boot process which prevent use to put our kernel or even a kernel module into the system.
You refer to a developer firmware. Did you get chance to have access to one of those?
Does that turns off secure boot or you somhow got the signing key?
Please pm me if you know more details on that.
Thanks a lot.
chinabull said:
Great job! I am also interested in hacking my K900 to enable kvm kernel module to run VMs on it.
The issue was always their stupid secure boot process which prevent use to put our kernel or even a kernel module into the system.
You refer to a developer firmware. Did you get chance to have access to one of those?
Does that turns off secure boot or you somhow got the signing key?
Please pm me if you know more details on that.
Thanks a lot.
Click to expand...
Click to collapse
Lenovo hasn't provided a dev firmware yet. And I don't think they will... Anyway we now have working recovery, and we are finding out how to bypass signature check, but it is really difficult.
Talking about the kernel, have you ever tried kexec? I don't know very much of it but you can find a lot of info and stuff in google
Thanks, man. That is a briliant idea!
I have built the kexec executible and have loaded my custom kernel into the memory.
Of course when it ran the new kernel, I got a black screen for now. But it's a good start. I'll debug it and keep you guys updated with the progress.
chinabull said:
Thanks, man. That is a briliant idea!
I have built the kexec executible and have loaded my custom kernel into the memory.
Of course when it ran the new kernel, I got a black screen for now. But it's a good start. I'll debug it and keep you guys updated with the progress.
Click to expand...
Click to collapse
Just a quick update on progress.
Tried all kinds of tricks including modifying kernel code on the fly.
Still no luck on kexec yet.
But I found a loophole in the JB4.3 kernel which I used to have the kernel module signature check disabled.
Now I can load any kerenl module I built.
If anybody has interest on that tool, please PM me.
Now we have AOSP 4.3 branch in our device tree: https://github.com/lenovo-k900/android_device_lenovo_redhookbay/tree/aosp-4.3
Author: MaXxXanter
Can't wait for this. I wish i could do some support too...
Sent from my Lenovo K900_ROW using XDA Free mobile app
can i use this device tree for build cm12.1 rom?
xxx-man-by said:
Now we have AOSP 4.3 branch in our device tree: https://github.com/lenovo-k900/android_device_lenovo_redhookbay/tree/aosp-4.3
Author: MaXxXanter
Click to expand...
Click to collapse
is possible to build cm11 with that source sir?
xxx-man and qubex and any other who is putting time to get some nice roms for our K900 is greatly appreciated.

[Q] Stuck at Adding device to OmniRom source.

I downloaded the OmniROM source but then I a bit confused what to do when it comes to adding a device to the ROM source. Can anyone help me with this.........
thejoker said:
I downloaded the OmniROM source but then I a bit confused what to do when it comes to adding a device to the ROM source. Can anyone help me with this.........
Click to expand...
Click to collapse
Are you trying to add a device already supported by Omni or adding a new device not already supported (In which case you will need to create a new device tree)?
shimp208 said:
Are you trying to add a device already supported by Omni or adding a new device not already supported (In which case you will need to create a new device tree)?
Click to expand...
Click to collapse
I think im adding a new device.BTW im making rom for redmi 1s.So how should I do it
thejoker said:
I think im adding a new device.BTW im making rom for redmi 1s.So how should I do it
Click to expand...
Click to collapse
Since your manufacture doesn't release the kernel source for your device that will make things a little bit different. But I would recommend checking out and following the steps in this guide, and then using this guide to convert the device tree to be Omni ROM compatible. The best way to get experience with creating device tree's is to look at similar device tree's to the device you own (Same SoC, same screen, etc.) and convert that device tree to suite your device. Let me know if you still have questions I'll be happy to answer them for you.
shimp208 said:
Since your manufacture doesn't release the kernel source for your device that will make things a little bit different. But I would recommend checking out and following the steps in this guide, and then using this guide to convert the device tree to be Omni ROM compatible. The best way to get experience with creating device tree's is to look at similar device tree's to the device you own (Same SoC, same screen, etc.) and convert that device tree to suite your device. Let me know if you still have questions I'll be happy to answer them for you.
Click to expand...
Click to collapse
The device tree and vendor tree both are available at github.
https://github.com/armani-dev
thejoker said:
The device tree and vendor tree both are available at github.
https://github.com/armani-dev
Click to expand...
Click to collapse
In that case it will be easier for you to compile Omni, what I would recommend doing is downloading the device tree and vendor tree for your device, and placing them in your Omirom source vendor folder and device folder respectively, and then taking the omni_armani.mk from here and placing it in your device folder that you downloaded above and using that to start compiling Omnirom.
shimp208 said:
In that case it will be easier for you to compile Omni, what I would recommend doing is downloading the device tree and vendor tree for your device, and placing them in your Omirom source vendor folder and device folder respectively, and then taking the omni_armani.mk from here and placing it in your device folder that you downloaded above and using that to start compiling Omnirom.
Click to expand...
Click to collapse
I downloaded both and placed the folders in their respective folders.But do I need to edit some .mk files for auccessfull compilation??Because everytime I lunch,I get errors.
thejoker said:
I downloaded both and placed the folders in their respective folders.But do I need to edit some .mk files for auccessfull compilation??Because everytime I lunch,I get errors.
Click to expand...
Click to collapse
Make sure your folder structure matches the device and vendor tree names for example it should be: "device/xiaomi/armani" you can see in full_armani.mk the developer has it set as "device/xiaomi/armani/" which means you should do the same. A couple of years ago I was compiling something for the Droid 1 and was using a device and vendor tree I had downloaded and I was getting an error about lunch could't find the device turns out I had my folders as device/moto/sholes when the developer had it in their tree as device/motorola/sholes which solved the lunch problem. Let me know if you still have questions.
Make sure your folder structure matches the device and vendor tree names for example it should be: "device/xiaomi/armani" you can see in full_armani.mk the developer has it set as "device/xiaomi/armani/" which means you should do the same. A couple of years ago I was compiling something for the Droid 1 and was using a device and vendor tree I had downloaded and I was getting an error about lunch could't find the device turns out I had my folders as device/moto/sholes when the developer had it in their tree as device/motorola/sholes which solved the lunch problem. Let me know if you still have questions.
Click to expand...
Click to collapse
Do I have to edit the Android.mk file in the device tree of my device????
thejoker said:
Do I have to edit the Android.mk file in the device tree of my device????
Click to expand...
Click to collapse
It's easier to just have your folder structure in your OmniROM source match the structure indicated by the device tree.
@shimp208 @thejoker anyone free to guide me? i am also trying to build omni rom for my device.
have snyced the repo and even have most of the stuff thats needed figured out. but can't figure out what goes where?
this is the device tree that i am using, i added it to local manifest.
Now the files which i need to edit mentioned on this page http://docs.omnirom.org/Porting_Omni_To_Your_Device
are now here to be found in the device folder? where are they??
i found them at on other person device tree of my device which i edited just to figure out stuff. but now where to place them?? also i can't seem to figure out the json file mentied on this webpage .
any sort of help will be appreciated.
Kapiljhajhria said:
@[email protected] anyone free to guide me? i am also trying to build omni rom for my device.
have snyced the repo and even have most of the stuff thats needed figured out. but can't figure out what goes where?
this is the device tree that i am using, i added it to local manifest.
Now the files which i need to edit mentioned on this page http://docs.omnirom.org/Porting_Omni_To_Your_Device
are now here to be found in the device folder? where are they??
i found them at on other person device tree of my device which i edited just to figure out stuff. but now where to place them?? also i can't seem to figure out the json file mentied on this webpage .
any sort of help will be appreciated.
Click to expand...
Click to collapse
Which specific files are you not sure where to place? A good starting point is to look where they are placed on a similar device tree and place them there. If you can provide some more details it will be very helpful. Also I am in the process of moving back to school when I get my stuff setup over the next day or so I'll try and take a closer look for you .
shimp208 said:
Which specific files are you not sure where to place? A good starting point is to look where they are placed on a similar device tree and place them there. If you can provide some more details it will be very helpful. Also I am in the process of moving back to school when I get my stuff setup over the next day or so I'll try and take a closer look for you .
Click to expand...
Click to collapse
here is the thread which i created. i have explained my sitaution in details.
http://forum.xda-developers.com/chef-central/android/advice-help-porting-omni-rom-op2-t3284334

can i use different kernel

I have a chinese tablet I ported a ROM for that tablet I have flashed the ported ROM but now I am having bootloop because i don't have the kernel so can I use kernel from different device having same CPU?
You will have to edit the kernel. Each devices kernel is built just for that device. That is why there is no universal kernel.
zelendel said:
You will have to edit the kernel. Each devices kernel is built just for that device. That is why there is no universal kernel.
Click to expand...
Click to collapse
I can't figure out why there doesn't exist an universal kernel. Which parts of kernel should be modified or added for a specific device?
JasonKidd said:
I can't figure out why there doesn't exist an universal kernel. Which parts of kernel should be modified or added for a specific device?
Click to expand...
Click to collapse
That's because each device has different hardware and is programmed differently. Same thing goes for Linux. The kernel that works for my setup won't work on yours.
To be honest I have no idea. You will have to rip the kernel apart and fix the errors one by one. Most likely start with the graphics drivers and such. Their are great tut all over the site.
The lack of kernel source is one well known issue of China based devices.
zelendel said:
That's because each device has different hardware and is programmed differently. Same thing goes for Linux. The kernel that works for my setup won't work on yours.
To be honest I have no idea. You will have to rip the kernel apart and fix the errors one by one. Most likely start with the graphics drivers and such. Their are great tut all over the site.
The lack of kernel source is one well known issue of China based devices.
Click to expand...
Click to collapse
Thanks for your instant response. I think the HAL of android is aimed to solve the problem of compatibility of different devices. But the vendor must open thier souce of kernel if they modified it.
Can't we put all specific drivers at HAL?
JasonKidd said:
Thanks for your instant response. I think the HAL of android is aimed to solve the problem of compatibility of different devices. But the vendor must open thier souce of kernel if they modified it.
Can't we put all specific drivers at HAL?
Click to expand...
Click to collapse
No because they will conflict with each other. Yes the vendor must open the source. You are gonna be pretty stuck without kernel source for the device.

[Discussion] TREBLE Support for Land [Redmi 3S/X]

And finally Our device, Redmi 3S (Land), with Treble ported... @TeamMex has brought in initial Treble support to Redmi 3S just like it was done on Redmi Note 4, using Cust as the Vendor partition... Hope He has great success in it...
Source: https://plus.google.com/u/0/+klozzjesus/posts/5REcrMxfq67
Let Us all hop into discussion and questions related to it here, rather than pollute other Development Threads...
Keep things polite and simple, varying opinions are all expected but lets not end up hurting anyone with Our Words... Be Responsible Guys...
Wow great news hope to see android p based roms without much problem in near future
amazing
Wow amazing
Wow ?
I need to ask something can anyone point me where are the drivers for soc lies i mean in a rom it is stored in /system/vendor folder but where does Qualcomm publishes its drivers for its different soc? Because project treble can only come to live if our land uses the project trebled compatible drivers from Qualcomm am i right? Please correct me of i am wrong and elaborate how these things goes
Ash225 said:
I need to ask something can anyone point me where are the drivers for soc lies i mean in a rom it is stored in /system/vendor folder but where does Qualcomm publishes its drivers for its different soc? Because project treble can only come to live if our land uses the project trebled compatible drivers from Qualcomm am i right? Please correct me of i am wrong and elaborate how these things goes
Click to expand...
Click to collapse
Can't get you
fxsheep said:
Can't get you
Click to expand...
Click to collapse
Look in windows we need to download drivers for windows 10, windows 7 etc etc and those are simple drivers which user can install right but in android there is vendor folder which contains all drivers for our soc camera ril etc. I want to know where does Qualcomm releases such drivers i mean in git or anywhere else. There must be a source from where mobile phone manufacturer get those vendor files and use it to build the rom for their devices Right? Take it in this way for buildings a custom rom we need source code which is available in git which devs can clone and compile to make a rom similarly where does we get these camera libs, soc, etc related files found?
Ash225 said:
Look in windows we need to download drivers for windows 10, windows 7 etc etc and those are simple drivers which user can install right but in android there is vendor folder which contains all drivers for our soc camera ril etc. I want to know where does Qualcomm releases such drivers i mean in git or anywhere else. There must be a source from where mobile phone manufacturer get those vendor files and use it to build the rom for their devices Right? Take it in this way for buildings a custom rom we need source code which is available in git which devs can clone and compile to make a rom similarly where does we get these camera libs, soc, etc related files found?
Click to expand...
Click to collapse
maybe you mean CAF(Code Aurora Forum)?
fxsheep said:
maybe you mean CAF(Code Aurora Forum)?
Click to expand...
Click to collapse
What is that and does it serves ?Okay can you tell me one thing does Qualcomm and other vendors who makes parts like soc, camera module etc for smartphone also makes drivers for the same or not? Or is the mobile phone company who makes all drivers for the components used in the phone? Intel makes processor and releases driver for the same does it gos well for manufacturer like Qualcomm?
Ash225 said:
What is that and does it serves ?Okay can you tell me one thing does Qualcomm and other vendors who makes parts like soc, camera module etc for smartphone also makes drivers for the same or not? Or is the mobile phone company who makes all drivers for the components used in the phone? Intel makes processor and releases driver for the same does it gos well for manufacturer like Qualcomm?
Click to expand...
Click to collapse
caf is the offical release of qualcomm's opensource
@TeamMex you are simply awesome dude
When we will also able to use project treble for land?
Any new about it where is @TeamMex gone?
abhishekpandey7148 said:
When we will also able to use project treble for land?
Any new about it where is @TeamMex gone?
Click to expand...
Click to collapse
Dont demand... You are not paying Him anything to ask Him like that... It will be done when He does it... Be patient...
abhishekpandey7148 said:
When we will also able to use project treble for land?
Any new about it where is @TeamMex gone?
Click to expand...
Click to collapse
Just wait for him to do the magic
abhishekpandey7148 said:
When we will also able to use project treble for land?
Any new about it where is @TeamMex gone?
Click to expand...
Click to collapse
I working in something's but I can release the old version xD presented in my screens
But have some message every boot and the camera take some time until the daemon is released
Sent from my Motorola Moto Z Play using XDA Labs
@TeamMex
Many thanks for your hard work.
Can you maybe release your software on github?
I want to used it for the Motorola G5s. Its almost the same device only I need not suc as vendor but OEM as vendor. But that can I fix if I have your code.
GoldeneyeS2 said:
@TeamMex
Many thanks for your hard work.
Can you maybe release your software on github?
I want to used it for the Motorola G5s. Its almost the same device only I need not suc as vendor but OEM as vendor. But that can I fix if I have your code.
Click to expand...
Click to collapse
Yeah I have it for Moto Z play too but u need to wait until my isp fix my internet issues , so for now I can't upload the source sorry
I hope it can be fixed in 3 days
Can somebody explain me what is treble for?
vandasche said:
Can somebody explain me what is treble for?
Click to expand...
Click to collapse
Just Google it... You can find a lot of really good explanations in it... I'll link a few in the OP very soon...

How to port vendor?

How can I port for the with the same processor? in vendor.img which files do i need to change? which lib? etc. thx
0
Seppppx said:
There isn't a specific guide for this. You will have to use your creative thinking to create solutions for problems. But you can follow these steps.
1. If you want to port your vendor to a new android version. See what was changed with phones with the same SoC.
2. Replace old files with new files from the other device vendor.
3. Be careful. You can mess up your phone.
Click to expand...
Click to collapse
I want to try this for gsi roms. Because current GSI roms send me to the recovery part. can't boot.
As you said number 2 I don't know which old files to replace
if it's easy for you maybe one day help with teamviewer
You'd build a GSI system image and change that. You don't need to use /vendor as it contains blobs for the device and doesn't need to be changed.
0
Seppppx said:
You won't need to port a vendor partition if you want to try GSIs.
Unless your phone is not treble. Have you checked if your phone is treble? You can do that by installing treble check from the Google Play store.
Which GSIs have you tried?
What device do you have?
What Android version do you have.
Devices that ship with Android 8 must be treble because of requirements by Google. (Unless your phone isn't google certified or VTS certified, I'm not sure)
You can see which files to add and delete (this won't be the same for your phone) by looking at the diff between treble and non treble proprietary-files.txt, proprietary-files-qc.txt, proprietary-files-qc-perf.txt.
https://github.com/ArrowOS-Devices/android_device_asus_zenfone3/compare/arrow-9.x...9.x-non-treble
Click to expand...
Click to collapse
Again hi. Phh gsi roms work fine. I want to try Ertan gsi. erfan gsi does not boot. That's why I thought maybe porting would be the solution. I have gm9 pro. Sp660 SoC. I want try a2 vendor port but ı cant
aykutfb93 said:
Again hi. Phh gsi roms work fine. I want to try Ertan gsi. erfan gsi does not boot. That's why I thought maybe porting would be the solution. I have gm9 pro. Sp660 SoC. I want try a2 vendor port but ı cant
Click to expand...
Click to collapse
No it's with how the system.img is built. Sometimes takes a bit more work to get things booting
TheExploitedOne said:
No it's with how the system.img is built. Sometimes takes a bit more work to get things booting
Click to expand...
Click to collapse
oh okey understand. I think there is no any solution :/
aykutfb93 said:
How can I port for the with the same processor? in vendor.img which files do i need to change? which lib? etc. thx
Click to expand...
Click to collapse
Ihave The Same Question but with different processor

Categories

Resources