[Guide] How to build CM10.1 (Android 4.2.1) for the Galaxy R I9103 - Samsung 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.....

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

[Q] Missing Repo for Android-NGK???

Tried to post this in the developer's forum, but apparently I don't have enough posts to do that. I'm trying to install the android-ndk platform on Debian Linux. It worked perfectly until I started downloading the toolchain sources.
Code:
# ./build/tools/download-toolchain-sources.sh /home/myusr/ndk-work/android-toolchain-src –verbose
Using git clone prefix: https://android.googlesource.com/toolchain
downloading sources for toolchain/binutils
Using sources for date '2011-02-23': toolchain/binutils revision a4316ba2b7698435a68e9826cabd87ae43dad182
downloading sources for toolchain/build
Using sources for date '2011-02-23': toolchain/build revision 2037ad5fa2969e0e77142548feb8cf54dc7b0a04
downloading sources for toolchain/gcc
ERROR: Could not clone https://android.googlesource.com/toolchain/gcc.git ?
I found the problem was my /tmp folder filled up and there was no more room to download anything. I saw 7 wasn't stable and I tried it do the same thing with version 6.
Code:
# ./build/tools/download-toolchain-sources.sh /home/ph33r/myusr/android-toolchain-src –verbose
Using git clone prefix: git://android.git.kernel.org/toolchain
downloading sources for toolchain/binutils
ERROR: Could not clone git://android.git.kernel.org/toolchain/binutils.git ?
This time /tmp was not even close to full. I am beginning to question if some of these repos aren't dead. Can anyone give me any advice or tips installing android-ndk?
i go back. lets go
i go back. lets go
Click to expand...
Click to collapse
What does that even mean?
This was the only response?

Building From from AOSP Source help

Hi all I have been trying to compile a pure stock from for my phone using someone elces kernel, device, and vendor directories. I synced the master branch of aosp repo and symlinked my sepreatly downloaded device directories to the proper directories. When I go to build, I use the command
Code:
. /build envsetup.sh && brunch ancora_tmo[Code]
I get
[Code]Including devices/samsung/ancora_tmo/vendorsetup.sh
No command 'brunch' found
[Code]
as well as 4 other aosp devices.
I added ancora tmo by symlinking the sources to my system tree.
I tried building with the command lunch and I get
[Code] don't have product specs for: full_ancora_tmo
Do you have right report manifest[Code]
where am I going wrong on building
I followed some custom build instructions and haven't modified much source yet but am simply trying to build pure stock for my phone what am I doing wrong?
Sent from my Galaxy Exhibit running Jocala's CM9
Try these:
Make sure you run the "PATH" command that it says to in SDK setup:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
Also, if you are making a new device, try to use the mkvendor.sh script in build/tools/device
WhiteHatHacker said:
Try these:
Make sure you run the "PATH" command that it says to in SDK setup:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
Also, if you are making a new device, try to use the mkvendor.sh script in build/tools/device
Click to expand...
Click to collapse
I did I setup the sdk and edited The .bashrc (or something similar) file
and added the sdk path
Sent from my Galaxy Exhibit running Jocala's CM9
Maybe the '-eng' part was missing
try:
Code:
brunch full_ancora_tmo-eng
or do everything:
Code:
brunch full-eng
WhiteHatHacker said:
Maybe the '-eng' part was missing
try:
Code:
brunch full_ancora_tmo-eng
or do everything:
Code:
brunch full-eng
Click to expand...
Click to collapse
Nope, still says brunch isn't found.
possible the report sync didn't complete right
Sent from my Galaxy Exhibit running Jocala's CM9
Who's kernel are you using?
You did:
Code:
source build/envsetup.sh
correct?
WhiteHatHacker said:
Whose kernel are you using?
Click to expand...
Click to collapse
jocala's custom rooted kernel
Sent from my Galaxy Exhibit running Jocala's CM9
WhiteHatHacker said:
Who's kernel are you using?
You did:
Code:
source build/envsetup.sh
correct?
Click to expand...
Click to collapse
Yes correct
I get this error when I try and build from the lunch menu
Don't have product specs for full_ancora_tmo
Do you have right report manifests.
Sent from my Galaxy Exhibit running Jocala's CM9
Its hard for me to help without browsing your directories, but try this.
Grab your boot.img
do:
Code:
build/tools/device/mkvendor.sh device_manufacturer_name device_name /your/path/to/the/boot.img
once that finishes, do:
Code:
lunch full_device_name-eng
then if you go to devices/product/something or other to your device, you should be able to try and replace your stock kernel with his.
I'm shooting from the hip here, so if i'm f***ed up please let me know, we're all learning ;-)
WhiteHatHacker said:
Its hard for me to help without browsing your directories, but try this.
Grab your boot.img
do:
Code:
build/tools/device/mkvendor.sh device_manufacturer_name device_name /your/path/to/the/boot.img
once that finishes, do:
Code:
lunch full_device_name-eng
[CODE]
then if you go to devices/product/something or other to your device, you should be able to try and replace your stock kernel with his.
I'm shooting from the hip here, so if i'm f***ed up please let me know, we're all learning ;-)[/QUOTE]
Huh? I think my repo sync didn't complete there is no device directory in build/ tools.
my directory is only 5.4gb in size that may be my whole problem
Sent from my Galaxy Exhibit running Jocala's CM9
Click to expand...
Click to collapse
Hmmm, then I'm tapped out.
But, at least this thread has been kept bumped
Whereas mine is back down near the bottom of the page :-(
WhiteHatHacker said:
Hmmm, then I'm tapped out.
But, at least this thread has been kept bumped
Whereas mine is back down near the bottom of the page :-(
Click to expand...
Click to collapse
Yep I think my source tree is jacked up I'll resyncing everything and see how that goes
thanks for helping
Sent from my Galaxy Exhibit running Jocala's CM9
No problem, best I could do was try.

[DEV][Porting] Ubuntu Touch on Galaxy Note II (GT-N7100)

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?

[GUIDE] Building Pure Nexus

Introduction
Hello everyone, this is a guide to get you up and running with your own build of Pure Nexus for the Nexus 5X. In this thread, you will learn how to get your computer set up to build and the commands you will need to run. Please read the entire guide and the FAQ. Additionally, this is a developer's thread, there should be no off topic discussion.
Compilation Guide
This is available on my Github, where it may be a little more up to date.
0. Getting started
In this guide, I will go over how to build Pure Nexus on your Linux machine. This particular tutorial will focus on Ubuntu 16.04 as that is what I use (Mint 18 is also good) but this should work with any version of Linux; it does need to be 64-bit however. I will leave the installation of that up to you, Google is a wonderful resource. If you don't have a good computer but still want to build, check out this thread on XDA: http://forum.xda-developers.com/chef-central/android/guide-how-to-build-rom-google-cloud-t3360430
1. Set up your environment
1. Automatically
Code:
sudo apt-get install git-core
git clone https://github.com/akhilnarang/scripts
cd scripts
ls
bash <script-name>
<script-name> should be one of the scripts in the folder for your particular architecture.
2. Manually
1. Install Java 8
Code:
sudo apt-get update
sudo apt-get install openjdk-8-jdk
sudo apt-get install openjdk-8-jre
2. Install other build tools
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip
2. Configure repo and git
If you have any problems with the below commands, try running as root:
Code:
sudo -s
Git is an open source version control system which is incredibly robust for tracking changes across repositories. Repo is Google's tool for working with Git in the context of Android. More reading if you are interested: https://source.android.com/source/developing.html
Run these commands to get repo working (only do this if you did the manual set up method above:
Code:
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Run these commands to get git working:
Code:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
3. Download the source
First, before downloading the source, create a folder for the source and move into it.
Code:
mkdir ~/<foldername> (eg. mkdir ~/PN or ~/PureNexus)
cd ~/<foldername>
Then, we need to grab the manifest and sync down the repositories. Here are the commands to do this for Pure Nexus for Nougat (make sure you are in the source folder you made above):
Code:
repo init -u https://github.com/PureNexusProject/manifest.git -b n
repo sync --force-sync
Here is the process generally for other ROMs:
When you go to build a ROM, you must download its source. All, if not most, ROMs will have their source code available on Github. To properly download the source, follow these steps:
Go to your ROM's Github (e.g. http://github.com/PureNexusProject)
Search for a manifest (usually called manifest or android_manifest).
Go into the repo and make sure you are in the right branch (located right under the Commits tab).
Go into the README and search for a repo init command. If one exists, copy and paste it into the terminal and hit enter.
If one does not exist, you can make one with this formula:
Code:
repo init -u <url_of_manifest_repo>.git -b <branch_you_want_to_build>
For example:
Code:
repo init -u http://github.com/PureNexusProject/manifest.git -b n
After the repo has been initialized, run this command to download the source:
Code:
repo sync --force-sync
This process can take a while depending on your internet connection.
4. Build it!
At this point, it'd be a good idea to set up ccache. ccache is a compiler cache, it stores previously compiled files in a directory and pulls from that instead of recompiling if nothing has changed. This speeds up compilation a LOT. If you want to use it, follow the below steps:
Open up your .bashrc file in your home directory using a text editor or nano and append this to the end of it:
Code:
export USE_CCACHE=1
Then type:
Code:
source ~/.bashrc
After that, run one of the below command (replacing the # with how many GBs of ccache you want, 50 is recommended)
Use this one if you used the manual method of set up in section 1:
Code:
prebuilts/misc/linux-x86/ccache/ccache -M #G
Use this one if you used the automatic method of set up in section 1:
Code:
ccache -M #G
After that, it's time to build!
Code:
. build/envsetup.sh
breakfast bullhead
mka bacon
After that, your computer will build the flashable zip file and if you see something that says make completed, you've done it!
Any time that you want to rebuild, type the following commands:
Code:
repo sync --force-sync
. build/envsetup.sh
breakfast bullhead
mka clobber
mka bacon
I also have a script to do this on my Github here
Frequently Asked Questions
1.1 Q: I got an error, what do I do??
1.1 A: Well to start, if it is anything with Ninja, I would go ahead and disable it. You can add this to your .bashrc file:
Code:
export USE_NINJA=false
Then type this
Code:
source ~/.bashrc
. build/envsetup.sh
breakfast bullhead
mka clobber
mka bacon
If it is saying you ran out of memory, follow this post.
If it isn't Ninja related, check out @AzraelsKiss's post here, where he has documented a few common issues. If none of those apply, post here with a detailed list of what you have done and we will do our best to help you.
1.2 Q: Can you guys share your personal builds?
1.2 A: No, personal builds are just that: personal. Beans releases whenever he feels that the release is ready for the masses and if a bunch of personal builds are floating around, that tarnishes the Pure Nexus name. We are more than happy to help get you up and running but we will not be sharing our builds. Thanks for understanding!
this wont work on Windows, right?
RonnellTapawan said:
this wont work on Windows, right?
Click to expand...
Click to collapse
I have heard people try to use Bash for Windows but I don't think it will work. Linux or bust.
nathanchance said:
I have heard people try to use Bash for Windows but I don't think it will work. Linux or bust.
Click to expand...
Click to collapse
I tried on bash for windows but it can't build android roms
Dude you should seriously get a XDA medallion or some sort of metal for all you do all over XDA. I see you everywhere. Thanks for building for us and also for this write up. :good: @ nathan
SM210 said:
Dude you should seriously get a XDA medallion or some sort of metal for all you do all over XDA. I see you everywhere. Thanks for building for us and also for this write up. :good: @ nathan
Click to expand...
Click to collapse
Talk to my superiors :silly: thanks for the kind words
Edited.......
Sent from my Nexus 5X using Tapatalk
myawan said:
Anybody wanna share home made build?
Sent from my Nexus 5X using Tapatalk
Click to expand...
Click to collapse
If you read at the end of the OP, it says:
"1.2 Q: Can you guys share your personal builds?
1.2 A: No, personal builds are just that: personal. Beans releases whenever he feels that the release is ready for the masses and if a bunch of personal builds are floating around, that tarnishes the Pure Nexus name. We are more than happy to help get you up and running but we will not be sharing our builds. Thanks for understanding!"
Reason being, because if we start compiling these and handing it out like it's no ones business, we're going to run Pure Nexus into the ground and people will start uploading them on AFH and it'll be one big mess. My guess is, this is just a courtesy by the original poster to those of us who can't wait.
My two cents.:laugh::highfive:
i'm on it!!!!! thank you very much!!! download is taking forever ugh
Building it right now! Thanks
I think this would work in Cygwin. I used to compile stuff for the PS3 way back. I'd have a lot of reading to do if I wanted to build this for my phone.
Which gapps to use with this?
Open Gapps micro are working fine.
Gesendet von meinem Nexus 5X mit Tapatalk
So WE can't share our build either? Or what, i didn't get it.
CreasingMass Dev said:
So WE can't share our build either? Or what, i didn't get it.
Click to expand...
Click to collapse
Don't distribute personal builds. Flash them yourself and that is it.
4 hours of download :crying:
OOH MAN!!!!!! no more space in my device!!! how can i resume that???
Code:
Checking out files: 100% (1717/1717), done.
error: unable to write file current/platforms/android-21/arch-x86_64/usr/lib/libz.a
error: unable to write file current/platforms/android-21/arch-x86_64/usr/lib/libz.so
fatal: cannot create directory at 'current/platforms/android-21/arch-x86_64/usr/lib64': Spazio esaurito sul device
Traceback (most recent call last):
File "/home/matteo/Scaricati/PureNexus/.repo/repo/main.py", line 531, in <module>
_Main(sys.argv[1:])
File "/home/matteo/Scaricati/PureNexus/.repo/repo/main.py", line 507, in _Main
result = repo._Run(argv) or 0
File "/home/matteo/Scaricati/PureNexus/.repo/repo/main.py", line 180, in _Run
result = cmd.Execute(copts, cargs)
File "/home/matteo/Scaricati/PureNexus/.repo/repo/subcmds/sync.py", line 769, in Execute
project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)
File "/home/matteo/Scaricati/PureNexus/.repo/repo/project.py", line 1325, in Sync_LocalHalf
self._InitWorkTree(force_sync=force_sync)
File "/home/matteo/Scaricati/PureNexus/.repo/repo/project.py", line 2482, in _InitWorkTree
raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree
can i move the PureNexus folder in an external drive and resume??? please
MatteXperiaU said:
4 hours of download :crying:
OOH MAN!!!!!! no more space in my device!!! how can i resume that???
can i move the PureNexus folder in an external drive and resume??? please
Click to expand...
Click to collapse
You can try. Your build times will be much slower though.
Sent from my Nexus 6P using XDA Labs
nathanchance said:
You can try. Your build times will be much slower though.
Sent from my Nexus 6P using XDA Labs
Click to expand...
Click to collapse
i have another partition in the same HD (300GB).. i can use that :fingers-crossed:
which command i need to resume?
sorry for the questions man, you're too kind
TPMJB said:
I think this would work in Cygwin. I used to compile stuff for the PS3 way back. I'd have a lot of reading to do if I wanted to build this for my phone.
Click to expand...
Click to collapse
No promises...
http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/
Out of curiosity, realistically how much disk space would be required to download everything and compile with a 50GB cache? I got everything downloaded and the compile ran but threw some warnings (most of which may have been benign). When the compile terminated with an error, I had about 40MB left on my Linux Mint 18 partition so I assume it ran out of space I started with about 70GB free space
I deleted everything and decided to try again if and when I have a larger partition to play with..... I am currently dual booting on a Windows machine and didn't think to allocate that much space to Mint.
Paul

Categories

Resources