[CM 7.2 Alpha 8.3] help for get source code. - Galaxy 3 Q&A, Help & Troubleshooting

Hi all,
First of all, where I can find a good tuto for starting dev ?
I want help for porting CM 7.2 so I find this in the thread:
1. Download source codes
- Get cyanogenmod source in a directory (eg: /cm7/)
- put device config to device/samsung/apollo
- put vendor files to vendor/samsung/apollo
- put cyanogen vendor files to vendor/cyanogen
Click to expand...
Click to collapse
I understand how too get "device config", "vendor files" and "cyanogen vendor files" but not "cyanogenmod source".
I think, I will get it with this command:
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
Thanks all.

Kalite-Iruka said:
Hi all,
First of all, where I can find a good tuto for starting dev ?
I want help for porting CM 7.2 so I find this in the thread:
Click to expand...
Click to collapse
Your help is welcome... there is a lot to do.
I think, I will get it with this command:
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
Thanks all.
Click to expand...
Click to collapse
yes, then
Code:
# repo sync -j4
and you will get the cyanogenmod source (cm7).

Thanks for the help for get CM7 source code.
For cyanogen vendor files, the folder already exist. What i need to do?
1 - merge the too folder (remplace existing file with yours)
2 - delete all files in the folder and put just your files in it

Kalite-Iruka said:
Thanks for the help for get CM7 source code.
For cyanogen vendor files, the folder already exist. What i need to do?
1 - merge the too folder (remplace existing file with yours)
2 - delete all files in the folder and put just your files in it
Click to expand...
Click to collapse
I have test the two : The solution is the first.
For doing it, I make a clone of your git repository in a temp directory. After that I copy the result in vendor/cyanogen.
I don't find a git comand to do it, does it exist ?
I tried too use eclipse indigo by following android source documentation.
When I tired too create the java project, there isn't "Create project from existing source" option. So, I search on google but I find any thing for CM and android source code.
What must I do?

Related

AOSP guide?

Can some one please point me to a complete guide that takes you through all the steps of making a final update.zip from the AOSP code? I ran the make command at the end of the AOSP website guide, but i have no idea where to go from here. Anyone wanna lend a hand?
http://wiki.cyanogenmod.com/index.php/Compile_for_dream
http://forum.xda-developers.com/forumdisplay.php?f=613
Use search next time.
I started from scratch and did not source cyanogen's repositories. what build target should i specify? Every target from the lunch menu seems to be eclair. So what do i do to select donut?
You do
source build/envsetup.sh
lunch
Click to expand...
Click to collapse
Then select dream-open (eng or userdebug).
Don't forget when you do repo init to set the branch to donut:
repo init git://android.git.kernel.org/platform/manifest.git -b donut
Click to expand...
Click to collapse
kingkurry said:
I started from scratch and did not source cyanogen's repositories. what build target should i specify? Every target from the lunch menu seems to be eclair. So what do i do to select donut?
Click to expand...
Click to collapse
you should probably download the donut branch and not the eclair branch
Eclair is very broken for build. Currently, Master is a snapshot of 2.1r1, so you'd best build master (donut stock is very broken too).
Unfortunately, at this time, there's no way to switch branches once you've synced a repository.
Unless there's a better way to do it that I don't know about, I keep different branches downloaded on different directories. It's redundant because the whole information for all branches/commits is downloaded to .repo anyway, so I don't see why branch switching is not possible. Anyway, if you want donut, create another directory, cd to it, and repo init -u git://android.git.kernel.org/platform/manifest.git -b donut (I suggest donut-plus-aosp instead, builds a bit better than donut).
Thanks for all of the help guys . Its been a long time since i started, but im going to start building and try and learn this stuff.
Also, will the make otazip command only work when sourcing cyanogen, or will it work on AOSP?

[Q] Best way to cherry pick changes from the CyanogenMod code review?

So I set up a chain of scripts to build, package, and deploy CyanogenMod kang builds on Ubuntu 11.04 according to the guide in this thread: http://forum.xda-developers.com/showthread.php?t=1067519
Now that I can successfully build CyanogenMod, I'm wondering what the best (quickest, easiest, etc.) way is to cherry pick changes from the CyanogenMod code review which is found here: http://review.cyanogenmod.com/#q,statuspen,n,z
For example, if I wanted to allow the user to choose whether or not to show the "Hold" button in calls, I would need to pull this change: http://review.cyanogenmod.com/#change,6104. What would be the best way of doing this?
Thanks in advance for any help!
When I try to use the git cherry-pick command found on the commit page, I get this error: "fatal: You do not have a valid HEAD"
hmmm I would
Code:
cd android/system/packages/apps/Phone/
and then do
Code:
git pull http://review.cyanogenmod.com/p/CyanogenMod/android_packages_apps_Phone refs/changes/04/6104/1
but I'm pretty new on this too.
I've been building from source for a couple of weeks now and just finished my first kernel from source but I'm having problems pulling commits.
Whenever I try to pull or cherry-pick I get
Code:
fatal: Not a git repository (or any of the parent directories): .git
Were you actually able to pull the commit? I'm doing this from android/system. Should I be in a different folder?
Try this little tutorial. ^_~
http://forum.xda-developers.com/showpost.php?p=23527685&postcount=29
The important part that I was missing was to be in the correct directory based on the patch.
For instance
Code:
cyanogenmod dot com/p/CyanogenMod/android_packages_apps_Phone refs/changes/04/6104/1
would have to be in android/packages/apps/Phone
and
Code:
cyanogenmod dot com/p/CyanogenMod/android_frameworks_base refs/changes/29/11129/8 && git checkout FETCH_HEAD
would be in android/frameworks/base
Thanks for the help on this

Building a rom...

i' m following a guide to try builiding my first rom and i don't understand a step
"6. After the repo sync finally finishes, all you need to do is add your device, kernel, vendor specific files for the device you are building for."
Where can i find these things? Is there a command i should give in the terminal?
I've searched a little but not found anything...any hint would be accepted!
tylpica wives
phoenixita said:
i' m following a guide to try builiding my first rom and i don't understand a step
"6. After the repo sync finally finishes, all you need to do is add your device, kernel, vendor specific files for the device you are building for."
Where can i find these things? Is there a command i should give in the terminal?
I've searched a little but not found anything...any hint would be accepted!
Click to expand...
Click to collapse
What rom are you building? If CM10.1 or CM10.2 just follow the instructions on
wiki.cyanogenmod.org - w - Build_for_ville
(sorry, cannot post the link since I don't have enough posts Just replace - with /)
I guess your point 6 refers to items 2.7-2.9 where prebuilt apps, device-specific code (e.g. kernel etc.) and other
proprietary drivers are copied to your source code.
To init for CM10.1, use
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
for CM10.2 use
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
Hope this helps. good luck
drkxyz said:
What rom are you building? If CM10.1 or CM10.2 just follow the instructions on
wiki.cyanogenmod.org - w - Build_for_ville
(sorry, cannot post the link since I don't have enough posts Just replace - with /)
I guess your point 6 refers to items 2.7-2.9 where prebuilt apps, device-specific code (e.g. kernel etc.) and other
proprietary drivers are copied to your source code.
To init for CM10.1, use
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
for CM10.2 use
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
Hope this helps. good luck
Click to expand...
Click to collapse
I'm trying to build another rom not CM but i'm trying following the 2.7-2.9 steps from your link
What
Building from source or MOD ROM?
xdluisssxd said:
Building from source or MOD ROM?
Click to expand...
Click to collapse
i think i'm building it from source lol

Building AOSP

I am trying to build AOSP. I have followed some instructions and the best are the instructions of Sony. But when I come to the point to clone the local_manifests, I need to have another file. I have found the AOSP-bacon repo on github where is a local_manifests to clone. So I have done that but when I try to sync the repo with the command 'repo sync' it gives this back:
[email protected]:~/android$ repo sync
fatal: remove-project element specifies non-existent project: platform/build
I have searched but could not find the answer what to do now. Can someone help me or say what I need to do to build AOSP?
Lennert_F said:
I am trying to build AOSP. I have followed some instructions and the best are the instructions of Sony. But when I come to the point to clone the local_manifests, I need to have another file. I have found the AOSP-bacon repo on github where is a local_manifests to clone. So I have done that but when I try to sync the repo with the command 'repo sync' it gives this back:
[email protected]:~/android$ repo sync
fatal: remove-project element specifies non-existent project: platform/build
I have searched but could not find the answer what to do now. Can someone help me or say what I need to do to build AOSP?
Click to expand...
Click to collapse
try deleting platform/build manually from the source and delete the same from the local_manifest.xml file then do a repo sync.

Build specific parts of system

Hey guys!
I tried building LineageOS 15.1 from source. No issues here, works great!
But here is the problem: I now want to include an app I developed into the system build.
Earlier, I did this by adding the files to the BUILD_DIR/packages/apps/<App name> directory. But to include it in the system, I had to rebuild the ROM from scratch.
The app uses an Android.mk file and not Gradle.
Also, if I modify an existing source file (say Activity.java), then how would I proceed, short of rebuilding the ROM?
I wanted to know if there is a more efficient way to build a part of the system. Any help would be appreciated.
Thank You
EDIT:
Found the answer. For anyone who needs it:
Note: This applies only if you have already built the system once and haven't deleted the output files.
Open the Android.mk file in the source tree that you want to build.
Find a line LOCAL_MODULE := <module_name>
Go to the project root folder.
Enter the following lines in the terminal:
Code:
$ source build/envsetup.sh
$ breakfast <device_name>
$ mka <module_name>
Then, to build the flashable zip:
Code:
$ brunch <device_name>

Categories

Resources