[Help] Build from source failed but make otapackage worked - Android Q&A, Help & Troubleshooting

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!

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

Invalid conversion!

I'm trying to build CM10.2 for an Allwinner A31 device. I also have an A31 dev tree for stock 4.2.2, which has the Cedarx framework I need, so I've imported it into the CM dev tree. Most things build fine without any, or much, changes but I'm getting the below error and haven't been able to fix it.
I've looked at just about everything and there doesn't seam to be a reason for the error. I have some "C" experience and I can handle some things but this is beyond my understanding.
Code:
frameworks/av/media/CedarX-Projects/CedarA/CedarARender.cpp: In member function 'android::status_t android::CedarAAudioPlayer::start(bool)':
frameworks/av/media/CedarX-Projects/CedarA/CedarARender.cpp:122:46: error: invalid conversion from 'int' to 'audio_output_flags_t' [-fpermissive]
In file included from frameworks/av/media/CedarX-Projects/CedarA/CedarARender.cpp:22:0:
frameworks/av/include/media/AudioTrack.h:168:25: error: initializing argument 6 of 'android::AudioTrack::AudioTrack(audio_stream_type_t, uint32_t, audio_format_t, audio_channel_mask_t, int, audio_output_flags_t, android::AudioTrack::callback_t, void*, int, int)' [-fpermissive]
make: *** [/home/curt/android/system/out/target/product/novo9/obj/SHARED_LIBRARIES/libCedarA_intermediates/CedarARender.o] Error 1
The CedarARender.cpp code is:
Code:
mAudioTrack = new AudioTrack(
AUDIO_STREAM_MUSIC, mSampleRate, AUDIO_FORMAT_PCM_16_BIT,
(mNumChannels == 2)
? AUDIO_CHANNEL_OUT_STEREO
: AUDIO_CHANNEL_OUT_MONO,
0, 0, &AudioCallback, this, 0); //This is line 122! The first "0".
These are the header lines referenced in the error:
Code:
AudioTrack( audio_stream_type_t streamType,
uint32_t sampleRate = 0,
audio_format_t format = AUDIO_FORMAT_DEFAULT,
audio_channel_mask_t channelMask = 0,
int frameCount = 0,
audio_output_flags_t flags = AUDIO_OUTPUT_FLAG_NONE,
callback_t cbf = NULL,
void* user = NULL,
int notificationFrames = 0,
int sessionId = 0);
The value of AUDIO_OUTPUT_FLAG_NONE is from <system/audio.h>:
Code:
typedef enum {
AUDIO_OUTPUT_FLAG_NONE = 0x0, // no attributes
AUDIO_OUTPUT_FLAG_DIRECT = 0x1, // this output directly connects a track
// to one output stream: no software mixer
AUDIO_OUTPUT_FLAG_PRIMARY = 0x2, // this output is the primary output of
// the device. It is unique and must be
// present. It is opened by default and
// receives routing, audio mode and volume
// controls related to voice calls.
AUDIO_OUTPUT_FLAG_FAST = 0x4, // output supports "fast tracks",
// defined elsewhere
AUDIO_OUTPUT_FLAG_DEEP_BUFFER = 0x8,// use deep audio buffers
#ifdef QCOM_HARDWARE
//Qualcomm Flags
AUDIO_OUTPUT_FLAG_LPA = 0x1000, // use LPA
AUDIO_OUTPUT_FLAG_TUNNEL = 0x2000, // use Tunnel
AUDIO_OUTPUT_FLAG_VOIP_RX = 0x4000, // use this flag in combination with DIRECT to
// indicate HAL to activate EC & NS
// path for VOIP calls
AUDIO_OUTPUT_FLAG_INCALL_MUSIC = 0x8000 //use this flag for incall music delivery
#endif
} audio_output_flags_t;
My question is, why is the "0" causing an error? I tried putting "AUDIO_OUTPUT_FLAG_NONE" and "0x0" in it's place but still get the error.
Any help would be appreciate!

Porting issues MIUI v6 G900F (klte)

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

Categories

Resources