[HELP]android rom compiling software - Android Q&A, Help & Troubleshooting

Hey guys . I'm new to Android development...but i have a good idea about developing a custom rom and kernel using ubuntu..
But one day i was thinking that,
everyone who are interested in rom development goes through the AOSP website and tries it. And atlast after so many confusions and so many new learnings they compile it..
Bug fixing and adding features is next job.... Let's keep it aside
My thought was to build a software using java or c++ , which will automatically compile the rom for any device according to the user's input.
The inputs are device's code name (eg:-hammerhead)
And type of os(lineage based or aosp based etc...)
In the background of this software, all the rom compiling codes, source downloading codes, setting up environment codes etc,.. will be feeded using c++ or java.
After getting inputs from the user via a simple interface, the process will start. Downloading source, choosing directory,compilation, and finally the flashable rom will be the output of this software which will be stored in the given directory folder...
What do u guys think about this. Will this work???
i also know there are many troubles making this software
Pls comment abt ur thought guys..
I also need help in this case..

My vote is for is for a interactive GUI for android kernel development. One to allow easy modification to the kernel source and compilation. Kinda like Link+ Kernel Ide for Eclipse but for android

Related

[Q] what diferences between compile form source & porting?!

can anyone help me to learn a bit more than android!
I heared about compile form source and biuld form source...And I can't understand what diferences between compile from source and port! can U explain easily?
for example should I want to bring superOxygen Rom in my x10 , should I port it with cm as base or compile form source?!
thx
for short:
porting means you are making rom to your device from another device, you will be just moving libs, editing ramdisk, etc.
compiling from source means you make a complete rom from scratch including programming own drivers, libs in some situations.
If source is avaiable fot superOxygen then you can try compiling it yourself, but editing, or adding your drivers is necessary, and anyway its harder than porting, but gives better result in fact because you can program everything to make it work and you aren't dependant on binary files like in porting.
When porting, hardware should be close to one you have in your X10, because most things will not work when processor differs, wifi modules, gsm etc. You take files from any X10 rom and replace ones that are with same name in another rom (oxygen here).
Thanks very much man!
I took your advices...it was good advices but what is your idea about this:
If I port Superoxygen from Nexus1 for my x10 and (use stable AOSP as base) , then can I say I make a superOxygen Rom?
compiling from source is how much difficult?! I'm 17...! , I have a link that teach compile from source... Is it need some Knowledges that is impossible for me?!
heh, im 17 too and I don't have much knowledge, but looking on pcfighter(a gt540 developer) im impressed, hes 17 too and does a great job, so it depends on time spent and interests
when you port oxygen, you can just say that you ported and not made it. credits go to the maker and you for just making it work on x10
I'm looking now how to compile for gt540 but can't find any idea how to make it strict for gt540 compiling from source tutorials are mostly for nexus s and nexus 4g because most of are just remade of what you can find on official android developer page and its easier. For unsupported device its even harder, you have to work with what you already have and add it first to sources then ... more things to do. I'm beginner with that too, just pulled sources yesterday and looking how to make it work :] so don't expect so much help in this way :]. Just telling you overall how this looks
For compiling you need to know Java and C programing language.
Sent from my Xoom using Tapatalk
@mesaj! do you know c and gava programing languge?! ofcourse I worked c++ a little...
Thanks now I also know what the difference is.
In easy terminology. Compiling a ROM is building a ROM from the source code so it means you are building a ROM from the ground up. Porting a ROM to your phones means to take a ROM built for another phone and to get it working on yours. That's the simplest way to think of it. I have in my signature a guide for compiling a ROM. Oh and I'm newly 18
私のEVO 3Dから送信される。
Thanks for this thread
Thanks now I also know what the difference is.
Click to expand...
Click to collapse
Thanks for this thread
Click to expand...
Click to collapse
just press the thanks button if you like this thread

Questions About Developing

Hello Everyone I Am New In This World And I Have Some Questions About Developing
-Which Programming language Should I Learn To Create Apps.?
-How To Create ROM?
-What About Porting Something From A Device To Another One?
-Is The SDK Of The Mobile Is Enough To Port Something From It?
-Should I Own An Old Phone For Testing?
P.S. I Have GS3
You develop for Android primary in the Java language. You may write native (i.e. compiled) code as well, but Java is recommended in most cases.
Creating custom roms is much like creating a Frankenstein Monster. Decompose your original rom, pick the pieces you like, replace the other with stuff you dig up from other places, or create yourself. Then re-pack everything in your new custom image, flashing you phone. The details about what to use to split images, flash devices etc you have to search this forum for - it'll differ from device to device.
When developing for Android you chose a minimal API level, e.g. Android 1.5. This way your app will run on all devices with at least Android version 1.5, no porting needed. Java is "write once, run many" so to say.
You can test your new apps either on you phone or in the emulator (Android Virtual Device) supplied with the SDK. If you intend to develop lots of code, a dedicated phone may be quite useful for testing, yes, but absolutely not necessary. You'll not crash your phone just because your application crashes, all apps are running in separate processes protected from each others.
You find the official tutorial at developer.android.com/training/basics/firstapp/index.html
Thanks For Your Help. Your Words Are Very Useful
THE.W!ZARD said:
Hello Everyone I Am New In This World And I Have Some Questions About Developing
-Which Programming language Should I Learn To Create Apps.?
-How To Create ROM?
-What About Porting Something From A Device To Another One?
-Is The SDK Of The Mobile Is Enough To Port Something From It?
-Should I Own An Old Phone For Testing?
P.S. I Have GS3
Click to expand...
Click to collapse
you need java to learn programming................
for basic rom making a bit of general knowledge is enought not much of programming is required........
for basic porting you can use cygwin for complex ports u need t change the framwork files which you will learn as the time passes..
sdk is required for building app and adb fastboot not for porting and other kind of stuff(related to api's)............
what do you mean by old phone.. you build mods for your phone so test it on the phone you built the mod for not old phone or something like that.........
The first thing you need to do is learn Java.
http://forum.xda-developers.com/forumdisplay.php?f=613

[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:.

Want to start with AOSP JB 4.2 - experienced developers are welcome :)

Hi all,
i want to start with AOSP 4.2 for our SGS3 i9300 - is anybody interested to develop and publish a AOSP based rom with me?
I'm a real application developer (C,C++,JAVA,PHP,MySQL,some Oracle PLSQL) and now its some cold out - i have time to do
some nice things
I think a team of 2 or 3 developers should be enough to develop on this rom, as we can use a lot from AOSP 4.1.2
### EDIT
As long as no one has found to help, here a short description of current progress:
- Code is pure based on AOSP 4.2 but some snippets of CyanogenMod to bring up hardware (camera,graphics,audio)
- Device is bootable (no other boot.img required anymore)
- Bootanimation is working
- Mount of partitions is working
- Deodexing is working
- adb, debuggerd and root access is working
Not working: a lot
- Graphic not working perfect, needs a kernel patch or a working gralloc/hwcomposer/hwconverter to work without laggy PMEM)
- Camera can not be activated due to a missing function call (undefined reference, maybe it can be solved with a newer driver)
- Audio: missing speaker device (Code have to reworked to work with stagefright and tinyalsa libs)
- USB/internal SDCard: cant be mounted (error message sounds like the device is mounted twice, have to find the error in init process)
- RIL not working (Java file from CM10 have to be integrated in frameworks/opt/telephony)
Currently, i'm working on the Graphic problem and USB part to bring up the device to a stable UI
Way to go man. Good luck to you!
Good luck ...!! Im waiting
Sent from my GT-I9300 using xda premium
Good evening,
Well how have you imagined that? Do you have build something like that before or would this be your first attempts to build up a rom from scratch? Do you know what's all necessary to contribute for that?
I would try to help you, but I have clearly to say that I haven't done anything like this before. I'm in the last term of my study of technical computer sciences, working in a company as application programmer for C/C++ and Java(Android). Due to my studies I have also some knowledge about hardware programming, down to read/writing some code in assembler. I would be interested to this if I get introduced to the topic and some help with the necessary tool chain wouldn't hurt too ^^.
greetings
hop3l3ss1990 said:
Good evening,
Well how have you imagined that? Do you have build something like that before or would this be your first attempts to build up a rom from scratch? Do you know what's all necessary to contribute for that?
I would try to help you, but I have clearly to say that I haven't done anything like this before. I'm in the last term of my study of technical computer sciences, working in a company as application programmer for C/C++ and Java(Android). Due to my studies I have also some knowledge about hardware programming, down to read/writing some code in assembler. I would be interested to this if I get introduced to the topic and some help with the necessary tool chain wouldn't hurt too ^^.
greetings
Click to expand...
Click to collapse
I have successfully built a rom in year 2010 for the LG-P500 device, based on CM7 and modified it in a strange way, so i included a lot of nice things
written from scratch - this rom was a unicate ... later, i developed the "Phoenix Launcher" for Gingerbread enabled devices, but its development is currently
frozen because its strange to support every or almost every device with a bugless launcher. In the last months i learned a lot about android and have to re-think about
what i'm able to do, and what i want to do. In the summer of 2011 i bought my SGS3, the first thing i was doing was to remove that samsung crap from my device and
have installed AOKP. So now it's time to do my own thing again - i want to have AOSP as i think for me its the best Android solution for myself and want to publish it
to other users who think "thats ok for me" too
In short, it doesnt matter if its your first rom - its enough if you know about basic things like "how is android doing all that nice things", "how to debug code", "how to fix
some bugs (even strange bugs)" and some experience with git and github. All other you can learn in a very short time - i've learned the most of things with try & error
andy572 said:
I have successfully built a rom in year 2010 for the LG-P500 device, based on CM7 and modified it in a strange way, so i included a lot of nice things
written from scratch - this rom was a unicate ... later, i developed the "Phoenix Launcher" for Gingerbread enabled devices, but its development is currently
frozen because its strange to support every or almost every device with a bugless launcher. In the last months i learned a lot about android and have to re-think about
what i'm able to do, and what i want to do. In the summer of 2011 i bought my SGS3, the first thing i was doing was to remove that samsung crap from my device and
have installed AOKP. So now it's time to do my own thing again - i want to have AOSP as i think for me its the best Android solution for myself and want to publish it
to other users who think "thats ok for me" too
In short, it doesnt matter if its your first rom - its enough if you know about basic things like "how is android doing all that nice things", "how to debug code", "how to fix
some bugs (even strange bugs)" and some experience with git and github. All other you can learn in a very short time - i've learned the most of things with try & error
Click to expand...
Click to collapse
This all sounds interesting for me and yes I like the idea of developing a own clean rom with some cool additional stuff, too. But what would be the first steps to a new rom? Have you begun with all the administration stuff like setting up a new gitrepo, make a to do list etc...?
I think Code debugging and writing some new stuff wouldn't be a problem for me but what are you meaning excactly with "how is android doing all that nice things"? How it build up, deep level architecture? Well, I know how the "normal" Linux system is working, how modules are getting loaded into the kernel... But how this is correctly working on android I have to learn at first and if there is a chance to do that I would do it
Currently on my S3 is SlimBean and till that there is still no update to 4.2 I'm happy with it, but exploring something new would be pretty cool
Do you have an IRC chat room or something like that? I've to go offline now, my girlfriend wants more attention.^^ But If you want, I' m willing to try to contribute to the rom
PS. I'm sorry for my bad English and hope its understandable, but outside from here you can talk to me in German ^^
If you want to help the AOSP experience on our phones the best place to do it is with the CyanogenMod guys. You'll find pretty much everything based on AOSP (including people that port Vanilla AOSP and AOKP) is using a CM kernel.
They're likely working on the merge now in terms of getting CM10.1 out (with Android 4.2) but most of our CM guys are pretty burned out on working with Samsung's subpar reference material to get basic stuff working (mostly HWC). If you think you could help with this, this would be provide a massive boost to the whole community that want to run these phones on an AOSP based ROM and they would be very grateful.
Gotta warn you though it sounds like it'll be an uphill struggle to get the rest of the stuff working right; unless Samsung release some decent sources for HWC.
Currently i have only downloaded the AOSP sources and started to integrate most of the configs. Currently it cant compile because AOSP is not AOKP/CM10
where i got the device and vendor directories, so i have to make some changes in the basic system. if it's compiling to the end, i open a fresh github account
and upload all my modifications. The compile process stops currently on audio,OMX plugins, graphics and camera - most of that are small pieces of changes
i have to make - i think, tomorrow (its monday in germany here) i can upload all and then we can start to develop on
andy572 said:
Currently i have only downloaded the AOSP sources and started to integrate most of the configs. Currently it cant compile because AOSP is not AOKP/CM10
where i got the device and vendor directories, so i have to make some changes in the basic system. if it's compiling to the end, i open a fresh github account
and upload all my modifications. The compile process stops currently on audio,OMX plugins, graphics and camera - most of that are small pieces of changes
i have to make - i think, tomorrow (its monday in germany here) i can upload all and then we can start to develop on
Click to expand...
Click to collapse
Wish i could help (just started learning JAVA ) ! gl with this awesome project
Nice to see you here, I remember you from the P500 forums.
Xda user krarvind should be able to give you some useful hints, you will have to contact him through the RD forum as his pm is locked down, or I could possibly put him in contact with you
slaphead20 said:
Xda user krarvind should be able to give you some useful hints, you will have to contact him through the RD forum as his pm is locked down, or I could possibly put him in contact with you
Click to expand...
Click to collapse
Thank you, it would be nice if you can contact him
andy572 said:
Thank you, it would be nice if you can contact him
Click to expand...
Click to collapse
Ok, will mention it to him
andy572 said:
Currently i have only downloaded the AOSP sources and started to integrate most of the configs. Currently it cant compile because AOSP is not AOKP/CM10
where i got the device and vendor directories, so i have to make some changes in the basic system. if it's compiling to the end, i open a fresh github account
and upload all my modifications. The compile process stops currently on audio,OMX plugins, graphics and camera - most of that are small pieces of changes
i have to make - i think, tomorrow (its monday in germany here) i can upload all and then we can start to develop on
Click to expand...
Click to collapse
How it's going forward?
Maybe it could be useful to publish the github link when it's ready and some more information like staus, on first post
In the next days I have some trouble with my exams ( in two weeks I'm completely finished with my studies ^^) but I think if there is something to do I'll find some time to work on.
Good Luck Dude~
I haven't tried AOSP yet.
Hope someday i can give it a go.:silly:
hop3l3ss1990 said:
How it's going forward?
Maybe it could be useful to publish the github link when it's ready and some more information like staus, on first post
In the next days I have some trouble with my exams ( in two weeks I'm completely finished with my studies ^^) but I think if there is something to do I'll find some time to work on.
Click to expand...
Click to collapse
current state:
- patched android/build so we can compile the kernel within the main compile process
- patched android/build main.mk file so we can use OpenJDK or Oracle JDK
- added android/vendor/aokp and android/vendor/samsung tree from AOKP (its the most useful directory structure)
- added android/hardware from AOKP so we have all that Exynos things that are needed, even by AOSP
- modified android/frameworks/native/include so a OMX Plugin header can be found
- modified android/libhardware and patched gralloc module
currently it compiles to the Webkit library, most of all apps, libs and binaries are building without errors - the next problem
to solve is the PRODUCT_COPY_FILES ****: nothing of proprietary files are copied to the android/out directory, seems like
a bug in android/build too.
For only 2 days trying to compile to the end without errors its a very good cut
here we go: it compiles to the end and a flashable "JOP40" zip could be created
tryed to flash, but it gives errors in CWM: have to remove the recovery folder and the recovery.sh file from etc folder in the ota zip file, but it doesnt boot up - got a black screen only.
do we need a new or patched kernel instead the CM10 smdk421x one?
Well does it have all the closed source libraries fron the phone? If not, it wont boot. Dont think i am calling you stupid, you obviously know what you are doing, but maybe you forgot. Idk. Check that. Try running a log cat and debug that.
Sent from my GT-I9300 using xda premium
b-eock said:
Well does it have all the closed source libraries fron the phone? If not, it wont boot. Dont think i am calling you stupid, you obviously know what you are doing, but maybe you forgot. Idk. Check that. Try running a log cat and debug that.
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
Thanks for the hint, yes i have all files included - i cant connect to adb, i see only small colored point on the top left side and a sensor
is red blinking (the one to the right of the speaker.
That would be the proximity sensor near the top front speaker. Cant connect, adb binary in /system/bin or xbin?
Sent from my GT-I9300 using xda premium

[Q] Road to developing?

Hey guys,
so this is applicable to all devices and its android specific therefore I think this is the best place to ask these question/s. I learned coding with Python for a few months last year and really enjoyed it. Now I am thinking since I have an android phone that is claimed by most "unbrickable" and I am probably stuck with it for another year I decided to learn android programming and contribute to this awesome community and hopefully make my phone awesome myself. Before I can do all that I have a few questions. Most of the development guides I saw after google searching, referred to how to create apps ( now I know there are guides to creating roms here). If I learn with those guides how to make apps will it be a similar process when I wan't to make custom roms? Also how to start? Start with Java SDK, with eclipse? Point to some guides plox
early thanks
There are guides for building apps... and guides for building ROMs... but AFAIK, guides for customising ROMs don't really exist... ROM customisations are generally just done following the API or using someone's work as a reference point....
craigacgomez said:
There are guides for building apps... and guides for building ROMs... but AFAIK, guides for customising ROMs don't really exist... ROM customisations are generally just done following the API or using someone's work as a reference point....
Click to expand...
Click to collapse
I think I worded that wrong. I know there are guides for building apps and building roms but I was asking If I use one of those guides to build app + learn to build app using a book or something will it help me build roms later? And for the custom rom thing, I meant like theres hellfire ics cm9 then theres eaglesblood ics cm9 for same device but by different people so I when I said custom rom I mean like my own ics cm9. but anyway thanks for your answer.
First and last bump
Making ROM's is different then making apps, while the skills you learn using Eclipse and Java JDK will only teach you Java, XML and ADB at most, when making ROM's you need to know many different things. While you can make custom ROM's with little programming experience to be a true master of making custom ROM's you need to know Java and XML, for modifying and creating your own custom apps you can include in your ROM, C and C++ for tweaking the kernel to truly optimize performance, Shell for creating scripts to automate tasks and performing other functions in your ROM, Photoshop/GIMP for image editing and creation in order to customize the look of your ROM, as well as patience to debug any problems you may run into and a couple other skills as well.
If you want to learn how to compile CM9 check out these guides:
[TUTORIAL]Setting up and compiling CM9/CM10 from source
Galaxy Nexus (GSM): Compile CyanogenMod 9 (Linux) It's for the Galaxy Nexus but it's still a very good place to start with to learn how to compile CM9 from source.
For learning basic customization of ROM's check out these great videos:
Let me know if you still have questions .
shimp208 said:
Making ROM's is different then making apps, while the skills you learn using Eclipse and Java JDK will only teach you Java, XML and ADB at most, when making ROM's you need to know many different things. While you can make custom ROM's with little programming experience to be a true master of making custom ROM's you need to know Java and XML, for modifying and creating your own custom apps you can include in your ROM, C and C++ for tweaking the kernel to truly optimize performance, Shell for creating scripts to automate tasks and performing other functions in your ROM, Photoshop/GIMP for image editing and creation in order to customize the look of your ROM, as well as patience to debug any problems you may run into and a couple other skills as well.
Okay that makes sense. So if I learn to make apps since thats what most guides are, I will learn to work with JDK and XML but creating ROMs requires much more knowledge. I am okay with just being able to compile source codes/porting roms from similar devices and what not. I am pretty decent with Photoshop so thats a win Thank you sir
Click to expand...
Click to collapse

Categories

Resources