Hi all,
I'm trying to build CyanogenMod for intl G2 (the only change I've made is to add halo)
for the repo init I've done:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0 -g all,-notdefault,d802,lge
And then repo sync -j8
After that, like I've said, I've added halo.
And now I'm trying to build by doing:
Code:
$ source build/envsetup.sh
$ breakfast d802
but the only things I get is:
Code:
[email protected]:~/CM/G2# breakfast d802
including vendor/cm/vendorsetup.sh
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[device/lge/d802/cm.mk]]: "device/lge/g2-common/g2.mk" does not exist. Arrêt.
Device d802 not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Traceback (most recent call last):
File "build/tools/roomservice.py", line 76, in <module>
result = json.loads(urllib.request.urlopen(githubreq).read().decode())
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 403: Forbidden
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[device/lge/d802/cm.mk]]: "device/lge/g2-common/g2.mk" does not exist. Arrêt.
** Don't have a product spec for: 'cm_d802'
** Do you have the right repo manifest?
I don't understand because when I take a look to device, there is no lge/d802 directory. By doing the init command, I would have to download specific files
also lunch and breakfast command gave me the same error...
Do you have an idea where I'm wrong and what can I do ? I think I've to download device specific files but how can I do this (if this is the error), normally before building, the files are downloaded ? I don't see...
Thanks in advance !
Up, if someone can help me :fingers-crossed:
I have the same problem, someone can help?
Related
Introduction
If you have tried to build Android on systems other than Ubuntu (or Ubuntu based systems) you may have noticed, that there are pretty much no guides for other systems.
I finally set up my openSuSE to build CM9 successfully, and would like to share the process with you.
I will also try to adopt this guide for CM10 if i find the time.
If you find mistakes feel free to post them here or PM me.
Contents
Requirements
About this guide
Install "Oracle JDK"
Install other needed packages
Install "make 3.81"
Install "Android SDK"
Set up source directories
Set up "repo"
Set up repositories
Update source code
Update device specific source code
Copy proprietary files
Download prebuilts
Build CyanogenMod 9
Done!
Possible build errors on openSuSE
Credits
1. Requirements
openSuSE 12.1 64bit (may work on other versions too)
a good internet connection
as much RAM as possible (at least 2GB to finish a build, but that will take very, very long.)
patience
common sense
Note: I did all this in a virtual machine, but i highly recommend installing Linux on your hardware. Building Android takes a long time even on high end hardware.
2. About this guide
Lines beginning with '$' are supposed to be entered in shell (without the $ sign).
File names are bold.
This guide assumes that you set up the sources at ~/android/system/. Feel free to change that.
bacon = device name (e.g. i9300 for Samsung Galaxy SIII I9300. See CyanogenMod Homepage for other devices.)
3. Install "Oracle JDK"
Download latest jdk-6uXX-linux-x64-rpm.bin from http://www.oracle.com/technetwork/java/javase/downloads/jdk6-downloads-1637591.html
$ <downloadfolder>/jdk-6uXX-linux-x64-rpm.bin -x
Open <downloadfolder> in your file manager
Right click jdk-6uXX-linux-x64-rpm -> open with -> Install Software
YaST Software Manager will open up.
DON'T click accept yet.
Search for openJDK and check uninstall for ALL openJDK packages.
DON'T click accept yet, go to next chapter.
4. Install other needed packages
Search and install following packages with YaST
git
gnupg
flex
bison
gperf
SDL-devel
esound-devel
wxGTK-devel
zip
curl
ncurses-devel
ncurses-devel 32bit
zlib-devel
zlib-devel 32bit
gcc-c++
glibc-devel 32bit
libstdc++ 32bit
mesa libs
Now click accept.
5. Install "make 3.81"
Note: Other versions won't work.
Download source from http://ftp.gnu.org/gnu/make/make-3.81.tar.gz.
Extract downloaded file.
$ cd <extracted folder>
$ ./configure
$ make
$ make install
6. Install "Android SDK"
Note: This is pretty straightforward. I will add this section later.
7. Set up source directories
$ mkdir ~/android
$ mkdir ~/android/system
$ mkdir ~/android/cache
8. Set up "repo"
Note: "repo" is a tool by Google, created to make access to git and gerrit very, very easy.
$ mkdir ~/bin
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Open ~/.bashrc in a file editor (e.g. kwrite)
Add the following line:
PATH=~/bin:$PATH
Save and close.
Close your shell and re-open it.
9. Set up repositories
$ cd ~/android/system
$ repo init -u git://github.com/CyanogenMod/android.git -b ics
10. Update source code
$ cd ~/android/system
$ repo sync -jX
X = number of connections. Try X = 1 if there are problems downloading.
This will take a while.
11. Update device specific source code
$ cd ~/android/system
$ . build/envsetup.sh && breakfast bacon
12. Copy proprietary files
Note: This only needs to be run once. You will need CyanogenMod 9 running on the device you are building for to complete this.
Connect the phone via USB.
Install USB drivers to get ADB access.
$ cd ~/android/system/device/<manufacturer>/<devicename>
$ ./extract-files.sh
13. Download prebuilts
$ ~/android/system/vendor/cm/get-prebuilts
14. Build CyanogenMod 9
$ ~/android/system
$ . build/envsetup.sh && brunch bacon
15. Done!
You now should have a CWM-flashable .zip file ~/android/system/out/target/product/maguro/cm-9-XXXXX-UNOFFICIAL-bacon.zip.
16. Possible build errors on openSuSE
Because Ubuntu is based on Debian and openSuSE is based on Slackware, you will probable get some build errors. In post 2 is a list of errors that can occur and how to fix them.
Credits
CyanogenMod Team
CyanogenMod Wiki
The Software Rouge (http://thesoftwarerogue.blogspot.de/2011/11/building-android-ics-ice-cream-sandwich.html)
Note: I got the fixes for build errors from some page in Google Groups. I can't find it anymore. If someone finds it, please PM me.
Possible build errors on openSuSE
Note: I used kwrite as text editor. To use another, just change kwrite to whatever editor you want to use.
Note: Open shell and got to ~/android/system
Error 1
make gets killed at some point
Fix: you need more RAM to finish the build.
Error 2
Code:
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base ‘android::KeyedVector<android::String8, android::sp<AaptDir> >’ are not found by unqualified lookup
frameworks/base/include/utils/KeyedVector.h:193:31: note: use ‘this->indexOfKey’ instead
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/AaptAssets.o] Error 1
Fix:
$ kwrite frameworks/base/tools/aapt/Android.mk
Add '-fpermissive' to line 31:
LOCAL_CFLAGS += -Wno-format-y2k -fpermissive
Error 3
Code:
frameworks/base/include/utils/KeyedVector.h:193:31: error: ‘indexOfKey’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base ‘android::KeyedVector<android::String8, android::wp<android::AssetManager::SharedZip> >’ are not found by unqualified lookup
frameworks/base/include/utils/KeyedVector.h:193:31: note: use ‘this->indexOfKey’ instead
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/AssetManager.o] Error 1
Fix:
$ kwrite frameworks/base/libs/utils/Android.mk
Add '-fpermissive' to line 64:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
Error 4
Code:
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:136:11: note: use ‘this->SetState’ instead
make: *** [out/host/linux-x86/obj/EXECUTABLES/grxmlcompile_intermediates/grxmlcompile.o] Error 1
Fix:
$ cd external/srec
$ wget "https://github.com/CyanogenMod/android_external_srec/commit/4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff"
$ patch -p1 < 4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff
$ rm -f 4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff
$ cd ../..
Error 5
Code:
development/tools/emulator/opengl/host/tools/emugen/main.cpp:79:9: error: ‘optind’ was not declared in this scope
development/tools/emulator/opengl/host/tools/emugen/main.cpp:92:45: error: ‘optind’ was not declared in this scope
make: *** [out/host/linux-x86/obj/EXECUTABLES/emugen_intermediates/main.o] Error 1
Fix:
$ kwrite development/tools/emulator/opengl/host/tools/emugen/main.cpp
Add '#include <getopt.h>' to list of includes:
#include <getopt.h>
Error 6
Code:
host C++: liboprofile_pp <= external/oprofile/libpp/arrange_profiles.cpp
In file included from external/oprofile/libpp/arrange_profiles.cpp:24:0:
external/oprofile/libpp/format_output.h:94:22: error: reference ‘counts’ cannot be declared ‘mutable’ [-fpermissive]
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/liboprofile_pp_intermediates/arrange_profiles.o] Error 1
Fix:
$ kwrite external/oprofile/libpp/format_output.h
Remove 'mutable' from 'mutable counts_t & counts;' on line 94:
counts_t & counts;
Error 7
Code:
development/tools/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.cpp:345:65: required from here
frameworks/base/include/utils/KeyedVector.h:193:31: error: ‘indexOfKey’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base ‘android::KeyedVector<unsigned int, ShaderData*>’ are not found by unqualified lookup
frameworks/base/include/utils/KeyedVector.h:193:31: note: use ‘this->indexOfKey’ instead
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libOpenglCodecCommon_intermediates/GLSharedGroup.o] Error 1
Fix:
$ kwrite development/tools/emulator/opengl/Android.mk
Add '-fpermissive' to line 25:
EMUGL_COMMON_CFLAGS := -DWITH_GLES2 -fpermissive
Error 8
Code:
/usr/bin/ld: note: 'XInitThreads' is defined in DSO /lib/libX11.so.6 so try adding it to the linker command line
/lib/libX11.so.6: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_renderer_intermediates/emulator_renderer] Error 1
Fix:
$ kwrite development/tools/emulator/opengl/host/renderer/Android.mk
Add new entry 'LOCAL_LDLIBS += -lX11' after line 6 as shown:
LOCAL_SRC_FILES := main.cpp
LOCAL_CFLAGS += -O0 -g
LOCAL_LDLIBS += -lX11
#ifeq ($(HOST_OS),windows)
#LOCAL_LDLIBS += -lws2_32
Error 9
Code:
external/llvm/include/llvm/ADT/PointerUnion.h:56:10: error: enumeral mismatch in conditional expression: ‘llvm::PointerLikeTypeTraits<llvm::PointerUnion<clang::Stmt*, const clang::Type*> >::<anonymous enum>’ vs ‘llvm::PointerLikeTypeTraits<clang::eek:bjCInterfaceDecl*>::<anonymous enum>’ [-Werror]
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs.o] Error 1
Fix:
$ kwrite frameworks/compile/slang/Android.mk
Remove '-Werror' from line 22:
local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter
Error 10
Code:
frameworks/base/libs/rs/rsFont.cpp:224:76: required from here
frameworks/base/include/utils/KeyedVector.h:193:31: error: ‘indexOfKey’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base ‘android::KeyedVector<unsigned int, android::renderscript::Font::CachedGlyphInfo*>’ are not found by unqualified lookup
frameworks/base/include/utils/KeyedVector.h:193:31: note: use ‘this->indexOfKey’ instead
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libRS_intermediates/rsFont.o] Error 1
Fix:
$ kwrite frameworks/base/libs/rs/Android.mk
Add '-fpermissive' to line 183:
LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable -fpermissive
Error 11
Code:
external/mesa3d/src/glsl/linker.cpp:1394:49: error: expected primary-expression before ‘,’ token
......
external/mesa3d/src/glsl/linker.cpp:1734:59: error: ‘offsetof’ was not declared in this scope
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libMesa_intermediates/src/glsl/linker.o] Error 1
Fix:
$ kwrite external/mesa3d/src/glsl/linker.cpp
Add '#include <stddef.h>' to list of includes as shown:
#include <climits>
#include <stddef.h>
#include <pixelflinger2/pixelflinger2_interface.h>
Error 12
Code:
external/gtest/src/../include/gtest/gtest-param-test.h:287:58: note: ‘template<class Container> testing::internal::ParamGenerator<typename Container::value_type> testing::ValuesIn(const Container&)’ declared here, later in the translation unit
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libgtest_host_intermediates/gtest-all.o] Error 1
Fix 1:
$ kwrite external/gtest/src/Android.mk
Add '-fpermissive' to lines 52 and 70 (both lines contain same info)
LOCAL_CFLAGS += -O0 -fpermissive
Fix 2:
$ kwrite external/gtest/include/gtest/internal/gtest-param-util.h
Add '#include <stddef.h>' to list of includes as shown:
#include <vector>
#include <stddef.h>
#include <gtest/internal/gtest-port.h>
Error 13
Code:
frameworks/compile/slang/slang_rs_export_foreach.cpp: In static member function ‘static slang::RSExportForEach* slang::RSExportForEach::Create(slang::RSContext*, const clang::FunctionDecl*)’:
frameworks/compile/slang/slang_rs_export_foreach.cpp:249:23: error: variable ‘ParamName’ set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs_export_foreach.o] Error 1
Fix:
$ kwrite kwrite frameworks/compile/slang/Android.mk
change
local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter -Werror
to
local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter
reserved #2
Wish somebody would build for the LG optimistic logic
Sent from my LGL35G using xda premium
Ive been trying to build it for the last 3 days and been running into errors and fixing some of them.
here is the latest error. I have no clue :
http://paste.omnirom.org/view/fe1c8798 (too long to i decided to paste errors here).
I also get this trying to sync repo:
Fetching projects: 100% (483/483), done.
Traceback (most recent call last):
File "/home/android/android/omni/.repo/repo/main.py", line 506, in <module>
_Main(sys.argv[1:])
File "/home/android/android/omni/.repo/repo/main.py", line 482, in _Main
result = repo._Run(argv) or 0
File "/home/android/android/omni/.repo/repo/main.py", line 161, in _Run
result = cmd.Execute(copts, cargs)
File "/home/android/android/omni/.repo/repo/subcmds/sync.py", line 669, in Execute
if self.UpdateProjectList():
File "/home/android/android/omni/.repo/repo/subcmds/sync.py", line 449, in UpdateProjectList
if project.IsDirty():
File "/home/android/android/omni/.repo/repo/project.py", line 637, in IsDirty
'--refresh')
File "/home/android/android/omni/.repo/repo/project.py", line 2533, in runner
p.stderr))
error.GitError: framework/base update-index: fatal: Not a git repository (or any of the parent directories): .git
look through official nightly?
fumes007 said:
Ive been trying to build it for the last 3 days and been running into errors and fixing some of them.
here is the latest error. I have no clue :
http://paste.omnirom.org/view/fe1c8798 (too long to i decided to paste errors here).
I also get this trying to sync repo:
Fetching projects: 100% (483/483), done.
Traceback (most recent call last):
File "/home/android/android/omni/.repo/repo/main.py", line 506, in <module>
_Main(sys.argv[1:])
File "/home/android/android/omni/.repo/repo/main.py", line 482, in _Main
result = repo._Run(argv) or 0
File "/home/android/android/omni/.repo/repo/main.py", line 161, in _Run
result = cmd.Execute(copts, cargs)
File "/home/android/android/omni/.repo/repo/subcmds/sync.py", line 669, in Execute
if self.UpdateProjectList():
File "/home/android/android/omni/.repo/repo/subcmds/sync.py", line 449, in UpdateProjectList
if project.IsDirty():
File "/home/android/android/omni/.repo/repo/project.py", line 637, in IsDirty
'--refresh')
File "/home/android/android/omni/.repo/repo/project.py", line 2533, in runner
p.stderr))
error.GitError: framework/base update-index: fatal: Not a git repository (or any of the parent directories): .git
Click to expand...
Click to collapse
why not use the official nightly as a base and check through bugs and fix. bluetooth isnt working for latest omnirom nightly from nov 18 2014. use it as reference.
halo12lol said:
why not use the official nightly as a base and check through bugs and fix. bluetooth isnt working for latest omnirom nightly from nov 18 2014. use it as reference.
Click to expand...
Click to collapse
Lol, I have grown further than I did when I posted this. ?
Hi XDA devs,
Building Ubuntu touch for Yureka so far
Yureka has Official cyanogenmod Rom.
Passed many errors, (Many to come ) but now i am stuck here
Code:
device/yu/tomato/charger/charger.c:49:25: fatal error: minui/minui.h: No such file or directory
compilation terminated.
cc1: warning: command line option ‘-Wsign-promo’ is valid for C++/ObjC++ but not for C [enabled by default]
host C: libsepol <= external/libsepol/src/avtab.c
build/core/binary.mk:512: recipe for target '/home/sheikh/touch/phablet/out/target/product/tomato/obj/EXECUTABLES/charger_mmx_intermediates/charger.o' failed
what i have
Code:
ubuntu system 14.10 64bit
Ubuntu touch phablet-4.4.2_r1 source code (with .repo folder 15GB)
android_kernel_yu_msm8916-cm-11.0
android_device_yu_tomato-cm-11.0
android_device_qcom_common-cm-11.0
if someone can tell me which file is supposed to be in 'vendorsetup.sh' (lunch menu)
i added this-:
add_lunch_combo full_tomato-userdebug (is this right file to be here ? )
and compilation started (with doubt )
HERE is
sources for Yureka are for 4.4.4 kitkat based cyanogenmod
but Ubuntu touch sources are like phablet-4.4.2_r1 !
Code:
repo init -u https://code-review.phablet.ubuntu.com/p/aosp/platform/manifest.git -b phablet-4.4.2_r1
sheikhrr said:
Hi XDA devs,
Building Ubuntu touch for Yureka so far
Yureka has Official cyanogenmod Rom.
Passed many errors, (Many to come ) but now i am stuck here
Code:
device/yu/tomato/charger/charger.c:49:25: fatal error: minui/minui.h: No such file or directory
compilation terminated.
cc1: warning: command line option ‘-Wsign-promo’ is valid for C++/ObjC++ but not for C [enabled by default]
host C: libsepol <= external/libsepol/src/avtab.c
build/core/binary.mk:512: recipe for target '/home/sheikh/touch/phablet/out/target/product/tomato/obj/EXECUTABLES/charger_mmx_intermediates/charger.o' failed
what i have
Code:
ubuntu system 14.10 64bit
Ubuntu touch phablet-4.4.2_r1 source code (with .repo folder 15GB)
android_kernel_yu_msm8916-cm-11.0
android_device_yu_tomato-cm-11.0
android_device_qcom_common-cm-11.0
if someone can tell me which file is supposed to be in 'vendorsetup.sh' (lunch menu)
i added this-:
add_lunch_combo full_tomato-userdebug (is this right file to be here ? )
and compilation started (with doubt )
HERE is
sources for Yureka are for 4.4.4 kitkat based cyanogenmod
but Ubuntu touch sources are like phablet-4.4.2_r1 !
Code:
repo init -u https://code-review.phablet.ubuntu.com/p/aosp/platform/manifest.git -b phablet-4.4.2_r1
Click to expand...
Click to collapse
lol ill also start my work when ill get replacement device
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
Hellow guys, i have an hP laptop with 16 gigs of ram and enough hdd space. also i am running xubuntu 16.04 where i was previously able to compile custom roms. however recently my hard drive had crashed and i had to recover using easeUS. then i formatted it to exFat. Xubuntu as such is giving me write operations on exFat devices. my problem is now whenever am using repo sync a custom rom source it gives error like
Code:
[email protected]:/media/ayan/Ayan/Mobile/mo/pixel$ repo init -u https://github.com/PixelExperience/manifest -b oreo-mr1
Get https://gerrit.googlesource.com/git-repo/clone.bundle
Get https://gerrit.googlesource.com/git-repo
remote: Finding sources: 100% (5/5)
remote: Total 5 (delta 0), reused 5 (delta 0)
Unpacking objects: 100% (5/5), done.
From https://gerrit.googlesource.com/git-repo
cf7c083..0f2e45a master -> origin/master
Get https://github.com/PixelExperience/manifest
Traceback (most recent call last):
File "/media/ayan/Ayan/Mobile/mo/pixel/.repo/repo/main.py", line 531, in <module>
_Main(sys.argv[1:])
File "/media/ayan/Ayan/Mobile/mo/pixel/.repo/repo/main.py", line 507, in _Main
result = repo._Run(argv) or 0
File "/media/ayan/Ayan/Mobile/mo/pixel/.repo/repo/main.py", line 180, in _Run
result = cmd.Execute(copts, cargs)
File "/media/ayan/Ayan/Mobile/mo/pixel/.repo/repo/subcmds/init.py", line 399, in Execute
self._SyncManifest(opt)
File "/media/ayan/Ayan/Mobile/mo/pixel/.repo/repo/subcmds/init.py", line 171, in _SyncManifest
m._InitGitDir(mirror_git=mirrored_manifest_git)
File "/media/ayan/Ayan/Mobile/mo/pixel/.repo/repo/project.py", line 2292, in _InitGitDir
self._UpdateHooks()
File "/media/ayan/Ayan/Mobile/mo/pixel/.repo/repo/project.py", line 2312, in _UpdateHooks
self._InitHooks()
File "/media/ayan/Ayan/Mobile/mo/pixel/.repo/repo/project.py", line 2341, in _InitHooks
os.symlink(os.path.relpath(stock_hook, os.path.dirname(dst)), dst)
OSError: [Errno 38] Function not implemented
[email protected]:/media/ayan/Ayan/Mobile/mo/pixel$
any help would be recommended and appreciated
Ayan Uchiha Choudhury said:
Code:
[email protected]:/media/ayan/Ayan/Mobile/mo/pixel$ repo init -u https://github.com/PixelExperience/manifest -b oreo-mr1
Get https://gerrit.googlesource.com/git-repo/clone.bundle
Get https://gerrit.googlesource.com/git-repo
remote: Finding sources: 100% (5/5)
remote: Total 5 (delta 0), reused 5 (delta 0)
Unpacking objects: 100% (5/5), done.
From https://gerrit.googlesource.com/git-repo
cf7c083..0f2e45a master -> origin/master
Get https://github.com/PixelExperience/manifest
Traceback (most recent call last):
File "/media/ayan/Ayan/Mobile/mo/pixel/.repo/repo/main.py", line 531, in <module>
_Main(sys.argv[1:])
File "/media/ayan/Ayan/Mobile/mo/pixel/.repo/repo/main.py", line 507, in _Main
result = repo._Run(argv) or 0
File "/media/ayan/Ayan/Mobile/mo/pixel/.repo/repo/main.py", line 180, in _Run
result = cmd.Execute(copts, cargs)
File "/media/ayan/Ayan/Mobile/mo/pixel/.repo/repo/subcmds/init.py", line 399, in Execute
self._SyncManifest(opt)
File "/media/ayan/Ayan/Mobile/mo/pixel/.repo/repo/subcmds/init.py", line 171, in _SyncManifest
m._InitGitDir(mirror_git=mirrored_manifest_git)
File "/media/ayan/Ayan/Mobile/mo/pixel/.repo/repo/project.py", line 2292, in _InitGitDir
self._UpdateHooks()
File "/media/ayan/Ayan/Mobile/mo/pixel/.repo/repo/project.py", line 2312, in _UpdateHooks
self._InitHooks()
File "/media/ayan/Ayan/Mobile/mo/pixel/.repo/repo/project.py", line 2341, in _InitHooks
os.symlink(os.path.relpath(stock_hook, os.path.dirname(dst)), dst)
OSError: [Errno 38] Function not implemented
[email protected]:/media/ayan/Ayan/Mobile/mo/pixel$
any help would be recommended and appreciated
Click to expand...
Click to collapse
Wrong place to ask but yeah, have you installed the latest version of repo and python2 ?
Or before that try `rm -rf .repo` and then init again.
Android Building queries can be discussed here:
https://forum.xda-developers.com/chef-central/android/guide-android-rom-development-t2814763
Yes yes I did both. I also created a new directory and tried repo init. But still
emmm....
Ayan Uchiha Choudhury said:
Yes yes I did both. I also created a new directory and tried repo init. But still
Click to expand...
Click to collapse
Have you found anything to solution ?
SchafferWang said:
Have you found anything to solution ?
Click to expand...
Click to collapse
Exfat was the problem. Formatted to NTFS to fix it