yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] gmhafiz:
Finally I have successfully compiled CM10 for SGS after many weekends! Thanks to OP and various guides before this.

I build it on Arch linux with Core2duo 2.6GHz with 2GB RAM. The methods are pretty much the same as with the OP, in fact may be a little bit easier because the AUR automates all the settings. The only thing unique to Arch (which stumped me for weeks) was this error

make[1]: Entering directory `~/android/kernel/samsung/aries'
INSTALL crypto/ansi_cprng.ko
INSTALL drivers/media/video/gspca/gspca_main.ko
INSTALL drivers/scsi/scsi_wait_scan.ko
INSTALL fs/cifs/cifs.ko
INSTALL fs/fuse/fuse.ko
INSTALL fs/nls/nls_utf8.ko
DEPMOD 3.0.8-g54d09f2
Warning: you may need to install module-init-tools
See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt
ERROR: could not open directory ~/android/out/target/product/galaxysmtd/obj/KERNEL_OBJ/../../system/usr/lib/modules/99.98.3.0.8-g54d09f2: No such file or directory
FATAL: could not search modules: No such file or directory
make[2]: * [_modinst_post] Error 1
make[1]: * [sub-make] Error 2
make[1]: Leaving directory `~/android/kernel/samsung/aries'
make: * [TARGET_KERNEL_BINARIES] Error 2
make: * Waiting for unfinished jobs....

I scratched my head about the 3.0.8-g54d09f2 and googling returns nothing. Yesterday I googled and found a post posted five days ago which suggests this could be arch specific: https://bbs.archlinux.org/viewtopic.php?pid=1153647 I followed the advice and manually made the symlink. http://xdaforums.com/showpost.php?p=30903806&postcount=94 also suggests the same thing.

Right after the compile process started, I entered the following command to symlink /lib into /usr/lib.

$ ln -s ~/android/system/out/target/product/galaxysmtd/system/lib ~/android/system/out/target/product/galaxysmtd/system/usr

Arch linux recently ditched /usr/lib in favour of /lib only. Not entirely sure how this could affect the CM10 compile but hey, I did it :victory:

I agree

Definitely! This is how a "Development Section" should be.
[Galaxy S I9000 Android Development] pmos69:
That's great.

If you post the required Arch packages I'll add them to the OP...
[Galaxy S I9000 Android Development] malcho:
Usefull info

Hi guys,

I use this guide also for cm10 and aokp building.

I would like to post also something from cm9 thread for build extra packages with cm10.

For instance when i want to include GummyBeam form source into my builds.

Here is how i do it.

Using file .repo/local_manifest.xml i add teamgummy github as remote and path to project.

<?xml version="1.0" encoding="UTF-8"?>
<manifest>

<remote name="gummy"
fetch="git://github.com/teamgummy/" />

<project path="packages/wallpapers/GummyBeam" name="packages_wallpapers_GummyBeam" remote="gummy" revision="master" />

</manifest>

Also in folder /build/target/product in file core.mk you have to add gummy.

PRODUCT_BRAND := generic
PRODUCT_DEVICE := generic
PRODUCT_NAME := core

PRODUCT_PACKAGES := \
ApplicationsProvider \
BackupRestoreConfirmation \
Browser \
Contacts \
GummyBeam \
ContactsProvider \
DefaultContainerService \
DownloadProvider \
DownloadProviderUi

and add link to gummy.

ln -s /packages/wallpapers/GummyBeam at root of working folder

and that's it.

Also you can edit directly default.xml file and add gummybeam source

Also with editing default.xml file you can remove some packages from build.

For example you can delete whole line in xml file for music app.

Next repo sync will delete this package and it won't be included in build.

This was ideas when bhu1 and me want to build ultimate rom(combinations of all roms).

Many regards
[Galaxy S I9000 Android Development] Gvdn:
Im really sorry for going Off topic but im kinda lost. I tried updating my graphic drivers with this post

http://askubuntu.com/questions/124292/what-is-the-correct-way-to-install-ati-catalyst-video-drivers

all went well untill i needed to reboot. Now Ubuntu doesnt start up anymore and im stuck at purple bootscreen with the ubuntu loga and red dots under it. Let it there for over 2 hours but nothing.

Would rather not have to reinstall ubuntu from scratch so i hope one of u guru's has a solution and once again my apologies for the off topic.
[Galaxy S I9000 Android Development] DROCSID:
EDIT: :)
[Galaxy S I9000 Android Development] gmhafiz:
I use Arch Bang and followed this wiki: https://wiki.archlinux.org/index.php/Android

A) Install Arch Bang

B) Enable multilib and archlinuxfr at /etc/pacman.conf

[multilib]
Include = /etc/pacman.d/mirrorlist

[archlinuxfr]
Server = http://repo.archlinux.fr/x86_64

C) Install yaourt

# pacman -Syy && pacman -S yaourt

D) Install Android stuff

$ yaourt android-sdk

When installing java-runtime choose 2) for openjdk6

Don't forget to install android-sdk-platform-tools too

$ yaourt android-sdk-platform-tools

E) Setup ADB

$ yaourt android-udev

F) Install Dependencies

# pacman -S git gnupg flex bison gperf sdl wxgtk squashfs-tools zip curl ncurses zlib schedtool openjdk6 perl-switch zip unzip lib32-zlib lib32-ncurses lib32-readline gcc-libs-multilib gcc-multilib lib32-gcc-libs

G) Change the default python from version 3 to version 2

Compiling needs python version 2

# mv /usr/bin/python /usr/bin/python3
# ln -s /usr/bin/python2 /usr/bin/python

H) Continue with Step 4 in the OP

There is no need to edit ~/.bashrc by hand or setup udev manually because they are all handled by the AUR packages.

I hope I don't miss anything but this should be it.

Addon: Also have to symlink the /lib folder to prevent the above-mentioned error

$ ln -s ~/android/system/out/target/product/galaxysmtd/system/lib ~/android/system/out/target/product/galaxysmtd/system/usr
[Galaxy S I9000 Android Development] sgw99:
Thank you ...

Thanks for this thread and the howto: I was able to sucessfully build my first "own" ROM here on gentoo linux, and it even booted ;)

Small question, maybe FAQ, didn't find it yet browsing the thread:

Does this howto (mentioned repo) pull from the same sources as the binaries/zips mentioned in this thread:

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

?

Until now I pulled zip-files from http://get.cm/?device=galaxysmtd ... I just want to be sure that I somehow use the same sources as those zip-files there (giving me the chance to switch between own builds and pre-builts).

Is there a way to browse the latest changes within the local repo? Or do I have to check that online?

Thanks again, Stefan!
[Galaxy S I9000 Android Development] pmos69:
The source is all from the official CyanogenMod repositories, from which the nightlies are also built, yes.

In fact, the output should be exactly the same, except when there are already changes waiting to be incorporated in the next nightly.

git allows you to check changes in several projects, yes, but it's per project based.

I'm not an expert on repo, so I don't know if there's a way to have a global view of changes.

I usually do it online.

If you want to share info on what packages you had to emerge I'll add them to the OP.
[Galaxy S I9000 Android Development] sgw99:
thanks @pmos69 ... good to know. So it seems that I don't have to pull zips anymore ... just sync/build/flash. sounds great! :)

checking changes online: why not, I did that for months already anyway.
[Galaxy S I9000 Android Development] pmos69:
Thanks a lot.

Your post is now linked in the OP.

;)
[Galaxy S I9000 Android Development] cgulliver:
Thx for great guide. Following this to build nightlies for my Verizon Galaxy S3. Although it produces a flashable zip, it hangs during boot when rebuilding apps. Just clobbered the build dir and started over with latest official extract. Compiling now, hopefully it fixes the issue.
[Galaxy S I9000 Android Development] gangstaboy13:
When i compile it stays for a long time at target dex: framework should i have to wait Longer? This is the second time i compile! First time i got The Same issue
[Galaxy S I9000 Android Development] pmos69:
Don't know what to tell you.

Can't reproduce.
[Galaxy S I9000 Android Development] kasper_h:
I think that the target dex step for framework does indeed take long, it's one of the most complicated steps and framework is large. So don't worry (unless it takes hours, but minutes is normal).
[Galaxy S I9000 Android Development] gangstaboy13:
Thanks its allready done! I take An hour! With an Intel i3 t
[Galaxy S I9000 Android Development] rycus86:
I'd just like to share the result of this investigation (if anyone interested).

After trying like a hundred combinations I finally found what caused the problem.

The Email package is indeed using an 'older' framework, the #16 to be exact (yep, that's jellybean) but the current/most recent version to compile is 'current'.

So changing this line in Email/Android.mk did the trick:

LOCAL_SDK_VERSION := current # was 16 before

Hope this helps others who would want to change the framework in the future. :)
[Galaxy S I9000 Android Development] kasper_h:
Good that you found the problem, AND shared the solution here :)
[Galaxy S I9000 Android Development] gangstaboy13:
when i do the commands find ./out/ -name 'build.prop' | xargs rm and find ./out/ -name 'cm_galaxysmtd-target_files-eng.*.zip' | xargs rm i get the following is this normal?

jaapteeuw@cyanobuilder:~/android/system$ find ./out/ -name 'build.prop' | xargs rm
rm: missing operand
Try `rm --help' for more information.
jaapteeuw@cyanobuilder:~/android/system$ find ./out/ -name 'cm_galaxysmtd-target_files-eng.*.zip' | xargs rm
rm: missing operand
Try `rm --help' for more information.
[Galaxy S I9000 Android Development] msri3here:
I usually get this error when these files are not found in the 'out' directory
[Galaxy S I9000 Android Development] fishears:
that's right. its because "find" had no result to pass to "xargs" - which is another way of saying that the file was not found so it can't be deleted ;)
[Galaxy S I9000 Android Development] pmos69:
http://review.cyanogenmod.com/#/c/22796/ seems to break building for the galaxysmtd

Anybody seen this?

Had to move the declaration of setPostviewSize out of the #ifdef QCOM_HARDWARE in CameraParameters.h to get it to build.
[Galaxy S I9000 Android Development] pmos69:
Or probably the definition in CameraParameters.cpp needs an #ifdef QCOM_HARDWARE

EDIT: Oh well...

https://github.com/CyanogenMod/android_frameworks_av/commit/563410dff94fec7329bed0b4c8927f8f4420653b
[Galaxy S I9000 Android Development] gangstaboy13:
Thanks but i compiled without errors. Strange!
[Galaxy S I9000 Android Development] pmos69:
Not strange. Normal.

If there are relevant files in the out directory to delete -> no error.

If the files are not there to delete -> harmeless error message.
[Galaxy S I9000 Android Development] Fuma:
Hi little question

I set the back button kill app time to 500 ms same as the lights time. But it doesnt work. Any one had this issue?
[Galaxy S I9000 Android Development] kasper_h:
Can you tell me what you have done exactly?

This is my change, and it worked:

https://github.com/kasperhettinga/d...mmit/4c944b8588b7a06f81a5d61415848dfefbc1b720
[Galaxy S I9000 Android Development] iyahman:
one quick question.. someone have something working on cm10 like http://xdaforums.com/showthread.php?t=1659279

someone on the linked thread said that it is working but for me no
[Galaxy S I9000 Android Development] msri3here:
you mean you dont want to build these app at all?

or you want to remove these apps after building the ROM?

If you dont want to build the apps at all, just go to build/target/product

and edit the galaxysmtd_no_telephony.mk (something similar dont remember) and remove the entries for apps you dont want
[Galaxy S I9000 Android Development] kasper_h:
Where does it go wrong? Does it give an error?
[Galaxy S I9000 Android Development] iyahman:
I'm looking for the two solution.

I don't find the file to edit.. But I will re take a look.

No error but no apk deleted, but for more precision I'm on my own build.. Maybe the zip work for nightly? but for unofficial..

Maybe a build prop problem.. But don't know..

Envoyé depuis mon GT-I9000
[Galaxy S I9000 Android Development] pmos69:
There's no difference.
[Galaxy S I9000 Android Development] kasper_h:
I looked at the zip. System is not mounted in the script, I don't know whether that matters?
[Galaxy S I9000 Android Development] iyahman:
yes, I thought the descriptions of the file build.prop where there are some difference.

you were right, I add the mounting system and it works now!

thank you ^ ^
[Galaxy S I9000 Android Development] malcho:
Hi,

Maybe not right place to ask...

I have cna rom with old partition layout.

How can i adapt it to new layout?

Ok,i will add new kernel,butt what else should i do?
[Galaxy S I9000 Android Development] fishears:
These are the relevant commits that were made to CM10 when the new partition layout was introduced. They will be helpful.

Kernel changes

Device Changes
[Galaxy S I9000 Android Development] Fuma:
Hi ,thx

that is excatly what i did also.

I built a build with nothing changed but this line - <integer name="config_backKillTimeout">500</integer>

and it doesnt work. the buttons light is also at 500 (not throught nst tools,which give 480\510) .

any idea?
[Galaxy S I9000 Android Development] kasper_h:
I have no idea :S I also don't know what the range is....
[Galaxy S I9000 Android Development] pmos69:
Any positive integer (representing miliseconds) ?

The value is actualy used in PhoneWindowManager.java in a call to postDelayed which actually can take a long as argument.

Doesn't seem to be anything in the the mBackLongPress runnable to change that so...
[Galaxy S I9000 Android Development] Fuma:
i'm trying to build cm10 with some minor changes,

adding governor to kernel and scheduler, some cherrys and that pretty much it.

i cant seem to compile the kernel an i dont know why... here is partial log :

i tried to add bfq v4 and sio , smartassv2 and wheatly, i'm still learning this stuff so probably i forgot something crucial :)

Ps. the killapp back thingy doesnt work on 500 and 600 ms , and the only thing i do know about it ,is that for it to work the backlight button time must be >= from the appkill time.
[Galaxy S I9000 Android Development] kasper_h:
Did you pick the changes from someone else or write it yourself. Can you post the changes somewhere?

Verstuurd van mijn GT-I9000
[Galaxy S I9000 Android Development] Fuma:
i looked at your sources ,dertufal's and starsosk. and the cm stock.

looked at how it was written and basically imitated.

that's waht i did for the smartass wheatly and sio.

bfq i used from you as is...gave it a shot... although i knew you changed way too much for it to work on stock without changing more stuff.

so afterwards i compiled another build without bfq. with just smartass wheatly and sio , it compiled fine but gave me bootlloops. didnt have time to do more .
[Galaxy S I9000 Android Development] kasper_h:
If you set up your own github and upload your patches to the kernel to your github account, I can take a look to see what may be wrong :)
[Galaxy S I9000 Android Development] Fuma:
Thanks a lot , i'll look into it.

Edit :

i tried to compile again with SIO and ,smartass & wheatly.

first time it didnt finish,and got an error in the kernel... so the line causing it was :

in elevator.h. if i delete it the build is done successfully. I dont have time right now to test the build but i would assume it wont boot.

any way here are the changes i made :

http://pastebin.com/Zk9W9NpQ
[Galaxy S I9000 Android Development] kasper_h:
It seems to be OK, but it is hard to really see this way. So that is why I adviced a github account :)

Anyways, what I always do is add features one-by-one. After every single addition, I build to make sure the code is fine...
[Galaxy S I9000 Android Development] Fuma:
Thanks again :)

The git hub will happan eventually ,dont have time to set everything up right now, summer semeter exams.

On any case,building with the governers alone is fine. And building with governers and the call volume hack is fine also.

Later today i hope to have time to check the builds.
[Galaxy S I9000 Android Development] Fuma:
Up....

The build from today with the sio, smartass2, wheatlly and the volume hack works gtreat!

There was one line that was unneeded in the sio code...not that i have any idea why... but it all works.

Thanks kasper for the help!
[Galaxy S I9000 Android Development] kasper_h:
Great it works now :)
[Galaxy S I9000 Android Development] samoled:
Ok, I've located the extract-files.sh file:

#!/bin/sh

BASE=../../../vendor/htc/ville/proprietary

rm -rf $BASE/*

for FILE in `egrep -v '(^#|^$)' proprietary-files.txt`; do

DIR=`dirname $FILE`

if [ ! -d $BASE/$DIR ]; then

mkdir -p $BASE/$DIR

fi

adb pull /system/$FILE $BASE/$FILE

done

./setup-makefiles.sh

And I've downloaded the latest cm10 nightly for the HTC One S, which I also extracted and left it in the Downloads folder. How do I modify the extract-files.sh script to pull from the extracted nightly? I tried changing

adb pull /system/$FILE $BASE/$FILE

to

cp ~/Downloads/cm-10-20120912-NIGHTLY-ville/system/$FILE $BASE/$FILE

and that made the "No such file or directory" error go away when I navigated to

~/device/htc/ville

and ran ./extract-files.sh. But it seemed like nothing happened. It also gave me errors when I tried to continue on and do

~/android/system/vendor/cm/get-prebuilts

I hope I haven't fubar'd something. Suggestions?
[Galaxy S I9000 Android Development] stbenz:
cp doesn't produce output if all went fine. So when you see no output, when running extract-files.sh, probably everything went fine. Just check the output folder ~/android/system/vendor/htc/ville/proprietary.

And without the error you get when running get-prebuilts, we can't help you with that...
[Galaxy S I9000 Android Development] :
I theorize that if I triple the beer intake I will get a 3X better build! Besides where would I get 4 beer from? 6 and 12 packs, 12 is the lowest multiple of 4... and you can't have anything left over!
[Galaxy S I9000 Android Development] samoled:
Error is :

bash: /home/chrishighfiled/android/system/vendor/cm/get-prebuilts: No such file or directory

I checked, and sure enough there's nada in the system folder. I can't find where or if the change to the extract-files.sh script copied anything at all.
[Galaxy S I9000 Android Development] fishears:
That makes sense to me so I guess I'm drunk then...
[Galaxy S I9000 Android Development] pmos69:
That's when all lag disappears, but the video driver starts displaying blurred/double images.
[Galaxy S I9000 Android Development] fishears:
That seems to confirm it then.
[Galaxy S I9000 Android Development] kasper_h:
If you open terminal and type:

$ cd /home/chrishighfiled/android/system/vendor/cm/

$ ls

Same for:

$ cd home/chrishighfiled/android/system/vendor/htc/ville/proprietary

$ ls

what is then the output?
[Galaxy S I9000 Android Development] samoled:
I found the issue- I had to have been in the wrong directory when syncing repo. /android/system was empty. I started over and will try to edit the extract-files.sh script again to pull the files from a nightly. I think I understand how to set it up now- replace 'adb pull' with 'cp', and point the source of the 'cp' toward the extracted nightly. The destination folder should stay as the $BASE folder defined at the beginning of the file, correct?
[Galaxy S I9000 Android Development] kasper_h:
If repo doesn't finish successfully, the folder will stay empty (at least when you look with a file explorer, there will be a hidden .repo folder containing all the downloaded files).

You should copy the extracted cm9-zip for the correct device in the same folder as where the extrect-files.sh script is located. Then you can simply replace adb pull by cp and keep everything else the same.
[Galaxy S I9000 Android Development] stbenz:
I tried the extracting from a downloaded package by my self yesterday. For your device it should be enough to replace the "adb pull" in ~/android/system/device/htc/ville/extract-files.sh

BUT, to all who build for galaxysmtd: You have to replace "adb pull" twice in ~/android/system/device/samsung/galaxysmtd/extract-files.sh and replace it also in ~/android/system/device/samsung/aries-common/extract-files.sh.
[Galaxy S I9000 Android Development] samoled:
moved extracted cm10-zip to /android/system/device/htc/ville, ran ./extract-files.sh- multiple errors:

cp: cannot stat '/system/liv/xxx/xxxxx' : No such file or directory

cm10 file stays in folder.

If I move extracted cm10-zip to the ../../../vendor/htc/ville/proprietary folder defined as BASE at the beginning of the 'extract-files.sh' script and then run it, I still get the same errors, but the file disappears...
[Galaxy S I9000 Android Development] kasper_h:
You will need to add the folder name to the cp command, as I presume the /system folder is still in a specific folder containing all extracted files.
[Galaxy S I9000 Android Development] samoled:
ok, dropped the 'cm-10-20120913-NIGHTLY-ville' extracted zip into /home/chrishighfield/android/system/device/htc/ville, and changed the copy source file to reflect that. Also changed 'adb pull' to 'cp' and ran 'extract-files.sh' script from ~/android/system/device/htc/ville$ -same results:

cp: cannot stat ' /home/chrishighfield/android/system/device/htc/ville/.../.../.../....so': No such file or directory

Is there another instance of the extract-files.sh script that may be in another directory that I should be putting the cm-zip in? Or do I need to drill down into the cm-zip to find a specific folder to drop into the 'ville' directory?
[Galaxy S I9000 Android Development] kasper_h:
Can you send me the contents of your updated extract-files.sh file? Hard to solve without seeing the file itself :)
[Galaxy S I9000 Android Development] DROCSID:
Now that I get my SGSIII next week it's time to try to build my own (customized) ROM too with cherriepicking / others mods. Just for trying.

Do you guys make an extra source tree (with CM10) to keep things fresh nd clean or what?
[Galaxy S I9000 Android Development] kasper_h:
No, I don't. I build for i9000 & i9100 from the same source tree (with off course separate device/kernel trees for both devices).
[Galaxy S I9000 Android Development] sgw99:
forgive my FAQ ...

How do I configure which packages get into my ROM? For example I want to get rid of some live wallpapers ...

Thanks in advance, Stefan
[Galaxy S I9000 Android Development] DROCSID:
Guess I have to spend more time on the correct patches and commits. Just ****ed

it up several times the last past days.

This helped me a lot :highfive:, because I couldn't GIT RESET --hard HEAD (or revert)

some of the pulled commits from the GIT. Tried to troubleshoot from step- by step but

did not find the issue.

repo forall -c git reset --hard && make clean && repo sync && make clobber && repo sync

Thought make clobber should take ages? Done within 10 minutes or so
[Galaxy S I9000 Android Development] pmos69:
Not the make clobber itself.

It's the rebuilding that will take ages. (It's building everything again from scratch)

Clobber is basically deleting stuff, and that's always fast.
[Galaxy S I9000 Android Development] DROCSID:
Yep, but the rebuilding also was *bliep* ready. Therefor I thought am I doing something

wrong or? But guess not. Added some stuff again, now building again without errors.
[Galaxy S I9000 Android Development] kasper_h:
I always work in a local branch. If I f**k up, something that sometimes happen, I just create a new branch that tracks github/jellybean, checkout to that new branch and remove the old one...