[GUIDE] How to make your own CM-11.0 for your S4 mini - Galaxy S 4 Mini General

Hello friends!!!
I have been compiling and making roms since 2 yrs now.
I am posting here the building and compiling guide of s4 mini.
There are already similar guides for other phones on XDA.
This guide has following parts
A.Preparation
B.Downloading the source
C.Compiling and building
A. Preparation
First and foremost is use 64bit operating system
you can use UBUNTU 14.04LTS, MINT, BBQLINUX or any variant of Ubuntu or debian .
I use UBUNTU 14.04LTS and BBQ LINUX
this guide is based on ubuntu 14.04 lts
I assume that you are familiar with linux and its basic commands.
Things to be done before downloading actual android source code. (to be done once only!!!!)
1. Installing Proper version of java
Open terminal, type and install following
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
This will remove current java installations
2. Install oracle java 6 by following command (say OK to prompts)
Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update && sudo apt-get install oracle-java6-installer
java -version
3.After that we need to install developer utilities for building android source
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
4. After installation of above do following
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
5. Install repo
Repo is a program which downloads and helps in syncing the source
Code:
mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
6.Use your favorite text editor to open ~/.bashrc - I like nano:
Code:
sudo nano ~/.bashrc
7. At the very bottom (use the Page Down key) paste this code to a new (empty) line:
Code:
export PATH=~/bin:$PATH
8. Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Restart bash:
Code:
source ~/.bashrc
B. Downloading the source
We are now going to download the source code for cyanogenmod kitkat cm-11.0
1. make a directory where you want to download the code
for guide purpose i use cm11
Code:
mkdir ~/cm11 && cd ~/cm11
2. initialise the repo for cm-11.0
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
3. make local manifest for downloading extra repositories for building for s4 mini
Code:
cd .repo
mkdir local_manifests
sudo nano s4mini.xml
copy and paste following to s4mini.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_samsung_msm8930-common" path="device/samsung/msm8930-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_samsung_serrano-common" path="device/samsung/serrano-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_samsung_serrano3gxx" path="device/samsung/serrano3gxx" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_samsung_serranoltexx" path="device/samsung/serranoltexx" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_kernel_samsung_msm8930-common" path="kernel/samsung/msm8930-common" remote="github" revision="cm-11.0" />
<project name="k2wl/android_device_samsung_serranodsdd" path="device/samsung/serranodsdd" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_samsung_qcom-common" path="device/samsung/qcom-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_hardware_qcom_fm" path="hardware/qcom/fm" remote="github" revision="cm-11.0" />
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-11.0" />
</manifest>
Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt.
now its time to download the sources
4. Syncing the sources
Code:
repo sync
now sit back and enjoy all the other things.
the source is around 12 to 15 gb.
so it is going to be a while before it gets downloaded.
(recommended 2mbps and above net speed for this)
you can speed up the process by adding following remove.xml in your local_manifests folder along with s4mini.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- Useless Stuff -->
<remove-project name="platform/prebuilts/clang/darwin-x86/3.1"/>
<remove-project name="platform/prebuilts/clang/darwin-x86/3.2"/>
<remove-project name="platform/prebuilts/clang/darwin-x86/arm/3.3"/>
<remove-project name="platform/prebuilts/clang/darwin-x86/host/3.3"/>
<remove-project name="platform/prebuilts/clang/darwin-x86/mips/3.3"/>
<remove-project name="platform/prebuilts/clang/darwin-x86/x86/3.3"/>
<remove-project name="platform/prebuilts/gcc/darwin-x86/x86/x86_64-linux-android-4.7"/>
<remove-project name="platform/prebuilts/gcc/darwin-x86/arm/arm-eabi-4.6"/>
<remove-project name="platform/prebuilts/gcc/darwin-x86/arm/arm-eabi-4.7"/>
<remove-project name="platform/prebuilts/gcc/darwin-x86/arm/arm-linux-androideabi-4.6"/>
<remove-project name="platform/prebuilts/gcc/darwin-x86/arm/arm-linux-androideabi-4.7"/>
<remove-project name="platform/prebuilts/gcc/darwin-x86/host/headers"/>
<remove-project name="platform/prebuilts/gcc/darwin-x86/host/i686-apple-darwin-4.2.1"/>
<remove-project name="platform/prebuilts/gcc/darwin-x86/mips/mipsel-linux-android-4.6"/>
<remove-project name="platform/prebuilts/gcc/darwin-x86/mips/mipsel-linux-android-4.7"/>
<remove-project name="platform/prebuilts/gcc/darwin-x86/x86/i686-linux-android-4.6"/>
<remove-project name="platform/prebuilts/gcc/darwin-x86/x86/i686-linux-android-4.7"/>
<remove-project name="platform/prebuilts/python/darwin-x86/2.7.5"/>
</manifest>
this will remove mac related prebuilts from downloading. so saving the time and bandwidth.
During initialising repo the repo tool may ask you your name and email
make one username with github
this will be your name and [email protected] is your email address.
C. compiling and building from source
Now you have all the source you want for building your own cm-11.0 for your s4mini.
Open terminal in cm11 directory.
1.building for serrano3gxx i9190
Code:
. build/envsetup.sh && brunch serrano3gxx
2.building for serranoltexx i9195
Code:
. build/envsetup.sh && brunch serranoltexx
3.building for serranodsdd i9192
for this we need to patch some things for ril and other things to work.
Code:
cd device/samsung/serranodsdd/patches
./install-all.sh
cd
. build/envsetup.sh && brunch serranodsdd
happy building
post your queries here .
i will keep updating this thread for some more tips and tricks.

reserved1

reserved2

Reserved3

Excellent guide, thank you!

This is my first time compiling an android ROM. This is not my first time developing or compiling software. I am trying to compile the latest cm11 for my Sprint Galaxy S4 mini SPH-L520 serranoltespr using these repositories:
github (dot) com (slash) 0be/android_device_samsung_serranoltespr
github (dot) com (slash) s0be/android_vendor_samsung_serranoltespr
Is there anything else I would need to swap out in order to compile cm11 for this device properly?
Thanks!
Its so sad that there is absolutely NO development for my device. Guess I have to bite the bullet and do it myself.

dddbtc said:
This is my first time compiling an android ROM. This is not my first time developing or compiling software. I am trying to compile the latest cm11 for my Sprint Galaxy S4 mini SPH-L520 serranoltespr using these repositories:
github (dot) com (slash) 0be/android_device_samsung_serranoltespr
github (dot) com (slash) s0be/android_vendor_samsung_serranoltespr
Is there anything else I would need to swap out in order to compile cm11 for this device properly?
Thanks!
Its so sad that there is absolutely NO development for my device. Guess I have to bite the bullet and do it myself.
Click to expand...
Click to collapse
i will help in that..
i will look into repositories for the device you mentioned above...and tell you anything more can be done or not...
http://forum.xda-developers.com/showthread.php?t=2669991
this above thread shows it has cm11 already.
you can take references from that.

Hi,
How to create your own ROM in Windows ?
Thanks in advance !
Envoyé de mon iPod touch à l'aide de Tapatalk

k2wl said:
Code:
sudo apt-get purge openjdk...
Click to expand...
Click to collapse
The cm wiki suggests to use openjdk, although it seems Android doesn't really support it: http://www.javaworld.com/article/20...source-java-for-android--don-t-bet-on-it.html
Have you had experience building with openjdk?
Does it have to be Java 6?
Will old Sun versions do as well? (I see there still is 6u26 in the squeeze repo)

sun java 6 is needed to build from source upto kitkat.
i have experienced openjdk building while jb...it is hopless....too many errors....better to stick for java6.
it has been said that from android L mostly google will support openjdk 7
i dont know that yet for sure.
@darckmin93100 for building on windows u need virtual machine with 8 gb ram atleast 30gb swap space and 200gb virtual hdd configured for linux guest.
if you have that much on your pc then go ahead...make a virtual machine of that configuration and build.

k2wl said:
Code:
...
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-11.0" />
...
Click to expand...
Click to collapse
Does this equal to extracting proprietary blobs?
Anything else to regard when using extract-files.sh instead of the repo?

And another one:
k2wl said:
Code:
...
<project name="CyanogenMod/... remote="github" revision="cm-11.0" />
...
Click to expand...
Click to collapse
Does revision "cm-11.0" refer to the nightly branch and "stable/cm-11.0" to the M snapshot releases?

aguaz said:
Does this equal to extracting proprietary blobs?
Anything else to regard when using extract-files.sh instead of the repo?
Click to expand...
Click to collapse
yes it represents equal to extracting libs from device with extract-riles.sh
aguaz said:
And another one:
Does revision "cm-11.0" refer to the nightly branch and "stable/cm-11.0" to the M snapshot releases?
Click to expand...
Click to collapse
mostly...cm-11.0 referred to current branch i.e. nightly releases build on this and there are release branches in tags in cyanogenmod repo those are snapshots.
stable/cm-11.0 is a snapshot release branch.
shipping/cm-11.0 is final stable branch.

k2wl said:
stable/cm-11.0 is a snapshot release branch.
Click to expand...
Click to collapse
While the project tree remains the same for stable/cm-11.0 in between M releases, I witnessed changes to some projects themselves. What are those changes? Bug fixes?
And as there are changes, I assume it is impossible to build a replica of an M release if you haven't fetched the sources in the very right moment of the release!?

aguaz said:
While the project tree remains the same for stable/cm-11.0 in between M releases, I witnessed changes to some projects themselves. What are those changes? Bug fixes?
And as there are changes, I assume it is impossible to build a replica of an M release if you haven't fetched the sources in the very right moment of the release!?
Click to expand...
Click to collapse
now cm is in m release mode i.e m for monthly stable builds.
so for if you build in that month then it is still that month's m release

k2wl said:
so for if you build in that month then it is still that month's m release
Click to expand...
Click to collapse
Not exactly. As mentioned above, the project tree does not change (no additions or removals), but projects themselves do get updates.
Is there a snapshot that refers to the actual release?

@aguaz
i am not understanding what exactly your point???
look in cm projects..there is branch called stable/cm-11.0 it is snapshot release branch as far as i know.
it almost get updated every month. look in the history of the branches..
like in the manifest.xml
in stable branch
<default revision="refs/heads/stable/cm-11.0" remote="github" sync-c="true" sync-j="4" />
Click to expand...
Click to collapse
and in regular cm-11.0
<default revision="refs/heads/cm-11.0" remote="github" sync-c="true" sync-j="4" />
Click to expand...
Click to collapse
that way stable releases are on stable branches and nightlies are in cm-11.0 current branch.
i hope i make my point clear..

OK, I try to make myself more clear:
I'm solely talking about the release tree "stable/cm-11.0". Every blue moon or so a new stable tree is merged and an "M" snapshot build and released. That tree does not change until the next release in terms of that there are no additions or removals of projects.
However projects themselves do receive updates during that time. See for example the ongoing commits to android_frameworks_base. I assume those are only bug fixes!?
For whatever reason the builds are not updated, but the source is.
So I was wondering if there is a snapshot of the stable/cm-11.0 tree available that actually refers to the state of the release.

@aguaz
ya bug fixes are coming in all the time.
to get the snapshot tree at that given time go in the releases tab on github and sync that
like https://github.com/CyanogenMod/android/releases

k2wl said:
to get the snapshot tree at that given time go in the releases tab on github and sync that
like https://github.com/CyanogenMod/android/releases
Click to expand...
Click to collapse
Those refer to the shipping/cm-11.0 tree, but this branch also got updated after the build release. Not even all cm projects have a shipping branch!? Also there are just 3 releases for cm-11.0, but meanwhile M10 has already been merged!
Not sure what the shipping tree is good for, but it doesn't seem to refer to the snapshot of the M releases.
Have you used repo's snapshot function? I'm wondering if such a snapshot is taken when the M releases are build and if they are available.
Another topic:
I see you've removed "patches/common/device_samsung_serrano-common" stating it has been added in main source. Which source are you referring to? It doesn't seem to be CyanogenMod/android_device_samsung_serrano-common itself.

Related

Compiling CM12 for G2

Hi guys! I've worked in several stock ROM projects, but I never learned how to build roms from source, I dont know why. Yesterday, I read some threads, and installed Ubuntu 14.04 in my lap. I am following the following threads to compile CM12:
Compiling CM12 for Moto G
Official CM12 Compiling guide
I started the first one, which I think is very clear, but when I arrive to this I have to stop:
Once all that stuff's over, create a folder called
Code:
local_manifests
in the .repo folder, and then make a new file in that folder called
Code:
roomservice.xml
open roomservice.xml using gedit, and add the following:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_motorola_falcon" path="device/motorola/falcon" remote="github" revision="cm-12.0"/>
<project name="CyanogenMod/android_device_motorola_msm8226-common" path="device/motorola/msm8226-common" remote="github" revision="cm-12.0"/>
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-12.0"/>
<project name="CyanogenMod/android_kernel_motorola_msm8226" path="kernel/motorola/msm8226" remote="github" revision="cm-12.0"/>
<project name="TheMuppets/proprietary_vendor_motorola" path="vendor/motorola" remote="github" revision="cm-12.0"/>
</manifest>
Click to expand...
Click to collapse
Obviously, that code is for Moto G, but I don't know what should I write in that file. I found a thread in G2 section with the same question, but the OP had no answer.
Then I switched to the official thread trying to find some information. About local manifests it says:
After the source downloads, ensure you are in the root of the source code (cd ~/android/system), then type:
Code:
$ source build/envsetup.sh
$ breakfast d802
This will download the device specific configuration and kernel source for your device. An alternative to using the breakfast command is to build your own local manifest. To do this, you will need to locate your device on CyanogenMod's GitHub and list all of the repositories defined in cm.dependencies in your local manifest.
Click to expand...
Click to collapse
Then I went to d802 github and located the cm.dependencies. Is that what I have to copy into the roomservice.xml file? Is this another way of preparing specific-device code?
If u know any other more comprehensive guide for d802 I would thank u so much if u could share with me. Any help is thanked.
------------------------- EDIT 1 -------------------------
I found this on a similar thread to mine in G2 subforum. Will be enough to paste it in roomservice.xml?
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
# Device Specific part
<project path="device/lge/d802" name="CyanogenMod/android_device_lge_d802" revision="cm-12.0" remote="github" />
<project path="device/lge/g2-common" name="CyanogenMod/android_device_lge_g2-common" revision="cm-12.0" remote="github" />
<project path="kernel/lge/msm8974" name="CyanogenMod/android_kernel_lge_msm8974" revision="cm-12.0" remote="github" />
<project path="vendor/lge" name="TheMuppets/proprietary_vendor_lge" revision="cm-12.0" remote="github" />
</manifest>
Thanks man!

[Q] How to compile from source a S3Neo ROM?

Hi all,
I've already read all the useful posts on XDA to build up a ROM, I've built rom for P990 with success some times ago.
Now I'm trying to build a CM12 rom and kernel for our S3 Neo but something goes wrong.
Anyone of our developers could explain me what kinds of commands we need to write to build up with success?
this is my first test on a Samsung and I already hate it, not an help or tutorial on a samsung devs forum (stupid forum, of course).
I've tried to build up only a kernel with Google chains 4.6 with those commands:
Code:
make ARCH=arm CROSS_COMPILE=pathofmycompiler
next:
Code:
make msm8226_defconfig VARIANT_DEFCONFIG=msm8226-sec_s3ve3g_defconfig
It builds a config files:
Next i lauch:
Code:
make -j4
and lots of error... ok, fix it, make a clean and retry... build a zimage, test it and.. doesn't work.
Where I'm wrong? Anyone could post a complete tutorial to build from source for our phone? :crying:
sev3n1985 said:
Hi all,
I've already read all the useful posts on XDA to build up a ROM, I've built rom for P990 with success some times ago.
Now I'm trying to build a CM12 rom and kernel for our S3 Neo but something goes wrong.
Anyone of our developers could explain me what kinds of commands we need to write to build up with success?
this is my first test on a Samsung and I already hate it, not an help or tutorial on a samsung devs forum (stupid forum, of course).
I've tried to build up only a kernel with Google chains 4.6 with those commands:
Code:
make ARCH=arm CROSS_COMPILE=pathofmycompiler
next:
Code:
make msm8226_defconfig VARIANT_DEFCONFIG=msm8226-sec_s3ve3g_defconfig
It builds a config files:
Next i lauch:
Code:
make -j4
and lots of error... ok, fix it, make a clean and retry... build a zimage, test it and.. doesn't work.
Where I'm wrong? Anyone could post a complete tutorial to build from source for our phone? :crying:
Click to expand...
Click to collapse
You have dowloaded cm12 right with all s3 neo specific?
to run buld go :
source build/envsetup.sh
breakfast "device code name chose one from list"
for full build chose : brunch grouper
for kernel only with ramdisk(to make boot.img) : make bootimage
fi you need more contact me
n1kolaa said:
You have dowloaded cm12 right with all s3 neo specific?
to run buld go :
source build/envsetup.sh
breakfast "device code name chose one from list"
for full build chose : brunch grouper
for kernel only with ramdisk(to make boot.img) : make bootimage
fi you need more contact me
Click to expand...
Click to collapse
Tnks man, i would compile only kernel because i haven't ever compiled a CM and i know only something about kernel modding.
So i need to compile all?
sev3n1985 said:
Tnks man, i would compile only kernel because i haven't ever compiled a CM and i know only something about kernel modding.
So i need to compile all?
Click to expand...
Click to collapse
no. if you have cm mainfest i tell you how to compile only kernel and that is easyest whay and best whay
ok, after 7 hours now i have cm12 source code, i've launched breakfast the code name but obviously not found.
So i need to create the local_manifest.xml under .repo/local_manifest.xml :
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="MSM8226-Samsung/android_kernel_samsung_s3ve3g.git" path="/kernel/samsung/s3ve3g" remote="github" revision="cm-12.0"/>
<project name="MSM8226-Samsung/android_device_samsung_s3ve3g.git" path="/device/samsung/s3ve3g" remote="github" revision="cm12.0" />
<project name="MSM8226-Samsung/android_device_samsung_msm8226-common.git" path="/device/samsung/msm8226-common" remote="github" revision="cm12.0"/>
<project name="MSM8226-Samsung/android_vendor_samsung_s3ve3g.git" path="/vendor/samsung/s3ve3g" remote="github" revision="cm-12.0"/>
<project name="MSM8226-Samsung/proprietary_vendor_samsung.git" path="vendor/samsung" remote="github" revision="cm12.0"/>
</manifest>
I've some problems to identify the correct paths, could you see if all are correctly?
Compiled but when make the zimage a stupid error
Export includes file: external/compiler-rt/Android.mk -- /home/antonio/cm12/out/target/product/s3ve3g/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/export_includes
make: *** Nessuna regola per generare l'obiettivo "/home/antonio/cm12/out/target/product/s3ve3g/obj/STATIC_LIBRARIES/libinit_msm_intermediates/export_includes", necessario per "/home/antonio/cm12/out/target/product/s3ve3g/obj/EXECUTABLES/init_intermediates/import_includes". Arresto.
#### make failed to build some targets (30:53 (mm:ss)) ####
Any solution?

[GUIDE] [mini] CM13 for Z4/Z3+ build

In a nutshell you do the steps
- unlock your bootloader
- backup your DRM (if available and possible on the Z4/Z3+)
You follow steps 4 to 4.6 of
https://wiki.cyanogenmod.org/w/Build_for_angler#Build_CyanogenMod_and_CyanogenMod_Recovery
(that is the entry for the Nexus 6P)
you go into ~/android/system/
or the folder you named it
Code:
cd .repo
mkdir local_manifests
copy over the lines from
https://github.com/SonyAosp/device_sony_ivy/blob/e97659de9c044e56fabe25cf1dfdac44b27131de/README.md
into e.g.
ivy.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!--Please do not manually edit this file-->
<manifest>
<project name="SonyAosp/device-sony-ivy" path="device/sony/ivy" remote="github" revision="cm-13.0" />
<project name="SonyAosp/device-sony-kitakami" path="device/sony/kitakami" remote="github" revision="cm-13.0" />
<project name="SonyAosp/device-sony-common" path="device/sony/common" remote="github" revision="cm-13.0" />
<project name="SonyAosp/camera" path="hardware/sony/camera" remote="github" revision="cm-13.0" />
<project name="SonyAosp/kernel" path="kernel/sony/msm" remote="github" revision="mm-6.0" />
<project name="sonyxperiadev/thermanager" path="hardware/sony/thermanager" remote="github" revision="master" />
<project name="sonyxperiadev/timekeep" path="hardware/sony/timekeep" remote="github" revision="master" />
<project name="sonyxperiadev/macaddrsetup" path="hardware/sony/macaddrsetup" remote="github" revision="master" />
<project name="SonyAosp/platform_hardware_sony_init" path="hardware/sony/init" remote="github" revision="mm-6.0" />
<project name="SonyAosp/vendor_qcom_opensource_dataservices" path="hardware/sony/opensource/dataservices" remote="github" revision="mm-6.0" />
<project name="SonyAosp/platform_vendor_qcom" path="vendor/qcom" remote="github" revision="mm-6.0" />
<project name="SonyAosp/platform_vendor_sony" path="vendor/sony" remote="github" revision="mm-6.0" />
<project name="SonyAosp/platform_vendor_qcom_proprietary" path="vendor/qcom/proprietary" remote="github" revision="mm-6.0" />
</manifest>
then do a
Code:
repo sync
again
and you should be good to go with something like
Code:
source build/envsetup.sh
lunch cm_ivy-userdebug
mka clobber && mka bacon
Troubleshooting:
Running Python >=2.7 ?
install python 2.7
then
Code:
export EPYTHON=python2.7
Running a Linux distribution with "Umlauts" and other European gibberish locale (de, fr, etc.)
Code:
export LC_ALL=C
Running a bleeding edge Linux distribution which only has ncurses >=6.0 ?
extract and/or build ncurses 5.9 (64bit) locally and copy it e.g. to ~/aosp/ncurses/lib64/
then
Code:
export LD_LIBRARY_PATH=~/aosp/ncurses/lib64/
Have a nice day
I am waiting for my device from repair, motherboard is going to be changed. Not sure I will be able to unlock bootloader or not but surely would love to try this and run an aosp rom on my device.
Thanks for this guide.
I followed your guide and building the ROM worked like a charm (compiling took like 2:15h in an Ubuntu 15.10 VM). Installing also worked without any problems so far, thank you soooooo much for this!
I tried following the guide on the Sony page, which always made problems for me (either compiling didn't work or the ROM wouldn't boot).
Thomas231 said:
I followed your guide and building the ROM worked like a charm (compiling took like 2:15h in an Ubuntu 15.10 VM). Installing also worked without any problems so far, thank you soooooo much for this!
I tried following the guide on the Sony page, which always made problems for me (either compiling didn't work or the ROM wouldn't boot).
Click to expand...
Click to collapse
Glad it worked flawless
What is the ROM status ? Working and not working list plz ?
Thanks
Right now the only issue I know of is the camera issue which is present on all AOSP-based ROMs using the open source driver (and even the stock ROM, at least for me).
I'm trying to build cm-13 using this manifest doesn't work. mm-6.0 is not present on some of the sony repos. Anyone face this issue ? repo sync fails.

Help Building Lineage OS

I've tried compiling a lineageos 16 rom from source for the H990ds, but it is stuck at the bootlogo. I was wondering if any of you could help me enable the kernel log/console on the screen (console=tty0) or via the usb ((serial) console=ttyMSM2,115200n8). A few links: http://bootloader.wikidot.com/linux:android:serial
https://forum.xda-developers.com/showthread.php?t=829817
I tried a few things, but this is what I have now:
Code:
CONFIG_CMDLINE_FORCE=y
CONFIG_CMDLINE="console=tty0 console=ttyMSM2,115200n8"
CONFIG_SERIAL_MSM=y
CONFIG_SERIAL_MSM_CONSOLE=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_FONTS=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
CONFIG_VT=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
and commenting out this line:
Code:
CONFIG_CMDLINE="console=ttyAMA0"
in the arch/arm64/configs/defconfig file, but all with no success.
I was hoping I could get some more information on why it won't boot via the console, but now I'm stuck.
I tried cat /proc/cmdline to see if it anything happened at all there, but it hasn't changed a thing after adding those lines above.
cmdline:
Code:
androidboot.bl_unlock_complete=false androidboot.authorized_kernel=true sched_enable_hmp=1 sched_enable_power_aware=1 app_setting.use_32bit_app_setting=1 kpti=1 console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 user_debug=31 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 [email protected] androidboot.hardware=elsa androidboot.bootdevice=624000.ufshc androidboot.selinux=permissive buildvariant=eng lge.rev=rev_10 model.name=LG-H990 lge.bootreason=recovery cc_mode=0 kswitch lge.bootreasoncode=0x77665502 bootcable.type=400MA lge.battid=SW3800_VC1 androidboot.dlcomplete=0 androidboot.ddr_size=4294967296 androidboot.ddr_info=0x1 lge.crash_handler=on lge.hreset=off boot_cpus=0-3 androidboot.revision=12 androidboot.verifiedbootstate=green androidboot.rpmb_state=1 androidboot.bootdevice=624000.ufshc androidboot.serialno=LGH990be84e8c0 qpnp-power-on.warm_boot=1 gpt lge.signed_image=true androidboot.baseband=msm mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_sw49407_dsc_qhd_cmd:config1:1:none:cfg:single_dsi
As you can see, it still says "console=ttyHSL0,115200,n8"
I guess I'm doing something wrong here?
I'm an amature and am completely unfamiliar with kernel coding.
Edit: I'm using the "default" msm8996 Lineage 16.0 kernel.
Edit 2: Pstore could be an alternative to what I am trying to achieve here, but yet again, I have no idea how and where to enable that. I found this https://github.com/CyanogenMod/andr...mmit/17a8ee52fac02b9ec4e8c958ed1ec70bcf2156eb but it's also a mystery to me.
BTW. How would you normally debug a build of a rom or kernel if the system does not boot?
Where did you get the source for Lineage 16 on the H990DS? From my knowledge the only LG device that has it is the G3(though I might be wrong). But in any case, you might want to ask @x86cpu since he's probably the most familiar here with building Lineage on this phone.
Ak7J4 said:
Where did you get the source for Lineage 16 on the H990DS? From my knowledge the only LG device that has it is the G3(though I might be wrong). But in any case, you might want to ask @x86cpu since he's probably the most familiar here with building Lineage on this phone.
Click to expand...
Click to collapse
All I did was initialise my dir with branch lineage-16.0 with fallback branch lineage-15.1
This is my local_manifest.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="LineageOS/android_device_lge_h990" path="device/lge/h990" remote="github" revision="lineage-15.1" />
<project name="LineageOS/android_device_lge_v20-common" path="device/lge/v20-common" remote="github" revision="lineage-15.1" />
<project name="LineageOS/android_device_lge_msm8996-common" path="device/lge/msm8996-common" remote="github" />
<project name="LineageOS/android_device_lge_common" path="device/lge/common" remote="github" />
<project name="LineageOS/android_kernel_lge_msm8996" path="kernel/lge/msm8996" remote="github" />
<project name="TheMuppets/proprietary_vendor_lge" path="vendor/lge" remote="github" />
</manifest>
You are right that the h990 and v20-common repo's don't have a 16.0 branch yet. I noticed that aswell, but you never know for sure that it won't work until you try.
I have commented stuff out, and added/moved lines/files to get at least a 'successful' build.
All the changes made to the source are in the attached diff.txt.
Migush said:
All I did was initialise my dir with branch lineage-16.0 with fallback branch lineage-15.1
This is my local_manifest.xml
You are right that the h990 and v20-common repo's don't have a 16.0 branch yet. I noticed that aswell, but you never know for sure that it won't work until you try.
I have commented stuff out, and added/moved lines/files to get at least a 'successful' build.
All the changes made to the source are in the attached diff.txt.
Click to expand...
Click to collapse
All devices have a lineage-16.0 branch. I created them Monday. If it gets sucks at the boot logo, it's something in the kernel in the .dtsi area. Also you cannot upgrade from 15.1 without wiping. There are also changes in 16.0 that you have to pick since they are not merged yet, they stay un-merged until it's validated they work.
You shouldn't have to comment anything out. I do know there are changes for lineage-16.0 needed for the msm8996-common area to even get past the initial make. I had to upgrade my entire build environment due to changes in the pie compiles. Still working on getting a first build.
Surprising
To see someone actually building android pie for the LG V20 is surprising, just wanted to say thanks for all your effort into making this a possibility.
That's the command line from the recovery kernel, not the one you built.
Code:
lge.bootreason=recovery
I've never tried to build lineage or debug an android kernel, but I don't think your kernel is getting loaded. Having console output probably isn't going to help you, unless you can get it from aboot.
If you want to read console output just for fun once your kernel boots, you could try ' CONFIG_CMDLINE="console=tty0 console=ttyAMA0" ' and hope it prints to the screen. Also, the serial console isn't going to help unless you have the phone opened up with probes for UART, a serial cable, etc. I don't know if qualcomm drivers support serial over USB, but that would be the way to go if they do. You could also try using netconsole, though it requires a little bit of extra setup.
x86cpu said:
Still working on getting a first build.
Click to expand...
Click to collapse
This. This makes me very happy :highfive:

Lineage 15.1 Build For Athene: Multiple Errors

Hello developers!
I am a newbie to XDA and also a newbie to ROM development, so if I am doing anything wrong, please do tell me. I own a Motorola Moto G4 Plus and I am very ready to invest as much time as needed in building and creating ROMs for this phone.
I am currently building LineageOS for this phone, and once that is done, I want to try my hand at porting Lineage 16 to this device. I had recently successfully built the cm-14.1 branch for this device (which seems to be the only official build for athene, see the LineageOS Wiki https:// wiki.lineageos.org/ devices/athene/ build#initialize-the-lineageos-source-repository). Now, I downloaded the code for LineageOS 15.1 onto my Linux computer (running Ubuntu 19.04) and have tried to build it.
Steps I took to build -
- Initialised repo with repo init.
- Synced the repository to my Linux computer with
Code:
repo sync -c --no-tags --no-clone-bundle -j24
- Created .repo/local_manifests/roomservice.xml for the device tree, kernel, etc. with the following content:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="LineageOS/android_device_motorola_athene" path="device/motorola/athene" remote="github" revision="lineage-15.0" />
<project name="LineageOS/android_kernel_motorola_msm8952" path="kernel/motorola/msm8952" remote="github" revision="lineage-15.0" />
<project name="TheMuppets/proprietary_vendor_motorola" path="vendor/motorola" remote="github" revision="lineage-15.0" />
<project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" revision="lineage-15.0" />
<project name="LineageOS/android_external_bson" path="external/bson" remote="github" />
<project name="LineageOS/android_external_stlport" path="external/stlport" remote="github" />
<project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" />
</manifest>
- Ran
Code:
repo sync -c -j24
- Then ran
Code:
export ROOMSERVICE_BRANCHES="lineage-15.0"
to specify a fallback branch
- Ran
Code:
source build/envsetup.sh
- Ran
Code:
breakfast athene
The command ran successfully, no errors until now.
- Then ran
Code:
brunch athene
This is where the problems started popping up. I got errors while building in the following places -
(Treat .(dot) as my source dir)
ERROR 1 - In out/soong/make-vars(don't remember correct file name) - Still get it after
Code:
make clobber[\CODE], I have to always comment line 692 which throws the my-check error to suppress it.
ERROR 2 - Couple of old CyanogenMod dependencies and packages which I managed to get past after messing about with the ./device/motorola/athene/BoardConfig.mk file.
ERROR 3 - Errored out because BOARD_KERNEL_IMAGE_NAME was not defined, finally found an old XDA thread for the 15.1 ROM that told me that I had to set that to zImage in device/motorola/athene/BoardConfig.mk
ERROR 4 - In file ./system/core/init/init.h - Could not find <android-base/chrono_utils.h>, Could not find <selinux/label.h> - Got rid of it by putting in relative file paths and also modifying the ./system/core/init/Android.mk's LOCAL_C_INCLUDES to have relative file paths.
ERROR 5 - In file system/core/adb/daemon/main.cpp, system/core/base/include/android-base/macros.h: Cannot identify arraysize(groups).
ERROR 6 - In file system/core/adb/daemon/main.cpp - Use of undeclared identifier 'AID_UHID'
I can try to fix these errors, but I feel that there must be some branch/fork of the LOS15.1 code that must have all these issues fixed. If anyone has any pointers regarding this or the errors, I would be very grateful.
Thanks in advance,
gamemaker1
I don't believe Lineage 15 or 15.1 ever made it to official status. LOS 14.1 was the last official rom for athene that I know of. You might take a look at this roomservice file and other noteworthy things.
https://forum.xda-developers.com/showpost.php?p=81772343&postcount=348
I've just started building myself and have built LOS 14.1 for a couple unsupported devices (atrix hd and razr hd). Also just started trying to build 16.0 for the old Razr HD but have quite a task ahead of me. Hope the link helps and good luck.
Wheels564 said:
I don't believe Lineage 15 or 15.1 ever made it to official status. LOS 14.1 was the last official rom for athene that I know of. You might take a look at this roomservice file and other noteworthy things.
https://forum.xda-developers.com/showpost.php?p=81772343&postcount=348
I've just started building myself and have built LOS 14.1 for a couple unsupported devices (atrix hd and razr hd). Also just started trying to build 16.0 for the old Razr HD but have quite a task ahead of me. Hope the link helps and good luck.
Click to expand...
Click to collapse
Ok, thanks! I just saw the link, it seems good. Will try it out today and let you know the result.
@Wheels564 Thanks a lot! You really made my day - the extra dependencies in the roomservice.xml got my build done in less than 40 minutes.
From here, I want to get (LOS 15.1 with some extra features of mine, maybe I could cherry pick some features from HavocOS or AEX) an official build out, maybe become an official contributor. If you have any tips about this, please do let me know.
Once again, thanks a ton for your timely help!
Regards,
gamemaker1
gamemaker1 said:
@Wheels564 Thanks a lot! You really made my day - the extra dependencies in the roomservice.xml got my build done in less than 40 minutes.
From here, I want to get (LOS 15.1 with some extra features of mine, maybe I could cherry pick some features from HavocOS or AEX) an official build out, maybe become an official contributor. If you have any tips about this, please do let me know.
Once again, thanks a ton for your timely help!
Regards,
gamemaker1
Click to expand...
Click to collapse
No problem at all. The only thing about LOS 15.1 is that Lineage will never make it official. They've dumped all the rest of the phone on 15.1 because of repo changes I believe. Check here: https://review.lineageos.org/269773
I'm sure they will continue to submit security patches just like 14.1. Looks like the only way to become official is to jump to 16.1. It looks like developers have had issues with athene on LOS 16.1. Glad you were able to build the rom and good luck with future projects.

Categories

Resources