[Firmware][SGH-I777][JB][4.1.1] CyanogenMod 10 | DEV THREAD

Search This thread

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
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.

Code:
#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.
 
Last edited:

Divine_Madcat

Retired Forum Moderator
Sep 9, 2005
2,936
2,608
USA
Now, how were any of the above posts development-related?

Looks like we're gonna have to send Cid on a little hunting trip.

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.
 

sjwaste

Senior Member
Jun 8, 2010
257
24
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?
 

drakester09

Senior Member
Jan 10, 2012
1,292
876
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?

Use
Code:
./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
Do you want us to get android sources for you? (y/n)
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:
Code:
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.
Code:
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:
Code:
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:
Code:
<?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. ;)
 
Last edited:

Slavestate

Senior Member
Sep 7, 2010
698
165
www.descentrecords.com
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
 

drakester09

Senior Member
Jan 10, 2012
1,292
876
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

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:
 

sjwaste

Senior Member
Jun 8, 2010
257
24
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

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.
 

sjwaste

Senior Member
Jun 8, 2010
257
24

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 ----------

I'm logged into my Ubuntu machine through citrix from work. Is there a way to get the prop files from windows?

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.
 
Last edited:

alejobog

Senior Member
Nov 8, 2008
830
117
Bogota
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
 
  • Like
Reactions: elutherian

tmckenn2

Senior Member
Nov 9, 2010
345
73
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.
 

Slavestate

Senior Member
Sep 7, 2010
698
165
www.descentrecords.com
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..
 

tmckenn2

Senior Member
Nov 9, 2010
345
73
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

Sent from my SGH-I777 using xda app-developers app
 

tmckenn2

Senior Member
Nov 9, 2010
345
73
I was just about to say that now that I reread the problem. Sorry. You can ignore my other post...

Sent from my SGH-I777 using xda app-developers app
 
  • Like
Reactions: Slavestate

Slavestate

Senior Member
Sep 7, 2010
698
165
www.descentrecords.com
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>
 

msgfromside3

Senior Member
Nov 23, 2010
744
131
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.

Sent from my SGH-I777 using Tapatalk 2

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. :)
 

drakester09

Senior Member
Jan 10, 2012
1,292
876
Here you go. ;)

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

Code:
<?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.
 

Attachments

  • local_manifest.zip
    493 bytes · Views: 32
Last edited:

Slavestate

Senior Member
Sep 7, 2010
698
165
www.descentrecords.com
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.

Sent from my SGH-I777 using Tapatalk 2
 

Top Liked Posts

  • There are no posts matching your filters.
  • 60
    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.

    Code:
    #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.
    15
    Now, how were any of the above posts development-related?

    Looks like we're gonna have to send Cid on a little hunting trip.

    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.
    11
    Now, how were any of the above posts development-related?

    Looks like we're gonna have to send Cid on a little hunting trip.
    11
    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?

    Use
    Code:
    ./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
    Do you want us to get android sources for you? (y/n)
    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:
    Code:
    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.
    Code:
    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:
    Code:
    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:
    Code:
    <?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. ;)
    11
    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 ;)

    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.