[Q] Compiling HTC desire roms from AOSP - Desire Q&A, Help & Troubleshooting

Hi,
Apolgies if this is in the wrong place, but this is the only forum I would expect to get my answer.
I need someone to point me in the right direction please. I'm thinking of compiling an ASOP for personal use from source. I have looked at the google tutorials and even though Linux isn't my weapon of choice, being an IT systems engineer I do not feel following the tutorial will be too difficult.
However, is there a more specific guide for the desire?
The tutorial builds for the development handsets eg Nexus one. Is it just a case of supplying the correct drivers, RIL and editing the product code, or is there a bit more to it than that?
Any help / direction greatly appreciated.

You could start with building ROMs from Oxygen or CM source. That way you can familiarize yourself with the AOSP project without worrying about drivers etc. (DevNull source is completely stock AOSP with drivers for the Desire etc.)
Later on, when you know how everything works, you can start your own project.
If you want to start building AOSP from Google source, you might want to read the tutorials over at Google for a couple of times + checking the wiki's over at CM. They pretty much explain everything that there's to it.
If you're looking for a guide specific for the HTC Desire, then I think you're out of luck. Most dev's over here start off with the tutorials over at android.com and even with tutorials etc. at CM.

Is DevNull definitely 100% AOSP + drivers? If so, then it would be pointless compiling from source anyway.
I already ran that through dsixda, but the options there are quite limited.
What I had hoped I could do was make a tiny tiny AOSP. DevNull is pretty small though, so maybe it can't get much smaller.

rootSU said:
Hi,
Apolgies if this is in the wrong place, but this is the only forum I would expect to get my answer.
I need someone to point me in the right direction please. I'm thinking of compiling an ASOP for personal use from source. I have looked at the google tutorials and even though Linux isn't my weapon of choice, being an IT systems engineer I do not feel following the tutorial will be too difficult.
However, is there a more specific guide for the desire?
The tutorial builds for the development handsets eg Nexus one. Is it just a case of supplying the correct drivers, RIL and editing the product code, or is there a bit more to it than that?
Any help / direction greatly appreciated.
Click to expand...
Click to collapse
Hi Dan, for a start, the best place to start would be building a Cyanogen Rom from source as per Cyanogen's guide here. This guide is specific for the Desire
My suggestion is to build/modify this source first, since it's actively supported by a community. Once you get a fair idea, you could move on to the vanilla source..
Btw..Linux knowledge isnt crucial for building it, and you can easily follow the guide
Edit: Oops, just reallized that I just mirrored Pyr0wl's advice

Related

Information regarding creation of a custom ROM

Hey, new to the forums, recently purchased a GSM Hero.
I have done some development for free software (think freedom, not price) projects, and have become accustomed to git repositories and structured development.
Upon entering the world of custom Android ROMs (at least Hero ROMs) I have been sorely disappointed with the development practices going on, releases on file sharing sites and the like.
On top of this, none of the ROMs available suit my needs.
This is all fine, as I'm not developing those ROMs.
I have decided that I need to start working on my own custom ROM, however guides and documentation regarding this process are in short supply.
It would be much appreciated if someone could link me to some guides to starting my own custom ROM.
I intend it to be a light vanilla ROM, with none of the bloat that seems to perpetuate other ROMs, I'm aware other such ROMs do exist, however none of them support all features, and even those that claim to do so, often require me to FC
naivemonarch said:
I'm aware other such ROMs do exist, however none of them support all features, and even those that claim to do so, often require me to FC
Click to expand...
Click to collapse
Have you tried this one ? >[2.1] aychteesees-vanilla-cupcake< NOT the [3.0.1]verison ..this is still @dev
http://android.modaco.com/content/h...96/3-0-1-aychteesees-vanilla-cupcake-rom-gsm/
Give it a try [2.1] ! and tell us how it went ...
Yeah I tried that one, it claims to have full functionality, however I frequently had to FC various applications.
I'm downloading 3.0.1 as we speak, however I'd still like some resources on making my own ROM.
I'm interested on this documentation too....thanks
naivemonarch said:
Yeah I tried that one, it claims to have full functionality, however I frequently had to FC various applications.
Click to expand...
Click to collapse
That's weird , I have used almost everything ( apps ) with that ROM [2.1] ... and never get FC's
Did you flashed from Zero .. I mean with all he possible wiping . inlcuding SD ext partition wipe
???
That is a MUST ..!
Before this gets too off-topic, I too would like to concur with what OP is saying. I'd love some info on where to begin with custom ROMs, and I think it would be great if we could create a community repo for code for a custom ROM.
This leads me to another question: all these custom ROMs that we see available for download -- are they free/open source? Like, do they have source code available? I certainly don't think they do, but if they don't, then aren't they violating the terms of the GPL by not providing source code?
FunkTrooper said:
Before this gets too off-topic, I too would like to concur with what OP is saying. I'd love some info on where to begin with custom ROMs, and I think it would be great if we could create a community repo for code for a custom ROM.
This leads me to another question: all these custom ROMs that we see available for download -- are they free/open source? Like, do they have source code available? I certainly don't think they do, but if they don't, then aren't they violating the terms of the GPL by not providing source code?
Click to expand...
Click to collapse
There's Paul's (modaco) online kitchen, but if you want to compile by yourself, there's a plethora of gits on github (cyanogen, lokx, kiall to mention just a few).
Good question. Yeah it would be nice if there was a 'Cooking Class' thread on this forum like in some of the other forums. There is a decent tutorial however at HTCpedia.com under the HTC Hero ROM Development section, it's in the stickies there. However, I still have questions and that forum is not visited as much as xda.
Link to cooking thread:
http://htcpedia.com/forum/showthread.php?t=1404
FunkTrooper said:
Before this gets too off-topic, I too would like to concur with what OP is saying. I'd love some info on where to begin with custom ROMs, and I think it would be great if we could create a community repo for code for a custom ROM.
Click to expand...
Click to collapse
As a start, I would read that thread I just linked above. Once you can dump the contents inside the system.img and then combine it with the boot.img to build an update.zip, then you are already halfway there - that's actually fairly easy. But knowing how to add custom kernels to the update.zip, making the custom ROM rooted, etc. are all stuff that I'm still working on. There's supposed to be a lot of info in the Dream/Magic forums, so I'll keep reading.
Android is still fairly new and very few people know how to use Linux, thus there's less support and less interest in wanting to cook for one's own Android device.
BTW, that thread I linked above is also found here.. Doh!
http://forum.xda-developers.com/showthread.php?t=551711
Thanks for the link, a good read.
Anyone know what the process is for using a custom kernel? There are a few things I'l like to enable that aren't in the HTC kernel (like FUSE).
naivemonarch said:
Thanks for the link, a good read.
Anyone know what the process is for using a custom kernel? There are a few things I'l like to enable that aren't in the HTC kernel (like FUSE).
Click to expand...
Click to collapse
If I eventually manage to find out I will post it here. My most important concern is making a rooted ROM from those shipped ROMs, as some people have been doing here.

Modifying Android's built-in apps

Hi guys!
I'm wondering what I'd have to do if I wanted to modify the built in apps inside Android..
I've got a HTC Hero running FroydVillain 1.5.0. Let's say... I want to modify the messaging app that's included, MMS.apk. I wouldn't know how to go about this, and I have a few questions...
Firstly, what sources exactly are used for building the built in apps for a given ROM? The source code link in the FroydVillain post, for example, is just for the kernel. The rest of the OS isn't there.
Secondly, I hear that in order to modify a built in app, you need to build the entire OS. If I just download all the code from Google official repo, and compile that, will it just... work on my phone, provided I use a kernel that is specific to my phone?
Lastly, are there any tips anyone has for someone who just wants to modify a couple of the built in apps? Is it possible to build them as standalone apps? Or import them into Eclipse?
I've had a search around the forum and the internets in general, and people have asked similear questions, but I've yet to find a good answer. This thread comes to mind: http://forum.xda-developers.com/showthread.php?t=635197
If anyone could help me, or point me in the direction of any help, that'd be awesome! Thanks!!
FunkTrooper said:
Hi guys!
I'm wondering what I'd have to do if I wanted to modify the built in apps inside Android..
I've got a HTC Hero running FroydVillain 1.5.0. Let's say... I want to modify the messaging app that's included, MMS.apk. I wouldn't know how to go about this, and I have a few questions...
Firstly, what sources exactly are used for building the built in apps for a given ROM? The source code link in the FroydVillain post, for example, is just for the kernel. The rest of the OS isn't there.
Secondly, I hear that in order to modify a built in app, you need to build the entire OS. If I just download all the code from Google official repo, and compile that, will it just... work on my phone, provided I use a kernel that is specific to my phone?
Lastly, are there any tips anyone has for someone who just wants to modify a couple of the built in apps? Is it possible to build them as standalone apps? Or import them into Eclipse?
I've had a search around the forum and the internets in general, and people have asked similear questions, but I've yet to find a good answer. This thread comes to mind: http://forum.xda-developers.com/showthread.php?t=635197
If anyone could help me, or point me in the direction of any help, that'd be awesome! Thanks!!
Click to expand...
Click to collapse
1) The whole sources for everything are there
http://github.com/ninpo
2) You can import the sources to eclipse, but I think you will need to build the entire tree, as opposed to just what you change
3) Apktool lets you do smali and resource edits on an APK. Without knowing what you aim to do, it's hard to guide you specifically.
Most apps are based on the sources provided by google. I assume you are talking about Froyo Hero ROMs (i.e. FroydVillain), which apps are generally built from the source of CyanogenMod. Specifically for FroydVillain, if you look around ninpo github you will see some packages with some changes to their code, although it does seem that many of the changes in recent releases are not there. I have actually PMed ninpo about this and hopefully this is only a technicality.... I assume that the other packages and apps (most of them) he just compiled off the CM sources without changes.
In any case, if you compile an app either from the CM source or from google's original sources, it should work just to copy the apk file - just make sure you use an appropriate ROM (i.e. Froyo ROM if you built it from Froyo sources). The reason to want the CM sources, is that if they have incorporated further fixes (over the google sources) you may want them.
Finally, some more practical advice: I would start with the google sources: http://source.android.com/source/index.html since I have found these instructions and explanations easier to begin with - it should be quite straight forward to build these sources on a linux machine (or VM).
Then you can also try to tackle the cyanogen source: http://wiki.cyanogenmod.com/index.php?title=Building_from_source currently missing instructions on how to build for hero. But if you only want to copy apks out of it, you can just build a generic build (like in the google souce).
If you have specific problems, ask and I'll try to help you.
Good luck.
pulser_g2 said:
1) The whole sources for everything are there
http://github.com/ninpo
Click to expand...
Click to collapse
For example where are all the changes to the dalvik code? I do not follow closely enough the changes in Froyd to point out other things which might be missing (if at all), but there are relatively few committed changes to the CM code. Specifically the dalvik code, ninpo mentioned hundreds of changes which caught my interest and are definitively not there.
The kernel sources do seem to be up to date always - been following that one closely .
Thanks for the advice I love this forum!
What I'm trying to do, in case you're wondering, ultimately, is to modify the built-in messaging application to give the user the option of sending a message by the normal method, or by using their provider's free webtext service, something that all the carriers seem to offer here in Ireland.
So, for example, you'd press the Send button, and you'd be able to select one of those methods. (of course, you'd have to have a data connection for the webtext). There's also be an interface for entering your login credentials for your carrier's website.
I'm doing this party because it would be very useful. I also feel that it would give me a good introduction to how you'd go about modifying Android. I mean, from a programming point of view, it shouldn't be *too* hard to do. I already have a simple standalone app that I made which can send a text message via an Irish carrier's webtext service. But it's all good experience to try to modify other people big codebases.
I have a good bit of experience with web application development, but my experience with other programming is a little more limited. I usually use PHP, where there's none of this compiling nonsense. You just write scripts and off they go!
So I'm gonna go off and see if I can set up an environment where I can build.. the OS, I guess.
If I was to take the vanilla official Google sources, would they work on my phone? Or would I have to use an official Google developer phone... or the emulator? Or maybe if I stopped writing here and investigated those links you've provided, I'd know that by know.
Brb, investigating
Yeh investigating and just trying to do it is usually the best way
To clarify what I was trying to say above: All the java code is obvious very portable - one of the big advantages of java. In the case of android it is compiled to an .apk file and this file should be, at the very least, portable to all android "devices" running this android version. So the apk you build (for example from the vanilla 2.2 sources) should work on the emulator (good for initial debugging) and any 2.2 ROMs.
erasmux said:
For example where are all the changes to the dalvik code? I do not follow closely enough the changes in Froyd to point out other things which might be missing (if at all), but there are relatively few committed changes to the CM code. Specifically the dalvik code, ninpo mentioned hundreds of changes which caught my interest and are definitively not there.
The kernel sources do seem to be up to date always - been following that one closely .
Click to expand...
Click to collapse
I'm currently on "vacation" from any and all Android development for a week. I'll be back after the weekend, at which time my modifications will be cleaned up and committed to git. The kernel is always current with my latest kernel release due to GPL obligations. The extra time away has also highlighted some changes I need to make both to the kernel and to my Android modifications when I get back.
Hacre said:
I'm currently on "vacation" from any and all Android development for a week. I'll be back after the weekend, at which time my modifications will be cleaned up and committed to git. The kernel is always current with my latest kernel release due to GPL obligations. The extra time away has also highlighted some changes I need to make both to the kernel and to my Android modifications when I get back.
Click to expand...
Click to collapse
Thanks Ninpo

[Q] Kernel Development for The Sprint Note 2

Hello Guys,
I am a developer of windows apps and I also do some web development stuff. I have also for the last couple of weeks been playing around with the android SDK and building apps for my phone. I have wanted to get into kernel development for my device, but I have had trouble finding a good place to start. I know I can follow the google directions and build a kernel, but that may not be specific to my device.
I was first wondering is there a kernel (Perferably AOSP like Cyanogenmod) that i can compile just get used to the build process. I belive I have already found that, it being this kernel right here:
https://github.com/CyanogenMod/android_kernel_samsung_smdk4412"]https://github.com/CyanogenMod/android_kernel_samsung_smdk4412
(Sorry, Im under ten posts.)
But this is where the confusion starts for me. I see this as a base of a lot of kernels for the note 2, but I notice the kernel is for the Galaxy S3. So in short, is there a good way to start learning how to build and modify android kernels for my Note 2? If so, do you have any recommendations on what kernel to base of of, or any tips or tricks, or etc?
PS: I am a "Newbie" by the forum standards so i can't post in the dev section.
R3liant said:
Hello Guys,
I am a developer of windows apps and I also do some web development stuff. I have also for the last couple of weeks been playing around with the android SDK and building apps for my phone. I have wanted to get into kernel development for my device, but I have had trouble finding a good place to start. I know I can follow the google directions and build a kernel, but that may not be specific to my device.
I was first wondering is there a kernel (Perferably AOSP like Cyanogenmod) that i can compile just get used to the build process. I belive I have already found that, it being this kernel right here:
https://github.com/CyanogenMod/android_kernel_samsung_smdk4412"]https://github.com/CyanogenMod/android_kernel_samsung_smdk4412
(Sorry, Im under ten posts.)
But this is where the confusion starts for me. I see this as a base of a lot of kernels for the note 2, but I notice the kernel is for the Galaxy S3. So in short, is there a good way to start learning how to build and modify android kernels for my Note 2? If so, do you have any recommendations on what kernel to base of of, or any tips or tricks, or etc?
PS: I am a "Newbie" by the forum standards so i can't post in the dev section.
Click to expand...
Click to collapse
You might want to start here http://forum.xda-developers.com/forumdisplay.php?f=1896
Check the Matrix thread, devil kernel and Garwyn's experimental kernel thread. These might give you some ideas
davidh59 said:
You might want to start here http://forum.xda-developers.com/forumdisplay.php?f=1896
Check the Matrix thread, devil kernel and Garwyn's experimental kernel thread. These might give you some ideas
Click to expand...
Click to collapse
Thanks! I have been testing around, but two problems have come up,
I have searched multiple threads and got as many dependencies as I could, but I still needed the toolchain. I got the android NDK, and used this guide:
http://xda-university.com/as-a-developer/getting-started-building-a-kernel-from-source
I used the arm-linux-androideabi- toolchain, is that ok? Even if it is, is there a better or recommended tool chain?
Another problem I had is when compiling the source I got a "error unknown pseudo-op .arch_extension" when it was compiling the devices section of the kernel.
Any thoughts and help would be appreciated.
Cheers,
R3liant

[Q]creating my own rom?

Hi guys- I have seen a website or page on how to build your own rom.
how difficult is it on 1 to 10?- 10 being very difficult.
what tools do I need?
many thanks
Well it depends how you create the rom and what type of ROM you are creating.
If you plan to simply take an already made rom.zip, make a few little modifications, and zip it back up...it obviously isn't very hard, and likewise its not very satisfying.
If you want to compile a rom from source, then its a bit harder than the process above. To be more specific let's first talk about android versions that are officially supported by the desire: froyo, and gingerbread. Compiling roms based on those honestly isn't that hard. You just need some basic Linux/terminal knowledge. The device and kernel source is actually meant to work by default so you don't need to make any further adjustments. It as simple as opening terminal, downloading the source, and running a build command. Give it an hour (more or less depending on how food your PC is) and you should have a freshly made ROM that you built from source. Yay...some satisfaction.
The hardest thing in my opinion (I've tried all three of these) is compiling a rom based on an android version that isn't officially supported by the desire. (Ice cream sandwich or jellybean). With roms based on these android versions you will have to scour to internet for a working device, vendor and kernel tree. (Hint, hint: WoH and evervolv/nikez). Even once you get the right device tree it probably won't work. You will have to make further adjustments, and even then I'm sure you will be bombarded with build errors. But eventually once you get it to compile successfully....most satisfying thing ever
So yea thats my answer. Keep in mind that I've tried (and eventually succeeded) with all three of the above, and that I've got quite limited programming knowledge. (2 high school comp sci courses, where I learned some java.)
Sent using xda-developers app
building your own rom
Chromium_ said:
Well it depends how you create the rom and what type of ROM you are creating.
If you plan to simply take an already made rom.zip, make a few little modifications, and zip it back up...it obviously isn't very hard, and likewise its not very satisfying.
If you want to compile a rom from source, then its a bit harder than the process above. To be more specific let's first talk about android versions that are officially supported by the desire: froyo, and gingerbread. Compiling roms based on those honestly isn't that hard. You just need some basic Linux/terminal knowledge. The device and kernel source is actually meant to work by default so you don't need to make any further adjustments. It as simple as opening terminal, downloading the source, and running a build command. Give it an hour (more or less depending on how food your PC is) and you should have a freshly made ROM that you built from source. Yay...some satisfaction.
The hardest thing in my opinion (I've tried all three of these) is compiling a rom based on an android version that isn't officially supported by the desire. (Ice cream sandwich or jellybean). With roms based on these android versions you will have to scour to internet for a working device, vendor and kernel tree. (Hint, hint: WoH and evervolv/nikez). Even once you get the right device tree it probably won't work. You will have to make further adjustments, and even then I'm sure you will be bombarded with build errors. But eventually once you get it to compile successfully....most satisfying thing ever
So yea thats my answer. Keep in mind that I've tried (and eventually succeeded) with all three of the above, and that I've got quite limited programming knowledge. (2 high school comp sci courses, where I learned some java.)
Sent using xda-developers app
Click to expand...
Click to collapse
Thanks for that-
Sound very complicated
I am a webdesigner but have no knowledge of developing.
Wanted to try and build a really good rom to make the desire a really good phone for photography.
I have on my phone your rom and RSK supersense 3.5 rom running - coz I like the camera
and I would like to make a rom to turn it into a photography rom for my phone.
any advice??
creating your own rom
Chromium_ said:
Well it depends how you create the rom and what type of ROM you are creating.
If you plan to simply take an already made rom.zip, make a few little modifications, and zip it back up...it obviously isn't very hard, and likewise its not very satisfying.
If you want to compile a rom from source, then its a bit harder than the process above. To be more specific let's first talk about android versions that are officially supported by the desire: froyo, and gingerbread. Compiling roms based on those honestly isn't that hard. You just need some basic Linux/terminal knowledge. The device and kernel source is actually meant to work by default so you don't need to make any further adjustments. It as simple as opening terminal, downloading the source, and running a build command. Give it an hour (more or less depending on how food your PC is) and you should have a freshly made ROM that you built from source. Yay...some satisfaction.
The hardest thing in my opinion (I've tried all three of these) is compiling a rom based on an android version that isn't officially supported by the desire. (Ice cream sandwich or jellybean). With roms based on these android versions you will have to scour to internet for a working device, vendor and kernel tree. (Hint, hint: WoH and evervolv/nikez). Even once you get the right device tree it probably won't work. You will have to make further adjustments, and even then I'm sure you will be bombarded with build errors. But eventually once you get it to compile successfully....most satisfying thing ever
So yea thats my answer. Keep in mind that I've tried (and eventually succeeded) with all three of the above, and that I've got quite limited programming knowledge. (2 high school comp sci courses, where I learned some java.)
Sent using xda-developers app
Click to expand...
Click to collapse
htc_desire_luke said:
Thanks for that-
Sound very complicated
I am a webdesigner but have no knowledge of developing.
Wanted to try and build a really good rom to make the desire a really good phone for photography.
I have on my phone your rom and RSK supersense 3.5 rom running - coz I like the camera
and I would like to make a rom to turn it into a photography rom for my phone.
any advice??
Click to expand...
Click to collapse
any software needed ??
htc_desire_luke said:
any software needed ??
Click to expand...
Click to collapse
here is a summary of what you need and main steps, from hd2 forum.. next time do a search before post.
Obviously you have to use a desire device tree.
http://forum.xda-developers.com/showthread.php?t=2488670
There is an entire section dedicated to this subject, found in
creating your own rom
paolo-red1 said:
here is a summary of what you need and main steps, from hd2 forum.. next time do a search before post.
Obviously you have to use a desire device tree.
http://forum.xda-developers.com/showthread.php?t=2488670
Click to expand...
Click to collapse
sound very difficult-
my laptop is running linux and i think 64bits- I am running opensuse 12.1 KDE
but thats all i know
will have to do some more reading on this, I dont think I will be able to just pick it up and go.....
You are kiddin' me
Enviado desde mi HTC Desire
creating your own rom
Jack4L_ said:
You are kiddin' me
Enviado desde mi HTC Desire
Click to expand...
Click to collapse
what do you mean Im kiddin you?

[Q] Building AOSP using Kernel source

Hey people!
I was trying to learn how to build AOSP ROMs for my E8 (also called the M8 Ace and basically a plastic shell version of the M8). I tried that sub as well but people aren't much into development there as of now. But as I understand the sources are in more or less the same format and I really needed to understand where what goes. As you may know, the HTC Dev source zip has two zips inside it - the kernel and the platform archive. I read many guides on how people do this in Sony Xperia devices but I found no help on HTC.
I feel kind of lost right now.. I have uploaded the kernel source for the device on to GitHub: [LINK]
Now, I'm sync-ing the AOSP source (from HERE) to my Ubuntu VM (which is a huge download). What do I do next? Will this be enough to build the ROM or will I need other help as well?
Sorry, I've never really done this before. So, I have some really noobish questions.
Thanks!
Just checking, but you've had a peek at this wealth of knowledge?
http://forum.xda-developers.com/chef-central/android
?

Categories

Resources