Porting issues MIUI v6 G900F (klte) - Android Q&A, Help & Troubleshooting

I keep getting issues while building miui v6-KK.
I first got errors because of a faulty/incompatible recovery.fstab, which I fixed.
But now I am getting this SignApk.jar error:
Code:
[email protected]:/home/caelin/android# tools/releasetools/ota_from_target_files -v klte/out/target_files.zip out/product/ota_klte.zip
unzipping target target-files...
running: unzip -o -q klte/out/target_files.zip -d /tmp/targetfiles-RN43AE
--- target info ---
blocksize = (int) 131072
boot_size = (int) 2621440
fstab = (dict) {'/cache': <common.Partition object at 0x7f8a4ef085d0>, '/boot': <common.Partition object at 0x7f8a4ef084d0>, '/system': <common.Partition object at 0x7f8a4ef08550>, '/recovery': <common.Partition object at 0x7f8a4ef08510>, '/firmware': <common.Partition object at 0x7f8a4ef08690>, '/firmware-modem': <common.Partition object at 0x7f8a4ef086d0>, '/data': <common.Partition object at 0x7f8a4ef08590>}
recovery_api_version = (int) 3
recovery_size = (int) 5242880
system_size = (int) 138412032
tool_extensions = (str) .
userdata_size = (int) 205783040
using device-specific extensions in .
unable to load device-specific module; assuming none
using prebuilt boot.img...
[MIUI CUST] OTA: copy data files
[MIUI CUST] OTA: handle relink
[MIUI CUST] OTA: SetPermissions
running: openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
running: java -Xmx4096m -jar /home/caelin/android/tools/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmpQjm_tO out/product/ota_klte.zip
Exception in thread "main" java.lang.OutOfMemoryError: Requested array size exceeds VM limit
at java.util.Arrays.copyOf(Arrays.java:2271)
at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:113)
at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:140)
at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:253)
at java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:211)
at java.util.zip.ZipOutputStream.write(ZipOutputStream.java:314)
at com.android.signapk.SignApk.copyFiles(SignApk.java:422)
at com.android.signapk.SignApk.main(SignApk.java:490)
ERROR: signapk.jar failed: return code 1
[email protected]:/home/caelin/android#

Bump

Related

curl: (3) <url> malformed <<installing repo error>>

while trying to install repo and running cmd
$ curl http://android.git.kernel.org/repo >~/bin/repo
i get the following error.
Code:
import optparse
import os
import re
import readline
import subprocess
import sys
home_dot_repo = os.path.expanduser('~/.repoconfig')
gpg_dir = os.path.join(home_dot_repo, 'gnupg')
extra_args = []
init_optparse = optparse.OptionParser(usage="repo init -u url [options]")
# Logging
group = init_optparse.add_option_group('Logging options')
group.add_option('-q', '--quiet',
dest="quiet", action="store_true", default=False,
help="be quiet")
# Manifest
group = init_optparse.add_option_group('Manifest options')
group.add_option('-u', '--manifest-url',
dest='manifest_url',
help='manifest repository location', metavar='URL')
group.add_option('-o', '--origin',
dest='manifest_origin',
help="use REMOTE instead of 'origin' to track upstream",
metavar='REMOTE')
group.add_option('-b', '--manifest-branch',
dest='manifest_branch',
help='manifest branch or revision', metavar='REVISION')
group.add_option('-m', '--manifest-name',
dest='manifest_name',
help='initial manifest file (deprecated)',
metavar='NAME.xml')
group.add_option('--mirror',
dest='mirror', action='store_true',
help='mirror the forrest')
# Tool
group = init_optparse.add_option_group('repo Version options')
group.add_option('--repo-url',
dest='repo_url',
help='repo repository location', metavar='URL')
group.add_option('--repo-branch',
dest='repo_branch',
help='repo branch or revision', metavar='REVISION')
group.add_option('--no-repo-verify',
dest='no_repo_verify', action='store_true',
help='do not verify repo source code')
class CloneFailure(Exception):
"""Indicate the remote clone of repo itself failed.
"""
def _Init(args):
"""Installs repo by cloning it over the network.
"""
opt, args = init_optparse.parse_args(args)
if args or not opt.manifest_url:
init_optparse.print_usage()
sys.exit(1)
url = opt.repo_url
if not url:
url = REPO_URL
extra_args.append('--repo-url=%s' % url)
branch = opt.repo_branch
if not branch:
branch = REPO_REV
extra_args.append('--repo-branch=%s' % branch)
if branch.startswith('refs/heads/'):
branch = branch[len('refs/heads/'):]
if branch.startswith('refs/'):
print >>sys.stderr, "fatal: invalid branch name '%s'" % branch
raise CloneFailure()
if not os.path.isdir(repodir):
try:
os.mkdir(repodir)
except OSError, e:
print >>sys.stderr, \
'fatal: cannot make %s directory: %s' % (
repodir, e.strerror)
# Don't faise CloneFailure; that would delete the
# name. Instead exit immediately.
#
sys.exit(1)
_CheckGitVersion()
try:
if _NeedSetupGnuPG():
can_verify = _SetupGnuPG(opt.quiet)
else:
can_verify = True
if not opt.quiet:
print >>sys.stderr, 'Getting repo ...'
print >>sys.stderr, ' from %s' % url
dst = os.path.abspath(os.path.join(repodir, S_repo))
_Clone(url, dst, opt.quiet)
if can_verify and not opt.no_repo_verify:
rev = _Verify(dst, branch, opt.quiet)
else:
rev = 'refs/remotes/origin/%s^0' % branch
_Checkout(dst, branch, rev, opt.quiet)
except CloneFailure:
if opt.quiet:
print >>sys.stderr, \
'fatal: repo init failed; run without --quiet to see why'
raise
def _CheckGitVersion():
cmd = [GIT, '--version']
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
ver_str = proc.stdout.read().strip()
proc.stdout.close()
proc.wait()
if not ver_str.startswith('git version '):
print >>sys.stderr, 'error: "%s" unsupported' % ver_str
raise CloneFailure()
ver_str = ver_str[len('git version '):].strip()
ver_act = tuple(map(lambda x: int(x), ver_str.split('.')[0:3]))
if ver_act < MIN_GIT_VERSION:
need = '.'.join(map(lambda x: str(x), MIN_GIT_VERSION))
print >>sys.stderr, 'fatal: git %s or later required' % need
raise CloneFailure()
def _NeedSetupGnuPG():
if not os.path.isdir(home_dot_repo):
return True
kv = os.path.join(home_dot_repo, 'keyring-version')
if not os.path.exists(kv):
return True
kv = open(kv).read()
if not kv:
return True
kv = tuple(map(lambda x: int(x), kv.split('.')))
if kv < KEYRING_VERSION:
return True
return False
def _SetupGnuPG(quiet):
if not os.path.isdir(home_dot_repo):
try:
os.mkdir(home_dot_repo)
except OSError, e:
print >>sys.stderr, \
'fatal: cannot make %s directory: %s' % (
home_dot_repo, e.strerror)
sys.exit(1)
if not os.path.isdir(gpg_dir):
try:
os.mkdir(gpg_dir, 0700)
except OSError, e:
print >>sys.stderr, \
'fatal: cannot make %s directory: %s' % (
gpg_dir, e.strerror)
sys.exit(1)
env = dict(os.environ)
env['GNUPGHOME'] = gpg_dir
cmd = ['gpg', '--import']
try:
proc = subprocess.Popen(cmd,
env = env,
stdin = subprocess.PIPE)
except OSError, e:
if not quiet:
print >>sys.stderr, 'warning: gpg (GnuPG) is not available.'
print >>sys.stderr, 'warning: Installing it is strongly encouraged.'
print >>sys.stderr
return False
proc.stdin.write(MAINTAINER_KEYS)
proc.stdin.close()
if proc.wait() != 0:
print >>sys.stderr, 'fatal: registering repo maintainer keys failed'
sys.exit(1)
print
fd = open(os.path.join(home_dot_repo, 'keyring-version'), 'w')
fd.write('.'.join(map(lambda x: str(x), KEYRING_VERSION)) + '\n')
fd.close()
return True
def _SetConfig(local, name, value):
"""Set a git configuration option to the specified value.
"""
cmd = [GIT, 'config', name, value]
if subprocess.Popen(cmd, cwd = local).wait() != 0:
raise CloneFailure()
def _Fetch(local, quiet, *args):
cmd = [GIT, 'fetch']
if quiet:
cmd.append('--quiet')
err = subprocess.PIPE
else:
err = None
cmd.extend(args)
cmd.append('origin')
proc = subprocess.Popen(cmd, cwd = local, stderr = err)
if err:
proc.stderr.read()
proc.stderr.close()
if proc.wait() != 0:
raise CloneFailure()
def _Clone(url, local, quiet):
"""Clones a git repository to a new subdirectory of repodir
"""
try:
os.mkdir(local)
except OSError, e:
print >>sys.stderr, \
'fatal: cannot make %s directory: %s' \
% (local, e.strerror)
raise CloneFailure()
cmd = [GIT, 'init', '--quiet']
try:
proc = subprocess.Popen(cmd, cwd = local)
except OSError, e:
print >>sys.stderr
print >>sys.stderr, "fatal: '%s' is not available" % GIT
print >>sys.stderr, 'fatal: %s' % e
print >>sys.stderr
print >>sys.stderr, 'Please make sure %s is installed'\
' and in your path.' % GIT
raise CloneFailure()
if proc.wait() != 0:
print >>sys.stderr, 'fatal: could not create %s' % local
raise CloneFailure()
_SetConfig(local, 'remote.origin.url', url)
_SetConfig(local, 'remote.origin.fetch',
'+refs/heads/*:refs/remotes/origin/*')
_Fetch(local, quiet)
_Fetch(local, quiet, '--tags')
def _Verify(cwd, branch, quiet):
"""Verify the branch has been signed by a tag.
"""
cmd = [GIT, 'describe', 'origin/%s' % branch]
proc = subprocess.Popen(cmd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
cwd = cwd)
cur = proc.stdout.read().strip()
proc.stdout.close()
proc.stderr.read()
proc.stderr.close()
if proc.wait() != 0 or not cur:
print >>sys.stderr
print >>sys.stderr,\
"fatal: branch '%s' has not been signed" \
% branch
raise CloneFailure()
m = re.compile(r'^(.*)-[0-9]{1,}-g[0-9a-f]{1,}$').match(cur)
if m:
cur = m.group(1)
if not quiet:
print >>sys.stderr
print >>sys.stderr, \
"info: Ignoring branch '%s'; using tagged release '%s'" \
% (branch, cur)
print >>sys.stderr
env = dict(os.environ)
env['GNUPGHOME'] = gpg_dir
cmd = [GIT, 'tag', '-v', cur]
proc = subprocess.Popen(cmd,
stdout = subprocess.PIPE,
stderr = subprocess.PIPE,
cwd = cwd,
env = env)
out = proc.stdout.read()
proc.stdout.close()
err = proc.stderr.read()
proc.stderr.close()
if proc.wait() != 0:
print >>sys.stderr
print >>sys.stderr, out
print >>sys.stderr, err
print >>sys.stderr
raise CloneFailure()
return '%s^0' % cur
def _Checkout(cwd, branch, rev, quiet):
"""Checkout an upstream branch into the repository and track it.
"""
cmd = [GIT, 'update-ref', 'refs/heads/default', rev]
if subprocess.Popen(cmd, cwd = cwd).wait() != 0:
raise CloneFailure()
_SetConfig(cwd, 'branch.default.remote', 'origin')
_SetConfig(cwd, 'branch.default.merge', 'refs/heads/%s' % branch)
cmd = [GIT, 'symbolic-ref', 'HEAD', 'refs/heads/default']
if subprocess.Popen(cmd, cwd = cwd).wait() != 0:
raise CloneFailure()
cmd = [GIT, 'read-tree', '--reset', '-u']
if not quiet:
cmd.append('-v')
cmd.append('HEAD')
if subprocess.Popen(cmd, cwd = cwd).wait() != 0:
raise CloneFailure()
def _FindRepo():
"""Look for a repo installation, starting at the current directory.
"""
dir = os.getcwd()
repo = None
while dir != '/' and not repo:
repo = os.path.join(dir, repodir, REPO_MAIN)
if not os.path.isfile(repo):
repo = None
dir = os.path.dirname(dir)
return (repo, os.path.join(dir, repodir))
class _Options:
help = False
def _ParseArguments(args):
cmd = None
opt = _Options()
arg = []
for i in xrange(0, len(args)):
a = args[i]
if a == '-h' or a == '--help':
opt.help = True
elif not a.startswith('-'):
cmd = a
arg = args[i + 1:]
break
return cmd, opt, arg
def _Usage():
print >>sys.stderr,\
"""usage: repo COMMAND [ARGS]
repo is not yet installed. Use "repo init" to install it here.
The most commonly used repo commands are:
init Install repo in the current working directory
help Display detailed help on a command
For access to the full online help, install repo ("repo init").
"""
sys.exit(1)
def _Help(args):
if args:
if args[0] == 'init':
init_optparse.print_help()
else:
print >>sys.stderr,\
"error: '%s' is not a bootstrap command.\n"\
' For access to online help, install repo ("repo init").'\
% args[0]
else:
_Usage()
sys.exit(1)
def _NotInstalled():
print >>sys.stderr,\
'error: repo is not installed. Use "repo init" to install it here.'
sys.exit(1)
def _NoCommands(cmd):
print >>sys.stderr,\
"""error: command '%s' requires repo to be installed first.
Use "repo init" to install it here.""" % cmd
sys.exit(1)
def _RunSelf(wrapper_path):
my_dir = os.path.dirname(wrapper_path)
my_main = os.path.join(my_dir, 'main.py')
my_git = os.path.join(my_dir, '.git')
if os.path.isfile(my_main) and os.path.isdir(my_git):
for name in ['git_config.py',
'project.py',
'subcmds']:
if not os.path.exists(os.path.join(my_dir, name)):
return None, None
return my_main, my_git
return None, None
def _SetDefaultsTo(gitdir):
global REPO_URL
global REPO_REV
REPO_URL = gitdir
proc = subprocess.Popen([GIT,
'--git-dir=%s' % gitdir,
'symbolic-ref',
'HEAD'],
stdout = subprocess.PIPE,
stderr = subprocess.PIPE)
REPO_REV = proc.stdout.read().strip()
proc.stdout.close()
proc.stderr.read()
proc.stderr.close()
if proc.wait() != 0:
print >>sys.stderr, 'fatal: %s has no current branch' % gitdir
sys.exit(1)
def main(orig_args):
main, dir = _FindRepo()
cmd, opt, args = _ParseArguments(orig_args)
wrapper_path = os.path.abspath(__file__)
my_main, my_git = _RunSelf(wrapper_path)
if not main:
if opt.help:
_Usage()
if cmd == 'help':
_Help(args)
if not cmd:
_NotInstalled()
if cmd == 'init':
if my_git:
_SetDefaultsTo(my_git)
try:
_Init(args)
except CloneFailure:
for root, dirs, files in os.walk(repodir, topdown=False):
for name in files:
os.remove(os.path.join(root, name))
for name in dirs:
os.rmdir(os.path.join(root, name))
os.rmdir(repodir)
sys.exit(1)
main, dir = _FindRepo()
else:
_NoCommands(cmd)
if my_main:
main = my_main
ver_str = '.'.join(map(lambda x: str(x), VERSION))
me = [main,
'--repo-dir=%s' % dir,
'--wrapper-version=%s' % ver_str,
'--wrapper-path=%s' % wrapper_path,
'--']
me.extend(orig_args)
me.extend(extra_args)
try:
os.execv(main, me)
except OSError, e:
print >>sys.stderr, "fatal: unable to start %s" % main
print >>sys.stderr, "fatal: %s" % e
sys.exit(148)
if __name__ == '__main__':
main(sys.argv[1:])
curl: (3) <url> malformed
Thoughts?
nm, got it..... thanks for all the quick help.
/sarcasm
I have the same issue. Could you please tell me what you've done to get rid of this error?
Thanks,
I just went to the url, copied the text into gedit(as root) and saved as repo.

[Q] Building CM10.2 - signapk.jar could not load main class

I am new to Android and Cyanogemod and started build CM 10.2 myself on a virtual Ubuntu machine. I followed the guide available on CM wiki (build for i9100) and I use Suns JDK 7
Everthing works fine, but the last step is causing some problems I don't know how to solve it. I googled and searched the forum, but there is something I am missing. This is the error message I get in my Ubuntu terminal:
Code:
default_system_dev_certificate = (str) build/target/product/security/testkey
extfs_sparse_flag = (str) -s
extra_recovery_keys = (str) build/target/product/security/cm
fs_type = (str) ext4
fstab = (dict) {'/sdcard': <common.Partition object at 0x2902890>, '/cache': <common.Partition object at 0x2902510>, '/data': <common.Partition object at 0x2902610>, '/system': <common.Partition object at 0x29023d0>, '/efs': <common.Partition object at 0x2902590>, '/emmc': <common.Partition object at 0x2902810>, '/preload': <common.Partition object at 0x29026d0>, '/recovery': <common.Partition object at 0x2902790>, '/boot': <common.Partition object at 0x2902650>}
fstab_version = (int) 2
mkbootimg_args = (str)
mkyaffs2_extra_flags = (str) -c 4096 -s 128
recovery_api_version = (int) 2
selinux_fc = (str) /tmp/targetfiles-8ZaTOH/BOOT/RAMDISK/file_contexts
system_size = (int) 536870912
tool_extensions = (str) device/samsung/i9100/../common
userdata_size = (int) 2147483648
using device-specific extensions in device/samsung/common
unable to load device-specific module; assuming none
[COLOR="Red"][B] running: openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
running: java -jar /home/markus/android/system/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmpUfRiuU /home/markus/android/system/out/target/product/i9100/cm_i9100-ota-eng.markus.zip
Error: Could not find or load main class
ERROR: signapk.jar failed: return code 1[/B][/COLOR]
make: *** [/home/markus/android/system/out/target/product/i9100/cm_i9100-ota-eng.markus.zip] Error 1
So what am I missing here?

[Q] Error while compiling CM10.1 for Motorola XT926

I have spend numerous hours trying to compile this rom for my device as practice...
I ran into a few errors int he past.. and finally was able to get it to compile until now...
it seems like it got stuck on one of the last steps.. and i dont know what to do from here...
does anyone have anything for me?
mkbootimg_args = (str) --ramdisk_offset 0x01600000 recovery_api_version = (int) 2 recovery_size = (int) 10485760 system_size = (int) 1560281088 tool_extensions = (str) device/motorola/xt926/../common userdata_size = (int) 12884901888 using device-specific extensions in device/motorola/common unable to load device-specific module; assuming none Traceback (most recent call last): File "./build/tools/releasetools/ota_from_target_files", line 865, in <module> main(sys.argv[1:]) File "./build/tools/releasetools/ota_from_target_files", line 833, in main WriteFullOTAPackage(input_zip, output_zip) File "./build/tools/releasetools/ota_from_target_files", line 409, in WriteFullOTAPackage script.Mount("/system") File "/home/liamfaille/cm/build/tools/releasetools/edify_generator.py", line 150, in Mount p = fstab[mount_point] KeyError: '/system' make: *** [/home/liamfaille/cm/out/target/product/xt926/cm_xt926-ota-eng.liamfaille.zip] Error 1 [email protected]:~/cm$
The MAIN part of the error is...
p = fstab[mount_point] KeyError: '/system' make: *** [/home/liamfaille/cm/out/target/product/xt926/cm_xt926-ota-eng.liamfaille.zip] Error 1

Error in building signed builds

Hello All,
I am trying to build LineAge 14.1 for Lux [Moto X Play].
I am following
http://wiki.lineageos.org/lux_build.html & http://wiki.lineageos.org/signing_builds.html
Now, when I am building unsigned build, everything works fine.
no issues at all.
ie by running
Code:
brunch lux
But, when I try to build a signed build,
with
Code:
mka dist
I get the following error.
Code:
[ 84% 1135/1347] target R.java/Manifest.java: PermissionTestAppMV1 (/mnt/volume-sfo2-01/android/system/out/target/common/obj/APPS/PermissionTestAppMV1_intermediates/src/R.stamp)
Warning: AndroidManifest.xml already defines versionCode (in http://schemas.android.com/apk/res/android); using existing value in manifest.
Warning: AndroidManifest.xml already defines versionName (in http://schemas.android.com/apk/res/android); using existing value in manifest.
Warning: AndroidManifest.xml already defines minSdkVersion (in http://schemas.android.com/apk/res/android); using existing value in manifest.
Warning: AndroidManifest.xml already defines targetSdkVersion (in http://schemas.android.com/apk/res/android); using existing value in manifest.
[ 84% 1137/1347] target R.java/Manifest.java: PerformanceLaunch (/mnt/volume-sfo2-01/android/system/out/target/common/obj/APPS/PerformanceLaunch_intermediates/src/R.stamp)
platform_testing/tests/perf/PerformanceLaunch/res/values-en-rXA/strings.xml:0: warning: Resource file platform_testing/tests/perf/PerformanceLaunch/res/values-en-rXA/strings.xml is skipped as pseudolocalization was done automatically.
platform_testing/tests/perf/PerformanceLaunch/res/values-ar-rXB/strings.xml:0: warning: Resource file platform_testing/tests/perf/PerformanceLaunch/res/values-ar-rXB/strings.xml is skipped as pseudolocalization was done automatically.
Warning: AndroidManifest.xml already defines versionCode (in http://schemas.android.com/apk/res/android); using existing value in manifest.
Warning: AndroidManifest.xml already defines versionName (in http://schemas.android.com/apk/res/android); using existing value in manifest.
Warning: AndroidManifest.xml already defines minSdkVersion (in http://schemas.android.com/apk/res/android); using existing value in manifest.
Warning: AndroidManifest.xml already defines targetSdkVersion (in http://schemas.android.com/apk/res/android); using existing value in manifest.
[ 84% 1140/1347] target R.java/Manifest.java: CMPlatformTests (/mnt/volume-sfo2-01/android/system/out/target/common/obj/APPS/CMPlatformTests_intermediates/src/R.stamp)
Warning: AndroidManifest.xml already defines versionCode (in http://schemas.android.com/apk/res/android); using existing value in manifest.
Warning: AndroidManifest.xml already defines versionName (in http://schemas.android.com/apk/res/android); using existing value in manifest.
[ 85% 1156/1347] host Java: ahat-tests (/mnt/volume-sfo2-01/android/system/out/host/common/obj/JAVA_LIBRARIES/ahat-tests_intermediates/classes)
Note: art/tools/ahat/test/SortTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[B][ 89% 1206/1347] host C: libosi-host <= system/bt/osi/./src/alarm.c
FAILED: /bin/bash -c "(PWD=/proc/self/cwd prebuilts/misc/linux-x86/ccache/ccache prebuilts/clang/host/linux-x86/clang-2690385/bin/clang -I device/motorola/msm8916-common/include -I system/bt/osi/.. -I system/bt/osi/../utils/include -I system/bt/osi/../stack/include -I device/motorola/msm8916-common/bluetooth -I system/bt/osi -I /mnt/volume-sfo2-01/android/system/out/host/linux-x86/obj/STATIC_LIBRARIES/libosi-host_intermediates -I /mnt/volume-sfo2-01/android/system/out/host/linux-x86/gen/STATIC_LIBRARIES/libosi-host_intermediates -I libnativehelper/include/nativehelper \$(cat /mnt/volume-sfo2-01/android/system/out/host/linux-x86/obj/STATIC_LIBRARIES/libosi-host_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem tools/include -isystem /mnt/volume-sfo2-01/android/system/out/host/linux-x86/obj/include -c -fno-exceptions -Wno-multichar -m64 -Wa,--noexecstack -fPIC -no-canonical-prefixes -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 -fstack-protector-strong --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 --sysroot prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/sysroot -Bprebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin -target x86_64-linux-gnu -std=gnu99 -DHAS_BDROID_BUILDCFG -DQLOGKIT_USERDEBUG -DUSE_AUDIO_TRACK -DEXPORT_SYMBOL=\"__attribute__((visibility(\\\"default\\\")))\" -fvisibility=hidden -Wall -Wextra -Werror -Wno-gnu-variable-sized-type-not-at-end -Wno-typedef-redefinition -Wno-unused-parameter -UNDEBUG -DLOG_NDEBUG=1 -D_GNU_SOURCE -DOS_GENERIC -fPIC -D_USING_LIBCXX -std=c99 -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type -MD -MF /mnt/volume-sfo2-01/android/system/out/host/linux-x86/obj/STATIC_LIBRARIES/libosi-host_intermediates/./src/alarm.d -o /mnt/volume-sfo2-01/android/system/out/host/linux-x86/obj/STATIC_LIBRARIES/libosi-host_intermediates/./src/alarm.o system/bt/osi/./src/alarm.c ) && (cp /mnt/volume-sfo2-01/android/system/out/host/linux-x86/obj/STATIC_LIBRARIES/libosi-host_intermediates/./src/alarm.d /mnt/volume-sfo2-01/android/system/out/host/linux-x86/obj/STATIC_LIBRARIES/libosi-host_intermediates/./src/alarm.P; sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/ :/' < /mnt/volume-sfo2-01/android/system/out/host/linux-x86/obj/STATIC_LIBRARIES/libosi-host_intermediates/./src/alarm.d >> /mnt/volume-sfo2-01/android/system/out/host/linux-x86/obj/STATIC_LIBRARIES/libosi-host_intermediates/./src/alarm.P; rm -f /mnt/volume-sfo2-01/android/system/out/host/linux-x86/obj/STATIC_LIBRARIES/libosi-host_intermediates/./src/alarm.d )"
In file included from system/bt/osi/./src/alarm.c:19:
In file included from system/bt/osi/../include/bt_target.h:38:
In file included from device/motorola/msm8916-common/bluetooth/bdroid_buildcfg.h:20:
system/core/include/cutils/properties.h:22:10:[COLOR="Red"] fatal error[/COLOR]: 'sys/system_properties.h' file not found
#include <sys/system_properties.h>
^
1 error generated.[/B]
[ 89% 1206/1347] Package target files: /mnt/volume-sfo2-01/android/system/out/target/product/lux/obj/PACKAGING/target_files_intermediates/lineage_lux-target_files-ce75856d2e.zip
building image from target_files RECOVERY...
using prebuilt boot.img from BOOTABLE_IMAGES...
putting script in bin/install-recovery.sh
running: unzip -o -q /mnt/volume-sfo2-01/android/system/out/target/product/lux/obj/PACKAGING/target_files_intermediates/lineage_lux-target_files-ce75856d2e.zip -d /tmp/targetfiles-atRbed
++++ boot ++++
using prebuilt boot.img from BOOTABLE_IMAGES...
++++ recovery ++++
building image from target_files RECOVERY...
running: mkbootfs -f /tmp/targetfiles-atRbed/META/recovery_filesystem_config.txt /tmp/targetfiles-atRbed/RECOVERY/RAMDISK
running: minigzip
running: /mnt/volume-sfo2-01/android/system/out/host/linux-x86/bin/mkbootimg --kernel /tmp/targetfiles-atRbed/RECOVERY/kernel --cmdline console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x3F ehci-hcd.park=3 vmalloc=400M androidboot.bootdevice=7824900.sdhci utags.blkdev=/dev/block/bootdevice/by-name/utags utags.backup=/dev/block/bootdevice/by-name/utagsBackup movablecore=160M buildvariant=userdebug --base 0x80000000 --dt /tmp/targetfiles-atRbed/RECOVERY/dt --pagesize 2048 --ramdisk_offset 0x01000000 --tags_offset 0x00000100 --os_version 7.1.1 --os_patch_level 2017-01-05 --ramdisk /tmp/tmpUZnRvD --output /tmp/tmpJ2eyen
++++ system ++++
creating system.img...
BuildImage: in_dir = /tmp/targetfiles-atRbed/system, out_file = /tmp/system-UI6LRH.img
fs type is not ext4
Running: mkuserimg.sh -s /tmp/targetfiles-atRbed/system /tmp/system-UI6LRH.img ext4 system 2852126720 -T 1230768000 -C /tmp/targetfiles-atRbed/META/filesystem_config.txt -B /tmp/system-blocklist-xeaHOq.map -L system /tmp/targetfiles-atRbed/META/file_contexts.bin
make_ext4fs -s -T 1230768000 -S /tmp/targetfiles-atRbed/META/file_contexts.bin -C /tmp/targetfiles-atRbed/META/filesystem_config.txt -B /tmp/system-blocklist-xeaHOq.map -L system -l 2852126720 -a system /tmp/system-UI6LRH.img /tmp/targetfiles-atRbed/system
loaded 2312 fs_config entries
Creating filesystem with parameters:
Size: 2852126720
Block size: 4096
Blocks per group: 32768
Inodes per group: 7920
Inode size: 256
Journal blocks: 10880
Label: system
Blocks: 696320
Block groups: 22
Reserved block group size: 175
Created filesystem with 2322/174240 inodes and 195326/696320 blocks
Running ['mkuserimg.sh', '-s', '/tmp/targetfiles-atRbed/system', '/tmp/system-UI6LRH.img', 'ext4', 'system', '2852126720', '-T', '1230768000', '-C', '/tmp/targetfiles-atRbed/META/filesystem_config.txt', '-B', '/tmp/system-blocklist-xeaHOq.map', '-L', 'system', '/tmp/targetfiles-atRbed/META/file_contexts.bin'] command, exit code = 0
++++ userdata ++++
creating userdata.img...
BuildImage: in_dir = /tmp/tmpGpF5hC/data, out_file = /tmp/tmpXM9Gfo
fs type is not ext4
Running: mkf2fsuserimg.sh /tmp/tmpXM9Gfo 11815223296
in mkf2fsuserimg.sh PATH=/mnt/volume-sfo2-01/android/system/out/host/linux-x86/bin:/mnt/volume-sfo2-01/android/system/out/host/linux-x86/bin/:/usr/lib/jvm/java-8-openjdk-amd64/bin:/mnt/volume-sfo2-01/android/system/out/host/linux-x86/bin:/mnt/volume-sfo2-01/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/mnt/volume-sfo2-01/android/system/prebuilts/gcc/linux-x86/:/mnt/volume-sfo2-01/android/system/development/scripts:/mnt/volume-sfo2-01/android/system/prebuilts/devtools/tools:/mnt/volume-sfo2-01/android/system/external/selinux/prebuilts/bin:/mnt/volume-sfo2-01/android/system/prebuilts/android-emulator/linux-x86_64:/mnt/volume-sfo2-01/bin:/root/platform-tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
make_f2fs -l 11815223296 /tmp/tmpXM9Gfo
Info: zone aligned segment0 blkaddr: 512
Info: Overprovision ratio = 1.890%
Info: Overprovision segments = 216 (GC reserved = 113)
Running ['mkf2fsuserimg.sh', '/tmp/tmpXM9Gfo', '11815223296'] command, exit code = 0
userdata size (14) is 0.00% of limit (11815223296)
++++ extrauserdata ++++
++++ cache ++++
creating cache.img...
BuildImage: in_dir = /tmp/tmpa0tOUX/cache, out_file = /tmp/tmpTM0SUW
fs type is not ext4
Running: mkuserimg.sh -s /tmp/tmpa0tOUX/cache /tmp/tmpTM0SUW ext4 cache 805306368 -T 1230768000 -L cache /tmp/targetfiles-atRbed/META/file_contexts.bin
make_ext4fs -s -T 1230768000 -S /tmp/targetfiles-atRbed/META/file_contexts.bin -L cache -l 805306368 -a cache /tmp/tmpTM0SUW /tmp/tmpa0tOUX/cache
Creating filesystem with parameters:
Size: 805306368
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 3072
Label: cache
Blocks: 196608
Block groups: 6
Reserved block group size: 47
Created filesystem with 11/49152 inodes and 6355/196608 blocks
Running ['mkuserimg.sh', '-s', '/tmp/tmpa0tOUX/cache', '/tmp/tmpTM0SUW', 'ext4', 'cache', '805306368', '-T', '1230768000', '-L', 'cache', '/tmp/targetfiles-atRbed/META/file_contexts.bin'] command, exit code = 0
cache size (14) is 0.00% of limit (805306368)
done.
[ 89% 1206/1347] Package symbols: /mnt/volume-sfo2-01/android/system/out/target/product/lux/lineage_lux-symbols-ce75856d2e.zip
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/mnt/volume-sfo2-01/android/system'
[B][COLOR="Red"]#### make failed to build some targets (06:42 (mm:ss)) ####[/COLOR][/B]
[email protected]:/mnt/volume-sfo2-01/android/system#
Any assistance will be appreciated.
Thank you.
Bump
I am getting exact same header file missing error
system_properties.h not found.
How to solve this.
Please help.
The same error was happening to me when running
Code:
mma
I managed to fix this by running
Code:
mma bacon
In your case however, I'm assuming you need to run
Code:
mka bacon dist
This assumption is based on the wiki article you mentioned:
breakfast <codename>
mka target-files-package dist
Click to expand...
Click to collapse
AFAICT bacon is some sort of "target files package" which needs to be specified when building.

[Help] Build from source failed but make otapackage worked

Been lurking on XDA for a while trying to soak up all the good info here. Finally decided to have a go at building a ROM from source. I'm using Ubuntu in a virtual machine, managed to setup my local repository, included necessary device tree and kernel with custom local manifest.
The build process fails at 99% on the very last step which is creating the flashable zip. I found it quite annoying after waiting 3 hours for it to build, but figured everything is there to create the zip. I then tried make otapackage and it successfully spat out a flashable zip.
I''m perfectly comfortable with command line interfaces but i'm a complete Linux noob, last time I experimented with a Unix flavour was Amix (Amiga port of UNIX System V R4) and couldn't wrap my head around it. Ubuntu is a lot friendlier but I still don't get what the error message is trying to tell me. Can anyone give me a clue?
Code:
[ 99% 16544/16545] build /home/nicholas/aospex/out/target/product/lithium/aosp_lithium-ota-19b2cd9547.zip
FAILED: /home/nicholas/aospex/out/target/product/lithium/aosp_lithium-ota-19b2cd9547.zip
/bin/bash -c "(echo \"Package OTA: /home/nicholas/aospex/out/target/product/lithium/aosp_lithium-ota-19b2cd9547.zip\" ) && (PATH=/home/nicholas/aospex/out/host/linux-x86/bin/:\$PATH MKBOOTIMG=/home/nicholas/aospex/out/host/linux-x86/bin/mkbootimg ./build/tools/releasetools/ota_from_target_files -v --block --extracted_input_target_files /home/nicholas/aospex/out/target/product/lithium/obj/PACKAGING/target_files_intermediates/aosp_lithium-target_files-19b2cd9547 -p /home/nicholas/aospex/out/host/linux-x86 -k build/target/product/security/testkey --backup=true /home/nicholas/aospex/out/target/product/lithium/obj/PACKAGING/target_files_intermediates/aosp_lithium-target_files-19b2cd9547.zip /home/nicholas/aospex/out/target/product/lithium/aosp_lithium-ota-19b2cd9547.zip )"
Package OTA: /home/nicholas/aospex/out/target/product/lithium/aosp_lithium-ota-19b2cd9547.zip
running: openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
--- target info ---
blockimgdiff_versions = (str) 3,4
blocksize = (int) 262144
boot_size = (int) 67108864
build.prop = (dict) {'ro.build.display.id': 'aosp_lithium-userdebug 8.1.0 OPM6.171019.030.H1 19b2cd9547 test-keys', 'ro.wifi.channels': '', 'ro.treble.enabled': 'false', 'ro.modversion': 'AospExtended-v5.8-20180818-2322-UNOFFICIAL', 'ro.build.id': 'OPM6.171019.030.H1', 'ro.product.cpu.abilist': 'arm64-v8a,armeabi-v7a,armeabi', 'ro.build.product': 'lithium', 'ro.build.host': 'nicholas-VirtualBox', 'ro.product.name': 'lithium', 'ro.build.version.security_patch': '2018-08-05', 'ro.product.manufacturer': 'Xiaomi', 'ro.extended.display.version': 'AospExtended-v5.8-UNOFFICIAL', 'ro.product.cpu.abilist32': 'armeabi-v7a,armeabi', 'ro.build.version.incremental': '19b2cd9547', 'ro.build.version.preview_sdk': '0', 'dalvik.vm.isa.arm.features': 'default', 'ro.build.tags': 'test-keys', 'dalvik.vm.isa.arm64.variant': 'kryo', 'ro.aex.device': 'lithium', 'ro.build.version.sdk': '27', 'ro.extended.releasetype': 'UNOFFICIAL', 'ro.build.date': 'Sun Aug 19 00:22:22 BST 2018', 'dalvik.vm.isa.arm.variant': 'kryo', 'dalvik.vm.lockprof.threshold': '500', 'ro.product.locale': 'en-US', 'ro.build.fingerprint': 'Xiaomi/lithium/lithium:7.0/NRD90M/V9.5.5.0.NAAMIFA:user/release-keys', 'ro.build.date.utc': '1534634542', 'ro.build.characteristics': 'default', 'ro.product.cpu.abilist64': 'arm64-v8a', 'ro.build.expect.modem': '2018-07-04 19:18:52,8.7.5', 'ro.build.user': 'nicholas', 'dalvik.vm.isa.arm64.features': 'default', 'ro.expect.recovery_id': '0xeed4e453264d12e67c8b4daa242b8636714b9623000000000000000000000000', 'ro.product.device': 'lithium', 'ro.build.version.all_codenames': 'REL', 'dalvik.vm.stack-trace-dir': '/data/anr', 'ro.build.description': 'lithium-user 7.0 NRD90M V9.5.5.0.NAAMIFA release-keys', 'ro.build.flavor': 'aosp_lithium-userdebug', 'ro.product.cpu.abi': 'arm64-v8a', 'ro.bionic.ld.warning': '1', 'ro.product.brand': 'Xiaomi', 'persist.sys.dalvik.vm.lib.2': 'libart.so', 'ro.build.version.release': '8.1.0', 'ro.build.version.codename': 'REL', 'ro.extended.version': 'v5.8', 'media.recorder.show_manufacturer_and_model': 'true', 'ro.build.type': 'userdebug', 'ro.product.model': 'MI MIX', 'ro.build.version.base_os': '', 'net.bt.name': 'Android'}
default_system_dev_certificate = (str) build/target/product/security/testkey
device_type = (str) MMC
ext_mkuserimg = (str) mkuserimg_mke2fs.sh
extfs_sparse_flag = (str) -s
fs_type = (str) ext4
fstab = (dict) {'none': <common.Partition object at 0x7f3adc335350>, '/cache': <common.Partition object at 0x7f3adc32d9d0>, '/boot': <common.Partition object at 0x7f3adc32d910>, '/system': <common.Partition object at 0x7f3adc32d990>, '/dsp': <common.Partition object at 0x7f3adc32dc10>, '/frp': <common.Partition object at 0x7f3adc3352d0>, '/persist': <common.Partition object at 0x7f3adc32da90>, '/recovery': <common.Partition object at 0x7f3adc32d950>, '/firmware': <common.Partition object at 0x7f3adc32dc50>, '/bt_firmware': <common.Partition object at 0x7f3adc32dc90>, '/misc': <common.Partition object at 0x7f3adc335310>, '/data': <common.Partition object at 0x7f3adc32da10>, '/vendor': <common.Partition object at 0x7f3adc32da50>}
fstab_version = (int) 2
mkbootimg_args = (str)
mkbootimg_version_args = (str) --os_version 8.1.0 --os_patch_level 2018-08-05
multistage_support = (str) 1
ota_override_device = (str) lithium
recovery_api_version = (int) 3
recovery_as_boot = (str)
recovery_mount_options = (str) ext4=max_batch_time=0,commit=1,data=ordered,barrier=1,errors=panic,nodelalloc
recovery_size = (int) 67108864
selinux_fc = (str) /home/nicholas/aospex/out/target/product/lithium/obj/PACKAGING/target_files_intermediates/aosp_lithium-target_files-19b2cd9547/META/file_contexts.bin
squashfs_sparse_flag = (str) -s
system_size = (int) 3221225472
tool_extensions = (str) device/xiaomi/msm8996-common
use_set_metadata = (str) 1
userdata_size = (int) 58846064640
vendor_fs_type = (str) ext4
vendor_size = (int) 872415232
(using device-specific extensions from target_files)
--- can't determine the cache partition size ---
loaded device-specific extensions from /home/nicholas/aospex/out/target/product/lithium/obj/PACKAGING/target_files_intermediates/aosp_lithium-target_files-19b2cd9547/META/releasetools.py
using prebuilt recovery.img from IMAGES...
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files", line 1647, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files", line 1602, in main
WriteFullOTAPackage(input_zip, output_zip)
File "./build/tools/releasetools/ota_from_target_files", line 570, in WriteFullOTAPackage
system_tgt = GetImage("system", OPTIONS.input_tmp)
File "./build/tools/releasetools/ota_from_target_files", line 328, in GetImage
return sparse_img.SparseImage(path, mappath, clobbered_blocks)
File "/home/nicholas/aospex/build/make/tools/releasetools/sparse_img.py", line 39, in __init__
header = struct.unpack("<I4H4I", header_bin)
struct.error: unpack requires a string argument of length 28
ninja: build stopped: subcommand failed.
01:55:58 ninja failed with: exit status 1
I think my repo didnt sync properly, i did make clobber and then repo sync and everything works fine now!

Categories

Resources