Build own Android with drivers - XDA-University

Hello
I’m building my own android image (so obviously I have the source code)
I want to add my own drivers (specific ones), but I have no idea about how to add them, so any help?
Regards

Any help guys ? srsly, i'm very stuck here

do you mean your device tree?

DSA said:
do you mean your device tree?
Click to expand...
Click to collapse
yes

If the device trees exist, you will need to add a local_manifests folder & roomservice.xml into your repo folder with the relevant details included, mine is attached as an example.
If not, you will need to create them, heres a couple of initial guides:
[GUIDE] How to make a device-tree for your phone
Welcome in this new tutorial! In this thread, i'll try to explain you how to create a device-tree. This is one of the most important part in the rom porting. So let's start right now! Warning: i took as example an Samsung phone and 7.0 rom. 1...
forum.xda-developers.com
How to create Device tree for Android Rom building
How to create Device tree for Android Rom building I assume you already downloaded source code before we start please do following 1. Install unpackbootimg Go to https://github.com/jsharma44/bootimg-tools and download as a zip or use git...
forum.xda-developers.com

Drivers can change for every device. Which devices do you want to support?

Related

[Q] SVN?

Hey guys! I have recently been seeing differrent roms with svn posted in the op. I was curious what this was and if it is important for me to have. If so could someone walk me through some guides as to how I get this up and running.
cvv1984 said:
Hey guys! I have recently been seeing differrent roms with svn posted in the op. I was curious what this was and if it is important for me to have. If so could someone walk me through some guides as to how I get this up and running.
Click to expand...
Click to collapse
SVN stands for Subversion.
Subversion is a free/open-source version control system. Subversion manages files and directories over time. A tree of files is placed into a central repository. The repository is much like an ordinary file server, except that it remembers every change ever made to your files and directories. This allows you to recover older versions of your code, or examine the history of how your code was changed.
SVN is used by devs to release nightly updates to their ROMs, it isn't important if you aren't a flashacoholic.
Every ROM has it's own setup, so you should see the OP of the ROM for instructions

Porting Guide

hi devs ...
i,m newbie in porting and want to port ubuntu touch for Galaxy S advance(GT-I9070)
i follow porting guide up to :
Enabling a new device
but in this step i got stuck
Cyanogenmod does not support my device officially but there is unofficial support for it.
my problem is don't understand how to do MANUAL step.
could anyone explain it for me?
note that i'm using ubuntu porting guide in ubuntu touch wiki ...
thanks in advance ...
anyone help me?
You may find a manifest file in the unofficial repository, a xml file, maybe.
According to guide, the project named kernal, device & vendor need to be added to the .repo/local_manifests/roomservice.xml, which does not exist, and you need to create yourself.
But I also saw some manifest files containing remove-project. Not sure if that should also be added to the roomservice.xml.
lonelyao said:
You may find a manifest file in the unofficial repository, a xml file, maybe.
According to guide, the project named kernal, device & vendor need to be added to the .repo/local_manifests/roomservice.xml, which does not exist, and you need to create yourself.
But I also saw some manifest files containing remove-project. Not sure if that should also be added to the roomservice.xml.
Click to expand...
Click to collapse
thanks a lot ...
after grabbing them and follow other steps when i want to make the image file
i got errors related to some header files in framework/native/include/gui that don't exists
so i find and download them and cpp files and added to include/gui and libs/gui ...
but i still getting some stupid syntax errors ...
can anyone port to my gt-s6310
Nice read
I'll have to look into this as well
How to port s8500 wave 1
GT-S8500 cihazımdan Tapatalk kullanılarak gönderildi

[DEVS ONLY][BCM21553] Samsung Galaxy Pocket GT-S5300 (Cori) Development Discussion

General informations:
This thread's aim is only to represent a central meeting and discussion point for BCM21553 developers and, in particular, for the open Kernel/ROM sources development for the Samsung Galaxy Pocket GT-S5300 (codenamed Cori).
Information for common users:
As already described in the previous section, if you are not a developer, please restrict your posts to the general discussion thread so that developers can maintain good communication. Every post that is not strictly respecting these rules will be reported to the forum moderators. Thanks for your understanding.
For any other BCM21553 device related question or information, please, use this thread as a reference point, instead:
[DEVS ONLY][BCM21553 series] CyanogenMod 11 for BCM21553 Development Discussion
As someone already might know, I'm streambinder, from MoltenMotherBoard team.
I have already followed some projects for the GT-S5300, but especially kept in contact
with some of the events related to the porting of ROM and Kernel sources for BCM21553 chipset based devices.
In this precise moment, the sources in my possession allow you to be able to compile
a bugfree CWM 5.0.2.8 (based on CyanogenMod 7 code) with a kernel based on the Samsung stock one.
The only - fundamental - problem was due to the fact that unless I hadn't used the prebuilt INIT binary
token in the Samsung stock firmware boot.img, the phone would not work - or, better, boot up.
This means that until the situation - regarding this issue - doesn't change, our access to the porting of custom ROM
would be barred.
Recently, I decided to give Cori another chance and rework my sources, looking at the wonderful work brought
by the BroadcomCM team on CyanogenMod 9 (in particular, thanks to @bieltv.3 and @Alberto96) and @psyke83 on CyanogenMod 11.
They've not only been able to run these two ROMs in a more or less crude way, but this developer has been able to write
the necessary strings to make the INIT binary of some of these BCM21553 devices opensource.
Strong of this informations, I readjusted some of the sources of BroadcomCM's CyangenMod 9, which includes
all the progress carried out by both the team and psyke83, in order to make them work even on Cori,
and am now next to the first test of the CWM 6.X.X.X, based on IceCreamSandwich code.
At the same time, @akhbh is working on the KitKat code based CWM.
I hope I can give more information about any progress as soon as possible.
The General Discussion thread for non-development issues is here:
*.[DISCUSSION] CyanogenMod 11 For Galaxy Pocket GT-S5300 Discussion Thread
Made a first test of CWM based on CyanogenMod 9 code.
It seems it cannot flash it as it weighs so much compared to its partition configuration value: in fact, the maximum boot partition size is set up to 5.0MB, but the compiled boot.img weighs 5.3MB.
Will have to resize its weight in order to make it fill into the partition.
@akhbh, have you had any complication in these terms, with CyanogenMod 11 sources?
@psyke83, what do you suggest to do? Do you think an increasement of boot partition would be a better idea?
streambinder said:
Made a first test of CWM based on CyanogenMod 9 code.
It seems it cannot flash it as it weighs so much compared to its partition configuration value: in fact, the maximum boot partition size is set up to 5.0MB, but the compiled boot.img weighs 5.3MB.
Will have to resize its weight in order to make it fill into the partition.
@akhbh, have you had any complication in these terms, with CyanogenMod 11 sources?
@psyke83, what do you suggest to do? Do you think an increasement of boot partition would be a better idea?
Click to expand...
Click to collapse
No, I didn't faced those complications. My boot.img weighted around 4.5 MB in lzma compression mode. In gzip, it increased to more than 5 mb.
akhbh said:
No, I didn't faced those complications. My boot.img weighted around 4.5 MB in lzma compression mode. In gzip, it increased to more than 5 mb.
Click to expand...
Click to collapse
Perfect.
Which kernel have you based your build on?
streambinder said:
Perfect.
Which kernel have you based your build on?
Click to expand...
Click to collapse
Well, I took the GeTux kernel for cori, had to change the board name though and then compile it. CWM was booting even before changing the board name but there was no reaction from the phone on trying to boot cm9/cm11
And after changing board name, a black screen on trying to boot
Another info: When tried to merge cori source into the bcm21553 common one, it did compile but gave bootloop of GT-S5300 logo on trying to boot as well as when trying to go in CWM.
Bieltv.3 recommended to use cori source instead of the bcm21553 common one so we used cori sources
akhbh said:
Well, I took the GeTux kernel for cori, had to change the board name though and then compile it. CWM was booting even before changing the board name but there was no reaction from the phone on trying to boot cm9/cm11
And after changing board name, a black screen on trying to boot
Another info: When tried to merge cori source into the bcm21553 common one, it did compile but gave bootloop of GT-S5300 logo on trying to boot as well as when trying to go in CWM.
Bieltv.3 recommended to use cori source instead of the bcm21553 common one so we used cori sources
Click to expand...
Click to collapse
I suggest to use our Kernel sources for now, too: it will automatically bypass few errors/issues/bootloops that we cannot now fight with.
The most important thing is to make INIT working from sources (hope it will be working
on my CM9 sources, too) and check that every our configuration is correctly working and
making Cori boot into recovery.
Once we'll make it perfectly working without any kind of issue, will be the right time to try
to make Cori supported with the BC21553-common kernel.
streambinder said:
I suggest to use our Kernel sources for now, too: it will automatically bypass few errors/issues/bootloops that we cannot now fight with.
The most important thing is to make INIT working from sources (hope it will be working
on my CM9 sources, too) and check that every our configuration is correctly working and
making Cori boot into recovery.
Once we'll make it perfectly working without any kind of issue, will be the right time to try
to make Cori supported with the BC21553-common kernel.
Click to expand...
Click to collapse
Okay, I will use your kernel sources and try if something is changed once I reach home. For now, I neither have this device nor a PC, as I'm in another city.
Will be keenly watching your work. Will start after reaching home around the end of September
akhbh said:
Okay, I will use your kernel sources and try if something is changed once I reach home. For now, I neither have this device nor a PC, as I'm in another city.
Will be keenly watching your work. Will start after reaching home around the end of September
Click to expand...
Click to collapse
No problem, mate.
Here you have every source in my possession:
platform_kernel_samsung_cori
platform_device_samsung_cori
Keep in contact with me, as I will need some informations by you.
Anyway I'm now making another build, keeping some not so much important binaries excluded, so that I can make the compiled boot.img fill into our little Cori's boot partition. I know it's a dirty workaround, but if it works, I'll use it untill @psyke83 will suggest me a better way to do.
streambinder said:
No problem, mate.
Here you have every source in my possession:
platform_kernel_samsung_cori | github.com
platform_device_samsung_cori
Keep in contact with me, as I will need some informations by you.
Anyway I'm now making another build, keeping some not so much important binaries excluded, so that I can make the compiled boot.img fill into our little Cori's boot partition. I know it's a dirty workaround, but if it works, I'll use it untill @psyke83 will suggest me a better way to do.
Click to expand...
Click to collapse
have u tried to build cwm v6 from cm9 source ??
cleverior.ipul said:
have u tried to build cwm v6 from cm9 source ??
Click to expand...
Click to collapse
Of course, mate. I'm working on it, right now.
It doesn't seem to boot, strange if the same INIT binary sources are working for @akhbh.
#UPDATE
In order to troubleshoot, I'll give you some info.
For his build I used these sources:
platform_kernel_samsung_cori
platform_device_samsung_cori
android_device_samsung_bcm21553-common
Applied some lines on our bcm21553-bootimg.mk, too, in order to exclude parted and mke2fs and make the compiled boot.img weigh less.
@cleverior.ipul, can you link me your kernel sources, as akhbh said he used your ones for CM11.
@akhbh, which modifies have you applied in order to compile CWM based on CM11 code? Which device tree?
#UPDATE 2
Attached my compiled boot.img.
If anyone of you would extract it (you can easily use this tool: bootimgtools - read how to use it in the README) and make a diff with the CM11 one (just extract the ramdisk of both boot.imgs and - in the terminal - use this command: diff -urN /path/to/cm9/ramdisk /path/to/cm11/ramdisk > diff.patch), would make to me a huge favour.
Let me know.
streambinder said:
Of course, mate. I'm working on it, right now.
It doesn't seem to boot, strange if the same INIT binary sources are working for @akhbh.
#UPDATE
In order to troubleshoot, I'll give you some info.
For his build I used these sources:
platform_kernel_samsung_cori
platform_device_samsung_cori
android_device_samsung_bcm21553-common
Applied some lines on our bcm21553-bootimg.mk, too, in order to exclude parted and mke2fs and make the compiled boot.img weigh less.
@cleverior.ipul, can you link me your kernel sources, as akhbh said he used your ones for CM11.
@akhbh, which modifies have you applied in order to compile CWM based on CM11 code? Which device tree?
#UPDATE 2
Attached my compiled boot.img.
If anyone of you would extract it (you can easily use this tool: bootimgtools - read how to use it in the README) and make a diff with the CM11 one (just extract the ramdisk of both boot.imgs and - in the terminal - use this command: diff -urN /path/to/cm9/ramdisk /path/to/cm11/ramdisk > diff.patch), would make to me a huge favour.
Let me know.
Click to expand...
Click to collapse
I think we didn't had significant changes. Perhaps the same as totoro. But, that resulted in the internal_sd not mounting error in cwm.
Sadly, as said before, I am away from my home city and can't provide the files to you and can't do the boot.img diffs as well
Try to ask psyke83, he might have a solution for that
akhbh said:
I think we didn't had significant changes. Perhaps the same as totoro. But, that resulted in the internal_sd not mounting error in cwm.
Sadly, as said before, I am away from my home city and can't provide the files to you and can't do the boot.img diffs as well
Try to ask psyke83, he might have a solution for that
Click to expand...
Click to collapse
Then, if you didn't make any massive change upon the sources, then I'll only try using your kernel.
Can you give me your kernel sources, mate, please?
streambinder said:
Then, if you didn't make any massive change upon the sources, then I'll only try using your kernel.
Can you give me your kernel sources, mate, please?
Click to expand...
Click to collapse
Currently, I can provide you the boot.img only. For the sources, @cleverior.ipul can provide the kernel sources coz as said earlier, his kernel is used. Well, we were working together to bring cm11 but weren't successful
akhbh said:
Currently, I can provide you the boot.img only. For the sources, @cleverior.ipul can provide the kernel sources.
Click to expand...
Click to collapse
Ok, please send it to me, will compare it with my package.
streambinder said:
Ok, please send it to me, will compare it with my package.
Click to expand...
Click to collapse
Here it is:
http://www.4shared.com/zip/1nKFbOJ2ba/ccccGetux_CM11.html
streambinder said:
Of course, mate. I'm working on it, right now.
It doesn't seem to boot, strange if the same INIT binary sources are working for @akhbh.
#UPDATE
In order to troubleshoot, I'll give you some info.
For his build I used these sources:
platform_kernel_samsung_cori
platform_device_samsung_cori
android_device_samsung_bcm21553-common
Applied some lines on our bcm21553-bootimg.mk, too, in order to exclude parted and mke2fs and make the compiled boot.img weigh less.
@cleverior.ipul, can you link me your kernel sources, as akhbh said he used your ones for CM11.
@akhbh, which modifies have you applied in order to compile CWM based on CM11 code? Which device tree?
#UPDATE 2
Attached my compiled boot.img.
If anyone of you would extract it (you can easily use this tool: bootimgtools - read how to use it in the README) and make a diff with the CM11 one (just extract the ramdisk of both boot.imgs and - in the terminal - use this command: diff -urN /path/to/cm9/ramdisk /path/to/cm11/ramdisk > diff.patch), would make to me a huge favour.
Let me know.
Click to expand...
Click to collapse
here the link source https://github.com/cleverior/android_kernel_samsung_cori
i've changed the board name. If your device can not boot after using the zImage from this source, then rename init.bcm21553.rc to init.gt-s5300.rc.
@streambinder, what is grom? As bieltv.3 said that init built grom for cori is required to fix adb over cwm recovery. If adb gets working, then possibly the black screen while booting cm11 might get fixed
akhbh said:
@streambinder, what is grom? As bieltv.3 said that init built grom for cori is required to fix adb over cwm recovery. If adb gets working, then possibly the black screen while booting cm11 might get fixed
Click to expand...
Click to collapse
Sincerely don't what are you talking about.
Anyway, have to try to understand where's the problem with the not-booting CWM.
Will try with your sources and let you know.

[GUIDES INDEX] Start Compiling ROM For Android One!

Hey Guys, Many People Ask About How To Start Compiling ROM And I Am Here With Some Pretty Neat Guides By Some Awesome Developers To Make Your Compiling Journey Way More Easy, If You Are A N00b Back Out(Just Kidding) It Is Still A Bit Complicated At First But You Get The Hang Of It! There Guides Are Not Just For Android But Also For Other Devices!
Requirements:-
A Linux PC (64bit)(Ubuntu Prefered)
Minimum 4 gigs of RAM (Recommended RAM is 8 Gigs And Above)
Make Sure You Have At-least Unlimited Data Plan And A High Speed Network (Coz You Have To Download Repos Over 15 Gigs)
Guides:-
The Best To Start Guide - [GUIDE][COMPLETE] Android ROM Development From Source To End Thanks to @jackeagle
Basics And XDA's - How to Build an Android ROM
The Reference Tally Guide I Would Recommend (Like It Too) - [GUIDE][Step-by-Step] Build ROM from source Thanks to @Haze028
ROM Specific Guides :-
Cyanogen-mod - [GUIDE] Compile CM from source, source basics & FAQ - Very detailed and noob friendly Thanks to @galaxyfreak
PAC Rom - [Guide]How to Compile PAC Rom Thanks To @iurnait
AOKP - [GUIDE] The Comprehensive AOKP Building Guide Thanks to @TheByteSmasher
Paranoid Android - [GUIDE][AOSPA:v3.+] How to Compile AOSPA from Source : + Support and Maintenance Thanks to @gokussjx
Android One Specific Device Tree, Kernel And Vendor Sources Links:- Thanks to @varun.chitre15
Device Tree - https://github.com/varunchitre15/android_device_google_sprout
Vendor - https://github.com/varunchitre15/android_vendor_google_sprout
Kernel Source - https://github.com/varunchitre15/android_kernel_mediatek_sprout
Code To Clone Repo :
git clone https://github.com/varunchitre15/android_device_google_sprout -b cm-11.0 device/google/sprout
git clone https://github.com/varunchitre15/android_kernel_mediatek_sprout -b cm-11.0 kernel/google/sprout
git clone https://github.com/varunchitre15/android_vendor_google_sprout -b cm-11.0 vendor/google/sprout
Click to expand...
Click to collapse
For Video Tutorials :-
Visit Post #2
IF REPO SYNC FAILS​[FIX] Repo Sync Failed Due To Fetch Errors!​
Detailed Video Tutorials On Building Custom ROMs:-
Part 1 :-
Part 2:-
Reserved
Need Help
Is it possible to compile ROMs with Windows 7 ?
SidLoveNuts said:
Is it possible to compile ROMs with Windows 7 ?
Click to expand...
Click to collapse
No,you will need a Linux 64bit machine to compile android from source
SidLoveNuts said:
Is it possible to compile ROMs with Windows 7 ?
Click to expand...
Click to collapse
You can dual boot ur PC such that u can select between Win and Linux
Dear OP, please post/request varun to post a detailed guide for compiling CM for noobs. It will be greatly helpful for budding developers. Thanks .
arunmcops said:
Dear OP, please post/request varun to post a detailed guide for compiling CM for noobs. It will be greatly helpful for budding developers. Thanks .
Click to expand...
Click to collapse
Visit Here For Detailed Guide
It is usefull and same for all Rom's
I already have CM11 branch, want to try CM12 branch . Question is - Can I reuse my existing CM11 sources ? How to do that ?
ash1425 said:
I already have CM11 branch, want to try CM12 branch . Question is - Can I reuse my existing CM11 sources ? How to do that ?
Click to expand...
Click to collapse
No,You need to sync the new branch in order to build CM12
DC07 said:
No,You need to sync the new branch in order to build CM12
Click to expand...
Click to collapse
I think its possible. JBQ responded with positive answer on google groups. Please have a look.
https://groups.google.com/forum/?hl=en#!topic/repo-discuss/yUslU8J76Rs
Code:
You can re-run repo init in your existing client. You can skip the -u parameter to use the same server, and just specify -b.
You can make a local copy of your client first, so that you can have both a kitkat and a lollipop client.
JBQ
ash1425 said:
I think its possible. JBQ responded with positive answer on google groups. Please have a look.
https://groups.google.com/forum/?hl=en#!topic/repo-discuss/yUslU8J76Rs
Code:
You can re-run repo init in your existing client. You can skip the -u parameter to use the same server, and just specify -b.
You can make a local copy of your client first, so that you can have both a kitkat and a lollipop client.
JBQ
Click to expand...
Click to collapse
That's what I said. -_- Check my reply properly.I said that you need the new branch in order to build CM12 and so did JBQ.
My question was "Can i reuse my existing CM11 sources". I might have framed it wrong. Anyways, i have started sync and i can confirm that my download size is minimized a lot.
ash1425 said:
My question was "Can i reuse my existing CM11 sources". I might have framed it wrong. Anyways, i have started sync and i can confirm that my download size is minimized a lot.
Click to expand...
Click to collapse
--reference={whereever the predownloaded rom source is}
Use This During Repo Init Before -u
Kunal.Kene.1797 said:
--reference={whereever the predownloaded rom source is}
Use This During Repo Init Before -u
Click to expand...
Click to collapse
You think that will work for 5.0?
##W4TCH0UT## said:
You think that will work for 5.0?
Click to expand...
Click to collapse
Yeah...using it it will use some pre-downloaded art compilers, etc! it won't make a big difference but it will!
Kunal.Kene.1797 said:
Yeah...using it it will use some pre-downloaded art compilers, etc! it won't make a big difference but it will!
Click to expand...
Click to collapse
You can't use cm11 sources to download cm12...lol. EVERY AND EACH repo is different in cm12.
##W4TCH0UT## said:
You can't use cm11 sources to download cm12...lol. EVERY AND EACH repo is different in cm12.
Click to expand...
Click to collapse
Thanks for this
I was trying to explain this itself from long.
##W4TCH0UT## said:
You can't use cm11 sources to download cm12...lol. EVERY AND EACH repo is different in cm12.
Click to expand...
Click to collapse
Okay!!!! thx!
ubuntu 14.10 compatible
I'm having problem dual boot so can run ububtu on virtual application by running IOS file??

I tried to build twrp for A605k but..

there is no such kernel,device tree,vendor for my device.
I could build device tree via twrpbuilder tree generator,
but kernel cannot be found in opensource release center.
why am i need A605k? not F or FN or else?
that's because when i used A605FN recovery it has so many errors... and it makes me build twrp for A605K.
not for other models..
but.. i failed,
device tree built via twrpbuilder tree generator doesn't have omni.dependencies file
so, what do you guys think how can i fix those annoying things?
I know, this is not a question area, but i want to make Discussion with you guys to get a idea
Well if your trying to build a device tree and kernel source and vendor start with downloading android source in linux there are many great guides for this then download the sources for the A600F/FN or any other current model of the A600 then there will be a file in the folder for whichever source you downloaded that will allow you to pull resources from your phone like kernel recovery device vendor files ect.. use that and then import it to the same folder than try to build TWRP and test it to see if you get a working build if not then go back and try again their are many sources for learning how to compile twrp for devices that dont have it read those and try again.
Sent from my [device_name] using XDA-Developers Legacy app
tmvkrpxl0 said:
there is no such kernel,device tree,vendor for my device.
I could build device tree via twrpbuilder tree generator,
but kernel cannot be found in opensource release center.
why am i need A605k? not F or FN or else?
that's because when i used A605FN recovery it has so many errors... and it makes me build twrp for A605K.
not for other models..
but.. i failed,
device tree built via twrpbuilder tree generator doesn't have omni.dependencies file
so, what do you guys think how can i fix those annoying things?
I know, this is not a question area, but i want to make Discussion with you guys to get a idea
Click to expand...
Click to collapse
I did find the kernel and source here: http://opensource.samsung.com/recep...menu_item=mobile&classification1=mobile_phone
(page 44 for SM-A605FN - A605FNXXU1ARD7)
I would like to build it myself, but my android development knowledge is limited (i do have a solid linux knowledge though).
Is this guide obsolete (https://forum.xda-developers.com/showthread.php?t=1943625)?
If yes, anyone knows where can i find an up-to-date one?
If not, any idea where BoardConfig.mk can be found?
Where can we find a guide on how to build a twrp? I would really like to learn how to do it

Categories

Resources