yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] rycus86:
Thanks for the answer but I still don't get it. :)

The device is CM supported but there are no CM10 nightlies for it only CM9 (there are unofficial CM10 builds though).

I know a github repository for CM10 device specific stuff and that is what I'd like to add to my local repo.

Thanks again!

---------- Post added at 11:20 PM ---------- Previous post was at 11:09 PM ----------

I just have another problem. I'm making changes in the sources and there are 3 projects involved: frameworks/base, Calendar and Email app.

I can't build the rom because I made changes in a framework class and the other 2 projects can't see these changes.

I'm trying to figure this out for 2 days now so please help. :)

Oh and I've started a separate branch for these 3 project (the same branch).

Thanks!
[Galaxy S I9000 Android Development] samoled:
You are correct in that adb fails to work once the build is installed, works fine prior to installing, and after restoring my backup of the stock ROM. It's just odd because I've had the same issue with two different setups now, one at home and the other here at work. I followed your guide to the T as far as I can tell, which makes me think the problem originates with my sync (done with -j16 at both locations). The only other similarity was that I had the drivers pulled from the 8/24 nightly both times as well. I'm stumped, so I think I will blow everything away at both locales and try again from scratch, only using the newest nightly as well. Thanks again for all your help folks, you guys rock!!!
[Galaxy S I9000 Android Development] kasper_h:
You can add any github project to your local manifest xml file (in .repo folder). This way, these additionally needed parts are synced as well. Then you need to extract the necessary files with a script from the device tree. And finally you just need to build using the build.

Can you be a bit more specific on what you have done?

Different github project are all separated, so if you create branches, these will not be connected, no matter if they get the same name or not. You just need to make the changes to every project separately and then build...

If repo syncing works and compiling is free of errors, I don't think resyncing everything will help. Are you sure about having the correct device specific trees (checked out to the correct jellybean branch)?

Verstuurd van mijn GT-I9000
[Galaxy S I9000 Android Development] rycus86:
Thanks, will try!

So this is the repo I made by following the guide in the OP e.g. for the SGS.

Changes made in the frameworks/base folder (which is a git project I guess) don't seem to be visible to classes in other project (for example Calendar which is at /packages/apps/Calendar -- I think that this is another git project)

I hope I explained it right this time and thanks again for your help!
[Galaxy S I9000 Android Development] samoled:
Device specific trees...maybe?

Before building, this command :

. build/envsetup.sh && breakfast d2att

synced 3 additional projects under device/samsung/d2att. I assumed this was setting up the device specific trees- am I mistaken? If so, what steps would I take to verify, and then correct, if they aren't?
[Galaxy S I9000 Android Development] kasper_h:
Yes, every app is a separate git project, just like frameworks/base. If changes in an app depend on changes in framework, you should seperately add them to both project, but then it should work. Do you try to merge code that is present online, so I can take a look?

Should work. Usually there are 3 projects: phone-specific, phone-general & kernel.

What you could try is download an "official" nightly and extract that to a folder on your desktop. Then extract a home-build CM10 to a different folder. You can then use the application meld (or something similar) to compare the contents of the two folders. This can help find missing files.
[Galaxy S I9000 Android Development] rycus86:
Ok, this is even stranger now. mmm Calendar builds just fine (so it can see the changes in frameworks/base) but mmm Email fails.

Also mmm frameworks/base can not build with this message:

make: *** No rule to make target `out/target/product/generic/system/framework/framework-res.apk', needed by `out/target/product/generic/system/framework/framework.jar'. Stop.

I wouldn't merge the code until I tested at least once on my device but these are the changes:

- frameworks/base: added an extra method to the class Notification.Builder

- packages/apps/Email: in the NotificationController class I'd like to use this new method but it fails with cannot find symbol

I'm modifying the sources in Eclipse and it builds just fine.

I don't know if there is an extra dependency somewhere because the Calendar app can use this method.

-- Edit:

Ok, now I was able to compile frameworks/base this way:

1) mmm frameworks/base/core/res

2) mmm frameworks/base

This compiled the project but then I tried mmm packages/apps/Email and it still fails.
[Galaxy S I9000 Android Development] Serious_Beans:
root@haithem-android:~# sudo mkdir -p /opt/java/64

root@haithem-android:/home# sudo cp jdk-6u34-linux-x64.bin /opt/java/64

cp: cannot stat `jdk-6u34-linux-x64.bin': No such file or directory

I am having trouble installing the Java SDK, I keep getting that error, I've followed the steps from the beginning.
[Galaxy S I9000 Android Development] rycus86:
Is there a 'jdk-6u34-linux-x64.bin' file in your /home/ directory?

Maybe you should be in /home/youruser or /home/youruser/Download
[Galaxy S I9000 Android Development] kasper_h:
My advice would be to do

$sudo apt-get install openjdk-6-jdk

OpenJDK is easier to install, and works just as good.
[Galaxy S I9000 Android Development] Serious_Beans:
"/home/myname" is the location of the .bin
[Galaxy S I9000 Android Development] rycus86:
Then try sudo cp /home/myname/jdk-6u34-linux-x64.bin /opt/java/64

Or just install openjdk just like kasper_h suggested.
[Galaxy S I9000 Android Development] kasper_h:
If you just build a complete CM10, what is the error at which it stops, can you copy-paste that to here (including the lines just before the error)?
[Galaxy S I9000 Android Development] Serious_Beans:
If I do that, do I skip the rest of the steps for installing the JDK?

2.5 - Add JDK PATH to .bashrc:

Code:

vi ~/.bashrc

Add these lines to .bashrc:

Code:

# Java PATHs

export JAVA_HOME=/opt/java/64/jdk1.6.0_##

export PATH=$PATH:$JAVA_HOME/bin

Do I do those ^ or skip to 3?

That worked lol, if I installed openjdk should I bother doing ^ as well or just move on?

Sorry for the really newb questions lol.
[Galaxy S I9000 Android Development] DROCSID:
After this tip (you gave earlier) I'm never going to install JAVA from the site.

This is just enough, OpenJDK is just working great, nothing to add to PATH.

:good:

And now reading your page about cherry picking, really need to get some

knowledge about that too, haven't had time for it.

Just another question; if I'm having a SGSIII or SGSI plus, can I just grab

the device specific repo and build? Or do I need to clean things up?

#EDIT

@ Serious_Beans with OpenJDK you can skip that whole step. Just install

and you're good to go
[Galaxy S I9000 Android Development] kasper_h:
You can skip all other java-related steps if you install openJDK

You don't need additional cleaning steps: all phone-specific steps of building CM10 occur in the product/galaxysmtd folder, so it should not interfere with building for other phones.
[Galaxy S I9000 Android Development] rycus86:
I'm currently running another build now but the error was at something like 'target java: Email' then the errors in the code: cannot find symbol

So this is a javac error I just don't know why it couldn't see the modifications even if I mmm frameworks/base before it.

I can post the exact error message if the current build finished.

Thanks!
[Galaxy S I9000 Android Development] Serious_Beans:
3.4 - Add Android SDK Path:

Code:

vi ~/.bashrc

Is that done in terminal in ~/android/sdk?

says

# ~/.bashrc: executed by bash(1) for non-login shells.

# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)

# for examples

# If not running interactively, don't do anything

[ -z "$PS1" ] && return

# don't put duplicate lines or lines starting with space in the history.

# See bash(1) for more options

HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it

shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)

HISTSIZE=1000

HISTFILESIZE=2000

# check the window size after each command and, if necessary,

# update the values of LINES and COLUMNS.

shopt -s checkwinsize

# If set, the pattern "**" used in a pathname expansion context will

Type :quit<Enter> to exit Vim

and a bunch of stuff, is that how it's supposed to look or did I miss something?
[Galaxy S I9000 Android Development] DROCSID:
Better use gedit

So: gedit ~/.bashrc [enter]

After this the file will be opened and you can save it when adding the path.

Be sure to have the proper permissions to do this (SU/sudo).
[Galaxy S I9000 Android Development] Serious_Beans:
Okay that worked

3.7 - Install Android SDK Tools

Code:

android

Check Android SDK Tools and Android SDK platform-tools and Install them

NVM I got it, sorry >_< like I said it's late, I'm not thinking too clearly lol.
[Galaxy S I9000 Android Development] rycus86:
The full build is failing after this line:

packages/apps/Email/src/com/android/email/NotificationController.java:535: cannot find symbol
symbol : method addExtraAction(int,java.lang.String,android.app.PendingIntent)
location: class android.app.Notification.Builder

mmm packages/apps/Email also failing on this.

Thanks!
[Galaxy S I9000 Android Development] samoled:
Woohoo!!!

Started from scratch last night- used most current nightly to pull drivers, and synced with -j1, hit build at 1:30. Woke up to a working build!!! Thank you guys for trying to help me sort that out, I appreciate it! :D
[Galaxy S I9000 Android Development] pmos69:
Your kung Fu is strong.
[Galaxy S I9000 Android Development] kasper_h:
It looks as if the frameworks/base patch is either incorrect or incorrectly applied. But it's hard to solve from a distance

YEEY, that's what makes us happy :good::highfive:
[Galaxy S I9000 Android Development] samoled:
Thank you Sensei :D
[Galaxy S I9000 Android Development] fishears:
Nice work! :victory:
[Galaxy S I9000 Android Development] rycus86:
I don't know... The interesting part is that the Calendar app compiles so it is not really a java error. :rolleyes:

It looks like the Email app is using an old version of the framework classes.

Anyway thanks for your help. :good:
[Galaxy S I9000 Android Development] Richy1989:
is it possile to get the Extra Files from an CM10 .zip file or somewere else instead from phone ?

sry for my english....
[Galaxy S I9000 Android Development] kasper_h:
Yes, you can extract a nightly zip. Then adjust the extract-files.sh so that it does cp from the directory where you extract cm10 zip to, in stead of adb pull.

Verstuurd van mijn GT-I9000
[Galaxy S I9000 Android Development] msri3here:
Curios question...

The other day, I was trying to extract the boot.img from the CM10 nightly for some experiment, but somehow, it does not seem to have ramdisk included in it and zImage file extracted is zero bytes?

is there some way I can extract CM10 boot.img and get to the zImage file?

any ideas?

P.S.: I am not sure if this question belongs in this forum, but I am posting it here because this a development thread and I have read knowledgeable people here :)
[Galaxy S I9000 Android Development] Gvdn:
Maybe try in pmos69 his kernel making thread?

http://xdaforums.com/showthread.php?t=1815598

At the end of the OP you alos have link to CM wiki about making kernel
[Galaxy S I9000 Android Development] msri3here:
the thread you specified talks about building the kernel from sources.

even though, I have been building the kernel and sources using the excellent guide pmos69 has put up, I wanted to do a bit of reverse engineering..

So, I have an already built kernel zImage file and want to insert it into existing boot.img, may be CM10 boot.img is made of different components?

thanks for the reply though
[Galaxy S I9000 Android Development] fishears:
You can always get boot.img from a CWM backup...

Or if you want it from your live phone then this should work in adb root shell

cat /dev/mtd/mtd0 > /sdcard/boot.img
[Galaxy S I9000 Android Development] msri3here:
I tried that too...but got same result...."Android 'magic' not found"

and then no ramdisk...
[Galaxy S I9000 Android Development] kasper_h:
For CM9, I have spend a lot of time trying to extract zImage & ramdisk from the boot.img but I never succeeded. All the online advice does not seem to work for our device.
[Galaxy S I9000 Android Development] fishears:
I've just clobbered my repo and rebuilt the whole thing with the linaro toolchain.

It is faster..... but not by much ;)

Its the first time PassMark has said that, overall, it is faster than a Samsung Galaxy S!!!!
[Galaxy S I9000 Android Development] DROCSID:
Fishears, a guy here from a dutch forum was/is sick of that new partition table.

You built nightlies yourself with the old table or? Can you share that by PM or ?

---------- Post added at 05:33 PM ---------- Previous post was at 05:06 PM ----------

I find that Linaro Toolchain very overrated imho. It's slightly better in

benchmarking, but not 10x faster, as was said before :highfive:.
[Galaxy S I9000 Android Development] fishears:
My current build is always in my sig (click on the "build" image) and, yes, it has the old partition layout. Feel free to share it.

ATM it is the non-linaro build. Next build I upload will be linaro compiled.
[Galaxy S I9000 Android Development] gangstaboy13:
Ok Guys! Please share the jellybean linaro toolchain with me i need it!
[Galaxy S I9000 Android Development] fishears:
I just went to the linaro site & downloaded the ics-jb toolchain from the downloads page.

It worked first time.

HTH. I'm not at my pc so don't have the link right now
[Galaxy S I9000 Android Development] kasper_h:
What did you do to set the toolchain to the linaro one? Can you share the build script changes?

Also, did you use the android toolchain or the gcc toolchain? I used the gcc one previously....but I now see an android-toolchain as well.
[Galaxy S I9000 Android Development] fishears:
I'm still out but iirc I used the android ics-jb one & just changed the cross compiler path in .bashrc

It definitely used the toolchain during the build.
[Galaxy S I9000 Android Development] kasper_h:
Did you check whether it really was used in the output. Because on my build system, changing the cross-compile path in .bashrc doesn't change the toolchain used...

You can also see the toolchain used in e.g. cpuspy.
[Galaxy S I9000 Android Development] fishears:
Well paint me silly. I saw the toolchain in the build output so I assumed it was "job done". Apparently not :o Still learning...

Back to the drawing board.
[Galaxy S I9000 Android Development] kasper_h:
I believe that in the build/envsetup.sh you can find references to the toolchains. I believe this is the place to change toolchains. But haven't been successful (compiling was fine, but resulting zip caused a bootloop).
[Galaxy S I9000 Android Development] pmos69:
Just dumb question, I know, but did you check the final PATH env variable to see if you hadn't another toolchain already prepended in the path?

Since I did all the testing for the guide on a "clean slate" environment to avoid any "contaminations", I haven't looked deeply into the matter.
[Galaxy S I9000 Android Development] fishears:
I checked ir . echo $path listed only linaro but Kasper is right, CPU spy says my kernel was compiled with normal GCC...but maybe only the kernel.
[Galaxy S I9000 Android Development] kasper_h:
I think I already mentioned somewhere else in this topic that setting the toolchain in the .bashrc file is useless, as the build script overrides the toolchain that has been set...
[Galaxy S I9000 Android Development] pmos69:
Yup. Remember that now.

Seems there's definitely a chance to fine tune the guide on several points, with all your great contributions.

On some points I think it can be simpler, and on others give more options.

When I have a chance...

My thanks to all, anyway.

It was only my intention to ease the hurdle of the environment setup to would be developers, but I ended up learning a lot already from all of you.
[Galaxy S I9000 Android Development] DROCSID:
Is it possible to save / send the building remotely to my server 'OTA'

without having manually to WinSCP the file? I use SSH keys for auth.

For example I want to up them here:

http://cyanogenmod.nl/files/?dir=Samsung Galaxy S/CM10/Own builds
[Galaxy S I9000 Android Development] elitevet:
crontab and scripted scp upload should do it?

Something like find /output/ -ctime $build_time | xargs scp...

sent from CM10 powered SGS
[Galaxy S I9000 Android Development] Snarksneeze:
Hey guise ;)

First of all, thanks to pmos69 for a great tutorial/guide. I installed xubuntu 12.04 on my Toshiba Satellite L755 just for this project.

I followed the steps in the OP exactly and simply changed "galaxysmtd" to "quincyatt" for my i717. I had 0 issues with the sync and build, the build took 1hr35m to complete, not too shabby for an old laptop, eh?

This morning, I gave kasper_h's clean script a try, modified it a bit to resync with -j8 and re-compiled.

I see no problems at all with my results: "cm-10-20120902-UNOFFICIAL-quincyatt.zip"

The only problem I have now is the fact that I don't have a backup phone and I'm a little scared to flash this. Does anyone have any further advice for me, or maybe can tell me if they think this is safe enough for me to flash?

I've used command-line kitchens before with no issues, but this is a little more complicated and I'm afraid that I've overlooked something simple and will brick my baby. :silly:
[Galaxy S I9000 Android Development] elitevet:
Knowing nothing about your phone I'd still suggest all you need is a CWM enabled kernel for your device, with which you can do a backup and then just flash the zip, but you'd better read the OP in the thread for your device's CM10/9

sent from CM10 powered SGS
[Galaxy S I9000 Android Development] Snarksneeze:
So this build method does not include the kernel?

I figured that the kernel would be built from the quincyatt CM10 sources and included... It certainly looks like it in the build folder.
[Galaxy S I9000 Android Development] pmos69:
Yes, it does.

He means, make a nandroid backup of your current ROM. For that, you should have a cwm enabled kernel already.

I would also suggest you make a copy of your /EFS folder and store it in your PC.

Having a zip of your favorite modem at hand can sometimes also be useful.

Remember that, if you're not using the new cm10 partitioning scheme already, the first flash will put you in s boot loop. You'll have to use the 3 button combo to get back into recovery and flash a 2nd time. It's "by design"

EDIT:

On the other hand, I don't even know if the partitioning scheme is the same for your device... ;)
[Galaxy S I9000 Android Development] Snarksneeze:
LOL!

Too late, I already flashed it.

And I'm running my first ROM self-built from source. You're awesome pmos69 :)
[Galaxy S I9000 Android Development] elitevet:
Daring young pupil Snarksneeze he is. Read more he must. Learn to control the Force, Snarksneeze, be with you it may.

sent from CM10 powered SGS
[Galaxy S I9000 Android Development] pmos69:
Just added another small related guide: [Guide] How to customize the CM10 i9000 kernel
[Galaxy S I9000 Android Development] elitevet:
More [noob] qsuestions...

I worked as described in the OP, run repo sync (first time) and it keeps going for 10 hours now... It has already downloaded about 4.4GB :confused: (I can't have no more beer, sorry :eek:)

Is that what supposed to happen or did I make a mistake somewhere? How much size is the full repo? How much time does it typically takes to sync

after

the first time?

I am on 5M ADSL, the cap is about 500Kb/s but the repo sync dl rate averages in about 50Kb/s...

Thanks in advance
[Galaxy S I9000 Android Development] Kshitiz_Indian:
Ah okay. I have flashed tons of times before, but it was the first time for me I got into the famous no-recovery-bootloops. I'll compile again tonight and test it!

Please do tell me one thing though; all the commits that pawitp does and are visible on BBQDroid, they automatically make there way on a repo sync right? Then why is there talk of cherry picking commits? :S From other repos?
[Galaxy S I9000 Android Development] a0a0:
setup ccache

http://source.android.com/source/initializing.html

not needed?
[Galaxy S I9000 Android Development] stbenz:
Last time I built CM9, the loal manifest wasn't needed. The device speciffic files and kernel got pulled in at the start of "brunch galaxysmtd".

Not required, but recommended, as it speeds up the build process after the first build.
[Galaxy S I9000 Android Development] pmos69:
I see.

But then, 4.7 would not be possible until the first brunch had been issued. No?

(Don't remember if that was what "failed" and made me add the manifest. Something definitely did.)
[Galaxy S I9000 Android Development] kasper_h:
Normal. It is about 7gb total. So you can calculate the time (I needed some 4hrs on a 25M connection).

Verstuurd van mijn GT-I9000
[Galaxy S I9000 Android Development] pmos69:
Well, the repo is quite large, no way around that. First sync is a pain.

D/l speeds have to do with the servers.

Just keep drinking beer until you get into a coma.

After the first time it's relatively fast (only differences are downloaded, of course)
[Galaxy S I9000 Android Development] pmos69:
1 - Yes.

2 - you can cherry pick unapproved commits, for example. (Look at gerrit).
[Galaxy S I9000 Android Development] elitevet:
Some ccache usage for kernel building fixes were merged, you might want to add enabling ccache to the OP...

sent from CM10 powered SGS
[Galaxy S I9000 Android Development] stbenz:
You're right, the device specific files have to be there before getting the binaries from the device. This can be done by running "breakfast galaxysmtd" which will only pull in the device specific files from the repository. See also this guide for the Galaxy Nexus

To see, what all those commands (breakfast/brunch/...) do, you should look into build/envsetup.sh, where they are defined. For me the build process made much more sense after looking there ;)
[Galaxy S I9000 Android Development] pmos69:
Thanks a bunch.

Will take a look into it.
[Galaxy S I9000 Android Development] Bonta768:
IIRC I sped up my first repo sync by taking the parallelism from about 16 to about 3...

Sent by my android overlord
[Galaxy S I9000 Android Development] gangstaboy13:
Compiling! No errors for now! How long will it take?
[Galaxy S I9000 Android Development] pmos69:
The first time?

Go watch a movie.

A long one ;)
[Galaxy S I9000 Android Development] gangstaboy13:
Hehe still compiling...
[Galaxy S I9000 Android Development] elitevet:
I could use a little help here, please.

I run

~/android/system$ . build/envsetup.sh && brunch galaxysmtd

I keep getting

build/core/binary.mk:21: *** external/bzip2: Invalid LOCAL_NDK_VERSION '5' Choices are 4. Stop.

I tried to repo sync prebuilt again as suggested regarding this error somewhere else on teh internets, but no luck.

pastebin of the whole command output

prebulit & prebuilts listings

Anyone? :o
[Galaxy S I9000 Android Development] pmos69:
Don't know.

Something is missing from your tree perhaps.

What do you have under ~/android/system/prebuilts/ndk/ ?
[Galaxy S I9000 Android Development] pmos69:
No problem discussing it here. Can be helpful for other later...

Anyway, as suspected, you seem to be missing a lot of stuff from your sorce tree in there.

Here's what I have:

$ ls ~/android/system/prebuilts/ndk/
Android.mk android-ndk-r4 android-ndk-r5 android-ndk-r6 android-ndk-r7 CleanSpec.mk

Why? No idea, sorry. :/

Did you have connection/dns issues during the sync?

(stuff like "github.com: Name or service not known")