[DEV][Porting] Ubuntu Touch on Galaxy Note II (GT-N7100) - Galaxy Note II, Galaxy S III Developer Discussion

Currently I'm trying to run Ubuntu Touch Developer Preview on my Note II
So far Ubuntu touch based on cm-10.1 it is quite simple to port to any device supported by cm.
For beginning there are some useful guides:
Ubuntu Touch Developer Preview - Porting Guide
How to Build CyanogenMod for Galaxy Note 2
And here we go:
First of all prepare the Build Environment
Code:
sudo apt-get install git gnupg flex bison gperf build-essential \
zip bzr curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386 schedtool
Install phablet-tools
Code:
sudo apt-add-repository ppa:phablet-team/tools
sudo apt-get update
sudo apt-get install phablet-tools
To get the source code do bootstrap, it takes a looooong time and need about 15 GB of disk space
Code:
phablet-dev-bootstrap -j 4 ubuntu-touch
Code:
cd ubuntu-touch
Now we need to grab the n7100 specific git repositories.
In general we use CyanogenMode repositories with some changes made for ubuntu phone
For the moment I'm not sure whether it is all changes what we need, therefore I have fork them on git hub,
so just create a new file .repo/local_manifest.xml with content:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="drapalyuk/android_device_samsung_n7100" path="device/samsung/n7100" remote="github" revision="phablet-10.1" />
<project name="drapalyuk/android_device_samsung_smdk4412-common" path="device/samsung/smdk4412-common" remote="github" revision="phablet-10.1" />
<project name="drapalyuk/android_kernel_samsung_smdk4412" path="kernel/samsung/smdk4412" remote="github" revision="phablet-10.1" />
<project name="drapalyuk/android_hardware_samsung" path="hardware/samsung" remote="github" revision="phablet-10.1" />
</manifest>
Code:
repo sync -j4
Extract proprietary blobs, expected you have all ready installed CM-10 on your phone, if not Install CM for n7100
Code:
cd device/samsung/n7100
./extract-files.sh
If you want to speed up subsequent builds after this one
Turn on caching
Code:
export USE_CCACHE=1
Start the build
Code:
. build/envsetup.sh
brunch n7100
After successfully build N7100 zip installer will be placed into out/target/product/n7100/cm-10.1-<date>-UNOFFICIAL-n7100.zip
Installation instructions:
reboot in recovery
wipe
install the N7100 specific installer
install the Ubuntu 12.10 Touch Preview, daily build quantal-preinstalled-phablet-armhf.zip
reboot
DISCLAIMER: this is development preview do not install if you don't know exactly what you are doing
Latest N7100 specific image Here
To Be Continued...

Progress

could we use this on the tmobile note 2 also

Hi, i'm porting ubuntu touch on SGS3 i9300 (international) but i'm having issues addressed to a segfault of surfaceflinger not finding libandroid_runtime.so: any errors like this?

Flashing this ROM already work Unbuntu into N7100?
Thanks, I took several days trying to download the repo but always fails.

allenjthomsen said:
could we use this on the tmobile note 2 also
Click to expand...
Click to collapse
I've never seen a straightforward answer to how to convert a n7100 rom to a t889 rom... Something to do with copy the kernel image out of a working t889 rom and into the n7100 rom? But I've also heard that some people get bricks trying!
If this rom doesn't work for a t889, could the same steps be followed, substituting in t889 where applicable, to make the right rom? I would just try it, but my phone is away for warranty repair :crying:

gianguido said:
Hi, i'm porting ubuntu touch on SGS3 i9300 (international) but i'm having issues addressed to a segfault of surfaceflinger not finding libandroid_runtime.so: any errors like this?
Click to expand...
Click to collapse
Exynos GPU Mali lib*_mali.so need libandroid_runtime.so
BoRoU said:
Flashing this ROM already work Unbuntu into N7100?
Click to expand...
Click to collapse
not completely I get console and can chroot into ubuntu, but no gui yet
but I'm working on

drapalyuk said:
Exynos GPU Mali lib*_mali.so need libandroid_runtime.so
not completely I get console and can chroot into ubuntu, but no gui yet
but I'm working on
Click to expand...
Click to collapse
How did you get the Android part to build, I have been trying for two days and I just got it to even start compiling yesterday. Here is a link to my paste bin, I have the T-Mobile Note II so I am using t0lte (GT-N7105).
Also if you want I have a guid i was putting together until I hit this snag yesterday.I will upload it and let you look at it if you want to further edit your OP. Where did you fork your android_hardware_samsung folder ? I could not find one in the CM repositories I had to use another repository I found.

Are your CM sources older then the 24th ? On the 23 they fixed the MALI render issued and memory leak in CM 10.1.
Sent from my GT-N7100 using xda app-developers app

lgstoian said:
Are your CM sources older then the 24th ? On the 23 they fixed the MALI render issued and memory leak in CM 10.1.
Sent from my GT-N7100 using xda app-developers app
Click to expand...
Click to collapse
Ha yeah they are from the 23 that is when i finished my repo sync and cloned my device files. I guess I need to re sync and redo my edits then try again. Also does this require the linaro toolchain?
I got past my above problem by going to device/samsung/t0lte/t0lte and taking out the following from it.
Code:
# Product specific Packages
PRODUCT_PACKAGES += \
GalaxyNote2Settings
But I am still having troubles.
Edit: This is now my issue, got to find where to disable this.
Code:
make: *** No rule to make target `/home/tmacgnolia/UPP/out/target/product/t0lte/obj/SHARED_LIBRARIES/libTVOut_intermediates/export_includes', needed by `/home/tmacgnolia/UPP/out/target/product/t0lte/obj/EXECUTABLES/mediaserver_intermediates/import_includes'. Stop.

I try to start with phablet-dev-bootstrap-c ubuntu-touch and always short. I get this error:
INFOhablet-dev-bootstrap:Changing to workdir /home/borou/ubuntu-touch
INFOhablet-dev-bootstrap:Initializing repository
Your identity is: BoRoU <[email protected]>
If you want to change this, please re-run 'repo init' with --config-name
repo has been initialized in /home/borou
If this is not the directory in which you want to initialize repo, please run:
rm -r /home/borou/.repo
and try again.
Fetching projects: 20% (28/136) fatal: The remote end hung up unexpectedly
Fetching projects: 37% (51/136) fatal: read error: Conexi?n reinicializada por la m?quina remota

Is i directly flash quantal-preinstalled-phablet-armhf.zip on galaxy note 2? and Is it work properly?

manish.t92 said:
Is i directly flash quantal-preinstalled-phablet-armhf.zip on galaxy note 2? and Is it work properly?
Click to expand...
Click to collapse
read the thread. (1 page) the op answered that question yesterday. and this section is developer talk only.

BoRoU said:
I try to start with phablet-dev-bootstrap-c ubuntu-touch and always short. I get this error:
INFOhablet-dev-bootstrap:Changing to workdir /home/borou/ubuntu-touch
INFOhablet-dev-bootstrap:Initializing repository
Your identity is: BoRoU <[email protected]>
If you want to change this, please re-run 'repo init' with --config-name
repo has been initialized in /home/borouosal
If this is not the directory in which you want to initialize repo, please run:
rm -r /home/borou/.repo
and try again.
Fetching projects: 20% (28/136) fatal: The remote end hung up unexpectedly
Fetching projects: 37% (51/136) fatal: read error: Conexi?n reinicializada por la m?quina remota
Click to expand...
Click to collapse
The repo sync took me forever so I ad to restart it several times. It would give the " fatal: The remote end hung up unexpectedly" every time.
Edit: I need hardware/samsung/exynose/multimedia/openmax/include/osal. I do not have it for some reason.

Someone asked about porting N7100 ROM's. Try this guide
http://forum.xda-developers.com/showthread.php?t=2018411
Sent from my Samsung Galaxy SIII LTE GT-I9305 using XDA Premium HD

weeo said:
Someone asked about porting N7100 ROM's. Try this guide
http://forum.xda-developers.com/showthread.php?t=2018411
Sent from my Samsung Galaxy SIII LTE GT-I9305 using XDA Premium HD
Click to expand...
Click to collapse
Thanks for the link but unfortunately that guide really has little relevance to the work going on here. This has to be built from source so any device specific files need to be in the source which means cloning them from a repository or added manually as well as adding lines to the appropriate .mk or config files. Now this guide does have some usefulness but just not a whole lot.

T-Macgnolia said:
Thanks for the link but unfortunately that guide really has little relevance to the work going on here. This has to be built from source so any device specific files need to be in the source which means cloning them from a repository or added manually as well as adding lines to the appropriate .mk or config files. Now this guide does have some usefulness but just not a whole lot.
Click to expand...
Click to collapse
Ah i see. My bad... I thought it wasnt relevant... But then someone told me Ubuntu was based on CM10.1 (i thought it was the same as building cm10.1) so i thought it had the same ROM format. So i was guessing that wouls work. Sorry my bad. Forgive me
Sent from my Samsung Galaxy Note 10.1 using XDA Premium HD app

current progress
finally get the gui starting
working:
camera (both), flash
sound (at least by tacking a photo)
microphone (by voice input)
pen
known issues:
font rendering artifacts
no gsm
no wifi
to be continued...

drapalyuk said:
current progress
finally get the gui starting
working:
camera (both), flash
sound (at least by tacking a photo)
microphone (by voice input)
pen
known issues:
font rendering artifacts
no gsm
no wifi
to be continued...
Click to expand...
Click to collapse
i did : Brunch n7100 and there is no zip file created ( out/target/product/n7100 )

any outputs in console?

Related

[DEV GUIDE] Build CM7 from source in its current state. Updated: 2011/05/16-23:52

PLEASE READ THIS BEFORE CONTINUING:
We are changing to a new build system which will result in an updated but VERY different ROM underneath the hood. There is a HIGH POSSIBILITY that building in the current state could BRICK your device, potentially PERMANENTLY. PLEASE DO NOT FLASH unless you are HIGHLY confident you know what you're doing.
For kernel building, see post #2.
For known issues and changelog, see post #3.
Kanged from the CM-Wiki. Yes it's a wiki, yes I could have created an epic page, but we aren't official yet.
Install ADB
Install the Android SDK.
Install the Build Packages
Install using the package manager of your choice:
For 32-bit & 64-bit systems:
Code:
git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
For 64-bit only systems:
Code:
g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
NOTE: On Ubuntu 10.10, and variants, you need to enable the parter repository to install sun-java6-jdk:
Code:
add-apt-repository "deb http://archive.canonical.com/ maverick partner"
Create the Directories
You will need to set up some directories in your build environment.
To create them:
Code:
mkdir -p ~/bin
mkdir -p ~/android/system
Install the Repository
Enter the following to download make executable the "repo" binary:
Code:
curl http://android.git.kernel.org/repo > ~/bin/repo
chmod a+x ~/bin/repo
NOTE: You may need to reboot for these changes to take effect.
Now enter the following to initialize the repository:
Code:
cd ~/android/system/
repo init -u git://github.com/EpicCM/android.git -b teamhacksung-merge
repo sync -j16
Download RomManager and Google Files
NOTE: This only needs to be done when an update to RomManager or GoogleApps is released. If you are up-to-date, you may skip to Building CyanogenMod.
Code:
cd ~/android/system/
./build.sh prepare
Building CyanogenMod
First, check for updates in the source:
Code:
cd ~/android/system/
repo sync
Configure Build & Compile
Now, the environment must be configured to build and the ROM compiled, from code, for the epic.
Code:
cd ~/android/system/
. build/envsetup.sh
./build.sh epic
Build failed? Check post #3 for common problems and solutions.
Install
1. The build system should create a flashable zipfile. Place it on the root of your sdcard.
Optional: Download Google Apps for CyanogenMod 7 and place it on the root of the SD card.
2. Boot into a custom recovery like ClockworkMod Recovery and flash the CM7 update.zip. Then flash google apps if you like.
Please don't flash yet, unless you want an expensive doorstop.
This section of the guide will inform you on how to build a CM7-compatible kernel using our github sources.
Download the Code
Due to the way the new build system works, you'll need the entire CM source to build a proper kernel. (Sorry)
Follow the steps in post #1 to initialize and download our entire CM source repository.
Keeping your code up-to-date:
Code:
cd ~/android/system
repo sync
Toolchain setup
The new build system automatically utilizes the toolchain included in CM7 source.
Prepare to build
The kernel build script requires a few environment vars be set by the CM build system.
Code:
cd ~/android/system/
. build/envsetup.sh
lunch cyanogen_epic-eng
Compile the kernel
Code:
cd ~/android/system/kernel/samsung/2.6.35/
./build.sh epic
cd ~/android/system/releasetools/
./kernel.sh epic
You should now have a flashable zip in out/target/product/epic/
Please don't flash yet, unless you want an expensive doorstop.
This is also incompatible with stock roms, and unless you're amazing, never will be compatible.
KNOWN BUILD-TIME ISSUES
WARNING: These fixes may cause your repo to become out-of-sync from the official repo. Make sure you know how to revert these changes so repo sync doesn't fail.
Error: New build does not boot.
Fix: Working on it
KNOWN RUN-TIME ISSUES
Will update this when it runs.
GUIDE CHANGELOG:
20110516-2352: New build system from teamhacksung.
20110506-1842: Switched to our forks of teamhacksung work.
CODE CHANGELOG:
Available at each of our repositories:
https://github.com/EpicCM
Love seeing these types of posts; makes a pathway for new developers to learn =)
XtaC318 said:
Love seeing these types of posts; makes a pathway for new developers to learn =)
Click to expand...
Click to collapse
I agree! Time to start playing!
Cool guide, makes it easy for the new guys.
Sent from my SPH-D700 using Tapatalk
getting same error. edited make file and tried to remove the samsung/device/crespo device.mk overlap but still a no-go
Code:
build/core/base_rules.mk:479: warning: overriding commands for target `out/target/product/epic/recovery/root/sbin/tune2fs'
bootable/recovery/Android.mk:87: warning: ignoring old commands for target `out/target/product/epic/recovery/root/sbin/tune2fs'
build/core/base_rules.mk:162: *** device/samsung/epic/libs3cjpeg: MODULE.TARGET.SHARED_LIBRARIES.libs3cjpeg already defined by device/samsung/crespo/libs3cjpeg. Stop.
smeyerhuky said:
getting same error. edited make file and tried to remove the samsung/device/crespo device.mk overlap but still a no-go
Code:
build/core/base_rules.mk:479: warning: overriding commands for target `out/target/product/epic/recovery/root/sbin/tune2fs'
bootable/recovery/Android.mk:87: warning: ignoring old commands for target `out/target/product/epic/recovery/root/sbin/tune2fs'
build/core/base_rules.mk:162: *** device/samsung/epic/libs3cjpeg: MODULE.TARGET.SHARED_LIBRARIES.libs3cjpeg already defined by device/samsung/crespo/libs3cjpeg. Stop.
Click to expand...
Click to collapse
yes, that's something that we can't easily fix in our own device repo. you could always remove the crespo folder as a temporary fix, but we need to push a patch upstream that fixes crespo makefiles. I will be adding this to known issues shortly.
So my windows seven crashed on me and I'm gonna go with Ubuntu 10.10 for now
I can play with this on that Linux install, correct?
sent by an Epic4g through the cosmos
raiderep said:
So my windows seven crashed on me and I'm gonna go with Ubuntu 10.10 for now
I can play with this on that Linux install, correct?
Click to expand...
Click to collapse
Yes, it's mentioned in the instructions.
Alternatively, you can use VMWare to do compiling from Windows. That's how I'd set up my old development system. There are tons of free Ubuntu 10.10 vm images.
Updated. Sorry for the mistake in Copy Proprietary Files. That should fix a compile error related to libcamera.
Any clue what causes a build to fail due to unable to dopen system/lib/egl/libandroid_servers.so. When I build with boardconfig has generic audio I'm fine, when I set has galaxys audio it fails
Sent from my SPH-D700 using Tapatalk
dreamsforgotten said:
Any clue what causes a build to fail due to unable to dopen system/lib/egl/libandroid_servers.so. When I build with boardconfig has generic audio I'm fine, when I set has galaxys audio it fails
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
Audio in and out works if you leave it at default values.
If you absolutely want to compile with galaxys audio, it looks like ./extract-files.sh might not be pulling that file? Check ~/android/system/vendor/samsung/epic/proprietary/lib/egl/ for that file.
Thanks for the heads up, no the fileisn't in egl and from what I can tell its not supposed to be.
Sent from my SPH-D700 using Tapatalk
Fix: Open up Context.java, find the three chunks of WimaxManager JAVADOC in comments. Delete JUST the commented stuff that's related to WiMax.
Click to expand...
Click to collapse
Can anyone please elaborate, I don't understand wat exactly to be done. Even though I deleted commented lines I still receive errors
Thanks
THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!
So for kernel compilation I received and error
fs/binfmt_aout.c: In function 'load_aout_binary':
fs/binfmt_aout.c:271: error: 'SEGMENT_SIZE' undeclared (first use in this function)
Click to expand...
Click to collapse
And I had to update a line in Makefile
from
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
Click to expand...
Click to collapse
to
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) -Dlinux
Click to expand...
Click to collapse
Still nearly at the end of compile I receive
samsung-kernel-epic/scripts/mksysmap: line 44: arm-none-eabi-nm: No such file or directory
Click to expand...
Click to collapse
I'll see if I can cream system.map from vmlinux and report again
The kernel compilation issue was discussed here: http://forum.xda-developers.com/showthread.php?t=825611
I needed to do
make update-api
Click to expand...
Click to collapse
After removing those comments
it went ahead now the next place I'm stuck is
CameraService.cpp:1478: error: undefined reference to 'openCameraHardware'
Click to expand...
Click to collapse
Any ideas?
Thanks
\m/ I got cm7 compiled
So here are nullghosts instructions:
open android/system/device/samsung/epic/full_epic.mk for editing and
replace any instance of SPH-D700 to epic
Click to expand...
Click to collapse
Then open extract-files.sh for editing and make sure Copy Files (from mid to bottom) list is same as files list (at top)
add these 2 lines to
FILES="
Click to expand...
Click to collapse
section of extract-files.sh
bin/netcfg
lib/libQmageDecoder
Click to expand...
Click to collapse
If you have any other file missing read below:
head -197 extract-files.sh > files may come in handy to compare 2 files
vendor/samsung/__DEVICE__/proprietary/bin/netcfg:system/bin/netcfg
vendor/samsung/__DEVICE__/proprietary/lib/libQmageDecoder.so:system/lib/libQmageDecoder.so
Click to expand...
Click to collapse
are the 2 lines in copy files which did not have corresponding files
Now need to zip it and see if I can get kernel compiled
Can anyone that has it compiled post a zip? I dont wanna download lile 10gb of stuff.
Sent from my SPH-D700 using XDA App

[Guide] How to build CM10.1 (Android 4.2.1) for the Galaxy R I9103

Note:
1. This is extension to the Karthik's Guide with Adam's Repo's...
2. Based on my experience i have created this Guide, I have successfully compiled the Build and sharing this with you so some one can try it...
Preparing the system:
Follow this Link until step 4.4 (i.e. 4.4 - Initialize Repository & Sync)
Start with sources:
Code:
cd ~/android/system/
Initialize Repo for Android CM10.1 (Android 4.2.1):
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
and enter your credentials if needed.
Download the sources:
Code:
$ repo sync -j4
Wait until it's finished (takes a lot of time!).
If the process hangs use Ctrl+C to break out of it and resume the download with another
Code:
$ repo sync -j4
Initialize the environment
NOTE: If you have trouble syncing due to connection issues, try repo sync -j1. It's slower but some ISPs have issues with -j4/16
Want to make sure you didn't get any connection errors and have the complete repository? Just run the repo sync command again. It can't give you ANY errors.
Wait until it's finished (takes a lot of time!).
VERY IMPORTANT: Now, Lets add the device specific tree..
1) Open your File Browser,
2) Press Ctrl+H (to show hidden files/directories)
3) Navigate to android/system/.repo/manifest.xml
(Right Click & open the XML file in text editor)
4) Add
Code:
<project path="device/samsung/galaxyr" name="Adam77Root/android_device_samsung_galaxyr" remote="github" revision="jellybean"/>
BEFORE the manifest closing tags (</manifest>).
5) Save & Close the File.
Run another
Code:
$ repo sync
Get Device Specific Repos:
Code:
. build/envsetup.sh
Extract files from phone:
NOTE: You need to have cm10 installed on the phone.
Code:
cd ~/android/system/device/samsung/galaxyr/
./extract-files.sh
Code:
~/android/system/vendor/cm/get-prebuilts
Important Things to be taken care before Building ROM:
1. Add these line in Boarconfig.mk
Code:
TARGET_ARCH := arm
BOARD_EGL_NEEDS_LEGACY_FB := true
2. Change the below line.
Code:
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 5242880
to
Code:
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 7242880
3. Delete Overlay folder.
4. Go to build/tools/releasetools and open file "ota_from_target_files" and replace the whole code with this code from this link.
Ok, You are done Now...
Building the ROM:
Code:
brunch cm_galaxyr-eng
it will take around 2 - 3 Hours....
Congrats you are done
Now Go to ~/android/system/out/target/product/galaxyr/cm-10.1-XXXXXXXXX-UNOFFICIAL-galaxyr.zip copy it to mobile and flash it on your mobile..
*********************************************************************************​
Updating the Build:
Code:
cd android/system
repo sync -j1
make installclean
brunch cm_galaxyr-eng
Big Thanks to Adam for his Efforts and Device tree..
Friends if i've missed some things please correct me ...
Gr8 mj! It will be better if u post ur error and how u solved.. By that it help others...
Sent from my GT-I9103 using xda app-developers app
Waiting for cm10.1 ROM now. Using Cm 10 and it is great
Sent from my GT-I9103 using xda app-developers app
I will start building 10.1 today.
Edit: This is my 500th post.
Sent from my CM10-powered GT-I9103
Adam77Root said:
I will start building 10.1 today.
Edit: This is my 500th post.
Sent from my CM10-powered GT-I9103
Click to expand...
Click to collapse
wow that's cool buddy...
Adam77Root said:
I will start building 10.1 today.
Edit: This is my 500th post.
Sent from my CM10-powered GT-I9103
Click to expand...
Click to collapse
adam wat abt cm10 ?? will u abonden it ??
Sent from my GT-I9103 using Tapatalk 2
vipul12389mehta said:
adam wat abt cm10 ?? will u abonden it ??
Sent from my GT-I9103 using Tapatalk 2
Click to expand...
Click to collapse
Not yet. The first builds will be only previews. If 10.1 gets as stable as 10 now is, I'll change to it. But there is work to be done on 10 as well and better to do it on a working build first. But I'm also very excited to see 10.1, so will definitely work on it.
Mj, before running the get-prebuilts command, should I run extract-files.sh first to get the vendor/cm directory as mentioned in karthick's tut for CM10 ?
I'm studying through your's, karthick's, and PA's compiling guides to get to know about compiling roms and trying to understand every step.
sarun_biotech said:
Mj, before running the get-prebuilts command, should I run extract-files.sh first to get the vendor/cm directory as mentioned in karthick's tut for CM10 ?
I'm studying through your's, karthick's, and PA's compiling guides to get to know about compiling roms and trying to understand every step.
Click to expand...
Click to collapse
Yes buddy you need to run it...
Friends updated the Guide with all the details and problems i have faced, so now you can simply follow the steps and build CM 10.1...
Ran in to trouble right in the beginning. My process does not support virtualization (not a n option in BIOS too) and so cannot install 64 bit Ubuntu on VM player.
Do you guys have any alternate suggestions or is it possible to use 32 bit Ubuntu to compile ?
I used wubi... dual boot...
sarun_biotech said:
Ran in to trouble right in the beginning. My process does not support virtualization (not a n option in BIOS too) and so cannot install 64 bit Ubuntu on VM player.
Do you guys have any alternate suggestions or is it possible to use 32 bit Ubuntu to compile ?
Click to expand...
Click to collapse
Even i also faced this problem, so i need to install the Ubuntu through the CD in different partition so that i have both Windows 7 and Ubuntu 12.10 64 Bit...
If you have any problem just PM me...
Cm10 official
Is there a official CM10 for galaxy r. If yes plz snd the link.
akirockstarr said:
Is there a official CM10 for galaxy r. If yes plz snd the link.
Click to expand...
Click to collapse
CM 10 & 10.1 are official for Galaxy R users and Unofficial from CM Team point of view...
1. CM 10 Thread.
2. CM 10.1 Thread.
Guys Check out xda-university.com An answer to all our development questions. :thumbup:
Everything at a single place.
I am trying to build CM 10.1 by your instructions and while extracting files from phone (cm10.1 beta 2.2) few "not found" & chmod errors occur. Logs (only error lines) following. Sorry I could'nt attach as file.Is it fine?
Code:
[email protected]:~/mydev/cm10.1/device/samsung/galaxyr$ ./extract-files.sh
remote object '/system/etc/wifi/bcm4330_mfg.bin' does not exist
remote object '/system/etc/wifi/nvram_mfg.txt' does not exist
remote object '/system/bin/wlandutservice' does not exist
remote object '/system/bin/macloader' does not exist
remote object '/system/bin/mfgloader' does not exist
remote object '/system/bin/nv_hciattach' does not exist
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/wlandutservice': No such file or directory
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/macloader': No such file or directory
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/mfgloader': No such file or directory
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/nv_hciattach': No such file or directory
remote object '/system/bin/brcm_patchram_plus' does not exist
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/brcm_patchram_plus': No such file or directory
remote object '/system/bin/drexe' does not exist
remote object '/system/bin/npsmobex' does not exist
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/drexe': No such file or directory
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/npsmobex': No such file or directory
Why are we extracting files from phone? The device tree should be holding them right?
kishoreinme said:
I am trying to build CM 10.1 by your instructions and while extracting files from phone (cm10.1 beta 2.2) few "not found" & chmod errors occur. Logs (only error lines) following. Sorry I could'nt attach as file.Is it fine?
Click to expand...
Click to collapse
Not an issue you can proceed with next command, it will take care of these files.....

[GUIDE][CM10/CM10.1] ROM Building From Source for GT-i9003 SL

Only Intention of This Guide More and More People Learn How to Build CM from Source.
Note ::
New Suggestion are welcome to make this guide more easy and perfect.Post any problem related to build in this thread. I will reply as soons as possible.:fingers-crossed:
What You will Require :-
1) PC Running Ubuntu 12.10x64 Bit System
2) Good Internet Connection Speed.
3) Patience
4) Samsung Galaxy SL
I will Distribute Building CM into Several Parts for Comfortable
(1) Setup Linux and Build Environment
(2) Source Sync & Download Pre-builts Files
(3) Setup Device tree
(4) Patching and cherry-picking
(5) Building ROM
(6) Installing ROM
(1) Setup Linux and Build Environment
Setup Linux
You will need Linux distros to build any ROM because windows system is not completely supported yet. you could possibly build ROMs on any Linux platform
but I recommended Ubuntu 12.10 64-bit System.And also this guide is written on base of pure clean Ubuntu 12.10 system.
You can setup dual boot with Windows.You can Google it how to Dual boot windows and Ubuntu.
or
you can use virtual machine like vmware player (http://www.vmware.com/products/player/ ) or Virtual Box (https://www.virtualbox.org/) they all are freeware software. But to use virtual machine you will need Higher Specification for best experience.
You could download Ubuntu 12.10 ISO from here : http://www.ubuntu.com/download
and make it bootable Pen Drive or CD to install it or Direct use in Virtual machine Software to Install it.
When You complete with installing Ubuntu proceed to setup build environment.
Build Environment
To build ROM from any source you will need several tools
Open Terminal,
1) Java Development Kit 6/Java Development Kit 7
If you are first time Installing JDK than procedded to installing step or first delete all previous version using this commands
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
sudo apt-get purge sun-java
Method 1 :: Install Latest JDK 6
Open terminal and type this :
Code:
sudo add-apt-repository ppa:webupd8team/java
This will add the correct PPA to your system for updated builds of Java 6 JDK that are compatible with 12.10/13.04.it’s self updating, so you don’t have to redownload binaries everytime they release a new version.
Next,install the package.
Code:
sudo apt-get update && sudo apt-get install oracle-java6-installer
Follow the onscreen instructions. You have to Accept the Licensing Agreement.
Once that is completed successfully to make sure the correct version of Java is installed, run the following at the Terminal prompt:
java -version
Click to expand...
Click to collapse
You should see something like the following:
java version “1.6.0_37″
Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Method 2 :: Install All Java tools
Its another method to install every JDK 6 tools automatically.
now to install JDK-6
Code:
mkdir ~/src
cd ~/src
git clone [url]https://github.com/flexiondotorg/oab-java6.git[/url]
cd ~/src/oab-java6
sudo ./oab-java.sh
Then when its finished, install java:
Code:
sudo apt-get install sun-java6-plugin sun-java6-jre sun-java6-bin sun-java6-jdk
You can follow the downloading process status of java package using this command in different terminal:
Code:
tail -f ~/src/oab-java6/oab-java.sh.log
You can check java veriosn using
Code:
java -version
Click to expand...
Click to collapse
2) Install dependencies
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
3) Android SDK (Optinal)
Download LINK :: http://developer.android.com/sdk/index.html
After Downloading Extract it at your desire directory as example : home/android/
it will be extracted with name : android-sdk-linux
Now go to that location using Terminal
Code:
cd ~/android/android-sdk-linux/tools
./android
than install adb driver and other platform tools. No need to download any API for now eiether you want to make android app.
To access adb command from anywhere in terminal you have to add its path to Bourne Again Shell (bash)
use any editor from below. (nano or gedit) to modify bash.
Code:
sudo nano ~/.bashrc
OR
Code:
sudo gedit ~/.bashrc
Than at the end of the file add this lines.
Code:
export PATH=${PATH}:<sdk>/tools:<sdk>/platform-tools
replace <sdk> with folder address.in My case i extracted it on /home directory
Code:
export PATH=${PATH}:/home/nics/android-sdk-linux/platform-tools/
Save the file. Then open a new Terminal. The adb command should now be available.
That's it. ADB (Android Debug Bridge) will have you debug ROM as well as application also.
(2) Source Sync & Download Prebuilts
1)Downloading Repository Binary
The binary for repo will let you talk to git servers and download all that precious source code. That second part after the && allows it to be executable:
Code:
mkdir ~/bin && curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo && chmod a+x ~/bin/repo
Use your favorite text editor to open ~/.bashrc
use nano:
Code:
sudo nano ~/.bashrc
At bottom add this line.
Code:
export PATH=~/bin:$PATH
Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Restart bash:
Code:
source ~/.bashrc
2) Initialize The Repository
First Close current terminal and reopen again New
Code:
mkdir ~/cm10.1 ## you can use any name on behalf cm10.1
cd ~/cm10.1
Now to build Jellybena 4.1.2 you need to initialize CM10 repo
Code:
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
or
If you want to build Jellybean 4.2.2 initialize CM10.1 repo below.
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
Now begin Download Source
Code:
repo sync
(It will take time depending on your internet speed. Downloading Source will download around 8.2 GB approaxmatiely or mare than that)
TIPS :: you can use "repo sync -j3" or "repo sync -j5" command also. It means it will download simantueosly 3 or 5 projects default threads are set to 16. this code are used to decreased it to whatever you want it only require when you have problem of syncin source on low speed.
3) Download Prebuilts
after completing repo sync Download pre-builts
go into :: ~/cm10.1/vendor/cm
Code:
cd ~/cm10.1/vendor/cm/
and run this
Code:
./get-prebuilts
(3) setup Device tree
In terminal
Code:
cd ~/cm10.1/.repo
Code:
mkdir local_manifests && cd local_manifests
gedit roomservice.xml
For CM10 with Kernel 3.0 copy below manifests and save & close roomservice.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="dhiru1602/android_device_samsung_galaxysl" path="device/samsung/galaxysl" remote="github" revision="jellybean-3.0" />
<project name="dhiru1602/android_vendor_samsung_galaxysl" path="vendor/samsung/galaxysl" remote="github" revision="jellybean-3.0" />
<project name="dhiru1602/android_kernel_samsung_latona" path="kernel/samsung/latona" remote="github" revision="latona-sandbox-3.0" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="jellybean"/>
</manifest>
For CM10.1 with kernel 3.0 copy and paste below manifest to roomservice.xml and save and close it.
CM10 with CM10.1 with Kernel 2.6 manifests will be added soon Here.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="dhiru1602/android_device_samsung_galaxysl" path="device/samsung/galaxysl" remote="github" revision="cm-10.1" />
<project name="dhiru1602/android_vendor_samsung_galaxysl" path="vendor/samsung/galaxysl" remote="github" revision="cm-10.1" />
<project name="dhiru1602/android_kernel_samsung_latona" path="kernel/samsung/latona" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="cm-10.1" />
</manifest>
close and ope new terminal and navigate in source folder and do again repo sync it will download device tree as per in roomservice.xml
Code:
cd cm10.1
repo sync
(4) Patching and cherry-picking
No Patching Required for CM10 and CM10.1 with kernel 3.0
(5) Building ROM
Before Building New ROM every time its wise idea to update source with mainstream. You need to just sync reporosity again.
Code:
repo sync
Now for Building ROM
Code:
. build/envsetup.sh
brunch galaxysl
It will take time depends on your processor and RAM of your machine & will create output in /out/target/product/galaxysl/cm-10-XXXXX-UNOFFICIAL-galaxysl.zip
It will look like this in the End
View attachment 2082696
(6) Installing
To install newly build ROM you need to Copy it to you SD card. Reboot into CWM Recovery Mode
Wipe Cache and Dalvik-cache if you are on CM10/CM10.1 with Kernel 3.0 or Do full wipe and Install it.
reboot phone and check everything is working. and than reboot again in Recovery Mode and install Gapps.
Gapps :: http://goo.im/gapps/
Reboot phone and Enjoy
Happy ROM BuildinG.:laugh:
Reserved for Description
Reserved for Patch Discussion
Reserved for FAQs
It is Seperate Guide for Kernel Building. Its Just Reference Guide So its require some understing. Will modify and update it to make easier when i will get time.
Kernel Building is different than ROM building. In ROM building Kernel is already build while ROM cooking by Android Build System.You will not require CM10 or CM10.1 source for this.
What you will Require
1) PC with Ubuntu 12.10/13.04 x64
2) Toolchain #Software to compile Kernel
3) One Kernel already build.
4) Some tools
1) get git tool
Code:
sudo apt-get git
2) Get toolchain.
Our Dear dev adipat has put sevaral toolchain in his git repo.
I recommand to use arm-eabi-4.4.3
now to download toolchain.
(1)mkdir Toolchains && cd Toolchains
(2) git clone -b arm-eabi-4.4.3 git://github.com/AdiPat/Android_Toolchains.git
I am showing here how to build CM10.1 Kernel 3.0 so dont get confused.
you can build different kernel as same as here. you will require some understanding of git commands and about our Kernel Source.
Code:
mkdir kernel_sl ## you can take any name instead of kernel_sl
cd kernel_sl
git clone -b cm-10.1 https://github.com/dhiru1602/android_kernel_samsung_latona.git ## it will download Kernel 3.0 Source of CM10.1 branch from Dheeraj's Repo.
after finishing go into android_kernel_samsung_latona
Code:
cd android_kernel_samsung_latona
make output folder for kernel.
default output of zimage is "arch/arm/boot/zImage" inside kernel source
change it your desire location.
Download build.sh.zip provided in the post and extract it and put build.sh in android_kernel_samsung_latona dir,
open it and change path of toolchain and output directory as per your setting.
Set it as per you prefernce.
I am using toolchain already in cm10.1 source. you can use it if you have source. or change path as per toolchain you downloaded from upper provided repo or any other website.
save it.
now give it permission to execute.
Code:
sudo chmod +x build.sh
to start building kernel.
Actually build.sh is line of commands to start building Kernel by putting them in one file and by executing we dont need to run every command manually. You can also type or copy & paste command manually to learn meanings of code.
Code:
./build.sh
Now download this :: http://d-h.st/ncR
unpack-repack tool by our dear Dev loSconosciuto.
now make new_kernel folder into kernel_out and extract unpack-repack tools there.
grab boot.img from our CM10.1 RoM
put it in /home/nics/kernel_out/new_kernel/unpack-repack
run in terminal
Code:
./unpack.pl
it will create directory named out containing boot.img and zimage.
just replace zimage with newely builed zimage.
and run
Code:
./repack.sh
it will create boot.img and updater-zip in out directory.
that's it boot.img is your new kernel.
take this boot.img and make updater.zip and flash it or replace it in CM10.1 ROM zip and flash it. that's most easiest way to flash and make Kernel.
Source
# frapeti's Guide for CM9 Here
# HP touchpad CM building Guide
# http://wiki.cyanogenmod.org/w/Template:Cm10_build
# http://soupdawg.wordpress.com/
Credits
Special thanks to dhiru1602,loSconosciuto & adi_pat
LoLaTiOn,rodero95
alfrix,TheDarkLord1997,frapeti
Our SL Senior Members & Recognized Contributors and every Developer who have contributed on SL Development.
HP touchpad CM building Guide authors
CyanogenMod Team
build cm10.1 kernel with 2.6 ?§!
Code:
mkdir -p ~/bin
PATH=~/bin:$PATH
Code:
sudo apt-get install curl
curl [url]https://dl-ssl.google.com/dl/googlesource/git-repo/repo[/url] > ~/bin/repo
chmod a+x ~/bin/repo
Code:
cd '/home/[COLOR="DarkOrange"]users[/COLOR]/cm10.1'
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
Code:
repo sync
other method the cloning party source !
Code:
mkdir -p ~/cm10.1/vendor/samsung
cd '/home/[COLOR="DarkOrange"]users[/COLOR]/cm10.1/vendor/samsung'
git clone https://github.com/rodero95/android_vendor_samsung_galaxysl
Code:
mkdir -p ~/cm10.1/device/samsung
cd '/home/[COLOR="DarkOrange"]users[/COLOR]/cm10.1/device/samsung'
git clone https://github.com/rodero95/android_device_samsung_galaxysl
Code:
mkdir -p ~/cm10.1/kernel/samsung
cd '/home/[COLOR="DarkOrange"]users[/COLOR]/cm10.1/kernel/samsung'
git clone https://github.com/rodero95/android_kernel_samsung_latona_legacy
Rename "android_kernel_samsung_latona_legacy" in "latona" like "roomservice.xml"
check the device and vendor directory has the same like "roomservice.xml"
Code:
mkdir local_manifests
cd local_manifests
gedit roomservice.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="rodero95/android_device_samsung_galaxysl" path="device/samsung/galaxysl" remote="github" revision="jellybean" />
<project name="rodero95/android_vendor_samsung_galaxysl" path="vendor/samsung/galaxysl" remote="github" revision="cm-10.1" />
<project name="rodero95/android_kernel_samsung_latona_legacy" path="kernel/samsung/latona" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="cm-10.1" />
</manifest>
Lola after first time source downloaded. you need to go in '.repo' folder in source folder. and in that create dir named 'local_manifests' and inside it create roomservice.xml file. in this file copy above code which i put in device tree section. for CM10.1 use CM10.1 manifests. Dont modify above commands 'bin' is folder where repo tool downloaded not source. dont clone any source manually instead just write that project name in roomservice.xml and when ever you do repo sync it will download that device tree as well as up date source. just follow above guide.
Hey!
Great to know more people get interested on android development!
Just if you want some help, all my scripts, manifests and patches I use are published as gists on my github account
http://gist.github.com/rodero95
Some of them may be outdated or non-working as some days I introduce some changes but don't finish them, so look for the different revisions of one does not work (I think the only broken script right now is the ROM building script).
Good luck and happy development!
Sent from my GT-I9003 using xda premium
rodero95 said:
Hey!
Great to know more people get interested on android development!
Just if you want some help, all my scripts, manifests and patches I use are published as gists on my github account
http://gist.github.com/rodero95
Some of them may be outdated or non-working as some days I introduce some changes but don't finish them, so look for the different revisions of one does not work (I think the only broken script right now is the ROM building script).
Good luck and happy development!
Sent from my GT-I9003 using xda premium
Click to expand...
Click to collapse
Thanks rodero.
I will update thread soon currently my semester's final exam are running and will finish next week. I will update thread with remaining guide description, manifests for CM10/CM10.1 with 2.6 kernel , dependency for new ubuntu 13.04 'Raring Ring Tail'.
hello
nicsptl said:
Reserved for FAQs
i have a question sir CYNOGENMOD working dual sim phones or not?
Click to expand...
Click to collapse
paras357 said:
nicsptl said:
Reserved for FAQs
i have a question sir CYNOGENMOD working dual sim phones or not?
Click to expand...
Click to collapse
Ans is Yes.
As CynogenMod is based on ASOP Source and AOSP source does support Dual Sim. But to complete support of Dual Sim on CM it requires complete Kernel source as well Device source. And most company do not release device specific dual sim source. That makes very difficult to implement Dual Sim support properly on CM. If i am not wrong than fewer device have Dual sim support on non-official CM Roms/Ports.
Click to expand...
Click to collapse
Ans is Yes.
As CynogenMod is based on ASOP Source and AOSP source does support Dual Sim. But to complete support of Dual Sim on CM it requires complete Kernel source as well Device source. And most company do not release device specific dual sim source. That makes very difficult to implement Dual Sim support properly on CM. If i am not wrong than fewer device have Dual sim support on non-official CM Roms/Ports.[/QUOTE]
ok but a dev create cm10.1 rom for MIcromx A110 but it not booting i also want create CM10.1 rom for MIcromax A110
can u help me to create cm10.1 rom plz
paras357 said:
ok but a dev create cm10.1 rom for MIcromx A110 but it not booting i also want create CM10.1 rom for MIcromax A110
can u help me to create cm10.1 rom plz
Click to expand...
Click to collapse
Sorry Buddy, I am not expert in Developing Device. But for working CM builds your Devs has to setup first Device Tree and Kernel Tree and than
need to debug where is problem and what causes bootloops in ROM and need to eliminate step by step problems.
nicsptl said:
Sorry Buddy, I am not expert in Developing Device. But for working CM builds your Devs has to setup first Device Tree and Kernel Tree and than
need to debug where is problem and what causes bootloops in ROM and need to eliminate step by step problems.
Click to expand...
Click to collapse
do u have facebook account Then i will tell u all errors if u have then plz send me and ics device tree are released.......:laugh::good:
paras357 said:
do u have facebook account Then i will tell u all errors if u have then plz send me and ics device tree are released.......:laugh::good:
Click to expand...
Click to collapse
I told you buddy i will not able to help to that much and i dont owe that phone either. you just cant build CM from another device source. it required its particular device specific code. Thats good thing that USB and ADB is working which will help Devs to debug more. (http://forum.xda-developers.com/showthread.php?t=2292308).
nicsptl said:
I told you buddy i will not able to help to that much and i dont owe that phone either. you just cant build CM from another device source. it required its particular device specific code. Thats good thing that USB and ADB is working which will help Devs to debug more. (http://forum.xda-developers.com/showthread.php?t=2292308).
Click to expand...
Click to collapse
ok sir.
@nicsptl
how big size is the cm10.1 prebuild download ?
chongns said:
@nicsptl
how big size is the cm10.1 prebuild download ?
Click to expand...
Click to collapse
did you mean source or prebuilt (prebuilt apk and libs i.e. term.apk) ??
source size is about 8.2 GB may be it varies to 10 GB to download and after extracting it will become 15 GB. and with device tree and kernel source it requires 15-20 GB. and after build rom completed it will it will acquire around 30 GB.
and prebuilt is only about 5 MB.

Building any rom for One XL

Do you know about a ROM that it's not builded for your beloved One XL? Do you want to port it for your device? This easy guide will help you.
Requirements:
A One XL.
A relatively recent computer (Linux, OS X, or Windows) w/a reasonable amount of RAM and about 35 GB of free storage. The less RAM you have, the longer the build will take. Using SSDs results in faster builds than traditional hard drives.
A micro USB cable.
A decent Internet connection & reliable electricity
Some familiarity with basic Android operation and terminology. It would help if you’ve installed custom roms on other devices and are familiar with what a recovery image such as ClockworkMod is, for example. It may also be useful to know some basic command line concepts such as cd for “change directory”, the concept of directory hierarchies, that in Linux they are separated by /, etc.
​HERE IS THE GUIDE.
Installing Build Packages
Open the terminal and type: (for 64-bit&32-bit)
Code:
sudo apt-get install bison build-essential curl flex git-core gnupg gperf libesd0-dev libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop openjdk-6-jdk openjdk-6-jre pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev
In addition to the above, for 64-bit systems:
Code:
sudo apt-get install g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev
Creating Directories
In order to start building ROMs you'll need to create some directories
Code:
mkdir -p ~/bin
mkdir -p ~/yourworkingdirectory
Installing the REPO command
Enter the following to download the "repo" binary:
Code:
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Now lets give this the proper permissions to make it runnable:
Code:
chmod a+x ~/bin/repo
Put the ~/bin directory in your path of execution
Make sure that the ~/bin directory you just created is in your path of execution so that you can easily run the repo command even when you're not in ~/bin.
Code:
export PATH=${PATH}:~/bin
Initialize the source repository
Code:
cd yourworkingdirectory
Now you'll need the repo init related to the rom you'd like to build. Here i will insert some of the I used. Anyway to find this you can go the rom's github and search for the manifest (android or platform-manifest).Just choose the right branch.
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
repo init -u git://github.com/LiquidSmooth/android.git -b kitkat
repo init -u git://github.com/SlimRoms/platform_manifest.git -b kk4.4-caf
Download the source code
This will download all the source code to your computer.Prepare to wait a long time while the source code downloads.
Code:
repo sync
Download device,kernel and vendor tree for Liquid
We will use CM ones. Thanks a lot.
Basically we need to add some projects to the download list. To do this we'll need a local_manifest.
Go in the .repo folder in your working directory(it's an hidden folder press ctrl+h). Create a new folder called "local manifests" then double click on it. Now you'll have to create a roomservice.xml file for the most of the ROMs and a slim_manifest.xml for SlimRoms, it's the same thing just the name it's different.
Open this file and paste this inside:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="github"
fetch="git://github.com/" />
<project name="CyanogenMod/android_device_htc_evita" path="device/htc/ville" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_htc_s4-common" path="device/htc/s4-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_htc_msm8960-common" path="device/htc/msm8960-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_kernel_htc_msm8960" path="kernel/htc/msm8960" remote="github" revision="cm-11.0" />
<project name="TheMuppets/proprietary_vendor_htc" path="vendor/htc" remote="github" revision="cm-11.0" />
</manifest>
Now give another:
Code:
repo sync
and wait.
Do some modifications to the .mk files
Since we are using CM device tree we need to modify them for the choosen ROM.
Go into the device folder(device/htc/ville) and do some modifications. I will explain you what i mean using LiquidSmooth as example.
1) Create a new file called vendorsetup.sh . Open it and inside you'll have to write a script to add it to the lunch list.
Code:
add_lunch_combo liquid_evita-userdebug
You can choose if you want an userdebug version of the rom or an eng one just by writing eng instead of userdebug.
2) Now rename cm.mk into liquid.mk(for other ROMs this file should be renamed in a different way. Use an existing device tree to see the correct naming.)
3) Open the .mk file. You'll find something like this:
Code:
# Release name
PRODUCT_RELEASE_NAME := evita
# Boot animation
TARGET_SCREEN_HEIGHT := 960
TARGET_SCREEN_WIDTH := 540
# Inherit some common CM stuff.
$(call inherit-product, vendor/cm/config/common_full_phone.mk)
# Inherit device configuration
$(call inherit-product, device/htc/ville/device_evita.mk)
# Device naming
PRODUCT_DEVICE := evita
PRODUCT_NAME := cm_evita
PRODUCT_BRAND := htc
PRODUCT_MODEL := One XL
PRODUCT_MANUFACTURER := HTC
# Set build fingerprint / ID / Product Name ect.
PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=htc_ville BUILD_FINGERPRINT=htc_europe/ville/ville:4.1.1/JRO03C/128506.8:user/release-keys PRIVATE_BUILD
You need to modify some things to make it buildable:
Code:
# Inherit some common CM stuff.
$(call inherit-product, vendor/cm/config/common_full_phone.mk)
becomes:
Code:
# Inherit some common LiquidSmooth stuff.
$(call inherit-product, vendor/liquid/config/common_phone.mk)
To understand the changes you'll have to go in the vendor folder searching the rom specific vendor and open the config folder to see what .mk file you need.
This:
Code:
PRODUCT_NAME := cm_evita
becomes:
Code:
PRODUCT_NAME := liquid_evita
4) Now rename cm.dependencies in liquid.dependencies(SlimRoms does not require this step for unsupported devices.)
Start the build
Code:
source build/envsetup.sh
If you created the vendorsetup.sh in the right way you will read the evita folder.
Code:
lunch
Now you have to choose the number near the evita in the list of the supported devices.
If you have done all in the correct way in your terminal you'll see a page like this:
View attachment 2470228
Build
After lunching you have to start the build using the right command:
For liquid:
Code:
time mka liquid
For others:
Code:
make bacon
make
brunch devicename
Wait some time till the build ends hopefully with no errors.​
Credits: http://wiki.cyanogenmod.org/w/Build_for_ville
and all the experience i got in this 2 months of building.
For most ROMS you'll have some overlays errors.
Just go in the overlay folder linked in the error and open config.xml. Just delete the lines in the error or search in the folder history the commit that you have to revert.
To revert a commit:
Code:
cd intheinteressedfolder
git revert thenumberofthecommit
Here is a screenshot of the what the number/name of the commit is:
View attachment 2470242
Enjoy.
Thank you so much for this guide! I can't tell you how frustrated I was yesterday when I tried to set up Git
For setting up the build packages, can I run that in the bash she'll of Git? I'm on Windows 8, so I don't think cmd will be able to run it
Sent from my One X
pandasa123 said:
Thank you so much for this guide! I can't tell you how frustrated I was yesterday when I tried to set up Git
For setting up the build packages, can I run that in the bash she'll of Git? I'm on Windows 8, so I don't think cmd will be able to run it
Sent from my One X
Click to expand...
Click to collapse
i don't know about this! Yo could try with a Virtual Machine or using jenkins.
Hopefully experienced dev will start work on MIUI AOSP or Touchwiz ROM /Xperia port using this steps ....
Really glad to see this steps for attempted dev..
Thanks Phoenixita
Sent from my One X using XDA Premium 4 mobile app
pandasa123 said:
Thank you so much for this guide! I can't tell you how frustrated I was yesterday when I tried to set up Git
For setting up the build packages, can I run that in the bash she'll of Git? I'm on Windows 8, so I don't think cmd will be able to run it
Sent from my One X
Click to expand...
Click to collapse
Step one if you want to get serious setup dual boot w/ubuntu. Don't even look at doing a VM....just wasting time
Sent from my One X using Tapatalk
jrior001 said:
Step one if you want to get serious setup dual boot w/ubuntu. Don't even look at doing a VM....just wasting time
Sent from my One X using Tapatalk
Click to expand...
Click to collapse
Definitely have to second this! Also, as mentioned in the op, make sure you have enough RAM. CM recommends 4GB. You can do it with less, but it will take a long time... Seriously long time. You would also most likely have to increase your Swap partition size as well with less than 4GB (or create a swap file).
Sent from my One X using XDA Premium 4 mobile app
This is pretty cool and I've seen a few guides before. I've been toying around with this idea for some time. I just need the free time to do it right. I totally agree with the dual boot as well. So much easier than messing around with VM.
Thanks! Now I wish this was out before I made two page text files of notes.
But I moved it to the cloud storage so I am using this whenever I set up build enviroment. I just have to do a little more since I am using Arch based linux.
---------- Post added at 01:10 AM ---------- Previous post was at 01:03 AM ----------
jrior001 said:
Step one if you want to get serious setup dual boot w/ubuntu. Don't even look at doing a VM....just wasting time
Sent from my One X using Tapatalk
Click to expand...
Click to collapse
Or even more serious.
I am dual booting
Windows 8.1 (250 GBs SSD)
+
(arch based Linux on 1TB HDD)
8 GBs ram
i7 3610CQM
Nvididia geforce gtx 660m
Yes i am syncing on a notebook I have used -j30's no problem
I needed help with the local manifest I forgot so thanks as well to guide creator.
right now, I'm installing ubuntu 13.10 on my laptop and I'm looking forward to it...but i was wondering, while installing it on my laptop, it would be nice to see an ubuntu ROM...i don't have the skill set to make one, but I'm just saying
pandasa123 said:
right now, I'm installing ubuntu 13.10 on my laptop and I'm looking forward to it...but i was wondering, while installing it on my laptop, it would be nice to see an ubuntu ROM...i don't have the skill set to make one, but I'm just saying
Click to expand...
Click to collapse
I know rohan32 had at one time attempted it but idk how far he got. I doubt our HTC mess would play nice.
Sent from my One X using Tapatalk
All right, so I think we should say what ROM we want to compile. Just so we don't get like 2 PA
Maybe I'll go back for round 2 with PA. This time from sources, instead of porting it with Windows explorer
Sent from my One X
pandasa123 said:
right now, I'm installing ubuntu 13.10 on my laptop and I'm looking forward to it...but i was wondering, while installing it on my laptop, it would be nice to see an ubuntu ROM...i don't have the skill set to make one, but I'm just saying
Click to expand...
Click to collapse
Here is a good place to start: (primarily for Nexus devices, but gives a great overview of how partitions work with Android and Ubuntu)
https://wiki.ubuntu.com/Touch/DualBootInstallation
And another:
https://wiki.ubuntu.com/Touch/Porting
Please note, I have not personally attempted these builds. With that being said, however, I believe that they will provide you with a good place to start. And by stating that they're good places to start, I mean that you should start reading there. In particular, with the first link, as it goes into detail about modifying partitions.
Very good write ups nonetheless.
Sent from my One X using XDA Premium 4 mobile app
@phoenixita i get this error ....
@brotherross
@jrior001
Which would you like? [aosp_arm-eng] 38
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[
.mk]]: "device/htc/evita/device.mk" does not exist. Stop.
** Don't have a product spec for: 'secret_evita'
** Do you have the right repo manifest?
No such item in brunch menu. Try 'breakfast'
[email protected]:~/android/evita/<secret>$
I found device-vendor.mk and renmaed it to device.mk and still not working
Edit-----
-------
Ok changed it back and went to terminals location and changed it from device-evita.mk to device.mk and now it works lol. oops
Techinstein said:
[email protected]:~/android/evita/<secret>$
:~/android/evita/<secret>$
Click to expand...
Click to collapse
your directories look so out of whack...
if anything it should be secret/device/htc/evita . ...and thats if youre working from within your device folder
youre gonna need to build from your rom directory man..
should be more like
[email protected]:~/<secret>$ . build/envsetup.sh && lunch/brunch/breakfast (whichever the rom uses) && mka bacon (if the rom build needs it)
but thats not even the error. keep messing with names of your make files and make sure the contents within the files lines up properly.
Techinstein said:
@phoenixita i get this error ....
@brotherross
@jrior001
Which would you like? [aosp_arm-eng] 38
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[
.mk]]: "device/htc/evita/device.mk" does not exist. Stop.
** Don't have a product spec for: 'secret_evita'
** Do you have the right repo manifest?
No such item in brunch menu. Try 'breakfast'
[email protected]:~/android/evita/<secret>$
I found device-vendor.mk and renmaed it to device.mk and still not working
Edit-----
-------
Ok changed it back and went to terminals location and changed it from device-evita.mk to device.mk and now it works lol. oops
Click to expand...
Click to collapse
rename device_evita.mk in device.mk.
Edit: ops you did it.
i am trying to compile liquid and getting this error
Which would you like? [aosp_arm-eng] 1
build/core/product_config.mk:250: *** No matches for product "liquid_evita". Stop.
** Don't have a product spec for: 'liquid_evita'
** Do you have the right repo manifest?
thanks
This guy is good.

[Guide] How to Build Your Own Custom ROM [athene]

Hello guys. I will show you how to build LineageOS to Moto G4 Plus.
You have to build in a Linux system. I prefer Ubuntu 16.04 in this guide.
The lines which is starting with $ are commands you should write but you won't write $'s.
1- First, open the terminal and write this command to download packages which are necessary for building.
Code:
$ sudo apt-get install bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop maven openjdk-8-jdk pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline6-dev lib32z1-dev
2- Write this commands to download the repo which is using for download sources.
Code:
$ mkdir -p ~/bin
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
3- Create a directory and open it. I will​ create los, you can create what you want.
Code:
$ mkdir ~/los
$ cd ~/los
4- Set your username and email.
Code:
$ git config --global user.name "YourUserName"
$ git config --global user.email "YourEmail"
5- Select the repo what you want to download. I will download LineageOS repo now, you can download what you want.
Code:
$ repo init -u https://github.com/LineageOS/android.git -b cm-14.1
To build another ROM, go to ROMs manifest in Github and copy the link. Then add .git to link.
cm-14.1 is our branch, you can change it.
6- Sync your repo.
Code:
$ repo sync --force-sync
7- Create a roomservice.xml in /los/.repo/local_manifests
8- Write this in your roomservice.xml. And save it. You can change or add your device trees here. I will use these trees
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- Device Trees -->
<project name="LineageOS/android_device_motorola_athene" path="device/motorola/athene" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_kernel_motorola_msm8952" path="kernel/motorola/msm8952" remote="github" revision="cm-14.1" />
<project name="TheMuppets/proprietary_vendor_motorola" path="vendor/motorola" remote="github" revision="cm-14.1"/>
<project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-14.1" />
</manifest>
9- Sync the repos again.
Code:
$ repo sync --force-sync
10- Write this commands before building.
Code:
$ . build/envsetup.sh
$ breakfast athene
11- Set cache. I recommend setting min. 50 GB cache for increase speed. I'll set 100 GB.
Code:
$ export USE_CCACHE=1
$ prebuilts/misc/linux-x86/ccache/ccache -M 100G
12- State you're going to use Java 8.
Code:
$ export EXPERIMENTAL_USE_JAVA8=true
13- Start building.
Code:
$ brunch athene
14- If you build successfuly, you can find your lineage-athene-unofficial-xxxxxxx.zip in /los/out/target
15- Finished.
Credits: @asderdd
Nice tutorial! I have a small question though. When I try to make a LineageOS build I always get an error, something about java being out of memory. I have tried several things to solve the problem but nothing really worked, like manually setting the java memory heap size on Jack Server. My machine's specs are: Intel Core i5 3450 quad core @ 3.4Ghz, 6GB RAM and a nVidia GTX 520. Yes my machine is old but that doesn't mean it's incapable of making builds, right?
Using the following is much easy imo, instead of modifying the manifest.
git clone url -b branchname directory
---------- Post added at 10:21 AM ---------- Previous post was at 10:19 AM ----------
TheSauceTesters said:
Nice tutorial! I have a small question though. When I try to make a LineageOS build I always get an error, something about java being out of memory. I have tried several things to solve the problem but nothing really worked, like manually setting the java memory heap size on Jack Server. My machine's specs are: Intel Core i5 3450 quad core @ 3.4Ghz, 6GB RAM and a nVidia GTX 520. Yes my machine is old but that doesn't mean it's incapable of making builds, right?
Click to expand...
Click to collapse
What linux distro are you using? Consider using soemthing light weight like Ubuntu Gnome or Kubuntu. Also, how are you alloting the RAM to Jack and did you do the same in the .bashrc ?
tywinlannister7 said:
Using the following is much easy imo, instead of modifying the manifest.
git clone url -b branchname directory
---------- Post added at 10:21 AM ---------- Previous post was at 10:19 AM ----------
What linux distro are you using? Consider using soemthing light weight like Ubuntu Gnome or Kubuntu. Also, how are you alloting the RAM to Jack and did you do the same in the .bashrc ?
Click to expand...
Click to collapse
I am using Ubuntu 16.04. I used the following guide to manually set the java memory size:
http://stackoverflow.com/a/37515468/5708385 and I also did the same in .bashrc
TheSauceTesters said:
I am using Ubuntu 16.04. I used the following guide to manually set the java memory size:
http://stackoverflow.com/a/37515468/5708385 and I also did the same in .bashrc
Click to expand...
Click to collapse
Found the things in the Stackoverflow link, a bit complicated; this is all you need, # refers to the GB of RAM you can allot. Type this in terminal and add it to your .bashrc file. Relogin/Reboot to make sure it gets implemented in bash.
Code:
export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx#G"
On a 6GB machine, 5 GB should be the max, provided that you're not using your machine while the ROM is building. :good:
I just reinstalled ubuntu and now it gives me fetch errors when it's trying to fetch the projects mentioned in roomservice.xml. The error says "Error: Exited sync due to fetch errors."
--Update
I manually cloned the 2 projects with git clone into their destinated directories.
@TheSauceTesters try this command
repo sync -j$( nproc --all ) --force-sync -c --no-clone-bundle --no-tags --optimized-fetch --prune
why do we need to sync repo twice? and will it take the same time the 2nd time too? cuz i started at 4:30 in the evening, still stuck at repo syncing the 1st time itself. till 19 gb downloaded
///TheNexus/// said:
7- Create a roomservice.xml in /los/.repo/local_manifests
8- Write this in your roomservice.xml. And save it. You can change or add your device trees here. I will use these trees
Click to expand...
Click to collapse
Hi, thanks for the tutorial. After adding the trees in roomservice.xml I get the following error with "brunch athene" (after sourcing envsetup.sh and breakfast etc...):
Code:
fatal: duplicate path device/motorola/athene in /home/robert/android/building/RR/.repo/manifest.xml
I have tried using a roomservice.xml from elsewhere ( I forget where now) which looks like:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="LineageOS/android_device_motorola_athene" path="device/motorola/athene" remote="github" />
<project name="LineageOS/android_kernel_motorola_msm8952" path="kernel/motorola/msm8952" remote="github" />
<project name="LineageOS/android_external_bson" path="external/bson" remote="github" />
<project name="LineageOS/android_external_stlport" path="external/stlport" remote="github" />
<project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" />
<project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" />
</manifest>
and the repo sync is fine but I get build errors. The latest being:
Code:
Starting build with ninja
ninja: Entering directory `.'
ninja: error: '/home/robert/android/building/RR/out/target/product/athene/obj/lib/libtime_genoff.so.toc', needed by '/home/robert/android/building/RR/out/target/product/athene/obj/SHARED_LIBRARIES/libandroid_servers_intermediates/LINKED/libandroid_servers.so', missing and no known rule to make it
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
Running the extract-files.sh script and getting files from an athene device running 14.1 makes no difference to the above error. Any advice on this?
cheers
Robert
Libtime_genoff is in vendor/motorola/athene/proprietary/lib/ check if it's missing or not, and also check if there's an Android.mk in the base folder that has the instructions for compiling libtime_genoff.so
It's there in the Muppets repository...
nlpl931 said:
Libtime_genoff is in vendor/motorola/athene/proprietary/lib/ check if it's missing or not, and also check if there's an Android.mk in the base folder that has the instructions for compiling libtime_genoff.so
It's there in the Muppets repository...
Click to expand...
Click to collapse
Thanks for your reply! I managed to get past that - it turned out I had a backup file in local_manifests/ that was giving me the duplicate path message, so I was able to add Muppets and repo sync went well. It also compiled and I got a zip of ~390M. Unfortunately it failed to boot - there was a "failed to load kernel" , "your device didn't start properly" etc. I flashed an ElementalX kernel and it booted just fine so I am not sure what went wrong. A boot.img was made BTW, about 8M.
grepper
grepp0r said:
Thanks for your reply! I managed to get past that - it turned out I had a backup file in local_manifests/ that was giving me the duplicate path message, so I was able to add Muppets and repo sync went well. It also compiled and I got a zip of ~390M. Unfortunately it failed to boot - there was a "failed to load kernel" , "your device didn't start properly" etc. I flashed an ElementalX kernel and it booted just fine so I am not sure what went wrong. A boot.img was made BTW, about 8M.
grepper
Click to expand...
Click to collapse
Try reverting the 'drop custom dtbtool' commit for athene - that commit for Lineage OS is https://review.lineageos.org/#/c/176309/ It's caused similar boot failure behaviour for other ROMs (as an aside, are you running a G4 Plus?) I'm not sure how to revert commits locally (i guess git revert will do it? https://git-scm.com/docs/git-revert)
echo92 said:
Try reverting the 'drop custom dtbtool' commit for athene - that commit for Lineage OS is https://review.lineageos.org/#/c/176309/ It's caused similar boot failure behaviour for other ROMs (as an aside, are you running a G4 Plus?) I'm not sure how to revert commits locally (i guess git revert will do it? https://git-scm.com/docs/git-revert)
Click to expand...
Click to collapse
Awesome, thanks, that worked! I did a "git revert --no-commit 3a10bd4" in .device/motorola/athene/ . All is well now. Hopefully they will get that fixed because I'm a bit flummoxed about how to use a branch to stop my revert from being overwritten.
And yes, I am using a Moto G4 plus.
cheers,
Robert
You can use 'git stash' command to save your local changes.
Then after syncing from the remote repo, you can run 'git stash pop' to merge your local changes with the version that you synced provided there are no real conflicts with your modifications...
nlpl931 said:
You can use 'git stash' command to save your local changes.
Then after syncing from the remote repo, you can run 'git stash pop' to merge your local changes with the version that you synced provided there are no real conflicts with your modifications...
Click to expand...
Click to collapse
Thanks, I was considering that approach before someone on #lineageos-dev said doing a branch was the right way. Personally I'd rather something simple like your idea rather than a more complicated solution I am unlikely to use very often or remember next time
On another note, while my zip installed and booted fine, I find I am getting quite a few app force closes (bluemail, atlas browser to name a few).. Not sure why, perhaps I was unlucky timing wise. This was on a clean flash with caches cleared. Guess I'll wait a bit and try again.
If any developer types are interested I can post the logcat.
cheers,
Rob
grepp0r said:
On another note, while my zip installed and booted fine, I find I am getting quite a few app force closes (bluemail, atlas browser to name a few).. Not sure why, perhaps I was unlucky timing wise. This was on a clean flash with caches cleared. Guess I'll wait a bit and try again.
If any developer types are interested I can post the logcat.
Click to expand...
Click to collapse
Never mind, its working now - installed after syncing on June 24th. I think I may have messed something up on my system by installing an incompatible development package. which I uninstalled now. Though you would think that it wouldn't compile rather than compiling successfully and giving me the errors I had. Anyway, it works fine now.
hey everybody I am trying to build PA for athene and I have downloaded PA sources by reference flag from Lineage sources but i am getting this error while breakfast command
build/core/product_config.mk:239: *** _nic.PRODUCTS.[[vendor/pa/products/athene/pa_athene.mk]]: "vendor/cm/config/common_full.mk" does not exist. Stop.
** Don't have a product spec for: 'pa_athene'
** Do you have the right repo manifest?
Will somebody plz tell me the workaround for that , it will be very kind of you
Are you using LineageOS device tree?
If so, look for the file lineage.mk in device/Motorola/athene and change the
"vendor/cm/config/common_full.mk" line to "vendor/pa/main.mk"
You see the build system is searching for LineageOS specific vendor config file whereas it should be looking for PA config...Hence the error. Hope this will fix it. Check this link
https://pastebin.com/9k71H45q
nlpl931 said:
Are you using LineageOS device tree?
If so, look for the file lineage.mk in device/Motorola/athene and change the
"vendor/cm/config/common_full.mk" line to "vendor/pa/main.mk"
You see the build system is searching for LineageOS specific vendor config file whereas it should be looking for PA config...Hence the error. Hope this will fix it. Check this link
https://pastebin.com/9k71H45q
Click to expand...
Click to collapse
Thanks a lot mate....It worked:good:
Although when i try to build it asks for libqc-skia missing and no known rule defined
hello friends I am trying to build PA for our device but the Lineage device tree is giving me a lot of errors......I am a newbie......so plz someone provide me a link for the AOSP device tree for our device....

Categories

Resources