[NOOBPROOF] Compile LOS/Based for jactivelte - Galaxy S 4 Active General

Here we are. Many were expecting CM14.1 for jactivelte. I compiled LineageOS 14.1 for jactivelte (check it out here). It has some bugs, but at least it works.
Unfortunately I think I cannot update it anymore, because of my low specs pc and my lack of time, so I made a noobproof guide on how to compile it, or any other LineageOS 13/14.1 based ROM.
A lot of guides on XDA don't show some steps, and for a n00b (like me) understand them is almost impossible without a step-by-step guide. So here we are, a COMPLETE guide on HOW TO BUILD for GT-I9525 (jactivelte).
It could be applied for any other device, but with some changes.
You can find this guide too on my Github, precisely in the local_manifest repository or on my Github Page. However, let's start.
Setup the machine
Download any Debian based distro, burn it in a USB and install it or just create a virtual machine. I advice you to install Ubuntu 16.04.2 Xenial. Don't install it on virtual machine if you've got a low specs PC.
Now, open a terminal and write the command:
sudo apt-add-repository ppapenjdk-r/ppa -y; sudo apt update -y; sudo apt install git-core python gnupg flex bison gperf libsdl1.2-dev libesd0-dev \
squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev openjdk-8-jre openjdk-8-jdk pngcrush \
schedtool libxml2 libxml2-utils xsltproc lzop libc6-dev schedtool g++-multilib lib32ncurses5-dev \
gcc-multilib liblz4-* pngquant ncurses-dev texinfo gcc gperf patch ccache libtool \
automake g++ gawk subversion expat libexpat1-dev python-all-dev bc libcloog-isl-dev \
libcap-dev autoconf libgmp-dev build-essential gcc-multilib g++-multilib pkg-config libmpc-dev libmpfr-dev lzma* \
liblzma* w3m android-tools-adb maven ncftp htop repo lib32z1-dev -y
Note that this one is a SINGLE giant command. There isn't any wrap between. Once you did it, do it again.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
If some package like lib32z1-dev causes error code (1), just remove it from the command. Note that it could compromise the build, if it's an important one. I'd advice you to Google it for solving.
Now, you successfully setted up your building machine.
Manage your repos
First of all we need to setup the repo binary, with the commands:
mkdir ~/bin
PATH=~/bin:$PATH
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Now create a folder for the sources where you want. I created mine in a subfolder inside my home. To do so, open your terminal and type mkdir LOS or change LOS to whatever you want.
Then enter in the folder just created with cd "FOLDER NAME"
You have now to configure your github account. To do so:
git config --global user.name "YOUR NAME"
git config --global user.email "YOUR EMAIL ADDRESS"
Now init the project, in this case I'll use the JDCTeam's project. To do so type in terminal
repo init -u git://github.com/JDCTeam/manifests.git -b opt-cm-14.1
If you want to repo sync RR
repo init -u https://github.com/ResurrectionRemix/platform_manifest.git -b nougat
Instead, for clean LineageOS
repo init -u git://github.com/LineageOS/android.git -b cm-14.1
After this, you have to repo sync, with the command
repo sync -f --force-sync --no-clone-bundle
It will take some hours, it depends by your connection speed. When it will finish, repo sync again (just for being sure).
Now open any file manager (if you're on Ubuntu, it will be Nautilus), press CTRL+H, open the folder .repo, create a new folder called "local_manifests". In base of the OS you want to build, choose between by LineageOS, Resurrection Remix OS, Side or OptimisedLOS local_manifests. Now rename the file you downloaded into local_manifest.xml and move it to the local_manifests folder you just created.
Repo sync again. If there are some duplicates, just comment them. To do so, put !-- and -- respectively before and after the duplicate paths. So <project *blablablahere* /> would become <!--project *blablablahere* /-->.
Now, go to LOS/device/samsung/jf-common and open BoardConfigCommon.mk
Here, if the BOARD_RECOVERYIMAGE_PARTITION_SIZE := is not set to 11300000 or more, change it, otherwise the build will fail.
That's what I'm talking about
Setting Ccache
This step should improve the building speed, but it require some space (just like a cache, considering that it IS a cache).
echo "export USE_CCACHE=1" >> ~/.bashrc
~/RR/prebuilts/misc/linux-x86/ccache/ccache -M 100G
If you don't have so much space, I advice you to give 50G instead of 100G. Less is useless IMHO.
Configure the repos
CyanogenMod (RIP) left the show to LineageOS. Unfortunately someone still didn't notice it. The sources, indeed, could still be setted up for CyanogenMod. Don't mind, it's not that difficult, we could solve together.
In terminal type:
cd LOS/device/samsung
ls
You should see jactivelte, jf-common and qcom-common. Well, if you don't, you missed some step. Now, open these folders. Rename any cm.dependencies into lineage.dependencies, without editing anything. If there is cm.mk too (but it shouldn't), rename it lineage.mk, then open it and at the bottom replace cm_jactivelte with lineage_jactivelte.
Building the ROM
Now, prepare yourself for the building itself. Type in the terminal
sudo -s
Write your password and press enter. This will enable the root access to every command. Type
export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX: +TiePurpleCompilation -Xmx4g"
. build/envsetup.sh
./prebuilts/sdk/tools/jack-admin kill-server
rm -rf /home/"yournamehere"/.jack-server
export USE_PREBUILT_CACHE=1
export ANDROID_JACK_VM_ARGS="-Xmx3g -Dfile.encoding=UTF-8 -XX:+TiePurpleCompilation"
croot
brunch jactivelte
Now wait some hours (or some minutes if your PC is a beast), and you'll get your ready-to-flash ROM zip! You can find it in home/LOS/out/target/product/jactivelte
If you want to build again, with updated sources:
make clean
repo sync -f --force-sync --no-clone-bundle
. build/envsetup.sh && brunch jactivelte
You can find it in home/CM14.1/out/target/product/jactivelte
Remember to put in your credit EVERYONE who helped you or provided you the sources, like CyanogenMod, LineageOS, XOSP, RR and so on and so on.
Remember also that if you want to publish a ROM, you also have to publish the sources, if you made some commits.
Have fun compiling!

Thank you! This will be my first build. I want to learn to build RR too.

quubee said:
Thank you! This will be my first build. I want to learn to build RR too.
Click to expand...
Click to collapse
Well, consider that the latest RR is based on LineageOS. Unfortunately, I'm getting some error while building LineageOS. Anyway, for any CM14.1 based, this guide works fine.
Hope you all the best

I got some errors eith CM14.1 too.
build / core / ninja.mk: 166: error is the recipe for «/home/linux/CM14.1/out/build-cm_jactivelte.ninja» goal
make: *** [/home/linux/CM14.1/out/build-cm_jactivelte.ninja] Error 1
make: a way out of the catalog «/home/linux/CM14.1»

quubee said:
I got some errors eith CM14.1 too.
build / core / ninja.mk: 166: error is the recipe for «/home/linux/CM14.1/out/build-cm_jactivelte.ninja» goal
make: *** [/home/linux/CM14.1/out/build-cm_jactivelte.ninja] Error 1
make: a way out of the catalog «/home/linux/CM14.1»
Click to expand...
Click to collapse
Unfortunately, I cannot understand the error from these lines. Please copy your entire log on hastebin.com and send it.
Anyway, it's weird, because that's everything I do, nothing less, nothing more. You should not get any error

quubee said:
I got some errors eith CM14.1 too.
build / core / ninja.mk: 166: error is the recipe for «/home/linux/CM14.1/out/build-cm_jactivelte.ninja» goal
make: *** [/home/linux/CM14.1/out/build-cm_jactivelte.ninja] Error 1
make: a way out of the catalog «/home/linux/CM14.1»
Click to expand...
Click to collapse
export USE_NINJA=false fix error

I thing it was small swap partition on my laptop. Thanks, I saw similar advice it on 4pda forums.
I will try to build something simple first, like CM for nexus, to learn more.

Thanks for the guide!
I'm trying to build a Lineage ROM for my Galaxy S4 active following your guide. But after several attempts it didn't work out, the building process fails always with the following messages:
Code:
. build/envsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/samsung/jactivelte/vendorsetup.sh
[B]: command not found[/B]
including vendor/cm/vendorsetup.sh
including sdk/bash_completion/adb.bash
including vendor/cm/bash_completion/git.bash
including vendor/cm/bash_completion/repo.bash
Code:
brunch jactivelte
including vendor/cm/vendorsetup.sh
Trying dependencies-only mode on a non-existing device tree?
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.2
LINEAGE_VERSION=14.1-20190212-UNOFFICIAL-jactivelte
TARGET_PRODUCT=lineage_jactivelte
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-45-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NJH47F
OUT_DIR=/home/testuser/android/out
============================================
make: Verzeichnis „/home/testuser/android“ wird betreten
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.2
LINEAGE_VERSION=14.1-20190212-UNOFFICIAL-jactivelte
TARGET_PRODUCT=lineage_jactivelte
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-45-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NJH47F
OUT_DIR=/home/testuser/android/out
============================================
prebuilts/clang/host/linux-x86/clang-2690385/bin/clang++ -fno-exceptions -Wno-multichar -DDECAY_TIME_DEFAULT=0 -m64 -Wa,--noexecstack -fPIC -no-canonical-prefixes -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 -fstack-protector-strong --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 --sysroot prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/sysroot -Bprebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin -target x86_64-linux-gnu -Wsign-promo -Wno-inconsistent-missing-override --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 --sysroot prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/sysroot -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8 -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8/x86_64-linux -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8/backward -target x86_64-linux-gnu -c -std=c++11 -g -W -Wall -MMD -MP -O -DNOLOG -march=native -o /home/testuser/android/out/host/linux-x86/obj/EXECUTABLES/ckati_intermediates/affinity.o build/kati/affinity.cc
//
Running kati to generate build-lineage_jactivelte.ninja...
/home/testuser/android/out/build-lineage_jactivelte.ninja is missing, regenerating...
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.2
LINEAGE_VERSION=14.1-20190212-UNOFFICIAL-jactivelte
TARGET_PRODUCT=lineage_jactivelte
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-45-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NJH47F
OUT_DIR=/home/testuser/android/out
============================================
Checking build tools versions...
frameworks/av/camera/cameraserver/Android.mk:18: Target has integrated cameraserver into mediaserver. This is weakening security measures introduced in 7.0
find: "/home/testuser/android/out/target/common/obj/SHARED_LIBRARIES/libwifi-hal-mock_intermediates": Datei oder Verzeichnis nicht gefunden
./vendor/qcom/binaries/Android.mk:1: *** This repo is now deprecated. Move your blobs to your device's vendor repo..
build/core/ninja.mk:166: die Regel für Ziel „/home/testuser/android/out/build-lineage_jactivelte.ninja“ scheiterte
make: *** [/home/testuser/android/out/build-lineage_jactivelte.ninja] Fehler 1
make: Verzeichnis „/home/testuser/android“ wird verlassen
#### make failed to build some targets (18 seconds) ####
Any ideas?

Related

[Q] how to change Droid's kernel parameters?

config_cmdline won't take effect if I modify there.
mkbootimg plus costumized command like also do not show up when kernel booting.
it looks like the kernel command line is in the bootloader code and passed to the kernel, and can NOT be overriden.
any one has sucussful experience changing the kernel commandline on droid?
Thanks in advance.
my kernel command line in dmesg is attached here:
<5>[ 0.000000] Kernel command line: console=ttyS2,115200n8 console=ttyMTD7 rw [email protected] init=/init ip=off brdrev=P3A_CDMA mtdparts=omap2-nand.0:[email protected](pds),[email protected](misc),3584k(boot)ro,4608k(recovery),143744k(system),94848k(cache),268032k(userdata),2m(kpanic) androidboot.mode=normal androidboot.bootloader=2C6C0 androidboot.serialno=xxxxxxxxxxxxxxxxxxxx
<6>[ 0.000000] boot_mode=normal
<6>[ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
Nexus 1 said:
config_cmdline won't take effect if I modify there.
mkbootimg plus costumized command like also do not show up when kernel booting.
it looks like the kernel command line is in the bootloader code and passed to the kernel, and can NOT be overriden.
any one has sucussful experience changing the kernel commandline on droid?
Thanks in advance.
Click to expand...
Click to collapse
I just finished doing this so that I could boot Debian. I'll post my notes here, and come back and pretty them up later.
Code:
Install the following packages using your favorite package manager:
Debian based Linux distributions
32bit and 64bit systems:
git-core gnupg sun-java6-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev abootimg
64bit only:
ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib
Download Code Sourcery ARM EABI Toolchain:
Use "./arm-2012.03-56-arm-none-eabi.bin" to install, then create an environment variable denoting the location of the toolchain as follows:
export CCOMPILER=[Install Folder]/bin/arm-none-eabi
Download Kernel Source Code
mkdir -p ~/android/kernel
cd ~/android/kernel
git clone git://github.com/cvpcs/android_kernel_omap.git --branch cm-sholes
cd android_kernel_omap
git reset --hard 470cb3613f8da9a2483d5592f750ef4ad7de29bf
Download cm-7.2.0-sholes.zip:
Extract, then copy boot.img to cm-kernel folder, then pull .config as follows:
scripts/extract-ikconfig boot.img > .config
The heart of this hack relies on a kernel configuration option that was created for situations when you can't change the command-line options of the boot loader, but you can change the kernel.
1) Open .config and replace:
------------------------------------
CONFIG_CMDLINE="root=/dev/nfs nfsroot=192.168.0.1:/home/user/buildroot ip=192.168.0.2:192.168.0.1:192.168.0.1:255.255.255.0:tgt:eth0:off rw console=ttyS2,115200n8"
------------------------------------
with
------------------------------------
CONFIG_CMDLINE="[email protected] mtdparts=omap2-nand.0:[email protected](mbm),[email protected](cdt),[email protected](lbl),[email protected](misc),3584k(boot),4608k(recovery),143744k(system),94848k(cache),268032k(userdata),2m(kpanic) root=/dev/mmcblk0p2 console=tty1"
CONFIG_CMDLINE_FORCE=y
------------------------------------
2)
Open arch/arm/Kconfig and replace:
------------------------------------
time by entering them here. As a minimum, you should specify the
memory size and the root device (e.g., mem=64M root=/dev/nfs).
config XIP_KERNEL
bool "Kernel Execute-In-Place from ROM"
depends on !ZBOOT_ROM
------------------------------------
with
------------------------------------
time by entering them here. As a minimum, you should specify the
memory size and the root device (e.g., mem=64M root=/dev/nfs).
config CMDLINE_FORCE
bool "Always use the default kernel command string"
depends on CMDLINE != ""
help
Always use the default kernel command string, even if the boot
loader passes other arguments to the kernel.
This is useful if you cannot or don't want to change the
command-line options your boot loader passes to the kernel.
If unsure, say N.
config XIP_KERNEL
bool "Kernel Execute-In-Place from ROM"
depends on !ZBOOT_ROM
------------------------------------
3)
Open arch/arm/kernel/setup.c and replace:
------------------------------------
static int __init parse_tag_cmdline(const struct tag *tag)
{
strlcpy(default_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE);
return 0;
}
------------------------------------
with
------------------------------------
static int __init parse_tag_cmdline(const struct tag *tag)
{
#ifndef CONFIG_CMDLINE_FORCE
strlcpy(default_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE);
#else
pr_warning("Ignoring tag cmdline (using the default kernel command line)\n");
#endif /* CONFIG_CMDLINE_FORCE */
return 0;
}
------------------------------------
Actual Compiling!
make ARCH=arm CROSS_COMPILE=$CCOMPILER -j`grep 'processor' /proc/cpuinfo | wc -l`
Creating "boot.img"!
mkdir ~/android/boot/
mv boot.img ~/android/boot/boot.img
cd ~/android/boot/
abootimg -x boot.img
sed -i 8d bootimg.cfg
rm boot.img initrd.img zImage
cp ~/android/kernel/android_kernel_omap/arch/arm/boot/zImage ~/android/boot/zImage
echo > ~/android/boot/initrd.img
abootimg --create boot.img -f bootimg.cfg -k zImage -r initrd.img
Flashing "bootimg"!
adb push boot.img /tmp/boot.img
adb shell flash_image boot /tmp/boot.img
use pst editor

[GUIDE][TUTORIAL][MAKO] How to build Cyanogenmod 12 from source

Requirements
1- Good knowledge of a linux distribution, I I recommend Ubuntu 14.04 LTS or or derived (Xubuntu, Lubuntu etc.);
2- A PC with at least 4 GB of ram (8 recommended) and CPU at least dual-core (quad-core recommended);
3- A partition with at least 100 GB free;
4- An Internet connection.
Now we are going to prepare the necessary tools for compile:
Install version 7 of java with the following commands:
Code:
sudo apt-get install openjdk-7-jdk
After type:
Code:
java -version
And make sure that your Java version is 7.
Now, install this packages necessary for build with this command:
Code:
sudo apt-get install git gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z1-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc libreadline6-dev lib32readline-gplv2-dev libncurses5-dev bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev squashfs-tools pngcrush schedtool dpkg-dev
At terminated download type:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Code:
mkdir ~/bin
Code:
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Now we will modify the bash file
Code:
sudo nano ~/.bashrc
At the end of fil We will add:
Code:
export PATH=~/bin:$PATH
After, save with the key combination Ctrl+o and exit with Ctrl+x.
OK, Now we are almos ready!
We proceed typing:
Code:
mkdir ~/cm12
Code:
cd ~/cm12
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0
Code:
repo sync
Be patient because you need to download about 20 GB of source.
If you have problems with authentication, you need to register on the site Git-Hub and enter your credentials typing:
Code:
git config --global user.email "xxxxxxxxxxxxxxxxx"
Code:
git config --global user.name "xxxxxxx"
At the end of source code download, we need to initialize building tool:
Code:
. build/envsetup.sh
Now:
Code:
gedit ~/cm12.repo/local_manifests/local_manifest.xml
And in the text file we just need to paste:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github" revision="cm-12.0"/>
</manifest>
After once again:
Code:
repo sync
OK, finally, we are ready for start building process:
Code:
. build/envsetup.sh
Code:
brunch mako
You will find your rom ready for flash in:
Code:
cm12/out/target/product/mako
Good building at all!!!
Now:
Code:
gedit ~/cm12.repo/local_manifests/local_manifest.xml
And in the text file we just need to paste:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github" revision="cm-12.0"/>
</manifest>
Thank you very much for this guide. I am working toward compiling my first ROM from source, so please forgive me noob questions. Can you please help explain how you got the text for the local_manifest.xml file? Why is the device source not "CyanogenMod/android_device_lge_mako," which is listed as the "source code" here?
Also, I didn't see your post until just now so I have been following the guide here. Does not the local_manifest.xml file need device, vendor, and kernal info?
Sorry if this very basic. I am still learning.
Mawth said:
Now:
Code:
gedit ~/cm12.repo/local_manifests/local_manifest.xml
And in the text file we just need to paste:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github" revision="cm-12.0"/>
</manifest>
Thank you very much for this guide. I am working toward compiling my first ROM from source, so please forgive me noob questions. Can you please help explain how you got the text for the local_manifest.xml file? Why is the device source not "CyanogenMod/android_device_lge_mako," which is listed as the "source code" here?
Also, I didn't see your post until just now so I have been following the guide here. Does not the local_manifest.xml file need device, vendor, and kernal info?
Sorry if this very basic. I am still learning.
Click to expand...
Click to collapse
You must create local_manifest.xml file with the command:
Code:
gedit ~/cm12.repo/local_manifests/local_manifest.xml
In gedit (text editor file..download it in ubuntu software center) you will see an empty file..for this reason you must copy in it these strings:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github" revision="cm-12.0"/>
</manifest>
Thank you for your very fast reply.
And thank you for providing the text for the local_manifest.xml file. I understand that is what I need to do.
I've successfully built CM12 from source using your guide. Thank you again. Very helpful.
Now my question is about subsequent builds. Is it necessary to make clean before each new build?
The reason I ask is that I have re-sync'd the repo several days after my first build and despite the updated date listed in the ~out file (e.g., "cm-12-20150325-UNOFFICIAL-mako.zip") the CyanogenMod version listed on my phone after flashing the new .zip stays the same as the first build (e.g. "cm-12-20150321-UNOFFICIAL-mako.zip"). I'm not sure what I'm doing wrong. The only solution seems to be make clean, which dramatically increase the compiling time.
Mawth said:
I've successfully built CM12 from source using your guide. Thank you again. Very helpful.
Now my question is about subsequent builds. Is it necessary to make clean before each new build?
The reason I ask is that I have re-sync'd the repo several days after my first build and despite the updated date listed in the ~out file (e.g., "cm-12-20150325-UNOFFICIAL-mako.zip") the CyanogenMod version listed on my phone after flashing the new .zip stays the same as the first build (e.g. "cm-12-20150321-UNOFFICIAL-mako.zip"). I'm not sure what I'm doing wrong. The only solution seems to be make clean, which dramatically increase the compiling time.
Click to expand...
Click to collapse
because build system didn't generate a new build prop and use first time build prop you build. just delete build.prop on system folder before you want to build, system will generate new build.prop witch exact date you build
Mawth said:
I've successfully built CM12 from source using your guide. Thank you again. Very helpful.
Now my question is about subsequent builds. Is it necessary to make clean before each new build?
The reason I ask is that I have re-sync'd the repo several days after my first build and despite the updated date listed in the ~out file (e.g., "cm-12-20150325-UNOFFICIAL-mako.zip") the CyanogenMod version listed on my phone after flashing the new .zip stays the same as the first build (e.g. "cm-12-20150321-UNOFFICIAL-mako.zip"). I'm not sure what I'm doing wrong. The only solution seems to be make clean, which dramatically increase the compiling time.
Click to expand...
Click to collapse
I advice always make clean
what is mako?
autoradio78 said:
Requirements
1- Good knowledge of a linux distribution, I I recommend Ubuntu 14.04 LTS or or derived (Xubuntu, Lubuntu etc.);
2- A PC with at least 4 GB of ram (8 recommended) and CPU at least dual-core (quad-core recommended);
3- A partition with at least 100 GB free;
4- An Internet connection.
Now we are going to prepare the necessary tools for compile:
Install version 7 of java with the following commands:
Code:
sudo apt-get install openjdk-7-jdk
After type:
Code:
java -version
And make sure that your Java version is 7.
Now, install this packages necessary for build with this command:
Code:
sudo apt-get install git gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z1-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc libreadline6-dev lib32readline-gplv2-dev libncurses5-dev bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev squashfs-tools pngcrush schedtool dpkg-dev
At terminated download type:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Code:
mkdir ~/bin
Code:
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Now we will modify the bash file
Code:
sudo nano ~/.bashrc
At the end of fil We will add:
Code:
export PATH=~/bin:$PATH
After, save with the key combination Ctrl+o and exit with Ctrl+x.
OK, Now we are almos ready!
We proceed typing:
Code:
mkdir ~/cm12
Code:
cd ~/cm12
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0
Code:
repo sync
Be patient because you need to download about 20 GB of source.
If you have problems with authentication, you need to register on the site Git-Hub and enter your credentials typing:
Code:
git config --global user.email "xxxxxxxxxxxxxxxxx"
Code:
git config --global user.name "xxxxxxx"
At the end of source code download, we need to initialize building tool:
Code:
. build/envsetup.sh
Now:
Code:
gedit ~/cm12.repo/local_manifests/local_manifest.xml
And in the text file we just need to paste:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github" revision="cm-12.0"/>
</manifest>
After once again:
Code:
repo sync
OK, finally, we are ready for start building process:
Code:
. build/envsetup.sh
Code:
brunch mako
You will find your rom ready for flash in:
Code:
cm12/out/target/product/mako
Good building at all!!!
Click to expand...
Click to collapse
can you specify for which device is this source and rom for?
what is mako?
can i use this codes for building cm12 for any android device?
shivajiv said:
can you specify for which device is this source and rom for?
what is mako?
can i use this codes for building cm12 for any android device?
Click to expand...
Click to collapse
Mako is for nexus 4
can i use the above tutorial for building for any device
cqloveqc said:
Mako is for nexus 4
Click to expand...
Click to collapse
by changing vendor,device,kernel can i use this tutorial for building rom for any device?
shivajiv said:
by changing vendor,device,kernel can i use this tutorial for building rom for any device?
Click to expand...
Click to collapse
I don't know, I'm not a developper, but also an amateur, I try to learn how to build a Rom for Nexus 4, but I think it take time
Thanks fo sharing
Thanks fo sharing~

[GUIDE] How to build CM12 From source for the MB886 Atrix HD

I've had some people PM me for guidance building CM12 from source from the Atrix HD. There are currently no device specific guides, so this will help those of you who want to get their hands dirty with development but don't have a place to start.
Please note that I am writing this from memory as I don't feel like wiping my build environment and setting it up again for the purpose of this tutorial. That said, this *should* be accurate, but if you hit any snags comment and we can try and sort them out.
CREDITS:
This is adapted from http://wiki.cyanogenmod.org/w/Build_for_mb886 and http://forum.xda-developers.com/nexus-4/general/guide-cm11-how-to-build-cyanogenmod-11-t2515305 (Big thank you to @Raum1807 for the excellent guide, I'm merely modifying it to work for the MB886).
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Overview
I. Preparation
II. Installation of the required packages
III. Installing Java
IV. The sources
V. Building the ROM
VI. Rebuilding with newest sources
I. Preparation
Things you need for building:
A computer
An internet connection
An open mind
Time
Patience
First of all, you need a running up-to-date Ubuntu/Linux system. I used Ubuntu 14.04 LTS 64-bit from within a VirtualBox VM.
Use the terminal to make the steps. A terminal window can be opened by pressing Ctrl+Alt+T. Every single command for the terminal is marked with a $ sign. Just paste every command (without the $ sign) to your terminal window and there shouldn't be any problem.
IMPORTANT: INSTALL EVERYTHING AS A NORMAL USER. DON'T INSTALL AS ROOT!
II. Installation of the required packages (Ubuntu 14.04 LTS 64-bit)
Install packages:
Code:
$ sudo apt-get install bison build-essential curl flex \
g++-multilib gcc-multilib git-core gnupg gperf \
lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev \
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
III. Installing Java
You need a version 6 Java Development Kit for building CM12.0. Usually, the SUN JDK 6 is recommended. But there is another way: you can use the OpenJDK 6. When you installed the required packages as described above, you will just need to configure your Java installation.
Check your Java version:
Code:
$ java -version
Verify the symlinks. Javac, Java, Javaws, Javadoc, Javah, Javap and Jar should all point to the right Java location and version:
Code:
$ ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
If they are pointing to the wrong versions you have to change that to OpenJDK6.
Select the default Java version for your system:
Code:
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javaws
$ sudo update-alternatives --config javadoc
$ sudo update-alternatives --config javah
$ sudo update-alternatives --config javap
$ sudo update-alternatives --config jar
All done.
IV. The sources
Install repo:
Repo is a tool that makes it quite easy to download and maintain the sources of Cyanogenmod.
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ cd ~/bin
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Create the working directory:
Code:
$ mkdir ~/cm12
$ cd ~/cm12
Initialize Repo:
Code:
$ repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0
and enter your credentials.
Download the sources:
Code:
$ repo sync
Wait until it's finished - takes some time to download the many GB of source code!
If the process hangs use Ctrl+C to break out of it and resume the download with another
Code:
$ repo sync
If you are running into a lot of syncing errors the reason might be that the 'repo sync' command is establishing four threads automatically. This might be too much. So try to change the command to run with one thread only by using
Code:
$ repo sync -j1
Initialize the environment
Code:
$ . build/envsetup.sh
Obtain the proprietary files:
First get missing repositories for the Atrix HD by running
Code:
$ breakfast mb886
Then create a file with the name local_manifest.xml in the local_manifests directory. To see this directory, you have to press Ctrl-H in your file manager. Use this code
Code:
$ gedit ~/cm12/.repo/local_manifests/local_manifest.xml
Paste the following lines to the editor
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_motorola.git" path="vendor/motorola" remote="github" revision="cm-12.0"/>
</manifest>
Save the file.
Run
Code:
$ repo sync
again to get the files needed.
Download the necessary prebuilts from cyanogenmod by running
Code:
$ cd ~/cm12/vendor/cm
$ . get-prebuilts
$ croot
And you're done!
V. Building the ROM
Now build it:
Code:
$ brunch mb886
And the building process starts. Now have patience. Building takes around half an hour on fast systems and a lot more on older,slower machines and VMs.
When everything worked as it should you will find your new ROM-image in ~/cm12/out/target/product/mb886
It is called cm-12-DATE-UNOFFICIAL-mb886-zip. You can flash it via CWM/PhilZ/Cyanogen Recovery as usual.
VI. Rebuilding with newest sources
Whenever you like to update your sources and build a new version you have to run these four simple commands:
Code:
$ cd ~/cm12
$ repo sync
$ . build/envsetup.sh
$ brunch mb886
Compiling takes less time than it took for creating the ROM the first time because it's only building new parts while reusing old parts that haven't changed. Occasionally you might want to wipe your output directory and build completely anew. To do this:
Code:
$ cd ~/cm12
$ repo sync
$ make clean
$ . build/envsetup.sh
$ brunch mb886
Good luck!
Thank you. Great work!
Awesome work mate
How can we build aosp for atrix hd?
madhurvyas said:
How can we build aosp for atrix hd?
Click to expand...
Click to collapse
almost the same, just you have to download aosp source insted of cm's.. give the aosp link while initialising the repo.. google it, you will find it
I have the aosp source, but I dont think the "brakfast" and "lunch" command will work till I edit/add few files, I have added the local_manifest file, and given path to muppets repo.
Still few more things would be required. any links to read would be great help.
madhurvyas said:
I have the aosp source, but I dont think the "brakfast" and "lunch" command will work till I edit/add few files, I have added the local_manifest file, and given path to muppets repo.
Still few more things would be required. any links to read would be great help.
Click to expand...
Click to collapse
https://source.android.com/source/initializing.html
http://xda-university.com/as-a-developer/getting-started-building-android-from-source
These two links can be useful..
How to build the kernel, or get a prebuilt one.
I downloaded atrixhd kernel source from cm12.1 https://github.com/CyanogenMod/android_kernel_motorola_msm8960-common/tree/cm-12.1
madhurvyas said:
How to build the kernel, or get a prebuilt one.
I downloaded atrixhd kernel source from cm12.1 https://github.com/CyanogenMod/android_kernel_motorola_msm8960-common/tree/cm-12.1
Click to expand...
Click to collapse
http://wiki.cyanogenmod.org/w/Doc:_integrated_kernel_building
try this..

[DEV] Building CyanogenMod 13 for Zenfone 5/6

Development: Building CyanogenMod 13 for Zenfone 5/6​
Prerequisites:
Ubuntu 16.04 (Installation Guide)
~80 GiB of Available Disk Space
Establishing a Build Environment
Open a Terminal Emulator (Ctrl+Alt+T)
Install the latest Ubuntu updates:
Code:
sudo apt-get update
sudo apt-get dist-upgrade
Add the OpenJDK 7 Repository:
Code:
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
Install the Required packages by Android:
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 maven yasm optipng openjdk-7-jdk
Install Repo:
Code:
sudo wget https://storage.googleapis.com/git-repo-downloads/repo -O/usr/bin/repo
sudo chmod +x /usr/bin/repo
Setup Git:
Code:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
Recommended: Reboot.
Downloading the Source:
Create a Working Directory:
Code:
mkdir -p ~/CM13
cd ~/CM13
Initialize the Repository (choose a command below):
Stable (ZNH2K):
Code:
repo init -u git://github.com/zf5/android.git -b stable/cm-13.0-ZNH2K
Stable (ZNH5Y):
Code:
repo init -u git://github.com/zf5/android.git -b stable/cm-13.0-ZNH5Y
Nightly:
Code:
repo init -u git://github.com/zf5/android.git -b cm-13.0
Download the Code:
Code:
repo sync -c -j4
Optional: Setup ccache (ccache acts as a compiler cache that can be used to speed up rebuilds)
Code:
echo "export USE_CCACHE=1" >> ~/.bashrc
export USE_CCACHE=1
prebuilts/misc/linux-x86/ccache/ccache -M 50G
Applying the Patches:
Download the Patches
Extract the Patches at your working directory
Apply the patch files by changing the directory to where they are and using the following command:
Code:
patch -p1 < filename.patch
Example: Applying the Patch for Vibration:
Code:
cd frameworks/base
patch -p1 < vibration.patch
(Do the same for every patch file in their respective directories)
Building the System:
Prepare the build environment:
Code:
. build/envsetup.sh
lunch cm_T00F-user
Build the System:
Code:
make -j4
That's it. Your system.img is located at WORKING_DIRECTORY/out/target/product/T00F/system.img
Also check out: Development: Building a Marshmallow Kernel for Zenfone 5/6
XDA:DevDB Information
Development: Building CyanogenMod 13 for Zenfone 5/6, Tool/Utility for the Asus Zenfone 5
Contributors
dgadelha
Version Information
Status: Stable
Created 2016-04-21
Last Updated 2016-09-13
For T00G:
Device Tree: https://github.com/T00G-Marshmallow-DEV/android_device_asus_T00G
Vendor Tree: https://github.com/T00G-Marshmallow-DEV/android_vendor_asus_T00G
Information: Sensors and some bugs fixed.
Gooood! Thanks very much
For cm12.1 also same method? Because I got some error on building cm12.1
AhZhi said:
For cm12.1 also same method? Because I got some error on building cm12.1
Click to expand...
Click to collapse
Yes. But I think you'll need to apply the Vibration patch manually, as it will probably fail.
And, well, no need to apply all the patches, only vibration.
That's it.
dgadelha said:
Yes. But I think you'll need to apply the Vibration patch manually, as it will probably fail.
And, well, no need to apply all the patches, only vibration.
That's it.
Click to expand...
Click to collapse
Thank you now i go to try it
Error
dgadelha said:
Development: Building CyanogenMod 13 for Zenfone 5/6​
Prerequisites:
Ubuntu 15.10 (Installation Guide)
~80 GiB of Available Disk Space
Establishing a Build Environment
Open a Terminal Emulator (Ctrl+Alt+T)
Install the latest Ubuntu updates:
Code:
sudo apt-get update
sudo apt-get dist-upgrade
Install the Required packages by Android:
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 maven yasm optipng openjdk-7-jdk
Install Repo:
Code:
sudo wget https://storage.googleapis.com/git-repo-downloads/repo -O/usr/bin/repo
sudo chmod +x /usr/bin/repo
Setup Git:
Code:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
Recommended: Reboot.
Downloading the Source:
Create a Working Directory:
Code:
mkdir -p ~/CM13
cd ~/CM13
Initialize the Repository:
Stable:
Code:
repo init -u git://github.com/zf5/android.git -b stable/cm-13.0-ZNH2K
Nightly:
Code:
repo init -u git://github.com/zf5/android.git -b cm-13.0
Download the Code:
Code:
repo sync -c -j4
Optional: Setup ccache (ccache acts as a compiler cache that can be used to speed up rebuilds)
Code:
echo "export USE_CCACHE=1" >> ~/.bashrc
export USE_CCACHE=1
prebuilts/misc/linux-x86/ccache/ccache -M 50G
Applying the Patches:
Download the Patches
Extract the Patches at your working directory
Apply the patch files by changing the directory to where they are and using the following command:
Code:
patch -p1 < filename.patch
Example: Applying the Patch for Vibration:
Code:
cd frameworks/base
patch -p1 < vibration.patch
(Do the same for every patch file in their respective directories)
Building the System:
Prepare the build environment:
Code:
. build/envsetup.sh
lunch cm_T00F-user
Build the System:
Code:
make -j4
That's it. Your system.img is located at WORKING_DIRECTORY/out/target/product/T00F/system.img
Also check out: Development: Building a Marshmallow Kernel for Zenfone 5/6
XDA:DevDB Information
Development: Building CyanogenMod 13 for Zenfone 5/6, Tool/Utility for the Asus Zenfone 5
Contributors
dgadelha, tank0412
Version Information
Status: Stable
Created 2016-04-21
Last Updated 2016-05-11
Click to expand...
Click to collapse
Fetching projects: 51% (222/435)
error: Exited sync due to fetch errors
Can you help me ?
HONGARC said:
Fetching projects: 51% (222/435)
error: Exited sync due to fetch errors
Can you help me ?
Click to expand...
Click to collapse
type again last comand
it will resume, try use google there are some comands what will help you
And how to creat .zip flash on twrp
adekcan said:
And how to creat .zip flash on twrp
Click to expand...
Click to collapse
you can use otapackage but you must this have in device tree or you can extrac system.img file after build
Hi @dgadelha..
I have successfully built the rom and kernel in my laptop using the steps you provided on first page..
After that I flashed it to my phone and it's been working so smooth and stable. It was a great experience for me getting the phone work using the firmware compiled by me ?. Many thanks for you..
Sent from my ASUS_T00F using XDA-Developers mobile app
sapiterbang said:
Hi @dgadelha..
I have successfully built the rom and kernel in my laptop using the steps you provided on first page..
After that I flashed it to my phone and it's been working so smooth and stable. It was a great experience for me getting the phone work using the firmware compiled by me ?. Many thanks for you..
Sent from my ASUS_T00F using XDA-Developers mobile app
Click to expand...
Click to collapse
Ohh that's good it means new dev come !! ??
sapiterbang said:
Hi @dgadelha..
I have successfully built the rom and kernel in my laptop using the steps you provided on first page..
After that I flashed it to my phone and it's been working so smooth and stable. It was a great experience for me getting the phone work using the firmware compiled by me . Many thanks for you..
Click to expand...
Click to collapse
Nice to hear that.
What is the procedure if I want to run this rom on stock kernel? (I am asking this because I have no camera found bug after unlocking bootloader.)
Beside that your guide is awesome.
[email protected][email protected]@ said:
What is the procedure if I want to run this rom on stock kernel? (I am asking this because I have no camera found bug after unlocking bootloader.)
Beside that your guide is awesome.
Click to expand...
Click to collapse
There is no procedure, you can't do that.
[email protected][email protected]@ said:
What is the procedure if I want to run this rom on stock kernel? (I am asking this because I have no camera found bug after unlocking bootloader.)
Beside that your guide is awesome.
Click to expand...
Click to collapse
You have to build a Lollipop 5.0 based ROM to run with stock kernel.
leonardohenrique10 said:
You have to build a Lollipop 5.0 based ROM to run with stock kernel.
Click to expand...
Click to collapse
I'm a bit disappointed,but anyway thanks a lot for information.
getting error in applying patches
I am getting erros while applying patch.....I reffered ur steps from guide by u that how to build cyanogenmod for zenfone 5....I have downloaded and synced sources and when i come to apply patch then i get error..
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/linker/linker.cpp b/linker/linker.cpp
|index bc40cf1..899eeca 100644
|--- a/linker/linker.cpp
|+++ b/linker/linker.cpp
--------------------------
File to patch: y
y: No such file or directory
Skip this patch? [y]
Skipping patch.
2 out of 2 hunks ignored
please help me...
Desert fox2612 said:
I am getting erros while applying patch.....I reffered ur steps from guide by u that how to build cyanogenmod for zenfone 5....I have downloaded and synced sources and when i come to apply patch then i get error..
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/linker/linker.cpp b/linker/linker.cpp
|index bc40cf1..899eeca 100644
|--- a/linker/linker.cpp
|+++ b/linker/linker.cpp
--------------------------
File to patch: y
y: No such file or directory
Skip this patch? [y]
Skipping patch.
2 out of 2 hunks ignored
please help me...
Click to expand...
Click to collapse
You need to copy the file bionic/linker.patch to the directory ~/CM13/bionic/
then you need to do
Code:
cd ~/CM13/bionic
patch -p1 < linker.patch
dgadelha said:
You need to copy the file bionic/linker.patch to the directory ~/CM13/bionic/
then you need to do
Code:
cd ~/CM13/bionic
patch -p1 < linker.patch
Click to expand...
Click to collapse
Thanks....that helped me.. Btw should I ignore warnings generated between building img file? & one prob is linker.patch is not worked....rest all patches worked....will it create problem?

Port ubuntu touch: segmentation fault (core dumped)

Hello everyone!
I follow guide on ubuntu website to build my own ubuntu touch image to my phone and stuck on build your first Ubuntu image for a Nexus 4 and don't know how to fix it.
All previous steps i complied without any errors. To check it I do it for second time.
Firstly I try install phablet-tools typing sudo apt-get install phablet-tools:
Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
phablet-tools is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Looks like all is fine. Ok next i try to install other packages I need for the build typing:
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 \
g++-4.8-multilib
Result:
Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
bison is already the newest version.
build-essential is already the newest version.
flex is already the newest version.
g++-multilib is already the newest version.
gperf is already the newest version.
python-markdown is already the newest version.
tofrodos is already the newest version.
xsltproc is already the newest version.
zip is already the newest version.
mingw32 is already the newest version.
schedtool is already the newest version.
libncurses5-dev:i386 is already the newest version.
libreadline6-dev:i386 is already the newest version.
libx11-dev:i386 is already the newest version.
zlib1g-dev:i386 is already the newest version.
bzr is already the newest version.
curl is already the newest version.
g++-4.8-multilib is already the newest version.
git is already the newest version.
gnupg is already the newest version.
libc6-dev is already the newest version.
libgl1-mesa-dev is already the newest version.
libxml2-utils is already the newest version.
x11proto-core-dev is already the newest version.
libgl1-mesa-glx:i386 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Next step sync repository phablet-dev-bootstrap phablet. Result below:
Code:
INFO:phablet-dev-bootstrap:Changing to workdir /phablet/phablet
INFO:phablet-dev-bootstrap:Initializing repository
... A new repo command ( 1.22) is available.
... You should upgrade soon:
cp /phablet/.repo/repo/repo /usr/bin/repo
Your identity is: user <mail>
If you want to change this, please re-run 'repo init' with --config-name
repo has been initialized in /phablet
If this is not the directory in which you want to initialize repo, please run:
rm -r /phablet/.repo
and try again.
... A new repo command ( 1.22) is available.
... You should upgrade soon:
cp /phablet/.repo/repo/repo /usr/bin/repo
Fetching project aosp/platform/frameworks/av
Fetching projects: 0% (1/136) Fetching project aosp/device/asus/flo
Fetching projects: 1% (2/136) Fetching project aosp/platform/frameworks/base
...
Fetching projects: 99% (135/136) Fetching project aosp/platform/external/libvpx
Fetching projects: 100% (136/136), done.
Syncing work tree: 100% (135/135), done.
So, i'm ready to build.
1 (. build/envsetup.sh):
Code:
including device/asus/deb/vendorsetup.sh
including device/asus/flo/vendorsetup.sh
including device/asus/grouper/vendorsetup.sh
including device/asus/tilapia/vendorsetup.sh
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/lge/hammerhead/vendorsetup.sh
including device/lge/mako/vendorsetup.sh
including device/samsung/manta/vendorsetup.sh
including sdk/bash_completion/adb.bash
2 (lunch):
Code:
You're building on Linux
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_x86-eng
3. aosp_mips-eng
4. vbox_x86-eng
5. aosp_deb-userdebug
6. aosp_flo-userdebug
7. aosp_grouper-userdebug
8. aosp_tilapia-userdebug
9. mini_armv7a_neon-userdebug
10. mini_x86-userdebug
11. aosp_hammerhead-userdebug
12. aosp_mako-userdebug
13. aosp_manta-userdebug
Which would you like? [aosp_arm-eng] 12
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.2
TARGET_PRODUCT=aosp_mako
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.4.0+-x86_64-with-Ubuntu-14.04-trusty
HOST_BUILD_TYPE=release
BUILD_ID=KOT49H
OUT_DIR=/phablet/out
============================================
3 (make). How you remember before this step I complete all steps without any errors or warnings! And finally i got segfault:
Code:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.2
TARGET_PRODUCT=aosp_mako
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.4.0+-x86_64-with-Ubuntu-14.04-trusty
HOST_BUILD_TYPE=release
BUILD_ID=KOT49H
OUT_DIR=/phablet/out
============================================
Checking build tools versions...
including abi/cpp/Android.mk ...
including bionic/Android.mk ...
...
including frameworks/av/media/libnbaio/Android.mk ...
including frameworks/av/media/libstagefright/Android.mk ...
Segmentation fault (core dumped)
How to fix it? Nobody can help me?

Categories

Resources