Help with cherry picking and making fixes to a ROM (cm13) - AT&T, Rogers, Bell, Telus Samsung Galaxy S III

so I decided to try and make unofficial cm13 builds for d2att, but the network isn't working, and I need help learning how to fix bugs
I feel like I can follow the instructions in this guide: http://forum.xda-developers.com/showthread.php?t=2763236
but I don't know what I should cherry pick to fix the network issue UPDATE: network fixed! / where to look / what to do in general
Here's my development thread:
http://forum.xda-developers.com/galaxy-s3-att/development/rom-unofficial-cm13-d2att-t3280433
Also, how do I use themuppets for the proprietary blobs? For that build, ^^^ I just used the extract-files.sh while running matrixzone's build (linked in my development thread) thanks @jason2678
oh and how do I set the number of threads to use when using the brunch command? All i remember is you type "-j#" or something with # being the number of threads you want to assign I'll just stick to using brunch

For the muppets I add this line to ./.repo/local_manifests/roomservice.xml when I build for this phone:
Code:
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-13.0" />
Do another repo sync after adding that to roomservice and you'll sync all the blobs from TheMuppets. That's probably overkill because it gets you all kinds of other samsung stuff, but if you have hard drive space and bandwidth its dead simple and gets a working build with no fuss. You probably just need d2att, d2-common, msm8960-common, and qcom-common to build for this phone.
I always set j = # cores X 2, but that's just something I read to do somewhere.
And if you haven't done it yet set up ccache unless you have a really awesome machine to build with. Saves you tons of time.
Good luck. :good:

Thanks! You helped me with themuppets but idk where to type the -j# because as soon as I enter
Code:
brunch d2att
The build starts.
and entering
Code:
brunch d2att -j8
gives an error, saying I have an invalid lunch combo
I do remember when I tried compiling slimkat a year ago, the build command was
Code:
make -j# bacon
would that work for compiling cyanogenmod instead of typing in brunch? nope doesn't work What's the difference? lol
Also, I have ccache set to 100GB
thanks so much!
Sent from my SAMSUNG-SGH-I747 using Tapatalk

Arunscape said:
Thanks! You helped me with themuppets but idk where to type the -j# because as soon as I enter
I do remember when I tried compiling slimkat a year ago, the build command was
Code:
make -j# bacon
would that work for compiling cyanogenmod instead of typing in brunch? nope doesn't work What's the difference? lol
Click to expand...
Click to collapse
Bacon is the code name for oneplus one; sorry if you know that and were just giving an example command. That command might be giving errors if you haven't run breakfast for bacon. The syntax looks right. I think this should start a build:
Code:
breakfast d2att
. build/envsetup.sh
make -j# d2att
But I usually just do
Code:
brunch d2att
to kick off a build.
I haven't been messing with this too much lately. This phone isn't my daily driver anymore, and my daughter doesn't take too kindly to when I want to take her phone to flash an experimental build.

jason2678 said:
Bacon is the code name for oneplus one; sorry if you know that and were just giving an example command. That command might be giving errors if you haven't run breakfast for bacon. The syntax looks right. I think this should start a build:
Code:
breakfast d2att
. build/envsetup.sh
make -j# d2att
But I usually just do
Code:
brunch d2att
to kick off a build.
I haven't been messing with this too much lately. This phone isn't my daily driver anymore, and my daughter doesn't take too kindly to when I want to take her phone to flash an experimental build.
Click to expand...
Click to collapse
ohhhhhhh I see that makes sense, so brunch is just a shortcut basically so you can type less I'll try it out and report back myself ^_^

Arunscape said:
ohhhhhhh I see that makes sense, so brunch is just a shortcut basically so you can type less I'll try it out and report back myself ^_^
Click to expand...
Click to collapse
Yeah, and now that I've had a few cups of coffee I think I mislead you on that earlier post. bacon is the codename for the 1+1, but I think it is also CMs shortcut for building the compiled ROM into a flashable zip.
Code:
. build/envsetup.sh
brunch d2att
is the same thing as
Code:
. build/envsetup.sh
breakfast d2att && mka bacon
You're right, it just saves you a little typing. Pretty much every I've fiddled with (Slim, PAC, CM, Chroma) has some shortcut way like that to kick off a build. Sorry about that.

jason2678 said:
Yeah, and now that I've had a few cups of coffee I think I mislead you on that earlier post. bacon is the codename for the 1+1, but I think it is also CMs shortcut for building the compiled ROM into a flashable zip.
Code:
. build/envsetup.sh
brunch d2att
is the same thing as
Code:
. build/envsetup.sh
breakfast d2att && mka bacon
You're right, it just saves you a little typing. Pretty much every I've fiddled with (Slim, PAC, CM, Chroma) has some shortcut way like that to kick off a build. Sorry about that.
Click to expand...
Click to collapse
Yep that code above works, but I still can't specify the amount of threads I want to use.
Example: if I type
Code:
source build/envsetup.sh
breakfast d2att
make -j4 bacon
I get an error
but if I only type
Code:
source build/envsetup.sh
breakfast d2att
make bacon
it works

I think with CM it is recommended to just use brunch or mka. mka is supposed to automatically take advantage of all the threads available. That way you don't have to worry about how many cores, Intel or AMD, is HyperThreading available, etc. You don't even need to specify -j, it should just go to an optimized default for your hardware.
If you use make it might only be using a portion of the power of a modern, multi-core processor.

jason2678 said:
I think with CM it is recommended to just use brunch or mka. mka is supposed to automatically take advantage of all the threads available. That way you don't have to worry about how many cores, Intel or AMD, is HyperThreading available, etc. You don't even need to specify -j, it should just go to an optimized default for your hardware.
If you use make it might only be using a portion of the power of a modern, multi-core processor.
Click to expand...
Click to collapse
oh. I thought mka was a typo lol.
update: I just tried building with mka and it returned an error also. but brunch works fine
I'll just stick to using brunch.

Arunscape said:
oh. I thought mka was a typo lol.
update: I just tried building with mka and it returned an error also. but brunch works fine
Click to expand...
Click to collapse
shows what I now

now I'm wondering how to add/remove apps from the source code so that when I build, certain apps are pre-installed.
Example: removing cyanogenmod's file manager and installing es file explorer
removing trebuchet and replacing it with google now launcher
installing youtube

Related

[Build-along] Building an AOSP Cupcake image and kernel

As an exercise to figure out how all of this works, I'm currently trying to build an AOSP Cupcake image with the stock HTC kernel. From what Lox posted earlier, a lot still didn't work.. and I think this is right in line with issues we're finding overall. It's my starting point, and so I'm posting here about how I'm accomplishing things. Follow along if you'd like and post any issues you come up with.. or if you make it to the next step!
1. Get a stable development environment with the right tools. Ensure you follow all of the information on the Android Source [1] page to make sure you have the right versions of GCC and Java.
2. Follow the instructions here: http://github.com/kiall/cupcake_platform_vendor_htc_hero
Thanks to Lox for his original work on the platform vendor repo, and to kiall for spending time this weekend to help pare the process down to be as easy as possible. The more people we have building stock AOSP builds, the more eyes we have working on the hardware issue. Keep it up guys!
Thanks for the guide was looking for something similar this afternoon
I set same goal for myself, to build a AOSP Cupcake ROM from the source. I have a question, though. What exactly is the purpose of loxK's cupcake_platform_vendor_htc_hero repo? I suspect it has something to do with the boot process since there are some init files..
And thanks for the guide!
Samek said:
I set same goal for myself, to build a AOSP Cupcake ROM from the source. I have a question, though. What exactly is the purpose of loxK's cupcake_platform_vendor_htc_hero repo? I suspect it has something to do with the boot process since there are some init files..
And thanks for the guide!
Click to expand...
Click to collapse
That is the product description that describes the device specific stuff needed to build for the Hero. Like what proprietary files needs to be saved, device specific init files, etc etc.
Would you guys mind deleting your posts above.. so I can have a bit more space to work?
Known Issues
Make fails with "No module defined for the given PRODUCT_POLICY (android.policy_phone)."
Make the following change to build/tools/findleaves.sh: https://review.source.android.com/#patch,sidebyside,9284,1,tools/findleaves.sh
On point 6, I assume you mean BoardConfig.mk and not BuildConfig.mk, right?
Yep, sorry =)
By the way, if you want WLAN, you can compile the driver from the AOSP tree, something like this:
Code:
[email protected]:~/android/src/cupcake/system/wlan/ti/sta_dk_4_0_4_32$ make KERNEL_DIR=~/android/kernel/kernel_hero
~/android/src/cupcake is my AOSP dir.
~/android/kernel/kernel_hero is where my Hero kernel source is.
This drops a wlan.ko in the current dir that you can get into your update package, make sure you get the correct wpa_supplicant startup for it (check from the normal hero rom).
Bluetooth stuff is also in system/bluetooth dir in AOSP tree. I've not messed so much with it, don't use BT myself, but it looks like it's all in there to make it function.
Headset is probably just some keycodes in an XML file, it seems to register like normal keystrokes. There are some h2w_headset (or something like that) files on the release roms, have a look at those.
And also, thanks for this nice clean guide jnwhiteh, my old AOSP build dir was a mess. So this was nice way for me to clean it up and at the same time check your guide
My suggestion is that we keep this thread for discussions regardning it, and maybe keep an actual up to date guide on the wiki, what do you think?
I've forked loxK's vendor stuff on github, and am adding as much of this as I can.. still a WIP
http://github.com/kiall/cupcake_platform_vendor_htc_hero
Hopefully I'll be able to put as much as possible of this in there so we can build with far less steps!
Thanks jnwhiteh
Also ... if anyone wants commit on the repo (esp jnwhiteh!) let me know...
like the progress i see
keep it up you guys, and thanx for the great how-to, will try it out as soon as i got some sparetime
I've got this process down to...
1. Get a stable development environment with the right tools.
2. Create a .repo/local_manifest.xml with the following contents:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="github" fetch="git://github.com/" />
<project path="vendor/htc/hero" name="kiall/cupcake_platform_vendor_htc_hero" revision="refs/heads/master" remote="github" />
</manifest>
3. repo sync
4. cd build && git cherry-pick 1e0847c2fcbe1b95464f32a719d2b9e620d1e6ec && git cherry-pick 6ea3b8856d656752c0310ca237ed99e7451be83b && cd ../system/core/ && git cherry-pick 2a63bb7abf1b27a7a2e8fd5951d77f71a2f290d4 && cd ../..
5. cd vendor/htc/hero/ && ./extract-files.sh && cd ../..
6. Download a recovery image from here and save it as recovery.img (I'll likely remove this part..)
7. make -j4 otapackage
8. .. Apply the update.zip generated ... no changes necessary
I'll update the github repo with this in a bit
I've pushed my changes to http://github.com/kiall/cupcake_platform_vendor_htc_hero
There is an updated readme / instructions at that page!
Right now - this is 99.9% jnwhiteh's stuff, just slightly more "automated"..
Thanks jnwhiteh!
Great work guys. At least some other guys to work on Hero developpement.
May I suggest a central git repo ? I can add you as collaborators to my git if you wish so you could submit your own patches with your names.
Yep, that would work for me, we'll see what kiall wants to do =)
jnwhiteh said:
Yep, that would work for me, we'll see what kiall wants to do =)
Click to expand...
Click to collapse
works for me aswell - only thing is, I've got *loads* of changes in my fork.. its git after all... we can pull and push each others changes pretty easy!
So, the issues that we're having:
Headphone:
Everything appears to start fine and the hardware/software properly detects the plugging in and unplugging of headphones, but it doesn't actually change the sound output. It says, instead, that it's ignoring the switch:
Camera:
Force close on the camera application
Bluetooth:
SIGSEGV
Trackball
Does not work
Actually, the issue with the headphone isn't due to some missing parts in your builds : http://code.google.com/p/android/issues/detail?id=2534
That's using the HTC heaphone_adapter_, which we don't have on the Hero. We can certainly try to patch AOSP and check it.. but the G1 uses an external usb adapter, and that's whats been reported as broken. One person there says they have a Sprint HTC Hero, but again...
Thanks!
Oups, I had no idea that an adapter was needed on some HTC device, my bad...
Np =) It still might be related, but I doubt it.

[KERNEL][HOWTO] E4GT Community Kernel - Updated: 2/26/2012

See second post for changes.
My phone has a nicely corrupted bit of memory right where my data partition is supposed to be so I can't really test any changes on kernels at the moment. Once my replacement gets here, I have quite a few changes to test and then push. Hopefully others are haveing some good luck with there own kernels.
This first post is going to look a little rough until I take the time to pretty it up, but I figured I would get at least this up and let it evolve from there. I know I gloss over some stuff(what the hell is a defconfig, you ask?) but I will flesh this out over the next few days (Years, really. Damn contracts)
Project Goals:
Provide a standard base and scripts for building kernels for the E4GT.
Attempt to provide reasonable documentation of the build/debug/pray-for-success process so that those that wish to learn, can.
What is included in the current base:
Completely Stock EL29 Kernel
initramfs for Samsung based ROMs with ClockworkMod and root
Codesourcery 2009q3-68 toolchain
Base for creating a ClockworkMod flashable kernel
Build script to tie it all together
Getting started:
Install Ubuntu or Linux distro of your choice. This guide is written for Ubuntu as that seems to be the most common choice for Android Development.
Install required packages
Install Oracle Java JDK, setup the Android SDK, and install other required packages from terminal.
For 32-bit installs:
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
and 64-bit:
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib
Download base
In terminal emulator, go to the directory you'd like to download to and type:
Code:
git clone git://github.com/SweetwaterBurns/xda-base.git
Pick a branch. Currently available are powersave, performance and master(all identical until things start moving forward a bit, I intend to keep master updated with the latest stock kernal) and select it with
Code:
git checkout powersaveorwhateverbranchnameyouactuallywantipromisetonotactuallymakeabranchthatisquitethisridiculousmaybe
Profit!
In a terminal emulator, change to the xda-base directory and type
Code:
./build.sh
and wait... congratulations you've just compiled your own kernel.
But wait there's more The build script will let you build with more then just the included source and toolchains. The basic format is ./build.sh kernel initramfs defconfig toolchain. All you have to do is copy the files into the appropriate directories and you're good to go.
So, if for example you wanted to build an EK02 kernel using Team Rogue's initramfs, the Linaro 11.12 toolchain and your perfect_defconfig, you would copy the source to xda-base/kernels/EK02, place the initramfs in xda-base/initramfs/rogue, and the toolchain to xda-base/toolchain/linaro. Place perfect_defconfig into EK02/arch/arm/configs/ and type the following command from the xda-base directory:
Code:
./build.sh EK02 rogue perfect linaro
The flashable zip is saved in xda-base using the defconfig, date and time in order to keep your files somewhat organized. I'm going to add kernel version to that in my next update, as well.
The base is essentially a snapshot of where we are at this stage of development and hopefully the community can help us improve it. Everything seems to be working, but if you come across any bugs/fixes, please share.
If you'd like you propose any changes, submit a request via git and I'll add them to the repo if it makes sense.
I'm typing a lot of this up from memory so please forgive any mistakes or omissions. If you find any let me know and I will update ASAP. If it seems confusing, let me know where clarification is needed. My goal is to figure this stuff out and help others while doing it. Any criticism will be taken constructively and I hope this helps spawn few more talented devs for the E4GT.
Known Issues:
Don't choose reboot to recovery after flashing Blazer 3.9(possibly others) I was able to reproduce this on Team Rogue's el29 repack as well.
I didn't realize that git doesn't push empty directories which caused issues with modules not being copied in to the initramfs. I'm going to fix by adding a check to create the files if necessary into the build script. in the meantime, just create initramfs/initramfsroot/lib/modules and remember to make sure that the directories are in any alternate recoveries you use.
Changelog:
2/26/2012
Added a quick howto on working with git and submitting pull requests to post #4. As soon as new phone gets here, I'll be uploading some new changes to performance.
2/13/2012
All right.
There are now branches for powersave, performance, and stock. Once you have cloned the repo you can select which one to use by typing
Code:
git checkout powersave
or whatever. The only difference between the repos at the moment is that I renamed the kernel source directory to match the branch name and edited the build.sh to build the respective variants by default. If anyone has any requests for other branches, let me know.
I also added a check to the build.sh to ensure that there is a lib/module directory in the initramfs that modules can be copied into.
Proposals:
I'm thinking about setting up a few different branches for the kernels. One for the latest clean stock kernel, one for those who would like to focus on performance, one for those that are more worried about battery, and possibly a bleeding edge kitchen sink kernel. More than I can handle myself, honestly, but if those of you that are already making modifications start pushing it should be doable.
Done
How to use git and submit pull requests on github.
If you haven't already, create an account on github Navigate to the xda-base repo and click fork in the upper right.
In a terminal emulator, go to the directory you would like to store your source in and clone your new fork with
Code:
git clone [email protected]:USERNAME/xda-base.git
git remote add upstream git://github.com/SweetwaterBurns/xda-base.git
The second part adds the original repository as an upstream source so that you can keep your code base updated with any changes.
Probably one of the most useful tools available is branches, essentially if you would like to add or change a feature, you would create a branch for working on it. Having it contained with in it's own branch is good for several reasons. It makes it easier to find any changes that you made without pulling in any extra cruft from other things you might be working on and helps prevent any conflicts that might arrise from working on too many things at once with in the same source tree.
Branches can be created locally with
git branch BRANCHNAME
For example, if you wanted to branch the performance kernel you would
Code:
git checkout performance
git branch performance-FEATURE
git checkout performance-FEATURE
This creates a local branch that you can work with, if you would like to push it to github for others to work on or to use it to submit a pull request:
Code:
git push origin BRANCHNAME
Branches can be deleted locally and remotely with
Code:
git branch -d BRANCHNAME
git push origin :BRANCHNAME
Make any changes you'd like and tell git which files you've changed with
Code:
git add CHANGED FILES HERE
Then commit those changes with
Code:
git commit -m 'Description of changes here'
If you would like to submit a pull request upstream, first fetch upstream and merge it with your work to make sure that any changes that have already been pulled don't conflict with your changes and that it can be merged cleanly. Use whatever branch you used as your base for the merge, i.e. for changes you'd like to submit to the performance branch
Code:
git fetch upstream
git merge upstream/performance
This will spit out any conflicts that need fixed and you can repeat the process until it merges clean.
Push your branch to github and navigate to it's page. Github has a pretty good write-up on sending pull requests and the process is really pretty simple.
Any questions, ask away.Any errors, let me know.
To Do:
Show how to add a remote repository and use it to port features using 'git cherry-pick' or whatever.
and one more for whatever else we might need.
Good job! Looking forward to see what comes from this. Good to see a forum to learn from.
Sent from the future
thatdudepoops said:
Good job! Looking forward to see what comes from this. Good to see a forum to learn from.
Sent from the future
Click to expand...
Click to collapse
Couldn't agree more! Thanks. I am eager to step things up myself. I am glad that this thread was started. Thanks OP.
Sent from my SPH-D710 using xda premium
This looks very interesting. Definitely will be watching this thread. Thanks.
Sent via EM waves.
nice work sir! Can't wait to see where this goes from here.
Sent from my SPH-D710 using Tapatalk
Well, I guess my first request is how to add boot animation support to a kernel? Is it as simple as adding the lines to the init.rc?
dtm_stretch said:
Well, I guess my first request is how to add boot animation support to a kernel? Is it as simple as adding the lines to the init.rc?
Click to expand...
Click to collapse
I think the init.rc file I uploaded has it in it.
Give it a try.
agat63 said:
I think the init.rc file I uploaded has it in it.
Give it a try.
Click to expand...
Click to collapse
Oh yeah, duh! I got it, I just didn't name the bootanimation.zip to sanim.zip
dtm_stretch said:
Oh yeah, duh! I got it, I just didn't name the bootanimation.zip to sanim.zip
Click to expand...
Click to collapse
I can either add a line to the init.rc to soft link bootanimation.zip to sanim.zip or put it in the CWM update script. I'm leaning towards the update script as it really should only need to be done once.
Also, be prepared for issues flashing Blazer 3.9 the flash didn't quite take when I tried it this morning.
SweetwaterBurns said:
links to outside resources or maybe a picture of a unicorn that my daughter drew
Click to expand...
Click to collapse
I can't wait.... to see that unicorn
njudell said:
SO, there's a great thread in the developer's section: [KERNEL][HOWTO] E4GT Community Kernel - 2/12/2012
Really nice job. I've built & flashed the kernel. BUT, the WIFI won't turn on, and 3G data won't flow, even though it shows 3G connectivity (Sprint Epic 4G Touch, rooted to L29 with CWM earlier...). Anybody have a clue what I may have messed up? Just ran the straight defaults, figuring that would get me into the least amount of trouble. One diagnostic: there was a number of segment mismatch warnings - I've had those in embedded kernels in the past, and they're usually not meaningful. Maybe this time is different?
Click to expand...
Click to collapse
Sent from my SPH-D710 using xda premium
This guy could not post in Dev
Sent from my SPH-D710 using xda premium
He can PM me and we can try to go over his settings to see what's wrong.
his reply
"Okay, found the problem, and I feel very slightly less stupid. Watching the build go by, I noticed diagnostics that the script was unable to copy the driver modules to the temporary initramfs lib/modules directory. In reading the script, I saw that the build.sh was wiping the temporary initramfs lib directory. SO I added a couple of lines to the build.sh script (the middle two lines are mine):
#Find all compiled modules and copy them for the final build
mkdir $INITRAMFS_TMP/lib
mkdir $INITRAMFS_TMP/lib/modules
find -name '*.ko' -exec cp -av {} $INITRAMFS_TMP/lib/modules/ \;
Which allows the script to copy the loadable modules, and POOF! Now I've got WIFI and such...
The script in the git repository should either get modified, or some additional tests on running the script implemented. One of my thoughts was that having dash as the shell script might be causing problems (I've had that before) - but that wasn't the problem.
-neil
A) Yes, this should be posted in the thread, but I can't because I'm a newbie
B) Therefore, this should heavily count as one of my 10 required posts to get there."
"he doesnt have 10 post so i posted here for him " his thread is in q & a if you want to reply to him
Just built a custom PC, might check this out and see how little I know about the linux world. But you gots to start somewhere right?
xlGmanlx said:
Just built a custom PC, might check this out and see how little I know about the linux world. But you gots to start somewhere right?
Click to expand...
Click to collapse
Its all about the desire to learn. Some start with theming. Then there are those that make ROMs but don't necessarily know how to make a kernel. There's a lot to learn. Its all about having the will and time to do it. The more development the better imo
Sent from my SPH-D710 using xda premium
xlGmanlx said:
Just built a custom PC, might check this out and see how little I know about the linux world. But you gots to start somewhere right?
Click to expand...
Click to collapse
Yup, just compiled my first fully working kernel yesterday.
Already overclocked it to 1.6 with extra added cpu steps for lower clock speeds...
Just tried adding and defaulting bfq scheduler but the jf4s module wouldn't compile after wards for some reason..
Ill figure it out eventually.. Right now im adding smartass / v2 see if it works...
EDIT: That didn't work either hmmmmm... Anyone know why when you edit the c1_rev5 config file the j4fs module doesn't compile?

How to build an AOSP Kernel?

So I pretty much would like to start building my own kernels and Roms from AOSP, but not sure where to start. I have downloaded the SDK already, and started downloaded some file with git and these commands:
git clone https://android.googlesource.com/kernel/omap
cd omap
git checkout origin/android-omap-tuna-3.0-mr0
but the guides I've been reading don't offer much more help. And then there is a toolchain of some sort? I can get my way around linux fairly well and have built my own kernels about a year and a half ago for my Vibrant, but took a completely different course.
Was wondering if someone could point me in the right direction, thanks!
You're on the right track. Use Linux ubuntu, install all the packages, the Android tool chain, then just clone the aokp kernel like you showed. But you had the wrong repo link. Go to team kangs github page, go to the nexus kernel, then at the top will be their git link in a box.
Git clone "link"
Then just run the make command in terminal. Make sure you navigated yo the downloaded kernel folder.
RogerPodacter said:
You're on the right track. Use Linux ubuntu, install all the packages, the Android tool chain, then just clone the aokp kernel like you showed. But you had the wrong repo link. Go to team kangs github page, go to the nexus kernel, then at the top will be their git link in a box.
Git clone "link"
Then just run the make command in terminal. Make sure you navigated yo the downloaded kernel folder.
Click to expand...
Click to collapse
Thanks a lot, will try that. The link on their page is AOSP?
Sent from my Galaxy Nexus using XDA
The guy is asking us on how to clone AOSP tuna kernel tree, and you tell him to clone teamKang kernel project?
@op, no, you dont have the incorrect url. Clone from there, then checkout branch android-omap-3.0.
Type:
'make tuna_defconfig'
'make -j4'
You'll then have a zimage in arch/arm/boot, which you'll need to merge with a compatible ramdisk (either by fastboot or manually).
sent from my i9250
bk201doesntexist said:
The guy is asking us on how to clone AOSP tuna kernel tree, and you tell him to clone teamKang kernel project?
@op, no, you dont have the incorrect url. Clone from there, then checkout branch android-omap-3.0.
Type:
'make tuna_defconfig'
'make -j4'
You'll then have a zimage in arch/arm/boot, which you'll need to merge with a compatible ramdisk (either by fastboot or manually).
sent from my i9250
Click to expand...
Click to collapse
Sweet will continue with these steps and look onto the merge
Sent from my Galaxy Nexus using XDA
bk201doesntexist said:
The guy is asking us on how to clone AOSP tuna kernel tree, and you tell him to clone teamKang kernel project?
@op, no, you dont have the incorrect url. Clone from there, then checkout branch android-omap-3.0.
Type:
'make tuna_defconfig'
'make -j4'
You'll then have a zimage in arch/arm/boot, which you'll need to merge with a compatible ramdisk (either by fastboot or manually).
sent from my i9250
Click to expand...
Click to collapse
Oh holy crap haha I completely thought he asked about aokp kernel, my bad I didn't read.
AOSP kernel for HTC Explorer/Pico
Can you tell me how to build aosp kernel for htc explorer?
monishvster said:
Can you tell me how to build aosp kernel for htc explorer?
Click to expand...
Click to collapse
Just do the same thing, but instead sync the htc kernel rather than the nexus. Go search and find out if source code has been released for that phone.
Then just run the make command.
Somebody call 911, we've been hijacked
Note: 'make tuna_defconfig' is for maguro, i dont know what is the name of default config file for the htc, why should we? User should refer to htc explorer subforum @xda or to kernel documentation.
Sent from my i9250

[ROM][AOSPA][DIY][GUIDE] How to build Paranoid Android for Endeavoru

This is DIY
If you are just looking for a well done and stable PA download, you are probably the wrong place. Then go and grab xzzz9097s build, it's good!
If you are impatient and know what to do, just leave and do the init/sync/build.
For anyone wanting to build her/his own PA without any "extras", go ahead and read on.
We already have a very easy full guide to compile CM10 for HOX. I was looking for the same for ParanoidAndroid, but did not find a 100% guide, meaning I had to do it myself.
To be fair, I only needed to do 1% as you will see after the usual disclaimer. I hope this little guide will be enough to make anyone complile their own PA for the HOX.
The usual disclaimer:
I am no developer!
I just happen to be able to read and understand instructions. I am persistent and know how to search for answers.
With luck and patience I ended up with a 184MB zip, that installs and runs just fine on my HOX.
I pass this guide as it is now, no guarantee no returns. I will probably not be able to help much here, time is very limited, so no commitments for support from me.
If it breaks you device, you broke it all by yourself
I am no developer!
gokussjx made the general guide, explaining how to port Paranoid Android 3.xx to different devices.
It works 99% for Endeavoru. The last 1% takes some effort to get right.
For me, not knowing what I am doing, it took a lot of trial and error, but eventually, - I made it and might as well pass it on here.
I'm in debt to all the people helping out in that thread. Huge thanks!
To get started, just follow a few simple steps:
You need a linux setup.
Install as your main system or run it in windows with VirtualBox.
Most guides are expecting Ubuntu. I use Mint Debian 64, which is just perfect for this job (and everything else ).
For VirtualBox you need at least a 50GB virtual-drive. Add 16GB if you will use ccache. I have build PA with a 52GB VBox in Win7.
It was just enough to compile, but had no room for ccache!
Compile time (VBox) on EliteBook 8540w (i7) was 120min. Not too bad, considering my old DeskTop need close to 4 hours on pure Linux.
Expect to download 8GB of source. Add 18GB for building to the "out" folder.
Enough statistics now, let's get started.
Follow gokussjx guide to setup linux for PA compiling.
Follow only these steps:
# Install OpenSSL, for Python
# Install Dependencies
# Configure USB
# JAVA JDK Installation
# Python Installation (just pick option 1)
# Android SDK
Click to expand...
Click to collapse
Exit gokussjx guide and continue here:
Download your favorite arm toolchain:
I found mine here.
Just extract the archive to any folder with user access, later you will point the build system to the /bin folder of the toolchain.
Install CCACHE:
Code:
$ sudo apt-get install ccache
Activate it in .bashrc:
Code:
# use ccache
export USE_CCACHE=1
You can change max-cache size, 16G should be enough for this build.
From terminal:
Code:
$ ccache -M 16G
Install Repo:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Download the build manifest:
Code:
$ mkdir -p padroid/system
$ cd padroid/system
$ repo init -u git://github.com/teemodk/manifest.git -b padroid
Get the source!
Code:
$ repo sync -j16
Find this section in "build/envsetup.sh" update with your favorite arm toolchain:
Code:
case $ARCH in
x86) toolchaindir=x86/i686-linux-android-$targetgccversion/bin
;;
arm) toolchaindir=[B]~/toolchain/linaro4.8/bin[/B]
;;
mips) toolchaindir=mips/mipsel-linux-android-$targetgccversion/bin
;;
Go!
Code:
$ ./rom-build.sh endeavoru
Thats all. If it went well, get your new ROM in "out/target/product/endeavoru"
Don't forget the gApps.
Credits go to
PA:molesarecoming, D4rKn3sSyS for the awesome hybrid magic. All PA contributors. gokussjx for the mother of all PA guides. All the helpful people here, that use their time to help.
CM(aosp):thöemy,gorbi16,tbalden,(pabx) and all the unknown soldiers contributing to CM
Everyone I forgot.​
Differencies from the official guide.
The official PA manifest is put together in a way, so you can easily build and maintain multiple devices with only one manifest.
It works by adding and removing device specific code with local manifests under the "vendor/pa" folder.
However, I am only compiling for OneX, so I found it easier to add/remove stuff directly in the main manifest.
The downside to this is, that you have to manually maintain the manifest everytime you want to sync with PA. Place for improvement
All changes in STEP 2 of the official guide, is already done if using my guide with padroid manifest.
In vendor/pa these steps are done:
Code:
* Create [URL="https://github.com/teemodk/padroid_vendor_pa/blob/padroid/manifests/endeavoru.adds"]/manifest/<device>.adds[][/URL]
* Create [URL="https://github.com/teemodk/padroid_vendor_pa/blob/padroid/manifests/endeavoru.removes"]/manifest/<device>.removes[/URL]
* Create [URL="https://github.com/teemodk/padroid_vendor_pa/blob/padroid/prebuilt/pa_endeavoru.conf"]/prebuilt/pa_<device>.conf[/URL]
* Create [URL="https://github.com/teemodk/padroid_vendor_pa/blob/padroid/products/pa_endeavoru.mk"]/products/pa_<device>.mk[/URL]
* Add device makefile entry to [URL="https://github.com/teemodk/padroid_vendor_pa/blob/padroid/products/AndroidProducts.mk"]/products/AndroidProducts.mk[/URL]
* Create [URL="https://github.com/teemodk/padroid_vendor_pa/tree/padroid/vendorprops"]/vendorprops/<device>.proprietaries[/URL]
* Add device lunch menu entry to [URL="https://github.com/teemodk/padroid_vendor_pa/blob/padroid/vendorsetup.sh"]/vendorsetup.sh[/URL]
Furthermore, I temporarily moved the CM adds/removes from "vendor/pa/manifests" to .repo/manifest.xml.
I am sure there are better ways to handle git/repo/manifest etc., but this works well for me for now. Open for suggestions though.
Problem Solving
If (when) you run into problems, go to the official guide and find the answer. Most, if not all, errors is already answered there. If not, ask.
But first make a serious effort to find the error yourself. Read some good advice about finding the error.
As a rule of thumb: The build system tells you where to find the error! Something is missing, something is duplicated or somthing is just wrong. It's all in the log, running up your screen when compiling.​
Build 25.Oct.2013
http://d-h.st/XRt
Nice, I'm always eager to learn this stuff .
Thanks!
ROM uploaded to post 3.
teemo said:
ROM uploaded to post 3.
Click to expand...
Click to collapse
Thank you so much Teemo, for providing the guide and the rom.
Just a Q: is this stock ParanoidAndroid rom (stock kernel?) ?
Thanks again for your work :good:
Mat08.cc said:
Thank you so much Teemo, for providing the guide and the rom.
Just a Q: is this stock ParanoidAndroid rom (stock kernel?) ?
Thanks again for your work :good:
Click to expand...
Click to collapse
The ROM is as close to stock as it get for OneX. It is really a mix of CyanogenMod and ParanoidAndroid. I follow the official build guide from PA-team.
The kernel is from same source as CM.
You can see everything in the manifest.
@teemo
your build is running fast and stable, congratulations! maybe you can keep updating this .. I appreciate it and I'm sure many other people would be of the same opinion
Sry,wrong threat....
Gesendet von meinem EndeavorU mit Tapatalk
Hi @teemo I was trying to build my own rom using a different source.
I'm pretty sure I've done things right except that when i start my build it ends up after few seconds saying: "Kernel source found, but no configuration was defined. Please add the TARGET_KERNEL_CONFIG variable to your BoardConfig.mk file"
I checked my BoardConfig.mk file and what I've got is TARGET_KERNEL_CONFIG := cyanogenmod_endeavoru_defconfig
I thought you may know how to help me with this!
Other infos: I'm tryn to build paranoidandroid 4.0 and i'm using cyanogenmod files for the endeavoru since i know aospa is cyanogenmod based right?
Hope you can help me :fingers-crossed:
Mat08.cc said:
Hi @teemo I was trying to build my own rom using a different source.
I'm pretty sure I've done things right except that when i start my build it ends up after few seconds saying: "Kernel source found, but no configuration was defined. Please add the TARGET_KERNEL_CONFIG variable to your BoardConfig.mk file"
I checked my BoardConfig.mk file and what I've got is TARGET_KERNEL_CONFIG := cyanogenmod_endeavoru_defconfig
I thought you may know how to help me with this!
Other infos: I'm tryn to build paranoidandroid 4.0 and i'm using cyanogenmod files for the endeavoru since i know aospa is cyanogenmod based right?
Hope you can help me :fingers-crossed:
Click to expand...
Click to collapse
Hi, I don't know what it takes to build ParanoidAndroid 4
But maybe you can ask in the Paranoid guide.
Or you can ask here for all other builds.
EDIT: Btw, to build PA4 or any other KitKat, you need the new sources for OneX (device+vendor+kernel). This guide will not work for KitKat.
teemo said:
Hi, I don't know what it takes to build ParanoidAndroid 4
But maybe you can ask in the Paranoid guide.
Or you can ask here for all other builds.
EDIT: Btw, to build PA4 or any other KitKat, you need the new sources for OneX (device+vendor+kernel). This guide will not work for KitKat.
Click to expand...
Click to collapse
I used the new sources but that was the result! I'll start from zero again to see if I missed something Thanks for the reply always really kind!
Mat08.cc said:
I used the new sources but that was the result! I'll start from zero again to see if I missed something Thanks for the reply always really kind!
Click to expand...
Click to collapse
the aospa dev build the aospa kitkat version...so a few days waiting and it will be there
One-X-master said:
the aospa dev build the aospa kitkat version...so a few days waiting and it will be there
Click to expand...
Click to collapse
Yeah I thought so! But I would love to learn! I have always looked to devs as to extraordinary people, understanding what makes them such would be great
Hey @teemo , sorry to bother you, but could you make an update build of PA? I don't have a stable connection, can't make a build of the new PA.. :/
Thanks man, take care
LuisDias said:
Hey @teemo , sorry to bother you, but could you make an update build of PA? I don't have a stable connection, can't make a build of the new PA.. :/
Thanks man, take care
Click to expand...
Click to collapse
All credits to @audahadi https://drive.google.com/folderview?id=0B-KjFDQ914F4dVdQLU9nT3VkMGc&usp=sharing
bosas200 said:
All credits to @audahadi https://drive.google.com/folderview?id=0B-KjFDQ914F4dVdQLU9nT3VkMGc&usp=sharing
Click to expand...
Click to collapse
Thanks brotha
teemo said:
Build 25.Oct.2013
http://d-h.st/XRt
Click to expand...
Click to collapse
Any chance helping me build AOSB with newer cm 11 base?
As no instructions anywhere on building AOSB from source. Source is
https://github.com/AOSB?page=1
Many thanks

DEV's build's Q&A discussion board

As the title says. This board is created for questions and answers pertaining to getting new ROM's and ports for our P9000.
THIS IS NOT A BUG REPORT DISCUSSION.
New Development only.
If you would like to see a new ROM for the P9000? Build it, and share it. Check out some of the guides, then ask some questions on building it.
I will be staying with Mediatek devices for the long term and encourage more people like me to start bringing some development love to them.
Thank you
Some useful guides.
https://www.youtube.com/watch?v=aF--LQDgg1M
http://source.android.com/source/initializing.html
Any guides to add? I'll be glad to add them.
Credits:
@Deepflex (Active) Vendor, Device, Kernel sources
@Jonny (Active) TWRP and multiple additions to Kernel source
@skeleton1911 (Active) Stock based ROM's
@leskal (ACTIVE) device and kernel commits
Please let me know of any credits I'm missing.
Have been working on CandyRom6. Been getting a lunch error in line 234. Not quite sure how to get lunch to point to the correct mk file. candy/device/elephone/p9000/candy.mk. Any suggestions?
syncing AOKP MM. I enjoyed this rom in my samsung days.
something interesting to try for automating builds.
http://forum.xda-developers.com/chef-central/android/guide-tool-projekt-scribt-v1-33-t3503018
electrofryed said:
Have been working on CandyRom6. Been getting a lunch error in line 234. Not quite sure how to get lunch to point to the correct mk file. candy/device/elephone/p9000/candy.mk. Any suggestions?
Click to expand...
Click to collapse
Check the .mk files in the root of your device tree, I'm guessing you need to rename a reference in one of them from something like 'cm.mk' to 'candy.mk'
So far I've modified /AndroidProducts.mk cm.mk vendorsetup.sh I think I'm missing a file to modify. Just not sure which one. Unfortunately, since I didn't make a copy of the original Candy directory, I'll need to resync to get rid of my Troubleshooting changes. Good lesson. After each sync, make sure you make a backup of the original in case you forget the modifications you've made. Lol
I think I figured it out. My product name didn't match the vendorsetup.sh
Update: Nope. That didn't work. I've attached a screenshot of the changes I've made in case anyone wants to chime in.
Thank you
What lunch command are you using?
Jonny said:
What lunch command are you using?
Click to expand...
Click to collapse
I just used lunch to check the build. I used brunch for AOKP and it seems to be working at the moment. I'm going to re sync candy and start from scratch next weekend. I noticed when using lunch in AOKP, it used my git which wasn't setup when building candy.
electrofryed said:
I just used lunch to check the build. I used brunch for AOKP and it seems to be working at the moment. I'm going to re sync candy and start from scratch next weekend. I noticed when using lunch in AOKP, it used my git which wasn't setup when building candy.
Click to expand...
Click to collapse
I recomend the brunch command as on official build guide of cm
Yeah. I tried brunch and "rainbowfarts" (recommended by AOKP. Lol. It stops when calling for maven 1.6 (I'm on 2.10). I think I need to find the file that will link my builds to my build environment path.
leskal said:
I recomend the brunch command as on official build guide of cm
Click to expand...
Click to collapse
BTW. Glad to see you here. I've seen your work on git and wanted to credit you.
electrofryed said:
BTW. Glad to see you here. I've seen your work on git and wanted to credit you.
Click to expand...
Click to collapse
Nice, also check this guide: https://wiki.cyanogenmod.org/w/Build_for_huashan#Install_the_Build_Packages
Maybe you will fix the prob with the "brunch" command
leskal said:
Nice, also check this guide: https://wiki.cyanogenmod.org/w/Build_for_huashan#Install_the_Build_Packages
Maybe you will fix the prob with the "brunch" command
Click to expand...
Click to collapse
Great guide!! I see a few big differences between this guide and some of the others. The biggest is the method of getting java 7 for 16.04. I've been using Oracle and open Java 8 the whole time.
Update. I got past the initial halts in the AOKP build. When it finishes, I will be testing. (in the morning EST)
Update: spoke too soon. Kernel compiling issues. Another hurdle. Ugh
Hello,
i started my first build-experience with downloading the cm13 sources and the p9000 sources form deepflex. Since yesterday i have an successful build cm_p9000-ota.zip package but after installation it ends in an bootloop!! I have no idea where to start searching for the mistake... I get no error massage while installing it.
Could someone give me a hint?
electrofryed said:
Update. I got past the initial halts in the AOKP build. When it finishes, I will be testing. (in the morning EST)
Update: spoke too soon. Kernel compiling issues. Another hurdle. Ugh
Click to expand...
Click to collapse
You need to fix includes when building out of mtk build chain, or use other sources that already have this done
OK, i get it running!
But, is their a reason why "/android_device_elephone_p9000/mediatek_driver_nl80211.h" is missing in the repo? Sorry, but i am totally new and trying to understand how these builds work and what exactly is needed to build a bugles ROM.

Categories

Resources