yashsingh1/xdaforums huggingface dataset:
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
DEVELOPMENT ONLY. USER DISCUSSION IS IN THE USER THREAD IN SGH-I777 GENERAL

Have you noticed how angry Cid looks after the white burst? Don't make us tell him YOU are the cause of all the problems in his life!​

CyanogenMod is a free, community built, aftermarket firmware distribution of Android 4.1 (JB), which is designed to increase performance and reliability over stock Android for your device.

#include
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*
* Submitting bug reports on nightly builds is the leading
* cause of male impotence.
*/

CyanogenMod is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. CyanogenMod does still include various hardware-specific code, which is also slowly being open-sourced anyway.

All the source code for CyanogenMod is available in the CyanogenMod Github repo. And if you would like to contribute to CyanogenMod, please visit out Gerrit Code Review. You can also view the Changelog for a full list of changes & features.

Device: https://github.com/teamhacksung/android_device_samsung_i777

Common: https://github.com/teamhacksung/android_device_samsung_galaxys2-common

Kernel: https://github.com/teamhacksung/android_kernel_samsung_smdk4210

CyanogenMod: http://github.com/CyanogenMod

http://teamhacksung.org/wiki/index.php/CyanogenMod10:How_to_build

If you're going to reuse our work, which we're doing for free, be fair and give proper credits.

This is the only payment we're really demanding and we deserve it to be mentioned because of the countless hours we've put into this project.

Open-Source doesn't meant Out-of-Respect!!!

USER DISCUSSION THREAD: http://xdaforums.com/showthread.php?t=1796733 - Unless it is discussing patches or how to build from source, it almost surely belongs there.

To be clear, posts without detailed instructions on how to reproduce a problem and without attached logs will be ignored.

Always provide android (adb logcat) and kernel logs (adb shell dmesg).

If it's a RIL problem we would need a radio log (adb logcat -b radio), too.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Now, how were any of the above posts development-related?

Looks like we're gonna have to send Cid on a little hunting trip.
[AT&T Samsung Galaxy S II SGH-I777] Divine_Madcat:
They were not.

Reminder to people - this is a development thread. Useless comments like "Sweet!" and "Thanks" are not dev related. From here on out, Red and I will delete ANY non dev related posts, without warning or notice. Entropy has mentioned the general discussion thread - USE IT.
[AT&T Samsung Galaxy S II SGH-I777] sjwaste:
I'd like to give building from source a shot in order to learn something. I'm looking at the instructions posted here:

http://teamhacksung.org/wiki/index.php/CyanogenMod10:How_to_build

But that specifies the build target as the i9100. Should I be doing that, and then pulling your kernel git, building that, and replacing the i9100 kernel with the i777 binary?

Is this an appropriate question for this thread?
[AT&T Samsung Galaxy S II SGH-I777] drakester09:
Use

./build.sh i777

and you should be fine. :good:

A general and very hastily made guide if you want to compile CM10 for i777 yourself:

The easy but experimental way will be all good for JB, follow it up to the point where it asks you

Say n. Why? Because it has not been updated to use the jellybean branch. It will only display GB and ICS. We do not want that. ;)

Then do this manually:

mkdir ~/bin
export PATH=~/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo

After that, go to your working dir (~/android/system as default), initialize the repo and sync.

repo init -u git://github.com/CyanogenMod/android.git -b jellybean
repo sync

After it's done (it will take a long while), you need to copy the propietary binaries from your device (make sure it has a CM9-10 build installed!).

With the android-sdk and platform-tools installed (we need adb for this to work, refer to Teamhacksung's and CM's wiki), run:

cd ~/android/system/device/samsung/i777/
./proprietary-files.sh

Go back to your working dir (~/android/system/) and then you can start the build with ./build.sh i777

After xy minutes you'll have your own kang of CM10. :highfive:

Hope it helps getting your build going.

Remember: if you kang don't forget the guys who made it possible in the first place. Give CM team some credit. ;)

Edit: Added on 27 Jul, IFyou have issues building, such as the ones reported below regarding missing repos or such.

Create a file inside .repo of your working dir (~/android/system/.repo/) called local_manifest.xml

Paste the following inside:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="teamhacksung/buildscripts" path="buildscripts" remote="github" revision="jellybean">
<copyfile dest="build.sh" src="samsung/build.sh" />
</project>
<project name="teamhacksung/android_device_samsung_i777" path="device/samsung/i777" remote="github" revision="jellybean" />
<project name="teamhacksung/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="jellybean" />
<project name="teamhacksung/android_kernel_samsung_smdk4210" path="kernel/samsung/smdk4210" remote="github" revision="jellybean" />
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="ics" />
</manifest>

This only applies while the SGS2 family device trees have not been added to the CM mainline repo. Once it's there, DO NOT use these. They will be outdated by then. ;)
[AT&T Samsung Galaxy S II SGH-I777] Slavestate:
Im on Mac OS X so Ive basically gone through the Cyanogen wikis instructions for setting up the workspace and compiling, and Im just substituting your commands where I need to.

So far all is well but Im still syncing the repo and it says its going to take awhile..

Now on the Team Hacksung wiki instructions, where I initially started, I got as far as downloading and chmoding the build.sh file, but couldnt run the 'prepare' step because it looks like its only for Ubuntu or Arch Linux. Since you didnt make any mention of it, am I safe to assume I can skip this step?

Im guessing the prepare flag just runs the steps that setup and install the repo which I did manually??

Let me tell ya this sure aint as easy as compiling MAME!! :D
[AT&T Samsung Galaxy S II SGH-I777] drakester09:
You are correct. The prepare just does all the environment setup for Ubuntu/Mint and Arch (running Mint myself, I'm a casual).

Best of luck mate! :highfive:
[AT&T Samsung Galaxy S II SGH-I777] sjwaste:
I've had issues compiling AOSP on OSX. Are you on 10.6 or 10.7? If on Lion, make sure and comment out those QEMU targets like the Wiki says. On 10.6, I've had other issues, having more to do with getting a working version of GCC. For some reason I had GCC 4.2 on this machine under 10.6.8 and the latest XCode, so I had to use Ports to install something newer AND THEN MAKE SURE it either had priority in the PATH or the symlink pointing at 4.2 was repurposed to the correct one.

FWIW, this was for CM9 and the Nook Color - not sure how CM10 and the i777 will behave, but to be honest, I've just decided not to hassle with OSX again and I set up a Ubuntu VM.
[AT&T Samsung Galaxy S II SGH-I777] kool2zero:
I'm logged into my Ubuntu machine through citrix from work. Is there a way to get the prop files from windows?
[AT&T Samsung Galaxy S II SGH-I777] sjwaste:
Thanks for the help. I'll be giving that a shot. No kanging intended, you guys will build a better ROM than I will, so I don't really even intend to modify anything aesthetically. I have a bluetooth issue very specific to the head unit in my car, so I'm hoping to fix that and submit a patch. That and curiosity are about as much as is motivating me right now.

Step 1 is to reproduce it in JB, and beyond that, figure out how to fix it. Off hand, is the bluetooth stack in JB significantly different than ICS, or just a newer version of BlueZ?

---------- Post added at 09:17 AM ---------- Previous post was at 09:12 AM ----------

Not easily, but here is the shell script that extracts them:

https://github.com/teamhacksung/android_device_samsung_i777/blob/jellybean/proprietary-files.sh

You can have a look through and do some of the steps manually, but it looks like a pain. Maybe with cygwin? I don't think I'd try it.
[AT&T Samsung Galaxy S II SGH-I777] alejobog:
Entropy, I'm from Colombia, I have successfully translated several ROMS to Spanish, I have free time on holiday from college, I want to help translate the Spanish ROM. thanks
[AT&T Samsung Galaxy S II SGH-I777] tmckenn2:
mac isnt going to be very fun to work with. if you had the option id suggest dual booting. but to each his own.

the environment in linux is very easy to set up, certainly easier then with ICS, there were a few flags that needed to be set and werent well advertised bc they were bugs. generally if you look for john BQ at google for bug reports he makes it very clear what is broken in the aosp tree. granted this is CM and the CM team often implements fixes and maintains their own code and ensure it is compileable.
[AT&T Samsung Galaxy S II SGH-I777] Slavestate:
Well I let the repo download and sync all night last night, ran the envsetup.sh just a few minutes ago, then moved onto the 'lunch cm_i777-userdebug' command. It attempted to retrieve the device repo from the Github and after downloading some stuff, I get this:

error: revision jellybean in CyanogenMod/android_device_samsung_i777 not found

Repository synced!

Looking for dependencies

Dependencies file not found, bailing out.

Done

build/core/product_config.mk:189: *** _nic.PRODUCTS.[[device/*/i777/cm.mk]]: "device/*/i777/cm.mk" does not exist. Stop.

** Don't have a product spec for: 'cm_i777'

** Do you have the right repo manifest?

I know I ran all the right commands cause I just copy/pasted direct from both drakesters post as well as Team Hacksungs wiki but Im stuck here.

Any ideas?? Should I redo the whole repo init/sync again?? Wipe it all out and start over??

Im on 10.6.8 by the way if that matters.. Lion aint going anywhere near my Mac Pro..
[AT&T Samsung Galaxy S II SGH-I777] tmckenn2:
Ensure that you have the proprietary files downloaded. That is key. They also need to be from cm9 or cm10. Also on a lunch command it shouldn't be dl anything. Try using the build.sh instead. Lunch combines both brunch and make into one command. Aka it sets environment variables then builds. And it seems to be having problems with that. You can try brunch then make. Or go back a page and use the build command
[AT&T Samsung Galaxy S II SGH-I777] drakester09:
I'll post my local manifest.xml when I get home. You need to add teamhacksung's sgs2 jb repos. They haven't been added to the CM main repo.
[AT&T Samsung Galaxy S II SGH-I777] tmckenn2:
I was just about to say that now that I reread the problem. Sorry. You can ignore my other post...
[AT&T Samsung Galaxy S II SGH-I777] Slavestate:
Yeah I was wondering if I had to add something to pull them from elsewhere hehehe.

Cool thanks Drakester! Im off to work til 9pm so no hurry post the xml whenever you get a chance!

Heres whats in mine currently (taken from the pastebin link posted on Team Hacksungs wiki):

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

<manifest>

<project name="teamhacksung/buildscripts" path="buildscripts" remote="github" revision="jellybean">

<copyfile dest="build.sh" src="samsung/build.sh" />

</project>

</manifest>
[AT&T Samsung Galaxy S II SGH-I777] msgfromside3:
Thanks for the info! I was pulling my hair last night and thought I missed something - that was my next step that I was thinking of trying when I get to it next time. :)
[AT&T Samsung Galaxy S II SGH-I777] drakester09:
Here you go. ;)

I grabbed the template from Pier in the i9100 forums and changed a bit. Thanks to him.:good:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="teamhacksung/buildscripts" path="buildscripts" remote="github" revision="jellybean">
<copyfile dest="build.sh" src="samsung/build.sh" />
</project>
<project name="teamhacksung/android_device_samsung_i777" path="device/samsung/i777" remote="github" revision="jellybean" />
<project name="teamhacksung/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="jellybean" />
<project name="teamhacksung/android_kernel_samsung_smdk4210" path="kernel/samsung/smdk4210" remote="github" revision="jellybean" />
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="ics" />
</manifest>

These repos are good only while they have not been added to CM mainline. When they get integrated to the main CM repo, change to those ones.
[AT&T Samsung Galaxy S II SGH-I777] Slavestate:
Wow holy crap that's a lot more then they give you the Hacksung wiki. Go figure I spend all night setting it up and now Entropys back in business haha.
[AT&T Samsung Galaxy S II SGH-I777] shri_chanakya:
I build cm10.1 on my linux box quite often. However I see a very high nice load and average loads during the build. Is this with everyone or is there something wrong I am doing.

I have tried -j1, -j2 and -j4 option during build but to no avail.
[AT&T Samsung Galaxy S II SGH-I777] msgfromside3:
Can't agree more. I was measuring if Phantasy Star Online 2 installation+patch or I figure out this problem would be faster while playing Monster Hunter on PSP waiting for repo to sync again.

Thanks! I will try out tonight/weekend.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
I don't think it's significantly different. If it affects you in ICS, I'd suggest reproducing and trying to patch in ICS. It's a more stable target. Once you've patched it in ICS, it's a lot easier to forward-port to JB.
[AT&T Samsung Galaxy S II SGH-I777] Slavestate:
Thanks to Drakester's local_manifest I finally got everything settled and tried my first build about 10 minutes ago.

It stopped here so hopefully someone can point me in the right direction..

Basically, after making the proper .dmg for Mac OS X, all I did was follow the steps from the Hacksung Wiki in the 'How to get sources' section, mixed with the little changes here and there drakester posted. I synced the repo, ran the envsetup.sh, ran the lunch cm_i777-userdebug, got the proprietary files, and ran build.sh i777, and thats what I got.

Tried to build just the kernel right now and it doesnt look like that built either. Right after it installed the signapk.jar, it tells me elapsed time and then stops. I dont see any zimage or anything in the output folder though unless Im not looking in the right spot..

EDIT - okay one more before Im off to work hehe.. Just did a 'make clean' and started over (the errors posted above was after like the third time I ran the build script) and this was my initial stopping point:

This all happens right after the error related to adler32.c that also happened in that first bit I posted..
[AT&T Samsung Galaxy S II SGH-I777] sjwaste:
That error is a gcc bug specific to osx. I never solved it and I tried every 4.x from ports. You might just want to save some trouble and create a Ubuntu VM.
[AT&T Samsung Galaxy S II SGH-I777] Slavestate:
Damn you Apple and your half ass BSD implementation!!!

Hmm I'll probably just start over then and copy my tree over to Ubuntu like you said.
[AT&T Samsung Galaxy S II SGH-I777] tmckenn2:
You are making he right decision. Setup should take less than an hour. If you know what your doing it can take as little as 15 min
[AT&T Samsung Galaxy S II SGH-I777] drakester09:
+1

I tried to get all working in vm at the office (for obvious reasons I can't just partition the hd and dual boot).

All went okay until I tried to build a full Rom/fw, the linker got killed midway all the time (signal 6 abort). Not enough memory... It can compile a kernel but for the full rom you need heaps more. :)

This was with 2gb ram allocated for the vm, couldn't add more because of the applications I had to use on the host.

I'd really recommend a real install in a separate partition if you plan to build the whole rom. It will also compile faster and JB takes quite some time...
[AT&T Samsung Galaxy S II SGH-I777] msgfromside3:
Hmm I was able to build the full with 2gb on my vm. I am using virtualbox. Are you also on 64 bit OS for your vm?
[AT&T Samsung Galaxy S II SGH-I777] drakester09:
How much swap did you have? I think I had barely nothing, that affected too.

I was using vmware player.
[AT&T Samsung Galaxy S II SGH-I777] msgfromside3:
That should definitely affect it. I let Ubuntu decide the swap size - I don't have my vm right now but I think it allocates 100% of RAM size you allocate.
[AT&T Samsung Galaxy S II SGH-I777] XGX5309:
Those of you compiling for yourself remember to install libxml2-utils either through apt-get or synaptic. Got nearly all the way through a build and it takes a dump because I don't have xmllint which is now required for Jellybean builds.

sudo apt-get install libxml2-utils
[AT&T Samsung Galaxy S II SGH-I777] ddominator:
Hello everybody. I finished compiling Jellybean using the instructions. Is it the same for everybody that the baked ROM detects an external keyboard every time you boot it up? I don't know if something was wrong with how I compiled it.
[AT&T Samsung Galaxy S II SGH-I777] Fusion777:
Kind of a nub question here, but I've always been curious:

Why is it we have to extract the proprietary files from our device vs. having a downloadable bundle somewhere? Is it a copyright thing? Binary files not liking to live in GIT? Something else?

I'm trying to get CM10 to build to install on the device but it needs the proprietary files from my device... and my device must be running CM10. Kind of a catch-22 thing :)
[AT&T Samsung Galaxy S II SGH-I777] Slavestate:
You do know there is a download link in the OP for Entropys latest experimental build right? You did read the first post right?
[AT&T Samsung Galaxy S II SGH-I777] Fusion777:
Yes I did, and reread it - but I think you may have misinterpreted my question.

I'm curious specifically as to why we must first install CM10, not how. One would think it would be easier to just grab a downloadable bundle of the i777 proprietary files vs. the whole ADB/extract process, so I'm curious about it. I'm certain there's a good reason, don't take it as me challenging the system ;)
[AT&T Samsung Galaxy S II SGH-I777] XGX5309:
You can be on CM9 or CM10 to pull the proprietary files since they're both pulling the same files. There are no new proprietary files for CM10. As for your other qts... IDK. I've wondered that myself, just never asked. lol.
[AT&T Samsung Galaxy S II SGH-I777] Fusion777:
Good to know about the CM9 vs CM10 thing. I saw that mentioned on the OP too but when yanking from CM9 a few files error out (bluetooth related ones I think). Did it again on CM10 and they all pull nicely.

Looks like I'm running into a snag compiling the kernel, getting a TARGET_KERNEL_BINARIES error 2 with no obvious apparent error explaining why. Gonna keep troubleshooting this, but if that looks familiar to anyone don't hesitate to speak up =)
[AT&T Samsung Galaxy S II SGH-I777] ddominator:
I know it's illegal to distribute proprietary files. My guess is distributing the files by themselves in a zip bundle is illegal but distributing them in a ROM is legal.

I didn't see that when I built CM10 but I built it several hours before you posted so there might have been new codes that are breaking the build.
[AT&T Samsung Galaxy S II SGH-I777] atinm:
It isn't legal to redistribute the proprietary binaries as they are copyrighted by the device vendor but it is legal for you to extract them off your own phone to install on your own phone as part of a different build that isn't the stock ROM. Luckily no manufacturer is going after ROM developers but it is best to keep the "redistribution" as little is possible, so we try not to publicize where we are keeping prebuilt binaries dumped from devices for our builds. For casual builds, it is best to just take them off your own phone. I am certain that if someone did this for the iPhone, they would hear from Apple, but thankfully, Android vendors haven't been doing this.
[AT&T Samsung Galaxy S II SGH-I777] XGX5309:
Thanks for the explanation! :) I can file that one away now. lol.
[AT&T Samsung Galaxy S II SGH-I777] Fusion777:
+1

OK I have been wrestling with this one. Let me know if there's a more appropriate forum to ask this question.

I'm running into:

/home/malachi/CM10/android/system/kernel/samsung/smdk4210/kernel/trace/trace_printk.c:69:10: error: 'fmt' may be used uninitialized in this function [-Werror=maybe-uninitialized]
/home/malachi/CM10/android/system/kernel/samsung/smdk4210/kernel/trace/trace_printk.c:52:8: note: 'fmt' was declared here
cc1: all warnings being treated as errors

make[4]: *** [kernel/trace/trace_printk.o] Error 1
make[3]: *** [kernel/trace] Error 2
make[2]: *** [kernel] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/malachi/CM10/android/system/kernel/samsung/smdk4210'
make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....

Sometimes, and other times it's a similar error but with alignment.c/alignment.o

am I missing something obvious here?
[AT&T Samsung Galaxy S II SGH-I777] drakester09:
You are compiling with warnings set as errors, any warnings will be treated as failures. The code has lots of them, specially on the kernel.

Might wanna check the compilation flags or your setup
[AT&T Samsung Galaxy S II SGH-I777] stone_ship:
I was able to successfully build and boot CM10 thanks to drakester's guide. The only quirk is that my soft keyboard never pops up. In Languages & input, I see that Android thinks I have a physical keyboard: sii9234_rcp.

I don't know how to begin to troubleshoot this. Is this something I messed up?
[AT&T Samsung Galaxy S II SGH-I777] XGX5309:
Nope, not something you messed up. It's something this seems to default to. All my builds have it enabled by default. lol.
[AT&T Samsung Galaxy S II SGH-I777] stone_ship:
Wow am I stupid! I didn't realize that you can disable the hw keyboard.
[AT&T Samsung Galaxy S II SGH-I777] ddominator:
Oh that's good to hear that I'm the only one with the issue. Is it in Jellybean or the Kernel that's causing this?
[AT&T Samsung Galaxy S II SGH-I777] Fusion777:
OK, thanks for the information. I was apprehensive about fiddling with something like that - i.e. perhaps the system was -supposed- to treat warnings as errors in this context. If my system default is set to 'errors as warnings' I'm comfortable changing that. Less comfortable fiddling with the kernel makefile...
[AT&T Samsung Galaxy S II SGH-I777] XGX5309:
For those interested, I've made a self-contained guide on how to compile CM10 for the GS2 i777/i9100. It's an amalgamation of drakester09's tips, along with steps from TeamHacksung and some I've added for convenience. From installing Ubuntu to making a flashable zip...

http://pastebin.com/EPbEtUjC