yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] kasper_h:
Here are my scripts (for CM7!):

galaxys script:

#!/bin/bash
#

#****************************************************************
## Set your device here:
device=galaxysmtd

#****************************************************************
## Setup directories:
out=~/android/system/out/target/product/$device

#****************************************************************
## Clean environment:
make installclean
rm $out/system/build.prop
rm $out/obj/PACKAGING/target_files_intermediates/cyanogen_galaxysmtd-target_files-eng.kasper.zip
rm $out/obj/PACKAGING/target_files_intermediates/cyanogen_galaxysmtd-target_files-eng.kasper/SYSTEM/build.prop

#****************************************************************
## Check for updates and make the build:
repo sync -j4
./get-rommanager
. build/envsetup.sh && brunch $device

get-rommanager script:

#!/bin/bash
#
~/android/system/vendor/cyanogen/get-rommanager
[Galaxy S I9000 Android Development] Html5Clouds:
pawtip moved the kernel to

https://github.com/CyanogenMod/android_kernel_samsung_aries

:)
[Galaxy S I9000 Android Development] malcho:
This morning i tried another build for my self.

Since there is changes with kernels and integrated kernel building i do this.

On /android/system i created folder /kernel/samsung/aries.

Go to folder /kernel/samsung/aries.

git clone git://github.com/CyanogenMod/android_kernel_samsung_aries

After that i created a little script that sync repos and build.

#!/bin/bash

cd ~/android/system

repo sync

cd ~/android/system/kernel/samsung/aries

repo sync

cd ~/android/system/buildscripts/samsung

./build.sh galaxysmtd

I run script with bash -x to see output.

Many regards

I just like to share this becouse procedure on first page didn't work this morning.
[Galaxy S I9000 Android Development] Perka:
OP updated, thx for posting :)
[Galaxy S I9000 Android Development] madphone:
i have tried this guide although i'm a noob. everything synced, took ages the first time, but i can't find galaxysmtd in /devices/samsung

that's why i'm stuck at the point where to use adb.

any idea what i'm doing wrong?
[Galaxy S I9000 Android Development] lippol94:
cat ~/android/system/.repo/local_manifest.xml

and post here the output
[Galaxy S I9000 Android Development] madphone:
it looks like this:
[Galaxy S I9000 Android Development] lippol94:
gedit ~/android/system/.repo/local_manifest.xml

replace everything with this:

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

<project path="device/samsung/galaxysmtd" name="CyanogenMod/android_device_samsung_galaxysmtd" />
<project path="device/samsung/aries-common" name="CyanogenMod/android_kernel_samsung_aries" />

</manifest>

then

cd ~/android/system/
repo sync
[Galaxy S I9000 Android Development] madphone:
thanks. now i got this when syncing:
[Galaxy S I9000 Android Development] madphone:
still no idea why there no galaxysmtd folder. only maguru, toro and tuna. Any idea?

repo sync says following

Fetching projects: 100% (251/251), done.
error: revision refs/heads/ics in CyanogenMod/android_kernel_samsung_aries not found
[Galaxy S I9000 Android Development] mialwe:
Tried again yesterday after a two week compile break, used OP description only and everything worked fine after changing

<project path="device/samsung/aries-common" name="CyanogenMod/android_kernel_samsung_aries" />

to

<project name="CyanogenMod/android_device_samsung_aries-common" path="device/samsung/aries-common" />

During build.sh execution some dependencies were added automatically which makes local manifest now look like this (compiled fine, did not flash yet slimmed down to ~85Mb, flashed, works):

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_samsung_galaxysmtd" path="device/samsung/galaxysmtd" />
<project name="CyanogenMod/android_device_samsung_aries-common" path="device/samsung/aries-common" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" />
<project name="CyanogenMod/android_kernel_samsung_aries" path="kernel/samsung/aries" remote="github" revision="android-samsung-3.0-ics" />
</manifest>
[Galaxy S I9000 Android Development] Perka:
Can some one confirm that this is the right manifest?

I had problems building and I changed my manifest to

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

<project path="device/samsung/galaxysmtd" name="CyanogenMod/android_device_samsung_galaxysmtd" />
<project path="device/samsung/aries-common" name="CyanogenMod/android_kernel_samsung_aries" revision="android-samsung-3.0-ics" />

</manifest>

and now Im building again.

So confirm and I will change in OP

Thx for your help ;)

Credit to fecalindor if its the solution. :)

Cant wait for sgs3 :D

EDIT: Did not build, some error but I have no time for this now.
[Galaxy S I9000 Android Development] malcho:
I built with success

Here it is.

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_samsung_galaxysmtd" path="device/samsung/galaxysmtd" />
<project name="CyanogenMod/android_kernel_samsung_aries" path="device/samsung/aries-common" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" />
<project name="CyanogenMod/android_device_samsung_aries-common" path="device/samsung/aries-common" remote="github" />
</manifest>
[Galaxy S I9000 Android Development] DROCSID:
Thanks Malcho!
[Galaxy S I9000 Android Development] malcho:
Any time:)
[Galaxy S I9000 Android Development] ak:
block

Repository synced!

Looking for dependencies

Adding dependencies to manifest

Adding dependency: CyanogenMod/android_packages_apps_SamsungServiceMode -> packages/apps/SamsungServiceMode

Adding dependency: CyanogenMod/android_device_samsung_aries-common -> device/samsung/aries-common

Syncing dependencies

After update manifest.xml everytime sync is blocked in this state ...

Anyone have a solution?

Thanks a lot.
[Galaxy S I9000 Android Development] Perka:
Great thx :) OP is updated with this manifest.

Package complete: /home/perka/android/system/out/target/product/galaxysmtd/update-cm-9.0.0-RC0-galaxysmtd-UNOFFICIAL-signed.zip
b69ea71a76bdd0a4eabe091b472616b1 update-cm-9.0.0-RC0-galaxysmtd-UNOFFICIAL-signed.zip
[Galaxy S I9000 Android Development] ak:
Fetching projects: 57% (148/258) remote: Counting objects: 42, done.

remote: Compressing objects: 100% (5/5), done.

remote: Total 22 (delta 16), reused 20 (delta 14)

Unpacking objects: 100% (22/22), done.

From git://github.com/CyanogenMod/android_frameworks_base

5e90c30..bd6edb0 ics -> github/ics

Fetching projects: 100% (258/258), done.

Syncing work tree: 7% (19/258) error: revision refs/heads/ics in CyanogenMod/android_device_samsung_aries-common not found

Initialized empty Git repository in /root/android/cm9/buildscripts/samsung/buildscripts/.git/

remote: Counting objects: 244, done.

remote: Compressing objects: 100% (83/83), done.

remote: Total 244 (delta 58), reused 230 (delta 44)

Receiving objects: 100% (244/244), 25.77 KiB, done.

Resolving deltas: 100% (58/58), done.

Fetching projects: 99% (256/258) -> For me building everytime block in this point.

Do you have a similar problem?
[Galaxy S I9000 Android Development] Perka:
Mine synced fine today.
[Galaxy S I9000 Android Development] malcho:
Something is wrong with kernel git.

Please be patient till tommorow i will see how is configured on my build comp.
[Galaxy S I9000 Android Development] ak:
Thanks a lot
[Galaxy S I9000 Android Development] malcho:
It will be fixed don't worry:)Since your rom is one of the best we must fix it:)
[Galaxy S I9000 Android Development] extralife:
why you changed kernel-tree-path?

aries-common? :D

should be 'kernel/samsung/aries'
[Galaxy S I9000 Android Development] Perka:
changed cuz someone posted that.

So whats the right manifest?
[Galaxy S I9000 Android Development] extralife:
repo moved to: https://github.com/CyanogenMod/android_kernel_samsung_aries

so

<project path="kernel/samsung/aries" name="CyanogenMod/android_kernel_samsung_aries" remote="github" revision="android-samsung-3.0-ics" />
[Galaxy S I9000 Android Development] malcho:
I posted a new manifest.Perka and me successfully builded new rom.anarkia didn't make it to sync repo.Seems to me that in this early stage everyone have different results.

And no official build guide like on cm7.
[Galaxy S I9000 Android Development] Perka:
So what should it be? The manifest.
[Galaxy S I9000 Android Development] ak:
sync

The problem seems probably related to repo side ...

I can build from source without problems with aokp rom. :cool:
[Galaxy S I9000 Android Development] malcho:
Really don't know.I can build with this manifest.
[Galaxy S I9000 Android Development] Perka:
yea me to so I will leave OP as is for now.
[Galaxy S I9000 Android Development] malcho:
I will ask stratosk maybe he can help us.
[Galaxy S I9000 Android Development] extralife:
You can build but kernel will not be updated.

... using tapatalk
[Galaxy S I9000 Android Development] malcho:
Can anyone confirm which is the right manifest?
[Galaxy S I9000 Android Development] extralife:
Today, after 2 months break, compiled a new kang.

(ram, samsung sources, kernel patch)

so my suggestion is : change kernel path

... using tapatalk
[Galaxy S I9000 Android Development] mialwe:
Hello, don't know if it helps but I tried a repo sync a few minutes ago as malcho notified me at MNICS thread and got this:

...
...
Fetching projects: 100% (259/259), done.
Syncing work tree: 100% (258/258), done.

local_manifest:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_samsung_galaxysmtd" path="device/samsung/galaxysmtd" />
<project name="CyanogenMod/android_device_samsung_aries-common" path="device/samsung/aries-common" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" />
<project name="CyanogenMod/android_kernel_samsung_aries" path="kernel/samsung/aries" remote="github" revision="android-samsung-3.0-ics" />
</manifest>

= sync worked correctly here!?
[Galaxy S I9000 Android Development] stratosk:
I have to repo sync cm9 since ages.

But I remember that I had problems syncing. Then I found that changing the protocol from git to https in manifest.xml did the trick form me.

(I'm sorry if my answer is not related with your issue)
[Galaxy S I9000 Android Development] ak:
What is the command for change protocol please?:)
[Galaxy S I9000 Android Development] stratosk:
Just replace the urls staring with git:// to https:// in .repo/manifest.xml. But as I said I don't know if this will resolve your issue. 3-4 months ago worked for me when I was not able to complete the sync (always was stuck at 98%). If I remember correctly I started with git and continue with https when it stuck.
[Galaxy S I9000 Android Development] kasper_h:
This was a problem a few months ago, but is no longer an issue. It is also not recommended to use https, as git is much more data-efficient.
[Galaxy S I9000 Android Development] malcho:
This manifest works ok.I managed to sync repo and build.

Thanks mialwe,stratosk,extralife,perka.
[Galaxy S I9000 Android Development] Perka:
OP upaded with this manifest.

Thx to all that helped.

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_samsung_galaxysmtd" path="device/samsung/galaxysmtd" />
<project name="CyanogenMod/android_device_samsung_aries-common" path="device/samsung/aries-common" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" />
<project name="CyanogenMod/android_kernel_samsung_aries" path="kernel/samsung/aries" remote="github" revision="android-samsung-3.0-ics" />
</manifest>
[Galaxy S I9000 Android Development] cdesai:
@OP no need to add those lines manually to .repo/local_manifest.xml, just lunch cm_galaxysmtd-userdebug (or breakfast galaxysmtd) and roomservice will automatically add and fetch those for u :)
[Galaxy S I9000 Android Development] ak:
repo sync

Hi all, this morning i can sync and build cm9 .... thanks for post and for the great thread ...... :)
[Galaxy S I9000 Android Development] extralife:
buildscripts/kernel

if anybody was wondering about the error at the end of compiling - 'kernel ...' - it's about some missings, particularly build.sh.

so i modified some files.

now, with default build-command

~/android/system/buildscripts/samsung$ [B]./build.sh galaxysmtd[/B]

you will get cm-build

+

flashable kernel-update-zip.

you can also build a standalone kernel-update-zip - >

~/android/system/buildscripts/samsung$ [B]./build.sh galaxysmtd kernel[/B]

---

How to?

extract zips content to

[B]~/android/system/buildscripts/samsung[/B]

(overwrite build.sh, and/or make a -bak-)
[Galaxy S I9000 Android Development] ak:
After execute the script i have this error:

***
*** Can't find default configuration "arch/arm/configs/root/android/cm9/kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig"!
***
make[3]: *** [root/android/cm9/kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig] Error 1
make[2]: *** [root/android/cm9/kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/root/android/cm9/kernel/samsung/aries'
make: *** [/root/android/cm9/out/target/product/galaxysmtd/obj/KERNEL_OBJ/.config] Error 2

And then this:

No private recovery resources for TARGET_DEVICE galaxysmtd
make: Nothing to be done for `updater'.
Elapsed: 1 min(s) 59 sec(s)

Have you any suggestion?

Thanks a lot.
[Galaxy S I9000 Android Development] extralife:
which script you've been started and whrere is your repo initialized?:confused:

anyway.

seems,there is something really misconfigured on your machine - and - hopefully you're not working as root @this stuff.

mtd-config-file should be here:

~/android/system/kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig

---

check your local_m.

repo ync

try again
[Galaxy S I9000 Android Development] ak:
info

root@anarkia
cd root/android/cm9/kernel/samsung/aries/arch/arm/configs
ls -lrt | grep cyanogenmod_galaxysmtd_defconfig

This is my setup .....

The problem is this path:

*** Can't find default configuration "arch/arm/configs/root/android/cm9/kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig"!
[Galaxy S I9000 Android Development] extralife:
you're using different repos, aren't you? :D

did you really install repo into root-directory?

-so tell me your path to cm-repo-

---

the problem ist the top of your tree, as you can see:

'arch/arm/configs/root/android/cm9/kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig'

---

quick solution:

cd your/cm/repo/path
git clone git://github.com/teamhacksung/buildscripts.git
[Galaxy S I9000 Android Development] ak:
You are right, with your script i have to modify my git path with standard "android/system".

I will try and report. :)
[Galaxy S I9000 Android Development] mialwe:
Hello all, this time I have to ask myself. Situation:

- TARed build environment (../system) after "make clobber" to backup

- made some experiments with stock Google sources (needed space for this)

- deletes Google sources

- restored TAR (worked fine a lot of times, not this time)

- tried syncing => error as in CODE block

- removed .../system/.repo

- reinitialized ics

- again, tried sync => error as ic code block

Fetching projects: 100% (248/248), done.
Traceback (most recent call last):
File "/home/cywhale/android/system/.repo/repo/main.py", line 385, in <module>
_Main(sys.argv[1:])
File "/home/cywhale/android/system/.repo/repo/main.py", line 365, in _Main
result = repo._Run(argv) or 0
File "/home/cywhale/android/system/.repo/repo/main.py", line 137, in _Run
result = cmd.Execute(copts, cargs)
File "/home/cywhale/android/system/.repo/repo/subcmds/sync.py", line 467, in Execute
project.Sync_LocalHalf(syncbuf)
File "/home/cywhale/android/system/.repo/repo/project.py", line 1051, in Sync_LocalHalf
lost = self._revlist(not_rev(revid), HEAD)
File "/home/cywhale/android/system/.repo/repo/project.py", line 1829, in _revlist
return self.work_git.rev_list(*a, **kw)
File "/home/cywhale/android/system/.repo/repo/project.py", line 1974, in rev_list
p.stderr))
error.GitError: CyanogenMod/android rev-list ('^eb7206d1ce3260e97d544f916a6b89115c8bf7af', 'HEAD', '--'): fatal: bad object eb7206d1ce3260e97d544f916a6b89115c8bf7af

is there any chance to recover this or do I have to simply wipe everything and start all over?
[Galaxy S I9000 Android Development] extralife:
@anarkia - if your repo syncs well, i would suggest you following:

open modified build.sh and have a look at line 288-313

then replace every '~/android/system' with '(~/:D)your/cm/repo/path'
[Galaxy S I9000 Android Development] lippol94:
It happened to me too once.

I don't remember what I did though :D

Did you do like said by the output?

cp /home/cywhale/android/system/.repo/repo/repo /home/cywhale/android/sgs1/kerneldev/repo
[Galaxy S I9000 Android Development] extralife:
@mialwe

git reset --hard

tried?
[Galaxy S I9000 Android Development] mialwe:
Thank you both, meanwhile I've tried both - no change. I'll just do a clean init and sync again.

EDIT: Worked, building again.
[Galaxy S I9000 Android Development] kasper_h:
I used you build script, but build didn't finish:

host Executable: clang (out/host/linux-x86/obj/EXECUTABLES/clang_intermediates/clang)
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMipo_intermediates/libLLVMipo.a: could not read symbols: Memory exhausted
collect2: error: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/clang_intermediates/clang] Error 1
make: *** Waiting for unfinished jobs....
true
Elapsed: 177 min(s) 11 sec(s)
[Galaxy S I9000 Android Development] extralife:
build.sh is original one from teamhacksung + a tiny addition - ist just makes a kernel-zip after cm-build-process has finished. in the original script, this was only configured for i777 and galaxys2 device (codeworkx) - my addition was galaxysmtd.

so there should really be no problem at the default build-process . :D

---

~177 min ...wow - it seems

Memory exhausted ...

---

try a clean one

rm -rf ./out/target/product
[Galaxy S I9000 Android Development] kasper_h:
See it now as well...just started building this morning and came back home a few hours later...didn't notice it took this long. I'll remove the out directory indeed and start completely fresh again.
[Galaxy S I9000 Android Development] lippol94:
Java 1.6.* for Ubuntu 12.04

Updating my linux box to Precise Pargoline, I had a few problems retrieving Java 1.6.* to succesfully compile CM9.

In fact, it seems that Java 1.7 is not allowed by the build script. So I downloaded all the needed packages from the old good ferramroberto's repository (compiled for Oneirc) and installed them on Xubuntu 12.04.

Building process went fine :)

So I packed all the required debs and uploaded to a friend of mine server. I hope you'll find this useful.

http://berryproject.de/private/personal-lippol94/Java-1.6-Precise-pangoline.rar

How to

Download and extract the rar archive to a folder in /home, let's say java-1.6

The open the terminal and type:

cd java-1.6
sudo dpkg -i *.deb
sudo apt-get install -f
sudo dpkg -i *.deb

That's it :)

You can check if Java version is correct by typing

java -version

@Perka: if you want to add this to OP, feel free to :)

It might be helpful.
[Galaxy S I9000 Android Development] kasper_h:
I was wondering about the build-script. It always gives a (non-fatal) error with regard to the prebuilt. (folder/script not found). So I looked in the build.sh script:

# Check for Prebuilts
echo -e "${txtylw}Checking for Prebuilts...${txtrst}"
if [ ! -e vendor/cm/proprietary/RomManager.apk ] || [ ! -e vendor/cm/proprietary/Term.apk ] || [ ! -e vendor/cm/proprietary/lib/armeabi/libjackpal-androidterm3.so ]; then
echo -e "${txtred}Prebuilts not found, downloading now...${txtrst}"
cd vendor/cm
./get-prebuilts
cd ../..
else
echo -e "${txtgrn}Prebuilts found.${txtrst}"
fi

Shouldn't the script refer to ~/android/system/vendor/cm in stead of vendor/cm? (knowing that the script is not located in the root)
[Galaxy S I9000 Android Development] kasper_h:
Do we still need the buildscript from teamhacksung?

Just building using ". build/envsetup.sh && brunch galaxysmtd" also works and results in a seemingly identical zip-file...
[Galaxy S I9000 Android Development] lippol94:
Well, it started to be useless as soon as galaxysmtd branch has been included into mainstream updates.

AFAIK the only thing that changes is an additional flashable package containing the stock kernel. Nothing more.
[Galaxy S I9000 Android Development] lippol94:
Maybe you can help me to sort out my doubt :)

If I apply any modification to the sources, I should expect some errors while repo syncing because of differencies with upstream code.

Is there any way to apply my personal modifications, w/out losing the ability to sync with upstream changes?

Thanks a lot! :)
[Galaxy S I9000 Android Development] malcho:
Cherry pick.

After sync changes will be override by source.

I don't know about personal mods.
[Galaxy S I9000 Android Development] lippol94:
Yeah, I know cherry-picking, but mods I want to apply are made with .patch files :)
[Galaxy S I9000 Android Development] malcho:
Ok.Try to patch it then repo sync and see if changes are reverted.i always backup my repos.

I tried some mods on manifest files-remove unnecessary files.
[Galaxy S I9000 Android Development] kasper_h:
If I change the source locally, I created a localtesting branch which follows the main branch:

>git branch --track localtesting github/ics

I then make my changes to the source code and commit them (git commit -a). This patch is then stored locally in the localtesting branch, but because this branch follows the remote/ics branch, new patches which get merged on the remote branch are still taken into acount (at the end of syncing with repo sync, your homemade patch is reapplied on top of the updated branch). In this way, you can always use your homemade patch on top of the most recent CM-sources.
[Galaxy S I9000 Android Development] malcho:
Very good.

How can i merge two branches?

I want to merge cm9 and CNA branches?

Is this possible?
[Galaxy S I9000 Android Development] kasper_h:
Go to the main branch you want to keep (let's say cm9 is the name of the branch in which you want to merge CNA). Then you can merge by:

>git checkout cm9

>git merge CNA

This only works if cm9 and CNA are both branches inside the same folder! If you have two separate repo's on you hard drive, or you want to merge a local with a remote branch, it's more complicated....
[Galaxy S I9000 Android Development] malcho:
Ok i will give a try.

Thanks
[Galaxy S I9000 Android Development] lippol94:
Thanks a lot man :) I knew you could give me the answer!

That's exactly what I was looking for ;)

Cheers!
[Galaxy S I9000 Android Development] kasper_h:
BTW, sometimes your local branch looses track of the remote branch (don't know why). You can see this as a message when syncing the repo (that your local branch is x commits behind). And I also use qgit to track the contents of the active branch, and here you can also see whether the local branch still tracks the remote branch (it should show a marker on top of the branch for both the local branch and the remote branch). If you need to reconnect the remote branch, you can use:

>git branch --set-upstream localtesting github/ics
[Galaxy S I9000 Android Development] lippol94:
Can you build CM9 today?

I'm having compile errors with sqlite..

Thanks :)
[Galaxy S I9000 Android Development] malcho:
No problems here
[Galaxy S I9000 Android Development] lippol94:
ls ~/android/system/vendor/cm/proprietary/lib/armeabi

please :)
[Galaxy S I9000 Android Development] kasper_h:
Did you download the fresh prebuilts?
[Galaxy S I9000 Android Development] lippol94:
I did it when I firstly set up my machine.
[Galaxy S I9000 Android Development] kasper_h:
But today there is a new patch merged which requires a fresh download of prebuilts:

http://review.cyanogenmod.com/#/c/16616/