CyanogenMod 13 compiling error. - android

I'm trying to port CM13 to LG K7, and it stopped with this error:
Generating digraph...
Finding vertex sequence...
Reversing backward edges...
0/0 dependencies (0.00%) were violated; 0 source blocks stashed.
Improving vertex order...
Reticulating splines...
max stashed blocks: 0 (0 bytes), limit: <unknown>
using prebuilt boot.img from BOOTABLE_IMAGES...
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files", line 1772, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files", line 1727, in main
WriteFullOTAPackage(input_zip, output_zip)
File "./build/tools/releasetools/ota_from_target_files", line 710, in WriteFullOTAPackage
common.CheckSize(boot_img.data, "boot.img", OPTIONS.info_dict)
File "/home/taco/android/system/build/tools/releasetools/common.py", line 701, in CheckSize
p = info_dict["fstab"][mount_point]
KeyError: '/boot'
build/core/Makefile:1912: recipe for target '/home/taco/android/system/out/target/product/m1/cm_m1-ota-7a8eeaa18d.zip' failed
make: *** [/home/taco/android/system/out/target/product/m1/cm_m1-ota-7a8eeaa18d.zip] Error 1
make: Leaving directory '/home/taco/android/system'
#### make failed to build some targets (11:25 (mm:ss)) ####
taco#taco-VirtualBox:~/android/system$
i couldn't resolve this issue by my self.

Related

Unable to access signapk.jar

So, I am trying to create an OTA package in AOSP and I run into this error at the very end.
2020-07-23 09:09:28 - common.py - INFO : using prebuilt boot.img from IMAGES...
2020-07-23 09:09:28 - common.py - INFO : boot size (13910016) is 20.73% of limit (67108864)
2020-07-23 09:09:29 - ota_from_target_files.py - ERROR :
ERROR:
Traceback (most recent call last):
File "/home/shen/android-11/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 2263, in <module>
File "/home/shen/android-11/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 2243, in main
File "/home/shen/android-11/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 1986, in GenerateNonAbOtaPackage
File "/home/shen/android-11/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 884, in WriteFullOTAPackage
File "/home/shen/android-11/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 1332, in FinalizeMetadata
File "/home/shen/android-11/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 1318, in ComputeAllPropertyFiles
File "/home/shen/android-11/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 495, in SignOutput
File "/home/shen/android-11/out/host/linux-x86/bin/ota_from_target_files/common.py", line 1898, in SignFile
proc.returncode, stdoutdata))
ExternalError: Failed to run signapk.jar: return code 1:
Error: Unable to access jarfile out/host/linux-x86/framework/signapk.jar
Compressing system.new.dat with brotli
Compressing vendor.new.dat with brotli
09:09:30 ninja failed with: exit status 1
#### failed to build some targets (01:44 (mm:ss)) ####
I checked and there is no signapk.jar created in the out directory.
I found the answer in case anybody face it in future. Building the signapk.jar separately fixes the issue. So do a make signapk.jar

[Android,Facebook,Infer]Too many open files about infer error

I use Facebook's Infer to check my android code
infer -- ./gradlew build
after 8 minutes
Fatal error: exception Sys_error("/Users/lm/project/android_workplace/******/app/build/intermediates/exploded-aar/com.mogujie/user/1.2.17/jars/classes.jar: Too many open files")
Traceback (most recent call last):
File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/infer", line 180, in <module>
main()
File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/infer", line 144, in main
capture_exitcode = imported_module.gen_instance(args, cmd).capture()
File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/../lib/capture/gradle.py", line 83, in capture
return util.run_commands(cmds)
File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/../lib/capture/util.py", line 40, in run_commands
if not cmd.start():
File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/inferlib.py", line 692, in start
if self.capture() == os.EX_OK:
File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/inferlib.py", line 478, in capture
return self.run_infer_frontend()
File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/inferlib.py", line 469, in run_infer_frontend
self.args.analyzer
File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/inferlib.py", line 385, in run_command
raise e
subprocess.CalledProcessError: Command '[u'/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/InferJava', u'-project_root', '/Users/lm/project/android_workplace/Minicooper4android', u'-results_dir', u'/Users/lm/project/android_workplace/Minicooper4android/infer-out', u'-verbose_out', '/var/folders/2r/7hc18jz1091_jg7_8jcnqlhr0000gn/T/javac_qWbfkP.out', u'-models', u'/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/../lib/java/models.jar', u'-no-static_final']' returned non-zero exit status 2
From http://fbinfer.com/support
The maximum number of files a program can simultaneously hold open is a bit low on MacOs. You can increase the limit by running these commands for example:
sysctl -w kern.maxfiles=20480
sysctl -w kern.maxfilesperproc=22480
ulimit -S -n 2048

Error involving subprocess.py while building Android for a RK3066 device

I get an error when building Android from source which I have not tinkered with and it should really by all means work (I'm quite certain I've got all the libs installed, Java and Python in the correct version). Error messages go as follows:
> Traceback (most recent call last):
File "../../base/android/jni_generator/jni_generator.py", line 1065, in <module>
sys.exit(main(sys.argv))
File "../../base/android/jni_generator/jni_generator.py", line 1061, in main
options.optimize_generation)
File "../../base/android/jni_generator/jni_generator.py", line 996, in GenerateJNIHeader
jni_from_javap = JNIFromJavaP.CreateFromClass(input_file, namespace)
File "../../base/android/jni_generator/jni_generator.py", line 507, in CreateFromClass
stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
make: *** [out/target/product/rk3066/obj/GYP/shared_intermediates/ui/gl/jni/Surface_jni.h] Error 1
make: *** Waiting for unfinished jobs....
I'm not really a specialist, so maybe the information I have provided is not complete. In this case - let me know.
At line 507 in file external/chromium_org/base/android/jni_generator/jni_generator.py
p = subprocess.Popen(args=['javap', class_name],
cwd=os.path.dirname(class_file),
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
It seems you don't have javap available in your PATH
If you have installed the jdk1.6.0_45 in usr/lib/jvm, then you can run this command
sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jdk1.6.0_45/bin/javap 1

Error when trying to use android systrace.py line 135

New to android and wanted to do a little debugging with the systrace tool however I am unable to run the tool on the emulator (tried running the python script with python 2.0.1, 2.7.x, 3.x) as well as using ADT.
However they all produce different errors:
Developers | Systrace claims that it requires 2.x so using Python 2.x and executing python command systrace.py --help, I get:
C:\Development\Android\sdk\platform-tools\systrace>python systrace.py --help
Traceback (most recent call last):
File "systrace.py", line 286, in <module>
main()
File "systrace.py", line 60, in main
device_sdk_version = get_device_sdk_version()
File "systrace.py", line 44, in get_device_sdk_version
stderr=subprocess.PIPE)
File "C:\Reuben\Softwares\Python 2.7.6\Lib\subprocess.py", line 709, in __init__
errread, errwrite)
File "C:\Reuben\Softwares\Python 2.7.6\Lib\subprocess.py", line 957, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
C:\Development\Android\sdk\platform-tools\systrace>python systrace.py --help
File "systrace.py", line 135
css = '\n'.join(linked_css_tag % (os.path.join(src_dir, f)) for f in css_files)
^
SyntaxError: invalid syntax
But with Admin permission:
C:\Development\Android\sdk\platform-tools\systrace>systrace.py --help
File "C:\Development\Android\sdk\platform-tools\systrace\systrace.py", line 135
css = '\n'.join(linked_css_tag % (os.path.join(src_dir, f)) for f in css_files)
^
SyntaxError: invalid syntax
With ADT settings
Error dialog
Other Relevant Information:
Enabled: Android Debugging, Profile GPU rendering
Enable OpenGL traces: Systrace (Graphics)
Enable traces: Graphics,Input
Tried Other solution but got "mount: Device or resource busy"

target id android-8 is not valid. use 'android list targets' to get the target ids

I want to build apk from my python main.py file. I am running this command
./build.py --package org.test.testapp --name testapp --version 1.0 --dir testapp debug adb installd
I am getting error as
Error: Target id 'android-8' is not valid. Use 'android list targets' to get the target ids.
Traceback (most recent call last):
File "./build.py", line 412, in <module>
make_package(args)
File "./build.py", line 304, in make_package
make_pythonzip()
File "./build.py", line 132, in make_pythonzip
python_files = [x for x in listfiles(d) if select(x)]
File "./build.py", line 96, in listfiles
for item in os.listdir(d):
OSError: [Errno 2] No such file or directory: '/home/home/Downloads/python-for-android/src/private/lib/python2.7'
It means you didn't followed the requirements / python-for-android installation process. You get this issue because you didn't installed the Android API 8 on your computer.

Categories

Resources