Unable to access signapk.jar - android

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

Related

Incremental OTA zip is not generating

I am trying to generate minor.zip(Incremental OTA zip)file.
Home$build/tools/releasetools/ota_from_target_files -i
out/target/product/xxx/OTA_20170916.zip
out/target/product/xxx/OTA-20171010.zip
out/target/product/xxx/minor.zip
unzipping target target-files...
Traceback (most recent call last):
File "build/tools/releasetools/ota_from_target_files", line 2028, in
<module>
main(sys.argv[1:])
File "build/tools/releasetools/ota_from_target_files", line 1937, in
main
OPTIONS.info_dict = common.LoadInfoDict(input_zip)
File "build/tools/releasetools/common.py", line 141, in LoadInfoDict
raise ValueError("can't find recovery API version in input target-files")
ValueError: can't find recovery API version in input target-files
This error is coming...
I followed this site http://solarex.github.io/wiki/Android/android_ota_update.html
Could you please help to overcome this error
I got solution for incremental OTA zip creation.
Step 1: Copy new OTA and old OTA zip files from out/target/product/xxx/obj/PACKAGING/target_files_intermediates/
Step 2: ./build/tools/releasetools/ota_from_target_files -i old.zip new.zip update.zip
Incremental OTA file will be generate.

CyanogenMod 13 compiling error.

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.

infer -- gradle build is not working

I'm trying to use the Infer tool to analyze my app code. I followed these steps and every time I'm trying to run infer -- gradle build I'm getting the below errors :
infer -- gradle build
Running and capturing gradle compilation...
Traceback (most recent call last):
File "/usr/local/bin/infer", line 183, in <module>
main()
File "/usr/local/bin/infer", line 147, in main
capture_exitcode = imported_module.gen_instance(args,cmd).capture()
File "/usr/local/Cellar/infer/0.8.1/libexec/infer/lib/python/inferlib/capture/gradle.py", line 87, in capture
cmds = self.get_infer_commands(util.get_build_output(self.build_cmd))
File "/usr/local/Cellar/infer/0.8.1/libexec/infer/lib/python/inferlib/capture/util.py", line 25, in get_build_output
proc = subprocess.Popen(build_cmd, stdout=subprocess.PIPE)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Any idea would be appreciated !!
I found that Infer is already included in the new android studio 2.2 where you can run it directly from Analyze->Infer Nullity then specify the scope.

compilation error with the build.py script in Kivy

I have recently installed a Ubuntu 13.10 virtual machine and have set the Kivy development environment for it i.e cloning kivy, building a distribution with distribute.sh and building an apk with the build.py script. While packaging my project to APK file and while running the ./build.py script i had the following error :
[aidl] /home/administrator/sdk/build-tools/19.0.1/aidl: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
BUILD FAILED
/home/administrator/sdk/tools/ant/build.xml:653: The following error occurred while executing this line:
/home/administrator/sdk/tools/ant/build.xml:659: null returned: 127
Total time: 1 second
Traceback (most recent call last):
File "./build.py", line 412, in <module>
make_package(args)
File "./build.py", line 336, in make_package
subprocess.check_call([ANT, arg])
File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ant', 'debug']' returned non-zero exit status 1 re
it is really confusing! I have downloaded SDK and NDK and pointed to where these files are located while setting my environmental variables. what am I missing?
Well i have solved it in the end! And the clue was here
[aidl] /home/administrator/sdk/build-tools/19.0.1/aidl: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
Explained : the Linux distro that i am working on is on a 64 bit machine so some c++ libraries were necessary to be able to run 32 bit applications so what i did is the following:
$ sudo apt-get install lib32stdc++6
and it was solved!

Android Nexus 10 AOSP build AndroidViewClient

I finally managed to successfully build a Nexus 10 image (full_manta-userdebug) with Google Mobile Services installed but unfortunately, I'm unable to use my MonkeyRunner script that uses AndroidViewClient. It crashes out of the script with the following:
/system/bin/sh: uiautomator: not found
130628 14:12:41.242:S [MainThread] [com.android.monkeyrunner.MonkeyRunnerOptions] Script terminated due to an exception
130628 14:12:41.242:S [MainThread] [com.android.monkeyrunner.MonkeyRunnerOptions]Traceback (most recent call last):
File "/home/allen/projects/cts-scripts/4.2/cts-setup.py", line 361, in <module>
main()
File "/home/allen/projects/cts-scripts/4.2/cts-setup.py", line 339, in main
vc = ViewClient(device, serialno)
File "/home/allen/projects/AndroidViewClient/AndroidViewClient/src/com/dtmilano/android/viewclient.py", line 1188, in __init__
self.dump()
File "/home/allen/projects/AndroidViewClient/AndroidViewClient/src/com/dtmilano/android/viewclient.py", line 1780, in dump
self.setViewsFromUiAutomatorDump(received)
File "/home/allen/projects/AndroidViewClient/AndroidViewClient/src/com/dtmilano/android/viewclient.py", line 1530, in setViewsFromUiAutomatorDump
self.__parseTreeFromUiAutomatorDump(received)
File "/home/allen/projects/AndroidViewClient/AndroidViewClient/src/com/dtmilano/android/viewclient.py", line 1688, in _ViewClient__parseTreeFromUiAutomatorDump
self.root = parser.Parse(receivedXml)
File "/home/allen/projects/AndroidViewClient/AndroidViewClient/src/com/dtmilano/android/viewclient.py", line 988, in Parse
parserStatus = parser.Parse(uiautomatorxml, 1)
File "/home/allen/android/android-sdks/tools/lib/jython-standalone-2.5.4-rc1.jar/Lib/xml/parsers/expat.py", line 212, in Parse
xml.parsers.expat.ExpatError: Content is not allowed in prolog.
Do I need to install the ViewServer for this to work or did I forget to include the uiautomator backend when I built the image?
Try uiautomator from command line to find out if it's there or not:
$ adb shell uiautomator
if your output is similar to
Usage: uiautomator <subcommand> [options]
Available subcommands:
help: displays help message
...
then you have uiautomator installed. Otherwise if the output is
/system/bin/sh: uiautomator: not found
then you forgot to include it in the image.
You don't need ViewServer if UiAutomator is used as AndroidViewClient back-end.

Categories

Resources