yashsingh1/xdaforums huggingface dataset:
[Captivate Android Development] mnjm9b:
I am Developing an AOSP Froyo build for the Samsung Captivate.

It is being built from the ground up and will be missing many of the

bells and whistles that this community has grown accustom to.

NO samsung or att bloat

although that also means no samsung goodies.

I also won't be including google apps. (this can easily be added in later)

This is not a CM build. although a lot of help comes from that arena.

I feel it would be better to build from a pure AOSP base.

knowing that it was created and fully compatible with the device that

it is being used on.

from there, all the optional extras can be added.

for now it will need to be built from source

here is some reading material for those that don't know how...

http://xdaforums.com/showpost.php?p=6243873&postcount=1

http://help.github.com/

http://www.cmsgs.com/mediawiki/index.php?title=Howto:_Install_the_Android_SDK

http://developer.android.com/sdk/index.html

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

some helpful sources

www.github.com/CyanogenMod

www.github.com/teamhacksung

www.github.com/cmsgs

these are just a few I had immediately available.

IF ANYONE HAS BETTER SUGGESTIONS PLEASE LET ME KNOW AND I WILL ADD IT HERE.

what doesn't work:

cell network...( probably just needed to flash a modem)

wifi...

bluetooth

sdcard (internal & external)

audio

camera

gps

accelerometer/sensors

keymapping incorrect Fixed 4/21/2011

what works:

boots up

most apps that I had installed (I didn't wipe data so it kept all my apps)

live wallpapers

crazy fast graphics (next time I will run some benchmarks to compare)

the dim settings for brightness was a TON dimmer than stock (most likely better on battery)

touchscreen very responsive/accurate.

I am looking for any assistance on this. I have a lot that I plan on doing still but I don't have a lot of time to work on it.

So the more help I get the faster it gets done.
[Captivate Android Development] mnjm9b:
HOW TO BUILD FROYO FOR CAPTIVATE

After reading the reference material above

I use Ubuntu 10.04 32bit at ubuntu.com

10.04 is a LTS release (long term support) so even though there are newer releases I would stick to that one.

you will need java5 NOT 6 so if you have 6 installed already you should uninstall it.

(there is a way to have both at the same time but I don't recall the steps at the moment)

sudo apt-get install sun-java5-jdk

some extra stuff you will need

sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind

make sure you are in your home directory (~/ = home directory)

cd ~/

create a working directory and go into it

mkdir mydroid
cd mydroid

copy my repo to your computer

git clone git://github.com/aosp4captivate/froyo.git

once that is done. (takes a while)

download this captivate_update.zip

and this initramfs.zip

Place the captivate_update.zip in the ~/mydroid/froyo folder.

Extract the initramfs folder from the initramfs.zip into ~/mydroid/froyo/device/samsung/captivate

there seems to be a permissions issue transferring from github

for now here is a quick fix for this

cd ~/mydroid
chmod -R 777 froyo

go into the captivate folder and run unzip script

cd ~/mydroid/froyo/device/samsung/captivate
. unzip-files.sh

yes that is a period before unzip-files.sh

now from the froyo directory setup the build

cd ~/mydroid/froyo
. build/envsetup.sh
lunch

select the captivate build

then

make -j4

I use 4 because my computer can handle 4 Jobs at once

just leave the -j4 off if you have a slow single processor.

this takes a LOOOOOOOONG time

for me an initial build takes about 1 hour.

subsequent builds are faster.

the result is in ~/mydroid/froyo/out/target/product/captivate

this is just off the top of my head so again

IF YOU HAVE ANY BETTER BUILD INSTRUCTIONS PLEASE LET ME KNOW...
[Captivate Android Development] bpodz34:
Hey Man before you put all of this work in, why dont you make a gingerbread asop rom. I dont see the point in putting all of this work into an outdated os
[Captivate Android Development] a.vandelay:
why don't you?
[Captivate Android Development] SkitchBeatz:
Froyo is easier at this point.. and im sure some people prefer aosp over touchwiz
[Captivate Android Development] bpodz34:
No need to be a ****, just trying to help
[Captivate Android Development] mnjm9b:
I already addressed this statement in the OP...

please don't clutter this up with this nonsense!!!
[Captivate Android Development] Grandelama:
An AOSP Froyo build would be an important step for the Captivate community, good luck with your work!
[Captivate Android Development] gocats7:
good luck, look forward to it.
[Captivate Android Development] novagator:
Appreciate your work. Good luck.
[Captivate Android Development] lrs421:
Awesome. Looking forward to it.
[Captivate Android Development] gunnyman:
Good idea ! I can help with testing if you like.
[Captivate Android Development] shishir95:
Sign me up for testing :) I actually am in the minority for working GPS so I can test that
[Captivate Android Development] demonte21:
I'm glad to hear that!

I'm in for testing as well if you need help.

Good luck!
[Captivate Android Development] xyrovice:
Yes please.

And I'm DTT.

Down To Test.
[Captivate Android Development] g0dzilla32:
not a troll, or hater, or dev but I thought an asop build was not possible because the touchwiz framework is tied in to deep and no open source drivers..
[Captivate Android Development] kannonball2290:
best of luck to you, im here to help test if needed
[Captivate Android Development] DAGr8:
I fail to understand this statement please explain ?

everything is possible , not that I understnad the need for it ...

Maybe im misquoting you , and dont get me wrong here , any captivate development is good , but I fail to understand why starting form CM is a bad idea and even why we need to work of ( like fork roms of ) something that was AOSP build for samsung while you already stated that :

we woudl then be makin roms 'ripped ' from CM like sooooo many other phone ..

IMHO , your work is redoing what CM is doing for many phones already , wouldnt it be much easier / not to mention rewarding for the community to just try and build cm 'from source' for the samsung captivate ?
[Captivate Android Development] ytt3r:
Naw, I'm running an AOSP build myself right now. While the drivers aren't opensource for the Captivate, do you remember that there is a little phone called the Nexus S that has almost IDENTICAL hardware? Everything from the Nexus is opensource (pretty sure...) and the drivers are compatible with our Captivates. The only thing that we have that they don't is the second SD Card, which is an easy hack-in, and the audience noise-canceling mic (also easy, as the Nexus 1 has the same mic/chip.)
[Captivate Android Development] Djazin:
O.o did the OP's cappy blow up or something, the accounts disabled >,> ~inches back~ joke aside, if you do have any thing needed testing give me a shout looking for something built off the cappys them selfs to though I must admit there is a (explicit) ton of roms for nomage as it is from the vibs source that are all well and good. Good luck, well back to flashing
[Captivate Android Development] harrynghiem:
Good sound. Keeping your work. I'll try your rom & respond later.

Thks for your job
[Captivate Android Development] Kaik541:
a few things I have found with this

1) init.rc needs to disable the playlogos1 section and to uncomment the bootanim service

2) the permissions aren't set to a+x on build/core/find-jdk-tools-jar.sh

3) permissions also aren't properly set on prebuild/linux-x86/toolchain/arm-eabi-4.4.0/bin/

after setting all the proper permissions and running a "lunch" and "captivate", it outputs the content of the build goal (android 2.2.2, target_product=full_captivate, etc) and then just abruptly stops.
[Captivate Android Development] mnjm9b:
1st Thank you for playing...

Not sure about the permissions, it ran fine for me without changing them. Maybe it got changed when I pushed it?

Also, did you do a "make" after lunch?
[Captivate Android Development] Kaik541:
oh drat, I somehow completely forgot to run the make command *facepalm.jpg*

doing that complains about the permissions of build/tools/findleaves.py (which chmod a+x fixes) but then it complains about the wrong version of java... wants 1.5 instead of 1.6 (double drat!)... I may have to put this on a VM with something running 1.5, I forgot building with 1.6 wasn't supported in AOSP until 2.3... can't get rid of the 1.6 as I use it for building CM7 xD
[Captivate Android Development] mnjm9b:
Lol...

The permissions issue is strange...

But yeah, you need java1.5.

I know there is a way to have both installed at the same time.

Don't remember how.
[Captivate Android Development] Kaik541:
ok, building in a 32 bit VM with java 1.5 and after fixing the permissions errors, it seems to be successfully building! huzzah

edit: wait, I lied, seems to break at some point with relation to android.mk with wpa_supplicant.
[Captivate Android Development] mnjm9b:
I figured out what the problem is...

I got carried away cleaning things up for pushing to repo.

I will fix it ASAP.
[Captivate Android Development] askpcguy:
Weird I have not seen an email saying there was a reply in this thread!

What's new?

Sent from the miui matrix SGH-i897
[Captivate Android Development] mnjm9b:
could you elaborate on this a bit?

and now...

lets try this again...

I had to update with all the hidden files like ".config" etc...

so it *should* now work.

I still don't understand the permissions issue but maybe that will no longer be an issue.

just re-sync with git://github.com/aosp4captivate/froyo.git

however, I removed the proprietary stuff from the repo

so you will need to get them from here

http://www.multiupload.com/3FQUBTJWWY

And

http://www.multiupload.com/NBL6I22KVB

EDIT: removed for update...

unzip the folder from initramfs.zip into the device/samsung/captivate folder

and place the captivate-update.zip into the root of the project folder (froyo)

then follow the previous build instructions
[Captivate Android Development] mnjm9b:
Anybody still interested in this????
[Captivate Android Development] goob1284:
I sure am! But im kinda waiting on a cwm zip or an odin cause most of the stuff you guys say confuses me and I don't think I can really do it
[Captivate Android Development] ferman:
Interested in your development of aosp froyo???!! YES!
[Captivate Android Development] bryman27:
I'm still very interested!
[Captivate Android Development] tytdfn:
I have been from the start!
[Captivate Android Development] kannonball2290:
As you said only people who knew what their doing... Just waiting on the simpler solution. We do greatly appreciate the hard work though!

From the my millennium falcon using the premium thingy
[Captivate Android Development] KonaZXIII:
I've been stalking this thread since day one. :cool:
[Captivate Android Development] nakedninja42:
I've been following since the beginning, still not much use to you until its available for testing for us non-devs.
[Captivate Android Development] askpcguy:
Wait I thought this was gingerbread asop.

Sent from the miui matrix SGH-i897
[Captivate Android Development] Kaik541:
line 460-462 of init.rc should be commented out

while lines 546-550 of init.rc should be uncommented

sorry I haven't been back to look more into this, I've been busy looking for work lately and haven't had the time to really invest in this yet.

based on what? where the first line of this thread says AOSP froyo?
[Captivate Android Development] DAGr8:
ok ok , I know I been negative about this whole idea form the start, but they seem to be general interest inthis so , here is what I think :

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

all the sources are there , they use diffrent modem and diffrent kernel , so making calls maybe an issue , but at least it woudl boot ..
[Captivate Android Development] mnjm9b:
I knew what you meant I'm just not sure why...

what is the benefit of those changes.

and no need to be sorry... I get it.

I appreciate your suggestion.

however, I am well aware of almost every source available for building android.

also, that link was for an ECLAIR build for the Fascinate.

I know there are a lot of similarities and the sources listed do provide good example code.

as far as this build not booting...

It might actually boot fine, I just haven't given much effort to doing so

due to it not being worth it yet.

I am sure I (or anyone else) could get this in a much more

useful state without much effort.

I just haven't had much time to dig into the details yet.

If I don't get any "devs" to come on board soon

I will post more step by step details in hopes to get some amateur (wanna be dev) help.

I could use all the help I can get.

its not hard.

just time consuming.
[Captivate Android Development] Kaik541:
doing this will remove the proprietary bootsamsung.qmg support and revert to the AOSP bootanimation.zip support (end-user customizeable and more in line with AOSP).
[Captivate Android Development] mnjm9b:
Thank you...
[Captivate Android Development] mnjm9b:
Ok,

You'll never guess what I was doing on my phone just now.....

:)
[Captivate Android Development] mnjm9b:
Updates tomorrow...
[Captivate Android Development] brd912:
Send it to me. Ill test it!
[Captivate Android Development] mnjm9b:
to all the requests here in the forum and in my inbox...

this will be available for testing when I release it.

for now if you are too inpatient to wait for it

I suggest you learn to build it.

it's not that hard...:cool:
[Captivate Android Development] brd912:
sorry about that:) haha
[Captivate Android Development] mnjm9b:
no worries...

I just cant keep up with all the requests.

my inbox will get flooded.
[Captivate Android Development] mnjm9b:
NOW for the update...

last night I successfully built and flashed AOSP Froyo 2.2.2 on my captivate.

funny thing... I left it sit while It first booted up and when I came back to it the screen was still black.

so I figured it was another failed attempt.

to my surprise when I pressed the power button...THERE it was!!!!

now for what works and what doesn't...

what doesn't work:

cell network...( probably just needed to flash a modem)

wifi...

bluetooth

sdcard (internal & external)

audio

camera

gps

keymapping was incorrect (menu was back, home was menu, back was ?, and search was power)...easy fix.

accelerometer/sensors

what works:

boots up :D

most apps that I had installed (I didn't wipe data so it kept all my apps)

live wallpapers

crazy fast graphics (next time I will run some benchmarks to compare)

the dim settings for brightness was a TON dimmer than stock (most likely better on battery)

touchscreen very responsive/accurate.

I made a lot of changes to the build environment so I am updating the repo today.

I will report back when it is done uploading...
[Captivate Android Development] kannonball2290:
Holy hell this is a good morning!!! :D

Quick question, is this gonna be a easier install or the way you had your previous update??

From the my millennium falcon using the premium thingy
[Captivate Android Development] bfgarzilla9k:
Sounds great! I'm actually very excited to see what becomes of this :D Good luck, you're doing an outstanding job!
[Captivate Android Development] brd912:
Patiently waiting. Like a spider waits for a fly to land in there web
[Captivate Android Development] mnjm9b:
or like...

watching grass grow

or paint dry....lol

it will be up later today :)
[Captivate Android Development] brd912:
Ok,ill be waiting. Like a snake scopes out a rat;)
[Captivate Android Development] mnjm9b:
updated OP and build instructions
[Captivate Android Development] mnjm9b:
Hopefully the permissions issue is fixed also.
[Captivate Android Development] mnjm9b:
Sorry...

I used the wrong syntax for cloning my repo

try this instead

git clone git://github.com/aosp4captivate/froyo.git
[Captivate Android Development] Kaik541:
unfortunately not :(

chmod a+x prebuilt/linux-x86/toolchains/arm-eabi-4.4.0/bin/*

chmod a+x prebuilt/linux-x86/sdl/bin/sdl-config

chmod a+x build/tools/findleaves.py

chmod a+x build/core/find-jdk-tools-jar.sh

and one other relating to "merge" that I don't remember are all required to even get it to build on my box, but the good news is it does seem to be building successfully.

edit: literally right as I hit enter it breaks.

prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-gcc -mthumb-interwork -o out/target/product/captivate/obj/lib/crtbegin_dynamic.o -c bionic/libc/arch-arm/bionic/crtbegin_dynamic.S
arm-eabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
make: *** [out/target/product/captivate/obj/lib/crtbegin_dynamic.o] Error 1
[Captivate Android Development] mnjm9b:
I am completely lost on the permission issue...

I have all the files on my end set to 777

so either there is a problem with github changing permissions

or the problem is on your end.

without anyone else commenting on this its hard to say.

as for the error.

sounds like you are missing build tools

do you have "build-essential" installed?
[Captivate Android Development] Kaik541:
yes, running on ubuntu 10.04 same as you. 32 bit and all that jazz. as for the permissions errors, I can live with it, just letting you know is all. trying to do another build with CROSS_COMPILE pointing to the direct path and seeing if that will help
[Captivate Android Development] mnjm9b:
ok I can confirm the permissions issue after re-downloading from github.

try

chmod -R 777 froyo

from the mydroid directory to fix permissions

although That has nothing to do with your build error.

I am currently rebuilding from the fresh download and a simple "make" is building it fine.

I will let it continue just to make sure but I have never had to cross_compile to build. (except when building kernel)

EDIT: Built fine.

are you running in a virtual machine?
[Captivate Android Development] Endoran:
Congratulations on getting it to boot! :D
[Captivate Android Development] Kaik541:
yes I am running in a virtual machine, I was wondering if that might be part of the problem, but (besides lack of RAM) I'm not sure how this would impact things. will check again in a bit when I have a moment.
[Captivate Android Development] KCutrer1:
When I was building CM7 from sources like this it wouldn't work in a VM. I ended up just installing ubuntu on its own partition and that cleared everything up.
[Captivate Android Development] Kaik541:
I've managed to build CM7 many times in a VM, and I know plenty of developers who do the same, so I don't see why this is it.
[Captivate Android Development] mnjm9b:
yea, there is no reason it shouldn't build in a VM.

but have you built anything in the current VM that your using now?

I have had similar issues in an installed 8.04 and I eventually had to

uninstall and reinstall several build tools (build-essential, gcc, cpp etc...)

not sure what the exact problem was.
[Captivate Android Development] Kaik541:
I haven't built anything in this particular VM (I keep them separated to prevent package contamination unless they're building the same version of android). I'm going to attempt to build on my 32 bit laptop (which is actually a horribly underpowered netbook), so if it builds find in there, I'll chalk it up the VM being the issue... even if it shouldn't be
[Captivate Android Development] mnjm9b:
Working on a few more fixes.

I got the keymapping fixed and I am Hopefully going to get sdcard working tomorrow. (at least the internal)

I will push the fixes tomorrow night.

Once I get at least phone working I will wrap up a CWM zip for all you eager testers.
[Captivate Android Development] syl0n:
Awesome work!
[Captivate Android Development] Kaik541:
ok seems to actually have been a problem with the VM, as I definitely passed the part that usually failed in the VM. I'll look into what's making it act up as building on a netbook is not feasible.

edit: whatever, I just chmod -R 777 on the VM and it works fine... guess there was another permissions error somewhere I was missing.
[Captivate Android Development] mnjm9b:
Oh that is good news.

Glad to hear it.

Especially because even with all the downloads...

Your the only one that is saying anything.

Plus, I expect you may have some good ideas on what to fix.

Although, I have never had to chmod anything I built before

so I am not sure what I am doing wrong with github.
[Captivate Android Development] mnjm9b:
I am not going to be able to work on the sdcard today

so I went ahead and pushed the keymapping fixes to the repo.

its probably better to just push one change at a time anyway...
[Captivate Android Development] Kaik541:
I have an idea for phone based on the CM6.1 port for SGS, would you happen to have the update script you are using (don't need the full zip, just want to make sure I know what I'm doing)
[Captivate Android Development] mnjm9b:
T

Not using an update script....yet.

What is it your not sure of?
[Captivate Android Development] Kaik541:
I'm not entirely sure what all is being installed, but are you using the stock KB1 kernel with this? are you just pushing the newly created system apps over top of your current setup?
[Captivate Android Development] mnjm9b:
yes, for now I am just writing the system.

I am currently running cog4.3 with the stock kb1 w/voodoo kernel.

and I use this dirty trick:

go into out/target/product/captivate folder

and run this

md5sum system.img > nandroid.md5
mkdir aospfroyo
cp system.img aospfroyo/
cp nandroid.md5 aospfroyo/

then copy the aospfroyo folder to clockworkmod/backup

on the internal card of the phone.

what I do then is reboot to recovery, backup current, restore aospfroyo, reboot.

don't wipe anything.

there are issues with doing it this way (especially with voodoo enabled.)

so I will eventually make a proper CWM zip

but for now it gets it on the phone for testing.
[Captivate Android Development] Kaik541:
oh dirty tricks! if you didn't get back to me within the next hour (when my test build finishes) this was what I was going to do! I'll let you know how it goes once I install it
[Captivate Android Development] js22:
Don't know if this is of any help, but i downloaded the code from github and built it following the directions on OP. Everything went fine. I'm on Fedora 13.

The one issue I had was invoking the correct version of java. I didn't want to uininstall jdk 1.6, so I dug around a little and learned how to switch between installed versions. On Fedora (and prolly on most linux distros), the command is update-alternatives. (read man page, do a google)

Quick Version: run this one time only to get it set up :

# for i in java javac javah jar appletviewer; do

update-alternatives --install /usr/bin/$i $i /usr/java/jdk1.5.0_22/bin/$i 15022 ;

done

Anyway, no time right now for testing, but +1 for the "I'm watching this and think its very cool" sentiment.
[Captivate Android Development] hedgehogmd:
First off i Just wanted to say Thank you for all your hard work. I Followed your instructions to the T in the OP and i must say it's Right On. Built on the first try and i'm very excited to try it out. I have to wait till i get my cappy back from repair hopefully it will be this week. Thanks Again :D
[Captivate Android Development] Kaik541:
hmm seems my first attempt at playing with RIL was very unsuccessful! funny enough I can enable usb tethering without an error though, just nothing to connect through!

I seem to have issues with /system/bin/tc not being able to find certain connections like rmnet0 and I have no idea where these are set. I may have also introduced a new bug in my testing where the screen doesn't wake up from sleep.

I will look more into this later this week, but my knowledge on this is really limited so I'm not sure how much help it'll be.