yashsingh1/xdaforums huggingface dataset:
[T-Mobile Samsung Galaxy S II SGH-T989] wizkidj:
Great job Kener. This is the kind of stuff that keeps the Devs and flashers here.

sent from my xylonified phone....
[T-Mobile Samsung Galaxy S II SGH-T989] Cl3Kener:
Hey Everyone!

Well I have been getting great feedback/ideas for this manual. I plan on making a second edition here in the near future. I've noticed Jelly Bam is already out of date and some of the others will go out of date with the ushering in of 4.3. Due to the many changes that are occuring, I will probably just ride the wave for the next week or two and update the manual once everyone is building 4.3. Hope that is okay with everyone!

Currently I am only planning on updating the building guides to 4.3 and adding LiquidSmooth and Thinking Bridge. I also think I'm going to teach you how to customize your build outputs so that the can say whatever you want. I'll also teach you how to add init.d tweaks and build.prop tweaks as well. :) Don't forget let me know which ideas you have ASAP so I can incorporate them into the 2nd Edition. :)

Cheers!

Cl3Kener
[T-Mobile Samsung Galaxy S II SGH-T989] hatememarkz:
Can we get a dual boot kernel please an can please make a linaro dirty unicorns

watching dirty unicorn porn
[T-Mobile Samsung Galaxy S II SGH-T989] JesusWazBlack:
Nice! More reading material for me. I actually enjoyed reading you're first edition and I even built my own cm build
[T-Mobile Samsung Galaxy S II SGH-T989] Florendroid:
Good idea !! I'd be interested in building ROM which does not support the hercules. I believe it's the case for both LiquidSmooth and ThinkingBridge. so go for it man !! Thanks for your devotion. :good:
[T-Mobile Samsung Galaxy S II SGH-T989] Cl3Kener:
Hey Everyone,

I finally hashed out an updated rough draft of my second edition. I've updated the build guides and I've added another chapter with more info on how to customize your ROM. It's pretty basic but it does show once again that ROM building isn't all that hard. Here is the link https://docs.google.com/file/d/0B0etHDZ0uDPhV0FtbkVjZW83WGM/edit?usp=sharing

Let me know what you think!

Cheers!

Cl3Kener

Edit: I also failed to mention that I've updated a few pictures and changed things in almost every chapter so you might want to skim them too and see if you detect any errors
[T-Mobile Samsung Galaxy S II SGH-T989] jeremyo83:
Very interested in looking through this, [MENTION=5105835]Cl3Kener[/MENTION]. No idea if I'll ever get to building or not, but I have a hunch this will give me a much better understanding of how things work under the hood and make my life as a flasher easier. Who knows, I might even try my hand at building. Work like this really encourages participation in development. Thanks for your effort. (and your ROMs, of course:cyclops:)
[T-Mobile Samsung Galaxy S II SGH-T989] Florendroid:
Thanks Cl3kener.

I wish I knew all that before starting Slim Halo because now my github looks like crap as I thought I needed to commit -m 'fix this' / commit -m 'fix that' everytime I was trying to fix build errors lol :p

Cheers man, looking forward to the next edition ;)
[T-Mobile Samsung Galaxy S II SGH-T989] Cl3Kener:
Op has been updated!

Now you have all of my 4.3 building guides. I also have that added chapter about building your own ROM. Thanks for those of you who found some typos. I read through and actually found a few more things I wanted to fix so I think it should be close to perfect. Anyhow, I hope you find this updated manual useful! :D If there is anything else you'd like me to cover in the next edition (which I plan on making for 4.4 Kit Kat, assuming our device gets updated by CM) make sure to post in this thread!

Cheers!

Cl3Kener
[T-Mobile Samsung Galaxy S II SGH-T989] bmg002:
I feel kinda silly asking this question, but are the steps for setting this up on an x86 system (ie 32-bit) similar to setting it up on a x64 system (with the exception of a few libraries needing to be forced to the x86 versions instead of the 32-bit specific ones on x64 systems)? I mean like lib32bz2-dev gets changed to libbz2-dev for example, but is it a lot of work getting this working on an x86 system? I don't want to try to get everything set up only to have it brick my phone because I'm not running a 64-bit system...
[T-Mobile Samsung Galaxy S II SGH-T989] Cl3Kener:
Anything 4.x requires that you use a 64-bit Debian based system. Gingerbread was the last one that was built on 32 bit. (At least that is what I've heard) If you have an older processor that doesn't support anything but 32 bit then buy a new computer because I seriously doubt you can get it to work on a 32 bit system..... While you're at it, make sure it has a solid state hard drive. I'm building ROMs in like 50 minutes now that I have a solid state :)
[T-Mobile Samsung Galaxy S II SGH-T989] bmg002:
heh... it is an older machine, but it was free. I THOUGHT it was an x86 system, but apparently it is x64... so I just gotta re-download xubuntu and reinstall it. minor pain, but not enough to have me complaining too much :P

I like the tutorial for sure... saves me a TON of time from finding all the info manually, but that AET tool seems a little buggy... a lot of scripts are pointing to folders that do not exist... I may go through the scripts later tonight and see what I can do to tweak them up a little bit... after I install an x64 OS. Im anxious to try bulding my own ROM/Kernel... and read through more code to figure out how all the back-end magic happens :)
[T-Mobile Samsung Galaxy S II SGH-T989] jason4962:
Just to make sure the first guide is 4.2.2 and second is 4.3 . Does this guide teach you how to built stock 4.1.2 roms? Anyone thanks
[T-Mobile Samsung Galaxy S II SGH-T989] bmg002:
Just wanted to say thanks again for the guide.I'm grabbing Pac man as a test of my system to see if it is set up properly or if I missed some steps. After I will probably start reading through the code to see what I can see... I love the guide. Without it I doubt I would have got my system set up at all
[T-Mobile Samsung Galaxy S II SGH-T989] g.man.7489:
Could anyone define or explain this "cherry picking"? I dont understand
[T-Mobile Samsung Galaxy S II SGH-T989] Blinkydamo:
To cherry pick is to pick out the parts you want and leave the rest.
[T-Mobile Samsung Galaxy S II SGH-T989] ryancnap:
the whole concept of forking and cloning confuses me. if one had a cm remote and a pa remote, and did git fetch -all (as per the example in the book) wouldn't you just have two different sources from two different roms..? another question..why clone my fork of the original repo if I'm already synced to the original repo? or were those two sections not intended to be done one after the other? so confused on this, can't seem to wrap my head around it from whatever I read. if anybody could set me straight on the matter I'd definitely appreciate it. this is the first piece I've read that made me understand git this far though! I learned more in the past fifteen minutes of reading this than I did all day.
[T-Mobile Samsung Galaxy S II SGH-T989] sa1tine:
if you wanted to make changes to the cloned repository you would not be able to push to the original repository.
[T-Mobile Samsung Galaxy S II SGH-T989] ryancnap:
so the correct way to go about things would be.. find the source I want to build on github. fork the repo with the default.xml, clone it to a working directory, repo sync, then make changes and upload them to my forked repo? what would happen when their were upstream changes (like changes to the original repo that I forked)..how would I go about getting those changes? sorry if I sound really stupid I'm just trying to understand .
[T-Mobile Samsung Galaxy S II SGH-T989] sa1tine:
github makes it pretty simple :)

https://help.github.com/articles/fork-a-repo
[T-Mobile Samsung Galaxy S II SGH-T989] Florendroid:
What I do when building slim :

- repo init

-repo sync

If you want to make changes to a particular repository ( for instance framework_base), what I did was fork that repo from slim to my github. You make the changes to your working directory ( cherry-picking or whatever), commit and push the changes to your forked repo. Don't forget to edit the default_manifest.xml and point it to your forked repo ( it will then sync the repo and fetch your forked frameworks_base repo instead of the slim one).

Edit : to update slim changes, add the original repo as a remote and git pull NameYouGaveToRemote branchYourWorkingOn to update your local repo and then git push to upload it to your github.
[T-Mobile Samsung Galaxy S II SGH-T989] ryancnap:
thank you so much for this, I never thought to go about it this way. so git pull would only grab whatever was updated that wasn't in my local repo? one thing I'm still puzzling over; if I were to commit my changes and push to my forked repo, wouldn't git pulling from the original and then pushing to upload to my github as you said overwrite whatever commits I had previously pushed to my forked repo?
[T-Mobile Samsung Galaxy S II SGH-T989] Florendroid:
No your commits will still be there. It only updates your repo with whatever changes they made to the original one, keeping your commits.
[T-Mobile Samsung Galaxy S II SGH-T989] dginsd:
Hope this isn't a too stupid a question but I can't seem to figure how to copy and paste the terminal commands to install the dependencies in Ubuntu. Java 6 or 7 installation and some of the commands listed are quite long to input manually. Also is it entirely necessary to have Oracle java, I already have openJDK 6 and 7 installed on my machine?
[T-Mobile Samsung Galaxy S II SGH-T989] Cl3Kener:
1) You have to right click inside the terminal window and click paste. You can't use the keyboard shortcuts unfortunately. Terminal is funny like that and it only likes it when you copy and paste using the mouse.

2) OpenJDK regardless of the version will not work and your build will fail within the first 30 seconds guarenteed (even if you override warnings and force the build). Your safest bet is to install Sun Java 6 since that is the only one supported by all platforms although I have both 6 and 7 and use the command "sudo update-alternatives --config javac" to manually flip flop back and forth between versions. (I also purge openjdk to make it less confusing when switching versions)
[T-Mobile Samsung Galaxy S II SGH-T989] dginsd:
I tried manually selecting and pasting but it seems to insert <returns> in the middle of commands making the terminal see a $'piece of the command' <return> error, $'next piece of command' <return> error etc.
[T-Mobile Samsung Galaxy S II SGH-T989] ghajj:
Error after running make

I am getting this error I have done the JAVA installation procedure twice. There must be something I am missing.

MYROM/out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/classes.jar] Error 41

I searched. All I could find is eitehr about openJDK or some path issues. java and javac executes fine from the cmdline.

Thanks in advance
[T-Mobile Samsung Galaxy S II SGH-T989] mondaza:
I want to put Linaro to AOSP. If I follow the tutorial, I put my discharge in place in / prebuilts and modify envsetup, I can build the rom. But I'm sure it does with the old gcc, because if I remove it gives me errors. Can anyone help?
[T-Mobile Samsung Galaxy S II SGH-T989] Cl3Kener:
[MENTION=4559230]mondaza[/MENTION]

That "old" gcc is still used for compiling many things. For the record, LINARO only builds a small portion of the ROM. We use linaro to optimize bionic and dalvik files and such. There is actually a more advanced way to use linaro to build the entire ROM but it causes problems with most devices. Using linaro in this fashion there are virtually no problems with most devices. If you really want to use linaro for everything possible try grepping "androideabi" and replacing any reference with linaro instead. Be aware that even if it compiles correctly some things might not work right.
[T-Mobile Samsung Galaxy S II SGH-T989] Cl3Kener:
Hey Everyone,

Good news!

I've almost completed Develop Now 3rd Edition. To make it more generic I cut out the building section and have been adding either more details or more tricks I've picked over the past few months. I will be posting soon but first I wanted to share with you a post I made showing an example of how I use bash scripts to compile kernels. Make sure to thank Ayysir while you're over visiting his thread. Here is the link to the bash script tutorial http://xdaforums.com/showpost.php?p=49684209&postcount=4

Cheers!

Cl3Kener
[T-Mobile Samsung Galaxy S II SGH-T989] Cl3Kener:
Hey Everyone,

So I finished updating the manual and you can find it posted on the OP. Let me know if you see any typos introduced by me reordering sections and rewriting things. Now you have my latest knowledge with changes in how I approach git now that I know more commands and how I approach developement in general. If there is something that you've seen me do that you don't quite understand from reading this shoot me a PM and we'll either add it to the guide or I'll just send you an explanation.

Enjoy the new update!

Cheers!

Cl3Kener
[T-Mobile Samsung Galaxy S II SGH-T989] LuigiBull23:
Fantastic guides!! Thank you VERY much!
[T-Mobile Samsung Galaxy S II SGH-T989] kennkanniff:
Thanks for the update!
[T-Mobile Samsung Galaxy S II SGH-T989] romuloxiii:
Wow, this is a great guide!! Thank you for this. Your guide has been very helpful for me with regards to some of the git commands such as cherry picking, how to use a differen toolchain during the build, as well as others. This is definitely the most comprehensive guide I have seen yet.

Thanks!!
[T-Mobile Samsung Galaxy S II SGH-T989] 12packabs:
Thanks for this guide! I've been building for a while but am now wanting to pull some features from one ROM into another.

What is the best way to find the commits I need in the source ROM? I want to add lockscreen notifications to Slim. Probably from PA. Any guidance would be appreciated.
[T-Mobile Samsung Galaxy S II SGH-T989] soccerfan6789:
Alright so your base is Slim. Cherry-picking from PA would be hard because you'll encounter tons of problems and errors. If you really want it, you're going to have to add in the lines of code that's modified manually. Some files are AOSP and are untouched so that'll be easy but majority of them will be different. Also, there might be some code previously done and you'll have to find those commits and incorporate them as well. It's time consuming and difficult but if you do it right, it's rewarding.
[T-Mobile Samsung Galaxy S II SGH-T989] 12packabs:
Thanks for your reply. Good point about PA. I know Carbon has them is also based on AOSP so that might be easier. Just struggling with how to find the features in the source and then identify the commits I need. I'll keep digging.
[T-Mobile Samsung Galaxy S II SGH-T989] soccerfan6789:
Majority of those commits are in frameworks/base and packages/apps/Settings
[T-Mobile Samsung Galaxy S II SGH-T989] roshan2989:
hi guys i successfully compiled my homemade cm11,so the next step is cherry pick..as i download the pdf file and read it which clearly understand..so im a newbie here,just wanna ask where to find the cherry pick for TRDS (the real dark slim) kit kat,...help would be appreciated..
[T-Mobile Samsung Galaxy S II SGH-T989] soccerfan6789:
Read what I just said ^^. But again, it'll be hard and I don't mean to be mean but it'll be difficult if you lack experience and I know you'll get a ton of errors. But if you want to do it, first find the commits that you need. They should be in frameworks/base and packages/apps/Settings.

git remote add ...

git fetch ...

git cherrypick ...
[T-Mobile Samsung Galaxy S II SGH-T989] brajesh.sharma87:
[MENTION=4966471]soccerfan6789[/MENTION] I have built aosp for my nexus 4. I tried doing some basic cherry picking from cm and pa (those which I thought wont have conflict) just to check whether I am going in right direction and it went well.

Now I want to move forward. Lets say I want to add Notification LED control. So for that I need to pick these commits.

First into package/apps/settings: https://github.com/AOSPA/android_pa...mmit/6b6632a3a6fe4f944819be0af67a5e65dbdead5a

Second into frameworks/base: https://github.com/AOSPA/android_frameworks_base/commit/47114889dbc722d3cd31378f47ddd1b025bf0e86

Now, as I do the first cherry pick, I get error, upon running 'git status' I see this:

brajesh@Brajesh-Sharma:~/android/aosp-kitkat/packages/apps/Settings$ git cherry-pick 6b6632a3a6fe4f944819be0af67a5e65dbdead5a
error: could not apply 6b6632a... Notification LED Control (2/2).
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
brajesh@Brajesh-Sharma:~/android/aosp-kitkat/packages/apps/Settings$ git status
# Not currently on any branch.
# You are currently cherry-picking.
# (fix conflicts and run "git commit")
#
# Changes to be committed:
#
#[COLOR="DarkGreen"]	new file: res/layout/dialog_light_settings.xml
#	new file: res/layout/preference_application_light.xml
#	new file: res/layout/pulse_time_item.xml
#	new file: res/values/pa_arrays.xml
#	modified: res/xml/display_settings.xml
#	new file: res/xml/notification_light_settings.xml
#	modified: src/com/android/settings/DisplaySettings.java
#	new file: src/com/android/settings/notificationlight/AlphaPatternDrawable.java
#	new file: src/com/android/settings/notificationlight/ApplicationLightPreference.java
#	new file: src/com/android/settings/notificationlight/ColorPanelView.java
#	new file: src/com/android/settings/notificationlight/ColorPickerView.java
#	new file: src/com/android/settings/notificationlight/LightSettingsDialog.java
#	new file: src/com/android/settings/notificationlight/NotificationLightSettings.java[/COLOR]
#
# Unmerged paths:
# (use "git add/rm <file>..." as appropriate to mark resolution)
#
#	[COLOR="Red"]deleted by us: res/values/pa_strings.xml[/COLOR]
#
brajesh@Brajesh-Sharma:~/android/aosp-kitkat/packages/apps/Settings$

How should I proceed from here onwards in solving the conflict?

[MENTION=5105835]Cl3Kener[/MENTION] : The way you've written the guide is excellent, it is useful for the newcomers. As a suggestion, there is no such detailed guide for cherry-picking. If you get time I would request you to create a guide on this with examples (I know its very tough and time taking)
[T-Mobile Samsung Galaxy S II SGH-T989] hatememarkz:
[MENTION=3570463]brajesh.sharma87[/MENTION] try his g+

?TEAMHELLDEVS?

?HELL?T989?

Big? S/O to C13kener
[T-Mobile Samsung Galaxy S II SGH-T989] soccerfan6789:
Great. Now this is where the guide doesn't necessarily go into. Well first off you're going to have to delete the pa_strings.xml. Before you do that though, there will be a line of code that you need for the feature your picking. So go to that commit and add it to your strings. Do that for the arrays as well. As for the .java files that you modified, search and delete the HEAD, <<<, ===== and the others. The guide covers that part. The problem may persist however with some additional errors because the original files were modified by the cherry-pick. I'll try and explain this as simply as I can. When you cherry-pick, it modifies the original file to incorporate some of the code that's necessary for the feature to work. That said, some lines may be added that you didn't even need and will cause errors because they aren't initiated. Such an example is the pa_strings.xml. It's not necessary and will cause errors. My best advice is to go though with it. Experience will only help you and although it will be really frustrating, it'll be worth it in the end. Don't give up and feel free to post generic questions in this thread if you need help. Hope I helped :)
[T-Mobile Samsung Galaxy S II SGH-T989] brajesh.sharma87:
[MENTION=5105835]Cl3Kener[/MENTION] I have a nexus 4. I am compiling aosp rom. Now, as I have stated before in the thread I am adding feature to it through cherry picks. I want a rom with the features only what I require. I was successful in adding some complex cherry picks like Notification LED control, T-mobile theme chooser, QuickSettings, SlimPie, Navigation Bar etc. The only thing which is stopping me is the lack of understanding I have for github related stuffs. Here's what I have done till now.

I have forked frameworks/base from github.com/android.

have created a branch in my local source tree called 'simply-smart'

have pushed my cherry-picks to this branch, you can see here.

Now I am worried about how can I can I do repo sync? As per my understanding from your book. I need to create a repository on github for android/manifest.xml and change the location of frameworks base to my github's one in the manifest with the branch 'simply-smart', isn't it? that way when I do a repo sync, it will be pulled from there.

Secondly, how will I keep my frameworks/base updated with google's changes? cuz I am syncing it from my github during repo sync and with that I get the changes only what I do. I need to somehow get the updates from google as well.

To solve that issue, I need to do this every 2-3 days I guess (this is what I understand by reading your book).

git remote add upstream https://github.com/android/platform_frameworks_base.git -t master

git fetch upstream

git merge upstream/master

git push

this will merge the latest updates from google to my local source, isn't it?

Kindly correct me If I wrote something wrong. Thanks for all your work. :)
[T-Mobile Samsung Galaxy S II SGH-T989] micr0g:
Hello [MENTION=5105835]Cl3Kener[/MENTION]

Thank you for awesome guides.

I start to learn a lot things from your guides.

The only thing i can't find is " How to build the kernel of a ROM" like SlimKat with other toolchain.

Everytime i try i see that the kernel is builded with default linaro 4.7.3 from "prebuilt" folder, any help pls?

I can't find how to change this

Thanks in advance.
[T-Mobile Samsung Galaxy S II SGH-T989] HiM@L:
need help...

thiss is kinda ttoo embrassing but i am trying to learn following this guide but i am stuck in step 2 "installing dependencies" i click on the link..it takes to ayysir page and there i click the given link it opens a page and theres nothing except some developers name.....need help please.

thanks in advance.
[T-Mobile Samsung Galaxy S II SGH-T989] aow1980:
[MENTION=5105835]Cl3Kener[/MENTION] thanks for the guide and the great work you do helping noobs learn. I was able to compile slimkat with your kernel for the n5 using it. Now I'm working on getting it to compile with Linaro 4.10.

Only issue I see is the way slim uses lunch for their build. I had to change the local manifest to your kernel after running lunch then repo sync before I built. Also had to change uber_hammerhead_defconfig to slim_hammerhead_defconfig. Other than that built and worked out good.
[T-Mobile Samsung Galaxy S II SGH-T989] TaRsY:
This was exactly the kind of guide I was looking for. Helped me a lot to start and showed the way to go further. I can't say enough thanks for creating this!

Keep up the good work!
[T-Mobile Samsung Galaxy S II SGH-T989] DualJoe:
[MENTION=5105835]Cl3Kener[/MENTION]:

16GB RAM is ridiculous. Check MAKEFLAGS+=-j$(NUM_JOBS) in Makefile.in. If NUM_JOBS is not declared it's resulting in '-j' that is infinite(!) jobs.

But i cannot compile it anyway from original manifest like stated here. It's frustrating. Anyone able to compile it these days?
[T-Mobile Samsung Galaxy S II SGH-T989] TaRsY:
[MENTION=5105835]Cl3Kener[/MENTION]

Are you planning to update your guide to 5.0? IMHO this is the best guide out there, that shall not let to be outdated. New chapter would be also gret to spead roms and keep older devices alive a bit further: compiling different roms for a device using the available kernel source or other dev's pdated device and kernel repo (who's olnly compiling only one specific rom for example).

Some words about compiling a rom using a different kernel than the default provided would be also great.

I don't know wheter you have enough free time for this, but please don't leave us, beginners alone!

Thank you in advance! :)