How to make source code of a new device? - Android Q&A, Help & Troubleshooting

Anyone here can u tell me how to create source code of a new device as my device is INFOCUS M680, kernel source.
I have used another device as same board to create source of my device but the kernel source is different. So anyone can tell me how to create kernel source and device tree.
My kernel version is 3.18.19+

Find the open sources for your device and download them. You need to match the build number from that release to the build number for the AOSP sources and download those as well. I have only done Samsung so far but the instructions are fairly clear for merging the sources. Next you need hardware drivers, in my case I have tons of free drive space so I just copied the entire /etc and /vendor from my device firmware.
A lot of time can be saved by downloading a matching sources from a custom rom. You can take configuration files and etc.
No open sources and no custom roms? You should start on something easier my friend. But if you want to continue forward with that I am guessing here. Unpack the boot.img and recovery.img files with the available unpackers. (save the info for the images and follow how to repack carefully) Match your build number to the AOSP sources and get the kernel. Modify, hack, gather and assemble what you need to make a new boot.img and recovery.img. Then with great courage comes lots of bricked devices..
Late reply so I didn't try to hard there. I will always help people send me a PM if your stuck

droidvoider said:
Find the open sources for your device and download them. You need to match the build number from that release to the build number for the AOSP sources and download those as well. I have only done Samsung so far but the instructions are fairly clear for merging the sources. Next you need hardware drivers, in my case I have tons of free drive space so I just copied the entire /etc and /vendor from my device firmware.
A lot of time can be saved by downloading a matching sources from a custom rom. You can take configuration files and etc.
No open sources and no custom roms? You should start on something easier my friend. But if you want to continue forward with that I am guessing here. Unpack the boot.img and recovery.img files with the available unpackers. (save the info for the images and follow how to repack carefully) Match your build number to the AOSP sources and get the kernel. Modify, hack, gather and assemble what you need to make a new boot.img and recovery.img. Then with great courage comes lots of bricked devices..
Late reply so I didn't try to hard there. I will always help people send me a PM if your stuck
Click to expand...
Click to collapse
Thanks for your reply.
I am planning to create a custom rom for my samsung tab A Sm-P555
Where do I start ? Is there AOSP for it ? How do I unpack everything ? Could you help me as I was very new to this ?
Many thanks in advance.

all you need is here

droidvoider said:
Find the open sources for your device and download them. You need to match the build number from that release to the build number for the AOSP sources and download those as well. I have only done Samsung so far but the instructions are fairly clear for merging the sources. Next you need hardware drivers, in my case I have tons of free drive space so I just copied the entire /etc and /vendor from my device firmware.
A lot of time can be saved by downloading a matching sources from a custom rom. You can take configuration files and etc.
No open sources and no custom roms? You should start on something easier my friend. But if you want to continue forward with that I am guessing here. Unpack the boot.img and recovery.img files with the available unpackers. (save the info for the images and follow how to repack carefully) Match your build number to the AOSP sources and get the kernel. Modify, hack, gather and assemble what you need to make a new boot.img and recovery.img. Then with great courage comes lots of bricked devices..
Late reply so I didn't try to hard there. I will always help people send me a PM if your stuck
Click to expand...
Click to collapse
Hola
Perdón pero estoy sufriendo errores con la app XDA labs

Thank you

Related

[Q] Files Required from Stock ROM in order to build AOSP ROM

There are many anecdotal notes here and there about ROM building, porting, etc. No where is there a list that outlines very simply (and device agnostic) what is required to 'pull' from a stock ROM in order to add it to the AOSP source code to build a fully working ROM image. I am looking for some help to define what this list might be.
I am creating this thread in the ViewPad 7 area because I am focused on this device at the moment, but this list does not have to be specific to this device, it just should be applicable to it.
Example:
Drivers
(Get everything in the /system/modules/lib folder and place it in AOSP/drivers/etc folder)
/system/modules/lib/* >> /AOSP/drivers/etc
Kernel:
Do a nandroid backup of boot.img and extract kernel from it via(...) then place that/those files into /AOSP/kernel
... These are all examples and do not represent real folders per-se.
Any help in assembling this list would be no double extremely beneficial to the entire android rom building community.
Thanks!

[Q] How to add new device tree,new kernel source code to CM source & compile?

Hello everybody.
I have a noob question about compile cyanogenmod for my new device.
Now, i have: CMW recovery, Kernel source code on local computer, full repo cm source + toolchains.
How to add my device tree, kernel source code to CM source and compile CM7 ROm?
Thanks you, cheer
Anyone here?
Did you figure it out yet? I asked the same question and am waiting for an answer, tho I'm on CM 10, HTC Vivid. If I figure it out I'll post back and try and help.
nguyenhonganh said:
Hello everybody.
I have a noob question about compile cyanogenmod for my new device.
Now, i have: CMW recovery, Kernel source code on local computer, full repo cm source + toolchains.
How to add my device tree, kernel source code to CM source and compile CM7 ROm?
Thanks you, cheer
Click to expand...
Click to collapse
I met the same problem, does anyone can help?
Do you have a device tree? Or do you have an unsupported device? If you have an existing device tree from some other ROM, etc, then you just need to edit your .repo/local_manifest/roomservice.xml to pull in the trees that you need.
If you need to create a device tree, then it gets not complicated, as each device is different. The basic process is to create the necessary directories (device/manufacturer/model, kernel/manufacturer/model (may need to be kernel/manufacturer/device_family/model, for reference to that, see CM's repo for the LG G3) and finally vendor/manufacturer/device.
After you have the directories setup, you will need to actually start building the tree. The easiest way is to copy another devices files into your devices tree, and then edit the files. The closer the device you copy in is, the less work you will need to do to the files. Refer to sites like gsmarena.com, PhoneArena.com, etc for phone specs.
That's about as far as I can take you without dealing with a specific device. If you need more info, post back here with your questions, and post your device specs, or at least the model number,and I'll see if I can help.
rassawyer said:
Do you have a device tree? Or do you have an unsupported device? If you have an existing device tree from some other ROM, etc, then you just need to edit your .repo/local_manifest/roomservice.xml to pull in the trees that you need.
If you need to create a device tree, then it gets not complicated, as each device is different. The basic process is to create the necessary directories (device/manufacturer/model, kernel/manufacturer/model (may need to be kernel/manufacturer/device_family/model, for reference to that, see CM's repo for the LG G3) and finally vendor/manufacturer/device.
After you have the directories setup, you will need to actually start building the tree. The easiest way is to copy another devices files into your devices tree, and then edit the files. The closer the device you copy in is, the less work you will need to do to the files. Refer to sites like gsmarena.com, PhoneArena.com, etc for phone specs.
That's about as far as I can take you without dealing with a specific device. If you need more info, post back here with your questions, and post your device specs, or at least the model number,and I'll see if I can help.
Click to expand...
Click to collapse
I have a mt6750 devices... And there is a device from my company manufacturer.. Its a mt6750 device, it have cm device tree.. Both device working on same rom.. I can port that device rom but it always give me bugs.. So my question is how to use it?

[Q] What are the steps to port a ROM to an unsupported device?

First a short question. What is the device configuration.(For example:https://github.com/TeamICS/android_device_htc_heroc) Which information does it contain? I don't think it's the whole Rom, but they update it, change stuff and so on?
Now my actual question:
I want to port a Kernel+System on an unsupported device.
Where do I have to start. Is there a difference between building it from source or port one from a similar device? Is one solution slower, more complicated or anything? There are many tutorials for porting, just bundle a system with a working kernel, but what to do if I want to have the Kernel also?
How do I extract the Device Proprietary Files without an github of the device?
Links, short explanation of the steps or anything else would be helpful.
I am sorry if this post seems to be ill informed, but I am searching and searching and can't find really helpful information..
chaoskoch said:
First a short question. What is the device configuration.(For example:https://github.com/TeamICS/android_device_htc_heroc) Which information does it contain? I don't think it's the whole Rom, but they update it, change stuff and so on?
Now my actual question:
I want to port a Kernel+System on an unsupported device.
Where do I have to start. Is there a difference between building it from source or port one from a similar device? Is one solution slower, more complicated or anything? There are many tutorials for porting, just bundle a system with a working kernel, but what to do if I want to have the Kernel also?
How do I extract the Device Proprietary Files without an github of the device?
Links, short explanation of the steps or anything else would be helpful.
I am sorry if this post seems to be ill informed, but I am searching and searching and can't find really helpful information..
Click to expand...
Click to collapse
First off what device do you have?
This link might be helpful
How to Port Android to Another Device
Now in regard to your questions i'll do my best to answer them best I can. The device configuration think of it as a fingerprint every fingerprint is unique (Although some a very similar), basically when building from source is tells the build what device you want the version of android your compiling to run on. They update and change the device configuration to reflect changes in the different versions of Android (Going from Gingerbread to ICS for example). Porting Kernels is not easy if you don't know C, things about embedded systems, basic Linux knowledge, among other skills but take a look at Guidance regarding Kernel porting, and what do you mean by port system? Here is a basic place to start for kernels AOSP Building Kernels and Building Your First Kernel. Yes their is a difference between porting a kernel and building from source, porting implies taking a kernel from device A and porting it to device B, while building from source means your building directly for device A. Porting in your case is probably going to be harder then building from source. If you want to have the kernel also again you have to modify it to run on the device you are porting it too. To extract proprietary files you have to hook your device up to your computer, turn on usb debugging, and using ADB run these commands:
Code:
cd ~/android/system/device/motorola/sholes/ # Replace Motorola and Sholes with your vendor such as HTC, Samsung, etc. and your device codename
Then run:
Code:
./extract-files.sh
Look at this guide for more info Compiling ICS from Source. Hope this helps you in some way :good:.

[TOOLS][PXA1908] G531F boot.img unpacking and packing tools

DISCLAIMER:
I'm not or will be responsible for the incorrect use of these tools.
Even if they decide to not work properly.
I've tested on my own and they work fine.
If they ever fail, well, not my fault.
Using them will make YOU responsible of anything they might cause to your phone or you.
Well, after a long time, I've decided to return since I now own 2 more android devices (Xperia E5 and a Galaxy J5) I'm no longer afraid of destroying this phone.
In the end of this thread I will put a link to my github repository where I'm putting the source code of a customized version of the mkbootimg tools, these tools are to help people to unpack and repack the boot.img of our phones which use a PXA1908 SoC that, for some reason, there never was any real development on.
I will try to change that I now possess more skills on programming in C, unfortunatly less time as well. I will try to improve these tools, try to make them more user friendly, and will try to get a real device tree for this model as well a real TWRP port.
HOWEVER IT IS TO NOTE, I HAVE UNIVERSITY SO I CAN'T PROMESS MUCH. DON'T SEE THIS AS A FUTURE GRAND DEVELOPMENT TOPIC OR DON'T EXPECT ANY ROMS TO BE MADE.
Again, be responsible with these tools, they are a low-risk bricking since you are only flashing boot.img or even recovery.img, but, well, no one ever knows.
Credit goes to kumajaya that made the customization to these tools first, I just fixed some warnings and will try to make them more powerful or not.
A link to his repo is in the README file in the root of the repo.
Please, feel free to fork this, to change it to your liking, if you add any features in, let me know so I can update the repo with freshly-made tools!
Source Code: https://github.com/fabiossilva21/custom_mkbootimg
Created: 15/01/2018
Last Updated: 13/04/2018
To be used... maybe?
Good news, I was able to update the tools so that people won't have to change the hex in the boot.img.
You can now just run the tools and repacked them without any edit.
Hello
Can you make a tutorial how to use this tools ??
I already have a modify Image but I dont know to compile it to zip ....
Pls atleast make simple tutorial .. thanks ..
acetdyoslike24 said:
Can you make a tutorial how to use this tools ??
I already have a modify Image but I dont know to compile it to zip ....
Pls atleast make simple tutorial .. thanks ..
Click to expand...
Click to collapse
can someone help us with this tool:crying::crying::crying::crying::crying::crying::crying:

what software/packages do you need to get a specific device working from AOSP stock

hello again peeps,
ive been gently banging my head around these past few days because i keep walking into knowledge pockets and nothing i can find, in the form of help or internet information, is filling in these holes. i originally planned to take my oneplus device and obtain the source code for oxygenos so i could build and customise it. this seems to have become a dead end so now i just want to build stock android via AOSP, but i dont understand what software i need to get the AOSP working on any device, so far i understand that you need 3 components; 1) Kernel 2) Vendor files (if any) 3) "Proprietary binaries".
The problems are, i have no idea how to obtain these "proprietary binaries", i have no idea where to put any 3 of them in the downloaded android source tree (after repo sync), and i dont know if thats all the information i need to atleast build and flash a stock image onto any phone. i think i have the kernel files i need on OnePlusOSS github and there is a vendor.img in the OTA update files, and a directory in my phone. if anybody could please guide me in the right direction, it'd be very cool. i just want to get started and have some fun.
0
Seppppx said:
You can't customize Oxygen Os as the source code doesn't exist for that. (It's not required for companies to publish that.)
What phone do you have? You already might have the required trees to build AOSP (or at least LineageOS)
You need
1. A Device Tree
2. The kernel (you can use the prebuilt kernel if you really want)
3. The proprietary vendor blobs located in the vendor partition.
You will probably have to download the aosp-caf source code instead of aosp for it to be more easy.
https://www.youtube.com/channel/UCnGqG_jyyXmTzdamBpKfeHA
This is a great channel about Android building and has about everything you need to know.
Click to expand...
Click to collapse
thank you for every inch of text in your reply. I have a oneplus 8. Ah right, so the vendor folder CONTAINS the proprietary binaries/blobs.
it seems safest for me to use the kernel in the manufacturers github for the first flash as i want to be careful with making changes. may i ask what "aosp-caf" is? or can i find out using the resource you provided? thank you again.
my new understanding is, you need; 1) android source (e.g android-10-r5) 2) kernel 3) proprietary blobs. this helps a lot and is a lot clearer. the last issue i have is with knowing where to put the kernel and the blobs. i think if i am not mistaken you put the blobs in a vendor folder after the build? i am unsure with the kernel. i am going to definitely check this guy out. your time means a lot to me.

Categories

Resources