problem with compiling twrp with omni sources - Omni Q&A

as the title says i have a probmel with building twrp
i get this error
Copying baseline ramdisk...
cp: cannot stat '/home/wajdi/Documents/omni/out/target/product/wingray/system/bin/adbd': No such file or directory
ninja: build stopped: subcommand failed.
13:33:35 ninja failed with: exit status 1

Wajdi Muhtadi said:
as the title says i have a probmel with building twrp
i get this error
Copying baseline ramdisk...
cp: cannot stat '/home/wajdi/Documents/omni/out/target/product/wingray/system/bin/adbd': No such file or directory
ninja: build stopped: subcommand failed.
13:33:35 ninja failed with: exit status 1
Click to expand...
Click to collapse
Did you ever figure this out? I have exactly the same problem.

ianmacd said:
Did you ever figure this out? I have exactly the same problem.
Click to expand...
Click to collapse
I have the same problem, have u solve it ?

kongkongyzt said:
I have the same problem, have u solve it ?
Click to expand...
Click to collapse
OK, I have solved this problem just now...
After I reading the .repo/manifest.xml , I was surprised to find the boot/recovery source code is from AOSP, not TWRP, which means when I type `make recoveryimage ` command, it doesn't compiling TWRP but AOSP's recovery.... so there is no doubt coming to this error.......
And I `rm -rf bootable/recovery` and git clone from github, omnirom/android_bootable_recovery, trying to recompile, it show's that I miss busybox folder, which is should required by TWRP but not exists from manifest.xml........
Maybe the omni team has remove TWRP from their manifest.xml, who knows? And I decide to try TWRP minimal install and I success,
repo init -u <URL> -b twrp-8.1 // XDA not allow me post the link, so the github project name is platform_manifest_twrp_omni
repo sync
git clone <your/device/twrp/tree> // this is my device tree, you should replace to your
export ALLOW_MISSING_DEPENDENCIES=true // remember to add this or u will get tons of unnecessary error.
source build/envsetup.sh
lunch omni_<device>-eng; mka recoveryimage

Related

[Q] Compilation of OpenSwift 2.2.1

Anybody managed to compile OpenSwift 2.2.1 from github? I'm trying to do that for 2 days without success.
My last error is:
Code:
Install: out/target/product/swift/system/lib/libdiskconfig.so
Install: out/target/product/swift/system/bin/vold
Symlink: out/target/product/swift/system/bin/watchprops -> toolbox
Symlink: out/target/product/swift/system/bin/wipe -> toolbox
target Strip: wpa_cli (out/target/product/swift/obj/EXECUTABLES/wpa_cli_intermediates/wpa_cli)
Install: out/target/product/swift/system/bin/wpa_cli
target Strip: wpa_supplicant (out/target/product/swift/obj/EXECUTABLES/wpa_supplicant_intermediates/wpa_supplicant)
Copy: out/target/product/swift/system/bin/wpa_supplicant
target Strip: zipalign (out/target/product/swift/obj/EXECUTABLES/zipalign_intermediates/zipalign)
Install: out/target/product/swift/system/bin/zipalign
Target buildinfo: out/target/product/swift/system/build.prop
/bin/bash: -c: line 0: unexpected EOF while looking for matching `"'
/bin/bash: -c: line 1: syntax error: unexpected end of file
make: *** [out/target/product/swift/system/build.prop] Error 1
make: *** Deleting file `out/target/product/swift/system/build.prop'
Maybe we can share experience about compilation of OpenSwift in this thread?
I have the same issue. But not find a solution yet.
Early I've success compile whole system. But after last updates from github gets errors.
I found solutions for all recent errors on 4pda.ru.
This is the original post:
http://4pda.ru/forum/index.php?s=&showtopic=215440&view=findpost&p=6414296
just got wubi ubuntu 10.10 installed and git and python were a nightmare and repo wouldnt work until i went and edited repo myself so it installed fine. i worked out how to install python2.4 on 10.10 and git running nicely. when i do the sync command it starts downloading the whole cyanogen mod tree i just want whats on the openswift branch thats it. any advice on the whole source codes and compiling would be greatly apppreciated.

[GUIDE] Compile the stock android kernel

I have already discussed how to unpack/repack the boot.img file.
Now let's try to recompile the android kernel.
You will need some packages not included in a default Ubuntu 11.04 installation:
Code:
sudo apt-get install git unrar libncurses5-dev qt3-dev-tools
Unrar and git are the only necessary packages.
Install libncurses if you want to modify the kernel configuration with the command line menu.
Otherwise, if you want a graphical interface, go with qt3.
Please refer to the documentation of your linux distro for help on how to install additional packages.
For the purpose of this guide we are going to rebuild the official asus kernel with no modifications.
Download the latest kernel source from the ASUS site (atm 2.6.36.3)
Code:
wget http://dlcdnet.asus.com/pub/ASUS/EeePAD/TF101/Eee_PAD_TF101_Kernel_Code_8_4_4_11.rar
Now unpack it:
Code:
unrar e Eee_PAD_TF101_Kernel_Code_8_4_4_11.rar
tar xvfz kernel-3eb19ec-fix-lic.tar.gz
We need a config file for the compile process.
The config file essentially sets features ON or OFF from the final kernel (yes, I know that is much more than this...).
If your tablet is upgraded to the latest build (8.4.4.11) you can extract the config file from your running device:
Code:
adb pull /proc/config.gz ./
Or you can find it attached to this post (the forum won't allow to upload a .gz file, so i made a .zip file; use unzip instead of gunzip).
Now uncompress and move it into the kernel dir (renaming it in .config).
Code:
gunzip config.gz
cp config kernel-3eb19ec/.config
Now the not-so-fun part.
We will need a compiler for the arm platform.
The android source comes with the arm compiler. You can download it following this instructions http://source.android.com/source/downloading.html .
The only problem is that the repository is about 2.6GB...
So we are going to download only the prebuilt toolchain (1,8GB):
Code:
git clone git://android.git.kernel.org/platform/prebuilt.git
After git finishes his download, you will have a new directory called "toolchain".
We have to set some environment variables (i assume you have downloaded the toolchain in your home directory):
Code:
export ARCH=arm
export CROSS_COMPILE=arm-eabi-
export PATH=$PATH:~/toolchain/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
Ok, the compiler is installed and configured.
It's time to come back to the kernel source.
If you want to modify some settings in your config file (!!AT YOUR OWN RISK!!) you can edit the .config file or use a graphical interface.
Code:
cd kernel-3eb19ec
make xconfig (make menuconfig if you prefer a command-line menu)
Now we can compile the android kernel:
Code:
make -j4
Our new kernel is stored in : arch/arm/boot/zImage
We can use it for make a boot image and flash in our TF101 (use this guide http://forum.xda-developers.com/showthread.php?t=1193737)
Let me say this again: I'm not an expert in android kernel/compiler.
If you find something wrong with this guide, please tell me.
I've learned this with google and by trial and error.
If you brick something don't blame on me.
If you want to hit "thanks", you're welcome.
Have Fun!
Pulling out config.gz you will get the current kernel configuration...it could not fit the stock kernel..
gnufabio said:
Pulling out config.gz you will get the current kernel configuration...it could not fit the stock kernel..
Click to expand...
Click to collapse
Of course the kernel source has to be exactly the same version as the running kernel for this to work.
In this example, the source and running kernel were both 2.6.36.3 (build 8.4.4.11).
For use an older .config (or a newer source tree), we should run:
Code:
make oldconfig
to adapt them (...kinda).
Thanks for point this out.
I was eventually planning on making this guide, good work!
gnufabio said:
Pulling out config.gz you will get the current kernel configuration...it could not fit the stock kernel..
Click to expand...
Click to collapse
This is a possibility if anything in the config changes from the kernel you're running in the actual source Asus has posted
I've always done the following:
Code:
make tegra_defconfig
make
I haven't actually checked to see if this is up to date with a running kernel, just noticed Asus pops up a few times in there.
Actually this is the default TF101 config: tf101_defconfig
Thanks for the guides. These are really helpful -
Hashi
I'm getting this set of errors. I've built and modified many linux kernels, so I'm guessing this is in the toolchain area, and am wondering if it needs to know something else for where to look at dynamic load libraries, etc?
I created a shell script to setup / export the shell environment vars. It looks like this:
Code:
export ARCH=arm
export CROSS_COMPILE=arm-eabi-
export PATH=$PATH:~/sandbox/android-sdk-linux_x86/toolchain/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
I'm using a PC I use for work ARM cross compiles that is 64 bit Ubuntu 9.10.
Thanks --
--- make -j4 errors ---
Code:
[email protected]:~/sandbox/android-sdk-linux_x86/kernel/kernel-3eb19ec$ make -j4
arm-eabi-gcc: /lib32/libc.so.6: version `GLIBC_2.11' not found (required by arm-eabi-gcc)
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CC scripts/mod/empty.o
arm-eabi-gcc: /lib32/libc.so.6: version `GLIBC_2.11' not found (required by arm-eabi-gcc)
make[2]: *** [scripts/mod/empty.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: `include/generated/mach-types.h' is up to date.
make[1]: *** [scripts/mod] Error 2
CC kernel/bounds.s
arm-eabi-gcc: /lib32/libc.so.6: version `GLIBC_2.11' not found (required by arm-eabi-gcc)
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
[email protected]:~/sandbox/android-sdk-linux_x86/kernel/kernel-3eb19ec$
In searching for the basic problem, that arm*gcc can't see libc.so.6 in the version it wants, I think it's not seeing this at all:
~/sandbox/android-sdk-linux_x86/kernel/kernel-3eb19ec$ find ../../toolchain/ -iname libc.so.6 -exec ls -al {} \;
lrwxrwxrwx 1 hashi hashi 11 2011-08-01 15:58 ../../toolchain/prebuilt/linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/sysroot/usr/lib/libc.so.6 -> libc-2.7.so
[email protected]:~/sandbox/android-sdk-linux_x86/kernel/kernel-3eb19ec$
thanks. I'm not new to kernel compiling but I'm new to android
hachamacha said:
I'm getting this set of errors. I've built and modified many linux kernels, so I'm guessing this is in the toolchain area, and am wondering if it needs to know something else for where to look at dynamic load libraries, etc?
I created a shell script to setup / export the shell environment vars. It looks like this:
Code:
export ARCH=arm
export CROSS_COMPILE=arm-eabi-
export PATH=$PATH:~/sandbox/android-sdk-linux_x86/toolchain/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
I'm using a PC I use for work ARM cross compiles that is 64 bit Ubuntu 9.10.
Thanks --
--- make -j4 errors ---
Code:
[email protected]:~/sandbox/android-sdk-linux_x86/kernel/kernel-3eb19ec$ make -j4
arm-eabi-gcc: /lib32/libc.so.6: version `GLIBC_2.11' not found (required by arm-eabi-gcc)
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CC scripts/mod/empty.o
arm-eabi-gcc: /lib32/libc.so.6: version `GLIBC_2.11' not found (required by arm-eabi-gcc)
make[2]: *** [scripts/mod/empty.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: `include/generated/mach-types.h' is up to date.
make[1]: *** [scripts/mod] Error 2
CC kernel/bounds.s
arm-eabi-gcc: /lib32/libc.so.6: version `GLIBC_2.11' not found (required by arm-eabi-gcc)
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
[email protected]:~/sandbox/android-sdk-linux_x86/kernel/kernel-3eb19ec$
In searching for the basic problem, that arm*gcc can't see libc.so.6 in the version it wants, I think it's not seeing this at all:
~/sandbox/android-sdk-linux_x86/kernel/kernel-3eb19ec$ find ../../toolchain/ -iname libc.so.6 -exec ls -al {} \;
lrwxrwxrwx 1 hashi hashi 11 2011-08-01 15:58 ../../toolchain/prebuilt/linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/sysroot/usr/lib/libc.so.6 -> libc-2.7.so
[email protected]:~/sandbox/android-sdk-linux_x86/kernel/kernel-3eb19ec$
Click to expand...
Click to collapse
The toolchain has everything it needs for compile the kernel.
The problem seems to be your 64 bit...
The arm compiler is built against 32bit version of glibc library; I think you already have a multilib environment (you have a /lib32 dir). Maybe the 32bit verion of the glibc is not the correct version.
Try this command:
Code:
ldd ~/sandbox/android-sdk-linux_x86/toolchain/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc
And look what it says for the libc.so.6. In my system it says it is located in /lib/i386-linux-gnu/libc.so.6. So if I run it:
Code:
$ /lib/i386-linux-gnu/libc.so.6
GNU C Library (Ubuntu EGLIBC 2.13-0ubuntu13) stable release version 2.13, by Roland McGrath et al.
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.5.2.
Compiled on a Linux 2.6.38 system on 2011-04-11.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.debian.org/Bugs/>.
The first line tell the version number. If it's older than 2.11 you need to update your multilib libc.
gnufabio said:
Actually this is the default TF101 config: tf101_defconfig
Click to expand...
Click to collapse
This is for 2.6.36.3 but seems way older. It says "Fri Mar 25 19:50:17 2011".
Maybe it's from an old build?
The last ASUS config (the one attached to the first post) is "Mon Jul 11 14:47:43 2011".
Brilliant!
I had problems cloning using the git protocol because of a corporate firewall, but the HTTP method worked fine:
Code:
http://android.git.kernel.org/platform/prebuilt.git
I also found the the toolchain with the Android NDK failed to build the kernel but the one linked to in the OP worked perfectly.
SammyC said:
I also found the the toolchain with the Android NDK failed to build the kernel but the one linked to in the OP worked perfectly.
Click to expand...
Click to collapse
Yes, I have tried this also, with the same result.
Someone said that the codesourcery compiler can compile the android kernel.
I have tried, it compiles all, but when i flash on the tablet it stucks on the boot screen.
Initially I wrote the guide using this compiler (it's smaller and has a graphical installer), when i realized that it doesn't work , i switched back to the android official compiler.
If someone want to try with the codesourcery compiler here's the (unsuccessful) process I have used:
!!ATTENTION!!: ATM THIS DOESN'T WORK
An easier (and somewhat faster) way is downloading the Code Sorcery's "Code Bench" compiler (http://www.codesourcery.com/) and install it.
Code:
wget http://www.codesourcery.com/sgpp/lite/arm/portal/package8741/public/arm-none-linux-gnueabi/arm-2011.03-41-arm-none-linux-gnueabi.bin
This compiler need some extra packages to work in Ubuntu:
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind
For some reason, in Ubuntu 11.04 the /bin/sh link refer to the dash shell and not bash.
The compiler's installer will comply for this, so we do as follows:
Code:
sudo dpkg-reconfigure -plow dash
and when it asks to use dash as the default shell, click on "NO"
Code:
sh arm-2011.03-41-arm-none-linux-gnueabi.bin
Leave all the default options. The installer will copy the files in your home directory.
We should set some environmet variables:
Code:
export ARCH=arm
export CROSS_COMPILE=arm-none-linux-gnueabi-
export PATH=$PATH:~/CodeSourcery/Sourcery_G++_Lite/bin
Click to expand...
Click to collapse
Then continue with the guide from the "make xconfig".
If someone can make it work with this compiler, could be so gentle to tell us how?
rebound821 said:
The toolchain has everything it needs for compile the kernel.
The problem seems to be your 64 bit...
The arm compiler is built against 32bit version of glibc library; I think you already have a multilib environment (you have a /lib32 dir). Maybe the 32bit verion of the glibc is not the correct version.
Try this command:
Code:
ldd ~/sandbox/android-sdk-linux_x86/toolchain/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc
And look what it says for the libc.so.6. In my system it says it is located in /lib/i386-linux-gnu/libc.so.6. So if I run it:
Code:
$ /lib/i386-linux-gnu/libc.so.6
GNU C Library (Ubuntu EGLIBC 2.13-0ubuntu13) stable release version 2.13, by Roland McGrath et al.
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.5.2.
Compiled on a Linux 2.6.38 system on 2011-04-11.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.debian.org/Bugs/>.
The first line tell the version number. If it's older than 2.11 you need to update your multilib libc.
Click to expand...
Click to collapse
Thanks again -- I'll try that out as soon as I'm back in TF mode.
Code:
~/sandbox/android-sdk-linux_x86/toolchain/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: /lib32/libc.so.6: version `GLIBC_2.11' not found (required by ~/sandbox/android-sdk-linux_x86/toolchain/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc)
linux-gate.so.1 => (0xf77e0000)
libc.so.6 => /lib32/libc.so.6 (0xf7677000)
/lib/ld-linux.so.2 (0xf77e1000)
^^ that was from the first command
Code:
GNU C Library (EGLIBC) stable release version 2.10.1, by Roland McGrath et al.
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.4.1.
Compiled on a Linux >>2.6.24-27-server<< system on 2011-01-11.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
For bug reporting instructions, please see:
<http://www.eglibc.org/issues/>.
And ^^ from the second.
It looks like with 9.10 Ubuntu, (backporting something from 10 or 11.x notwithstanding), I can't easily get to GLIBC 2.11 from GLIBC 2.10.x. Thanks. I'll put together an 11.x VM for this task.
For 64bit machines, you might need to do the following?
apt-get install ia32-libs
raypou said:
For 64bit machines, you might need to do the following?
apt-get install ia32-libs
Click to expand...
Click to collapse
Thanks, I managed to download a ARM toolchain from their site that works fine with Ubuntu 9.10 64 bit.
Whether or not it'll run when I try to install a kernel is another question, but it builds without problem and produces ARM code.
rebound821 said:
Yes, I have tried this also, with the same result.
Someone said that the codesourcery compiler can compile the android kernel.
I have tried, it compiles all, but when i flash on the tablet it stucks on the boot screen.
Initially I wrote the guide using this compiler (it's smaller and has a graphical installer), when i realized that it doesn't work , i switched back to the android official compiler.
If someone want to try with the codesourcery compiler here's the (unsuccessful) process I have used:
!!ATTENTION!!: ATM THIS DOESN'T WORK
Then continue with the guide from the "make xconfig".
If someone can make it work with this compiler, could be so gentle to tell us how?
Click to expand...
Click to collapse
Wow can't believe I found this thread. I just want to confirm that I'm also having a horrible time with the code sourcery toolchain trying to compile the android kernel, the moto atrix kernel specifically. The zimage compiles, but flashing to the device it just hangs.
So im currently downloading the official android toolchain.
Also some learned knowledge for everybody, the correct code sourcery toolchain supposedly android equivalent is arm-none-linux-gnueabi-, NOT the arm-none-eabi- or any of the others. This info is very hard to find fyi.
However as this thread seems to prove, even using the correct one doesn't exactly work.
Hi,
I'm trying to build the stock Memo Pad smart(ME301t) stock kernel 10.6.1.29 downloaded directly from asus.
I used 4.3.3 to 4.7 toolchains with similar results(give or take some deprecated compiler arguments).
What I really want to know is why I'm getting a lot of warnings(NOT ERRORS), some of them are minor errors like "unused function" and some of them are major warnings breaking function functionality. Some of the builds don't even boot.
What toolchain should I use with this kernel?
Why a stock kernel(from asus) should produce warnings at the first place?
I'm on linux BTW.

[GUIDE][REVISED] Build CM12.1 from Source! [NOW-CAT&GRANDMA-FRIENDLY]

Im sick of seeing guides around that tell you all about how to build a rom but never ever go into detail about the hardest part in my opinion which is obtaining device specific code, its ridiculous!? So im here to help.
Just a prior note, im no dev, ive never built from source before (hopefully this will change in few days ) and the real devs are people like Luk & Luca who built a lovely repos for us with lots of good documentation. So please go and give Luca & Luk a thanks on any one of there posts!
Also i would like to personally thank Luca for helping me when i asked for info regarding building.
Lets get started shall we!
1 - Pre-requisites
4+ GB RAM (I have 4GB)
Preferably a Quad-Core CPU (I have an i5)
At least 90GB of HDD/SSD space for the repo & ccache (SSD recommended for faster compile times, i have a 750GB HDD)
GPU - (not needed but may aswell throw it in here) GTX-740M & Intel HD 4000 (Optimus technology - not working on Linux though)
And lastly a Github account, please go make one (its free!)
2 - Installing Linux
We need a Linux based 64 bit OS, i use Lubuntu with my own tweaks
Download and install it, either dual-boot or use it as your primary OS like the bad-ass you are! (If you want help on doing this there at least +100000 guides in google and youtube alone)
3 - Grabbing build dependencies
Code:
sudo apt-get install git && cd ~/ && git clone https://github.com/DiamondBond/Scripts/ .init-scripts && cd ~/.init-scripts && ./dev_init.sh
Copy & Pasta that code above into your terminal and accept/press ok/press yes to any prompts that appear
That should get your system fit with all the necessary things to build and work with androids source, its about 900mb of a download! So sit back and relax...
4 - Preparing to download the massive source-code
I recommend downloading a small movie before doing this so you can relax while it all syncs! (just be sure to keep your eye on that sync window to make sure its still scrolling...)
Lets make a folder to hold all our stuff:
Code:
mkdir -p ~/android/titan/roms/cm && cd ~/android/titan/roms/cm
Now your inside the cm folder, you have to be in the cm directory every-time you want to start building!
Now initiate the cm repo: (one-time thing)
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.1
Now it might give a small error at the end stating for some email and user id stuff.
So now is the time to add your github infos (run this in terminal):
Code:
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
EG:
Code:
git config --global user.email "[email protected]"
git config --global user.name "Diamond Bond"
We havnt yet downloaded the CM source, but we will in the next part...
(source code is roughly 35GB for CM12.1 , pure AOSP is slightly smaller)
5 - Downloading & waiting
Note: Straight after syncing official CM12.1 repo this is its size: (31GB)
{
"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"
}
It is time!, run one of the two commands below (depending on your networking speed) to initiate the long wait of syncing!)
Code:
repo sync
Finished? sweet, lets have a rave party!
6 - Building!
Now once youve downloaded all the source code you should be able to run your first build after init!
Thanks to some nice build scripts by Luca and Luk, running builds is super duper easy!
To initialize the last thing, run:
Code:
. build/envsetup.sh
then to build run
Code:
brunch titan
to build, ive read around and on my system it should only take 1.5 to 3 hours tops, and my system is mediocre + its a laptop so take in account that it may thermally throttle, if you have a desktop it should only take around 1-2 hours with relatively decent specs!
7 - Party Time!
If you want help please leave a comment in this thread and i/others will try to help.
Also if you do get a successful build done please share it with us, we would love to be a part of your victory party!
Thanks to this guide: http://forum.xda-developers.com/chef-central/android/guide-android-rom-development-t2814763
&
Luca & Luk again!
@Pizza_Dox
Replace
Code:
mkdir ~/titan/ && cd ~/titan/ && mkdir cm12 && cd ~/titan/cm12/
With
Code:
mkdir -p ~/titan/cm12 && cd ~/titan/cm12/
Also users don't need github account to just build the rom.
I would try this, but I don't have a cat. Thanks for sharing tho
Exactly what I was looking .
Thank you for sharing.
LuK1337 said:
@Pizza_Dox
Replace
Code:
mkdir ~/titan/ && cd ~/titan/ && mkdir cm12 && cd ~/titan/cm12/
With
Code:
mkdir -p ~/titan/cm12 && cd ~/titan/cm12/
Also users don't need github account to just build the rom.
Click to expand...
Click to collapse
Thanks updated.
hippy dave said:
I would try this, but I don't have a cat. Thanks for sharing tho
Click to expand...
Click to collapse
Haha welcome
CaptainCaptcha said:
Exactly what I was looking .
Thank you for sharing.
Click to expand...
Click to collapse
Enjoy!
LuK1337 said:
@Pizza_Dox
Replace
Code:
mkdir ~/titan/ && cd ~/titan/ && mkdir cm12 && cd ~/titan/cm12/
With
Code:
mkdir -p ~/titan/cm12 && cd ~/titan/cm12/
Also users don't need github account to just build the rom.
Click to expand...
Click to collapse
Oh right i know you dont need a github account but its better to have one
Updating this soon
Sent from my Motorola Titan
I dont know why but every time i repo sync it gets stuck here for quiet a long time and after sometimes ends up in error like below.. Is it that its downloading below package file again
koradiavatsal said:
I dont know why but every time i repo sync it gets stuck here for quiet a long time and after sometimes ends up in error like below.. Is it that its downloading below package file again
Click to expand...
Click to collapse
Sent from MicroTitan
There are some tricks to before compiling.
This is just the introduction to compile Cyanogenmod
Good job @Pizza_Dox :good:
klander said:
There are some tricks to before compiling.
This is just the introduction to compile Cyanogenmod
Good job @Pizza_Dox :good:
Click to expand...
Click to collapse
And they are? Please let us know
Sent from MicroTitan
Code:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.4
CM_VERSION=
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.16.0-4-amd64-x86_64-with-debian-8.0
HOST_BUILD_TYPE=release
BUILD_ID=KTU84Q
OUT_DIR=/data/deepak/titan/cm11/out
============================================
Checking build tools versions...
************************************************************
You are attempting to build with an unsupported JDK.
You use OpenJDK but only Sun/Oracle JDK is supported.
Please follow the machine setup instructions at
https://source.android.com/source/download.html
Continue at your own peril!
************************************************************
************************************************************
You are attempting to build with an unsupported version
of java.
Your version is: java version "1.7.0_75".
The correct version is: Java SE 1.6 or 1.7.
Please follow the machine setup instructions at
https://source.android.com/source/download.html
************************************************************
find: `bootable/recovery/res-720': No such file or directory
No private recovery resources for TARGET_DEVICE generic
Entire build directory removed.
Set cache size limit to 50.0 Gbytes
/tmp/hudson8243709547868758627.sh: line 13: ./resync.sh: No such file or directory
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/goldfish/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
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
including vendor/cm/vendorsetup.sh
ls: cannot access device/*/titan/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Can not locate config makefile for product "cm_titan". Stop.
Device titan not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Found repository: android_device_motorola_titan
Default revision: cm-11.0
Checking branch info
Default revision cm-11.0 not found in android_device_motorola_titan. Bailing.
Branches found:
cm-12.0
Use the ROOMSERVICE_BRANCHES environment variable to specify a list of fallback branches.
ls: cannot access device/*/titan/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Can not locate config makefile for product "cm_titan". Stop.
** Don't have a product spec for: 'cm_titan'
** Do you have the right repo manifest?
No such item in brunch menu. Try 'breakfast'
real 0m17.121s
user 0m0.256s
sys 0m0.024s
Build step 'Execute shell' marked build as failure
Sending e-mails to: [email protected]
[BFA] Scanning build for known causes...
[BFA] Done. 0s
Finished: FAILURE
Can someone help please? or just list me with cm11 commands of repo initialisation and device trees?
klander said:
There are some tricks to before compiling.
This is just the introduction to compile Cyanogenmod
Good job @Pizza_Dox :good:
Click to expand...
Click to collapse
Oh okay, well thank you, ill try and add whatever more into this so more people can compile,
Quick steps for compiling cm11
I hope you dont mind adding to OP
repo init -u git://github.com/CyanogenMod/android -b cm-11.0
curl --create-dirs -L -o .repo/local_manifests/titan.xml -O -L https://raw.githubusercontent.com/motog2014devteam/roomservice/cm-11.0/manifest.xml
repo sync
Thanks @LuK1337
Sent from MicroTitan
koradiavatsal said:
Quick steps for compiling cm11
I hope you dont mind adding to OP
repo init -u git://github.com/CyanogenMod/android -b cm-11.0
curl --create-dirs -L -o .repo/local_manifests/titan.xml -O -L https://raw.githubusercontent.com/motog2014devteam/roomservice/cm-11.0/manifest.xml
repo sync
Thanks @LuK1337
Sent from MicroTitan
Click to expand...
Click to collapse
done
Great, I'll try this guide, thank you very much I was always curious about ROM development. In case, where can I ask questions about it ?
Regarding this guide : is necessary to create a bin folder in home directory ? Usually I put large binaries in /opt/. Is there any permission problem ?
davcri91 said:
Great, I'll try this guide, thank you very much I was always curious about ROM development. In case, where can I ask questions about it ?
Regarding this guide : is necessary to create a bin folder in home directory ? Usually I put large binaries in /opt/. Is there any permission problem ?
Click to expand...
Click to collapse
Thanks
Um I think its best to keep the binary as is since other things might link to it and etc... Questions can be asked here I or others will try to help! Glad this helps.
Is there a way to use these steps to similarly build a kernel? As Moto G2 lollipop kernel sources are out (http://www.androidpolice.com/2015/02/23/motorola-finally-posts-kernel-source-lollipop-2014-moto-x), I want to try building a stock kernel.
@LuK1337 Is this guide still work since titan switched to new kernel?
I get this errors while building
<code>
find: `dummy': No such file or directory
build/core/tasks/kernel.mk:130: **********************************************************
build/core/tasks/kernel.mk:131: * Kernel source found, but no configuration was defined *
build/core/tasks/kernel.mk:132: * Please add the TARGET_KERNEL_CONFIG variable to your *
build/core/tasks/kernel.mk:133: * BoardConfig.mk file *
build/core/tasks/kernel.mk:134: **********************************************************
make: *** No rule to make target 'bacon'. Stop.
</code>
koradiavatsal said:
@LuK1337 Is this guide still work since titan switched to new kernel?
I get this errors while building
<code>
find: `dummy': No such file or directory
build/core/tasks/kernel.mk:130: **********************************************************
build/core/tasks/kernel.mk:131: * Kernel source found, but no configuration was defined *
build/core/tasks/kernel.mk:132: * Please add the TARGET_KERNEL_CONFIG variable to your *
build/core/tasks/kernel.mk:133: * BoardConfig.mk file *
build/core/tasks/kernel.mk:134: **********************************************************
make: *** No rule to make target 'bacon'. Stop.
</code>
Click to expand...
Click to collapse
So
rm -rf out
rm -rf .repo/local_manifests
rm -rf build* resync.sh patches
And follow the guide
Or join irc hannel isntead of using thread xd

[GUIDE] Build CM13 from source for the Z5/Z5C/Z5P

The Sony-Kitakami dev team is glad to announce a guide on how to build CM13 or any CM13 based ROM for the entire Z5- series
Note: If you plan to release a ROM using our sources then credits aren't required, however we would deffinately appriciate it very much!
Before we get started
What you need
Any of our supported devices
A PC that is capable of running linux
An Internet connection
And lots of lots of patience
Getting started
Setting up Linux
To be able to build a ROM fully from source a Linux based operating system is required. This is due to the fact that windows is unable to compile the android source code due to lacking tools/libaries. After all you're compiling Linux on Linux (Because android is Linux). We strongly recommend to have AT LEAST 50 GB of space for Ubuntu!!!
Please be aware that this guide is target audiences with Ubuntu specifically and so may not work on other distros. Because of this we prefer ubuntu for everyone that is coming from windows.
Because this guide isn't about how to install ubuntu, I'll let this guide explain all for you : http://www.linuxtechi.com/ubuntu-15-10-desktop-installation-guide/
Installing the required packages
We will start off by downloading openjdk 7 (Note: Open JDK 8 isn't supported by CM yet).
Please open the terminal and enter or copy paste the following :
Code:
sudo apt-get update && sudo apt-get install openjdk-7-jdk
After entering the password (Note: you won't be able to see any output when typing the password) hit enter and then type "y" and hit enter again.
Once this is completed we will download the required packages. Please copy paste the following into your terminal :
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 schedtool
You may have to enter your password again after hitting enter. Once that is done enter "y" again and hit enter again.
Additionally you can set up ccache by entering the following into the terminal :
Code:
echo 'export USE_CCACHE=1' >> ~/.bashrc
after this has been done, restart your PC.
Then we will set up git. Replace "Your name" with your name and "[email protected]" with your email :
Code:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
Now we will need to set up the repo tool. Copy the following into the terminal:
Code:
mkdir ~/bin && PATH=~/bin:$PATH && echo 'PATH=~/bin:$PATH' >> ~/.bashrc && curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
Guides
CyanogenMod 13
Getting the CM13 source
Start out by making a directory called cm13 in your home dir by running the following command :
Code:
mkdir ~/cm13/
Now we will initialize the CM13 repository by entering the following in your terminal :
Code:
cd ~/cm13/ && repo init -u https://github.com/CyanogenMod/android.git -b cm-13.0
We are now coming to the worst part and that is downloading the entire 20GB big CM13 source code. To sync the source code, run the following command :
Code:
repo sync
And now wait.... and wait..... and wait....... until it's done
Getting the Z5/Z5C/Z5P source
To clone the device specific source code we'll have to introduce you to some of the codenames as those are used for simplifying reasons when building from source
Code:
NAME CODENAME
Sony Xperia Z5 sumire
Sony Xperia Z5 Compact suzuran
Sony Xperia Z5 Premium satsuki
We will start off by cloning the appropriate manifests for your device. Please enter the following and make sure to replace yourdevicecodename with your device codename :
Code:
cd ~/cm13/ && git clone https://github.com/Sony-Kitakami/android_.repo_local_manifests.git -b cm-13.0-yourdevicecodename .repo/local_manifests
Now we will sync our device specific source like this :
Code:
repo sync --force-sync
This could again take some time depending on your connection as the kernel source is quite heavy.
Building the ROM
We will now get to the big part, which is compiling. Note this could take from 1 hour to more than 10 hours depending on how good your PC is. Replace yourdevicecodename with your targeted device codename.
Please copy the following to your terminal line by line
Code:
cd ~/cm13/
cd .repo/local_manifests/ && git pull && cd ../.. && repo sync --force-sync
. build/envsetup.sh
lunch
cm_yourdevicecodename-userdebug
mka clobber
mka bacon
After a long time of waiting you should be done and your CyanogenMod package should be located in home/cm13/out/target/product/yourdevicecodename/
Congratulations! You have now build your very own CM13 ROM from source!
CyanogenMod 13 based ROMs
If you are planning to build a CM13 based or similar ROM (Bliss Pop, RR, Slim etc.), we're expecting you to be a more advanced user. As much as we would like to give a strict guide, we simply can't cover all as there are always differences between each and every ROM.
You will have to start off by downloading the ROM source. Again this should be similar to CM but the git links are different.
Ex:
Code:
RR = repo init -u [url]https://github.com/ResurrectionRemix/platform_manifest.git[/url] -b marshmallow
Bliss = repo init -u [url]https://github.com/BlissRoms/platform_manifest.git[/url] -b mm6.0
and much more. Most of them can be found on the ROMs official git team under the platform_manifest repo.
Here is where things get hard. You will have to edit our manifests and adjust them to work with your target ROM. This is nearly impossible to explain as each ROM contains different repos that may overlap with the CM ones or it may lack repos that you're trying to remove. In other words, you will need to learn how to use the local manifests. A nice guide exists here https://wiki.cyanogenmod.org/w/Doc:_Using_manifests
Once this is done you will have to adjust your device tree to work with your specific ROM. Again this is always different. The best way to learn is to compare a CM tree with a tree from a different ROM
Ex:
Samsung Galaxy S5 mini tree for CyanogenMod : https://github.com/cm-3470/android_device_samsung_kminilte
Samsugn Galaxy S5 mini tree for BlissPop : https://github.com/cm-3470/android_device_samsung_kminilte/tree/bosp-6
The main differences are the cm.mk or device.mk files etc.
Here is a commit that show the transfer from CM to Bliss Pop which usually isn't very hard
https://github.com/cm-3470/android_...mmit/5e902e7dd228c6804b2735af9a96ea02969aa2cf
Once this is completed you can run your build and release it!
XDA:DevDB Information
How to build CM13 from source for the Z5, ROM for the Sony Xperia Z5
Contributors
CTXz, zacharias.maladroit, Moonbutt74
Source Code: https://github.com/Sony-Kitakami
ROM OS Version: 6.0.x Marshmallow
ROM Firmware Required: Stock Marshmalllow
Based On: CyanogenMod
Version Information
Status: Alpha
Created 2016-04-12
Last Updated 2016-04-15
Reserved
Reserved
Thanks for posting the guide
I followed the steps, but got stuck at the command: "cd ~/cm13/ && git clone [email protected]:Sony-Kitakami/android_.repo_local_manifests.git -b cm-13.0-sumire"
It returned this to me:
Cloning into 'android_.repo_local_manifests'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
EDIT: Never mind, I investigated, and found out that I had to generate an SSH key and link that to my GitHub account. If anyone needs help with this, I used this guide: https://help.github.com/articles/generating-an-ssh-key/
Uclydde said:
Thanks for posting the guide
I followed the steps, but got stuck at the command: "cd ~/cm13/ && git clone [email protected]:Sony-Kitakami/android_.repo_local_manifests.git -b cm-13.0-sumire"
It returned this to me:
Cloning into 'android_.repo_local_manifests'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
EDIT: Never mind, I investigated, and found out that I had to generate an SSH key and link that to my GitHub account. If anyone needs help with this, I used this guide: https://help.github.com/articles/generating-an-ssh-key/
Click to expand...
Click to collapse
Hey, sorry for that. I had git set to ssh like and forgot that they require a keygen. I've changed it to https://github.com/Sony-Kitakami/android_.repo_local_manifests.git -b cm-13.0-yourdevicecodename so it no longer needs a key
Actually, is you are building CM13 and using Ubuntu 14.04 or up, you just need to type:
Code:
sudo apt-get install bison g++-multilib git gperf libxml2-utils make zlib1g-dev:i386 zip
Okay, I hit another bump. When I type: "cd .repo/local_manifests/ && git pull && cd ../.. && repo sync --force-sync"
It returns:
bash: cd: .repo/local_manifests/: No such file or directory
zhangyang_haha said:
Actually, is you are building CM13 and using Ubuntu 14.04 or up, you just need to type:
Code:
sudo apt-get install bison g++-multilib git gperf libxml2-utils make zlib1g-dev:i386 zip
Click to expand...
Click to collapse
No, you'll be missing quite some packages
Sent from my E5823 using XDA-Developers mobile app
Uclydde said:
Okay, I hit another bump. When I type: "cd .repo/local_manifests/ && git pull && cd ../.. && repo sync --force-sync"
It returns:
bash: cd: .repo/local_manifests/: No such file or directory
Click to expand...
Click to collapse
Ok updated again. Please run this.
cd ~/cm13/ && git clone https://github.com/Sony-Kitakami/android_.repo_local_manifests.git -b cm-13.0-yourdevicecodename .repo/local_manifests
CTXz said:
Ok updated again. Please run this.
cd ~/cm13/ && git clone https://github.com/Sony-Kitakami/android_.repo_local_manifests.git -b cm-13.0-yourdevicecodename .repo/local_manifests
Click to expand...
Click to collapse
Yay, that worked! However, I got to the "cm_yourdevicecodename-userdebug" line, so I entered "cm_sumire-userdebug", but that returned: "cm_sumire-userdebug: command not found"
Uclydde said:
Yay, that worked! However, I got to the "cm_yourdevicecodename-userdebug" line, so I entered "cm_sumire-userdebug", but that returned: "cm_sumire-userdebug: command not found"
Click to expand...
Click to collapse
This needs a
Code:
repo --sync
in between
Uclydde said:
Yay, that worked! However, I got to the "cm_yourdevicecodename-userdebug" line, so I entered "cm_sumire-userdebug", but that returned: "cm_sumire-userdebug: command not found"
Click to expand...
Click to collapse
When you type lunch it will show a big list of devices and prompt for an input. Enter cm_sumire-userdebug. You can also however run
Code:
lunch cm_sumire-userdebug
Sent from my E5823 using XDA-Developers mobile app
Nice guide, buddy
Binaries have been updated to v5a,
v4 is included in this, can you update please? I did it manually and got it to boot
I'm not able to push them to github.
http://developer.sonymobile.com/downloads/tool/software-binaries-for-aosp-m-android-6-0/
celderic said:
Binaries have been updated to v5a,
v4 is included in this, can you update please? I did it manually and got it to boot
I'm not able to push them to github.
http://developer.sonymobile.com/downloads/tool/software-binaries-for-aosp-m-android-6-0/
Click to expand...
Click to collapse
Is the camera working for you ?
Did the focus improve ? or are still changes needed ?
zacharias.maladroit said:
Is the camera working for you ?
Did the focus improve ? or are still changes needed ?
Click to expand...
Click to collapse
It doesn't work for me with v4, or v5a
Using the guide posted here, nothing changed only updated to v5a manually.
I haven't bothered to look through the log yet, bur it says camera hardware inaccessible or something like that I forget the exact wording. With v4 and v5a, I even downloaded the source again to make sure it wasn't a problem on my end.
I'll try and have a proper look tomorrow
celderic said:
It doesn't work for me with v4, or v5a
Using the guide posted here, nothing changed only updated to v5a manually.
I haven't bothered to look through the log yet, bur it says camera hardware inaccessible or something like that I forget the exact wording. With v4 and v5a, I even downloaded the source again to make sure it wasn't a problem on my end.
I'll try and have a proper look tomorrow
Click to expand...
Click to collapse
Yeah, we kinda apologize for that. My linux environment has broken hard after upgrading to ubloatu, i mean Ubuntu 16.04... I'm busy updating to debian now, and will most likely stick with debian jessie as sid and stretch ended in an huge catastrophy. Thanks to @moonbutt74 for not warning me. (<- Only a joke, he actually predictied that sid will be a catastrophy but I didn't listen cuz that's me). I'll also most likely need to update the guide too as we no longer prefer/recommend ubuntu 16.04
Sent from my E5823 using XDA-Developers mobile app
celderic said:
It doesn't work for me with v4, or v5a
Using the guide posted here, nothing changed only updated to v5a manually.
I haven't bothered to look through the log yet, bur it says camera hardware inaccessible or something like that I forget the exact wording. With v4 and v5a, I even downloaded the source again to make sure it wasn't a problem on my end.
I'll try and have a proper look tomorrow
Click to expand...
Click to collapse
@celderic
did you do any modifications to the repos ?
If not did the kernel built with the ROM work for you ?
Thanks
edit:
v04 and v05a binary blobs are the same for us (Kitakami)
Changes in v05a was for kanuti, rhine, shinano and yukon
zacharias.maladroit said:
@celderic
did you do any modifications to the repos ?
If not did the kernel built with the ROM work for you ?
Thanks
edit:
v04 and v05a binary blobs are the same for us (Kitakami)
Changes in v05a was for kanuti, rhine, shinano and yukon
Click to expand...
Click to collapse
Sorry been on holiday not had time to reply on here, oh I didn't realise they where the same for our device.
I didn't modify the repos, and yes the stock cm kernel booted fine.
openjdk-7 isnt available under ubuntu 16.04. Is 8 or 9 supported yet or do I have to manually install v7?

[Guide][G800F/M/Y][7.1.2][UNOFFICIAL] Build Slim ROM 7 Nougat from Source

Overview
I've created a very simple #!/bin/bash script (attached) to automate the initial build or subsequent rebuild of SpookCity138's ROM:
Slim Rom 7 for the Samsung S5 mini G800f (kminilte). The script simply automates the steps and processes created by others (none of which is my own work - all credit goes to the original creators). I have only tested this script on my own working environment: Gnome Ubuntu 17.04; 16GB RAM; i7-7700HQ; If your environment differs from this your experience may differ from mine.
How to Execute script
See readme at: https://github.com/fidoedidoe/build_scripts
Thanks
@spookcity138, @jimmy999x. Taking the time to educate me at each and every tentative step and demonstrating great patience
Contributors
spookcity138
jimmy999x
Script Source
The latest version of the script (and others for different devices) can be found here: https://github.com/fidoedidoe/build_scripts
SpookCity138's ROM
https://forum.xda-developers.com/galaxy-s5-mini/development/rom-slim-rom-7-nougat-t3558926
Created 2017-09-20
Last Updated 2017-12-09
There are sources to build this ROM for the Snapdragon variant (G800H)? It's a very good device, but simply there is not a single Nougat ROM for it...
wow, excellent, I have reviewed the code (I have not executed it yet) looks pretty good, it should work, I have to copy your script and modify it for other roms, thanks!
edit 1: it is possible to use this script (I use it and it works perfect) to automate even more the process of configuring the compilation environment https://github.com/akhilnarang/scripts
Also, for Ubunt 16.04 I added a couple more to make it easier some things:
cmake
nautilus (optional)
phablet-tools
unrar
silversearcher-ag (this is optional, but extremely useful for me, allows me to find the problematic lines inside a document or folder)
lfom said:
There are sources to build this ROM for the Snapdragon variant (G800H)? It's a very good device, but simply there is not a single Nougat ROM for it...
Click to expand...
Click to collapse
You need to apply some SELinux, CAF, And CM/LOS Patches to build a Nougat ROM for G800H, or that rom will not boot, or will shall not pass from build errors.
Is not a easy task.....
lfom said:
There are sources to build this ROM for the Snapdragon variant (G800H)? It's a very good device, but simply there is not a single Nougat ROM for it...
Click to expand...
Click to collapse
i found this on YT
so far so good for me
give it a try
https://youtu.be/UPOpJgqnlf8
not working for me -- using xubuntu 17.10
ko_taka said:
not working for me -- using xubuntu 17.10
Click to expand...
Click to collapse
Script updated on github (follow links for build_slimrom7_kminilte.sh). Tested on my laptop (Ubuntu gnome 17.04) and SlimRom7 version 1.17 builds successfully (although I have yet to test the build on the device). I'll update the attached zip in the opening page in the coming days, but as a general rule github is the best place to find latest version(s).
Thanks to @spookcity138 (again) for taking time the time and offering sound help / advice identifying the issues and resolve (the issue was within applying device specific patches ./apply.sh).
I am on 40GB partition. Not enough?
perly terminated.
Fetching projects: 70% (381/544) fatal: unable to access 'https://android.googlesource.com/platform/hardware/akm/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
Fetching projects: 73% (398/544) fatal: unable to access 'https://android.googlesource.com/platform/system/connectivity/shill/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
fatal: unable to access 'https://android.googlesource.com/platform/external/jsr330/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
Fetching projects: 74% (403/544) fatal: unable to access 'https://android.googlesource.com/platform/external/jsr330/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
error: Cannot fetch platform/external/jsr330
Fetching projects: 78% (425/544) fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: index-pack failed
error: index-pack died
fatal: index-pack failed
fatal: index-pack failed
fatal: index-pack failed
fatal: index-pack failed
fatal: index-pack failed
error: Cannot fetch SlimRoms/frameworks_base
Click to expand...
Click to collapse
ko_taka said:
I am on 40GB partition. Not enough?
Click to expand...
Click to collapse
Yeah,you're running out of space. I don't recall exactly what the sources and the build of a nougat ROM take,space wise. It seems a little weird you were running out of space syncing the sources. If I recall correctly nougat sources are somewhere between 25-30GB. I could be wrong though. The actual build itself (the out folder) also takes a fair bit of space. Again,just guessing,but around 15-20GB. I would say 60GB would be what you need.
hi spookcity138, nice to see you around
I haven't coded that so I'm feeling a bit lost
The process finally ended (now I am on 80GB partition)
I do not know where is the build if that built anything
those are the last lines
build_slimrom7_kminilte.sh: 176: build_slimrom7_kminilte.sh: [[: not found
Remove references to OmniRom recovery...
remove config_uriBlruEnabled references, spoils the build...
alter local manifest files for slimrom 7 build compatability...
insert text into file: frameworks/base/core/res/res/values/config.xml...
delete file cm_arrays.xml...
remove flipflap stuff from device/samsung/smdk3470-common/smdk3470-common.mk...
build_slimrom7_kminilte.sh: 205: read: Illegal option -t
build_slimrom7_kminilte.sh: 210: build_slimrom7_kminilte.sh: [[: not found
patching file include/telephony/ril.h
Hunk #1 FAILED at 31.
Hunk #2 succeeded at 395 (offset -1 lines).
Hunk #3 succeeded at 409 (offset -1 lines).
Hunk #4 succeeded at 569 (offset -1 lines).
Hunk #5 succeeded at 624 (offset -1 lines).
Hunk #6 succeeded at 1023 (offset -1 lines).
Hunk #7 succeeded at 5217 (offset -1 lines).
Hunk #8 succeeded at 5866 (offset -1 lines).
1 out of 8 hunks FAILED -- saving rejects to file include/telephony/ril.h.rej
manually reapplying failed Hunk #1...
patching file ril/Android.mk
patching file ril/libril/Android.mk
patching file ril/libril/ril.cpp
patching file ril/libsecril-client/Android.mk
applying frameworks_av to frameworks/av
Applying: av: Add samsung wfd service
Applying: add Android M MediaBufferGroup:MediaBufferGroup() for libwvm.so
applying frameworks_native to frameworks/native
Applying: Revert "Remove Parcel::writeIntPtr."
Applying: add missing const getSensorList() for MM gpsd (G800FXXU1CPK5)
applying hardware_libhardware to hardware/libhardware
applying hardware_ril to hardware/ril
Applying: ril: recover on crash
applying hardware_samsung_ril to hardware/samsung/ril
Applying: add SetAudioMode and SetSoundClockMode for MM audio-ril
applying packages_services_Telephony to packages/services/Telephony
./apply.sh: line 24: cd: /home/ferran/android/build_scripts/packages/services/Telephony: No such file or directory
build_slimrom7_kminilte.sh: 238: read: Illegal option -t
build_slimrom7_kminilte.sh: 243: build_slimrom7_kminilte.sh: [[: not found
prepare device specific code...
build_slimrom7_kminilte.sh: 249: build_slimrom7_kminilte.sh: source: not found
build_slimrom7_kminilte.sh: 250: build_slimrom7_kminilte.sh: lunch: not found
running croot...
build_slimrom7_kminilte.sh: 253: build_slimrom7_kminilte.sh: croot: not found
build_slimrom7_kminilte.sh: 262: read: Illegal option -t
build_slimrom7_kminilte.sh: 267: build_slimrom7_kminilte.sh: [[: not found
running mka bacon...
build_slimrom7_kminilte.sh: 273: build_slimrom7_kminilte.sh: mka: not found
Click to expand...
Click to collapse
ko_taka said:
hi spookcity138, nice to see you around
I haven't coded that so I'm feeling a bit lost
The process finally ended (now I am on 80GB partition)
I do not know where is the build if that built anything
those are the last lines
Click to expand...
Click to collapse
The build did not start. It applied the patches successfully (all but one where there was an error) Then it is just a serious of failures. I have not used this script so I cant say specifically where you are going wrong. Does the script have executable permissions? (I assume so as it partially worked) Do you have all of the need dependencies for building Android? Thats not the issue I don't think,but you need them either way. Other than that I am not real sure honestly. You may need to wait for @fidoedidoe to help you. I'll reply back if any possible reason comes to mind.
ko_taka said:
hi spookcity138, nice to see you around
I haven't coded that so I'm feeling a bit lost
The process finally ended (now I am on 80GB partition)
I do not know where is the build if that built anything
those are the last lines
Click to expand...
Click to collapse
Hi @ko_taka
@spookcity138 is correct, the script failed...when it succeeds it's pretty clear the last few messages published will read along the lines of: "Package Complete: .../out/target/product/kminilte/Slim-kminilte-7.1.2.build.1.17-UNOFFICIAL-20171209-1401.zip" followed by "#### make completed successfully (24:30 (mm:ss)) ####" (note the build time will vary depending on the power of your build machine and utilisation of ccache). Oh, FYI - my build folder is ~95GB in size (the ../out/ folder is 26GB and the ../.repo/ folder is 47GB!!)
Back to the script failure....first verify the following variable in the build_slimrom7_kminilte.sh is defined correctly for your environment:
Code:
WORK_DIRECTORY="$HOME/android/slimrom7"
For my personal build environment I keep the script (build_slimrom7_kminilte.sh) in a separate folder to where the source is located and the build is output to (just so i can purge those folders without losing the build script). FYI on your laptop your folder structure should look something like that shown below, with build_slimrom7.kminilte.sh stored in the folder .../build_scripts
Code:
/home/ferran/android/build_scripts
/home/ferran/android/slimrom7
Once the above is verified...the primary issue you have is every time you see "...[[: not found", the script is hitting an issue. Check that the first line of the script contains the line "#!/bin/bash ", this is called "shebang" and it tells your shell what program to interpret the script with, in our case we need "Bash". I'm now wondering what OS / Shell you're using (I use Ubuntu Gnome 17.04 with Bash version 4.4.7) does yours differ from this? To verify your Bash version:
Code:
$ bash -version
GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)
Copyright © 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
You could try forcing your shell to use bash (from memory), by switching to the /build_scripts/ folder and running the following command (do not use sudo or any elevated permissions):
Code:
$ cd /home/ferran/android/build_scripts
$ ./build_slimrom7_kminilte.sh
Let me know how you get on, in essence the script is failing on the evaluation lines where "if [[....]]" is used. if we can't get it to work, in your case, the script may need to be altered to change the evaluation (perhaps "if [...]" would be more suitable). Anyway - give me some feedback and lets see if we can get you a little further.
my bash is 4.4.12
working directory had been set correctly
I removed the double [[ leaving a simple [ same with ]] closing brackets
it says Illegal option -t in line 238
this is line 238: read -r -p "6/7. Initialise environment for Build <Y/n>? (automatically continues unprompted after 10 seconds): " -t 10 -e -i Y PROMPT
it also says [: Y: unexpected operator on line 243
this is line 243: if [ ! $PROMPT =~ ^[Yy]$ ]; then
Timte to time I was getting errors while fetching
TLS errors
I found it is due gnutls package and applied the following solution:
compile git with openssl. To do this, run the following commands:
sudo apt-get update
sudo apt-get install build-essential fakeroot dpkg-dev libcurl4-openssl-dev
sudo apt-get build-dep git
mkdir ~/git-openssl
cd ~/git-openssl
apt-get source git
dpkg-source -x git_1.7.9.5-1.dsc
cd git-1.7.9.5
(Remember to replace 1.7.9.5 with the actual version of git in your system.)
Then, edit debian/control file (run the command: gksu gedit debian/control) and replace all instances of libcurl4-gnutls-dev with libcurl4-openssl-dev.
Then build the package (if it's failing on test, you can remove the line TEST=test from the file debian/rules):
sudo dpkg-buildpackage -rfakeroot -b
Install new package:
x86_64: sudo dpkg -i ../git_1.7.9.5-1_amd64.deb
Click to expand...
Click to collapse
I'm using git-openssl build now
Just started the fetching process again
I'm under virtual machine on a host with a proper firewall configuration -- maybe that caused the connection problems while fetching
ko_taka said:
my bash is 4.4.12
working directory had been set correctly
I removed the double [[ leaving a simple [ same with ]] closing brackets
it says Illegal option -t in line 238
this is line 238: read -r -p "6/7. Initialise environment for Build <Y/n>? (automatically continues unprompted after 10 seconds): " -t 10 -e -i Y PROMPT
it also says [: Y: unexpected operator on line 243
this is line 243: if [ ! $PROMPT =~ ^[Yy]$ ]; then
Click to expand...
Click to collapse
Sounds like we're making progress. This is good. So, reading around the subject of square brackets vs double. It transpires converting the evaluations from double square brackets ([[..]]) to singles ([..]) may** change how variables are referenced. In my script I was forced to use double square brackets to correctly evaluate the response from the "read -r....." (read input) command (where it evaluates when upper or lower case Y is entered). If this command is changed from double square brackets to single ones the command then fails (on my setup). Further to this, in your reply it appears you're also having issues with the "read" command, for some reason your version doesn't support the -t directive (which waits for N seconds - ie: -t 5 will wait 5 seconds for user input).
For now the easiest thing to do is to remove *all* of the steps in the script that awaits input from the user to continue processing the script (they are non essential vanity items primarily used while I was building out the script). There are 7 is these in the script (look for "1/7", "2/7", "3/7", etc etc), just comment out (insert # at beginning of each line) for all 7 instances. There are ~10 lines per instance, examples of how instance #1 and #7 should look after editing is below. Just do the same for all 7 instances in your script and re run the script.
Code:
...
...
#PROMPT=""
#read -r -p "1/7. Initialise/Reinitialise Repo, first 'repo init' will take hours <Y/n>? (automatically continues unpromted after 5 seconds): " -t 5 -e -i Y PROMPT
#echo
#if [ -z "$PROMPT" ]; then
# PROMPT="Y"
#fi
#if [[ ! $PROMPT =~ ^[Yy]$ ]]; then
# echo "Response: '$PROMPT', exiting!"
# exit 1
#fi
...
...
#PROMPT=""
#read -r -p "7/7. Build rom (this segment can take hours) <Y/n>? (automatically continues unprompted after 10 seconds): " -t 10 -e -i Y PROMPT
#echo
#if [ -z "$PROMPT" ]; then
# PROMPT="Y"
#fi
#if [[ ! $PROMPT =~ ^[Yy]$ ]]; then
# echo "Response: '$PROMPT', exiting!"
# exit 1
#fi
...
I'd be really interested in knowing what OS you're using (Ubuntu, Mac, etc along with version) perhaps I can use this detail to come up with a more generic version of the script.
Good luck, let me know how you get on.
ko_taka said:
Timte to time I was getting errors while fetching
TLS errors
I found it is due gnutls package and applied the following solution:
I'm using git-openssl build now
Just started the fetching process again
I'm under virtual machine on a host with a proper firewall configuration -- maybe that caused the connection problems while fetching
Click to expand...
Click to collapse
I'd also try changing the value of the variable: REPO_SYNC_THREADS in the script to something lower (more suitable to your internet bandwidth / performance), try 2 or 4 and build up from there. ie: REPO_SYNC_THREADS=2
I think the problem was on GIT .. confusing I think so
I would be waiting a message like (file doesnt exist or something like that)
anyway I still with compiling errors but now is quite different
I am using virtualbox (Xubuntu 17.10) on Mac OS 10.13.2 Mac Mini 2014 entry level
applying packages_services_Telephony to packages/services/Telephony
./apply.sh: line 24: cd: /home/ferran/android/slimrom7/packages/services/Telephony: No such file or directory
6/7. Initialise environment for Build <Y/n>? (automatically continues unprompted after 10 seconds): Y
prepare device specific code...
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-mips64/vendorsetup.sh
including device/generic/mini-emulator-mips/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/samsung/kminilte/vendorsetup.sh
build/envsetup.sh: line 1716: vendor/slim/build/envsetup.sh: No such file or directory
build/core/product_config.mk:250: *** _nic.PRODUCTS.[[device/samsung/kminilte/slim.mk]]: "vendor/slim/config/common_full_phone.mk" does not exist. Stop.
build/envsetup.sh: line 624: vendor/slim/build/tools/roomservice.py: No such file or directory
build/core/product_config.mk:250: *** _nic.PRODUCTS.[[device/samsung/kminilte/slim.mk]]: "vendor/slim/config/common_full_phone.mk" does not exist. Stop.
cat: /home/ferran/android/slimrom7/vendor/slim/build/envsetup.sh: No such file or directory
cat: /home/ferran/android/slimrom7/vendor/slim/build/envsetup.sh: No such file or directory
build/core/product_config.mk:250: *** _nic.PRODUCTS.[[device/samsung/kminilte/slim.mk]]: "vendor/slim/config/common_full_phone.mk" does not exist. Stop.
** Don't have a product spec for: 'slim_kminilte'
** Do you have the right repo manifest?
running croot...
mka clean/clobber needed...
./build_slimrom7_kminilte.sh: line 257: mka: command not found
7/7. Build rom (this segment can take hours) <Y/n>? (automatically continues unprompted after 10 seconds): Y
running mka bacon...
./build_slimrom7_kminilte.sh: line 273: mka: command not found
Click to expand...
Click to collapse
ko_taka said:
I think the problem was on GIT .. confusing I think so
I would be waiting a message like (file doesnt exist or something like that)
anyway I still with compiling errors but now is quite different
I am using virtualbox (Xubuntu 17.10) on Mac OS 10.13.2 Mac Mini 2014 entry level
Click to expand...
Click to collapse
Thanks for the feedback. At first glance it looks to me like your issue is less to do with the script and more to do with not having all the source locally. Seeing commands such as running ./apply.sh (puled down with the source) error reporting "file not found" is the smoking gun.
Right now I'd be tempted to say ensure you've successfully pulled the primary SlimRom7 source locally. It may be easier to do this outside of the script by running the following:
Code:
$ cd /home/ferran/android/slimrom7/
$ repo forall -vc "git reset --hard" --quiet
$ repo sync --jobs="2"
Keep an eye out of timeouts / 404 while it's syncing the repo's (the third of the three commands above). If you get errors just keep rerunning the "repo sync" command given above while in the correct directory until it completes without error. Once you have that done successfully, change the the build_scripts directory and re-run the script. If you see timeouts / 404 in the script output then you might have to manually run the "git clone" commands to see which one is causing the issue(s).
why does need that much space?
I was executing
$ repo forall -vc "git reset --hard" --quiet
$ repo sync --jobs="2"
Click to expand...
Click to collapse
I am getting the message "out of space"
80GB full of source code and even need more space??
ko_taka said:
why does need that much space?
I was executing
I am getting the message "out of space"
80GB full of source code and even need more space??
Click to expand...
Click to collapse
Use a disk usage analysis tool to find out whether earlier failed attempts pulled source down to multiple locations (when the script was failing).. I mentioned in an earlier post the size of the repo, look back 5 or 6 posts. Don't forget the bulk of the source will be contained in a hidden folder named /.repo/ check this folder doesn't exist outside of the build folder (/slimrom7/)...looking at earlier attempts I'd fist check your /build_scripts/ folder for the hidden .repo folder and if there delete it. Good luck

Categories

Resources