Following the guide Signing Builds for Release
<https://source.android.com/devices/tech/ota/sign_builds.html>, I'm trying
to sign a target file with my own keys, I ran the command below:
./build/tools/releasetools/sign_target_files_apks \
-o \
-d ~/.android-certs \
target_files-20161102.zip \
signed-target_files-20161102.zip
failed with:
creating system.img...
Running: mkuserimg.sh -s /tmp/targetfiles-wqUF1M/system
/tmp/system-3giXhK.img ext4 system 3758096384 -T 1478166659 -B
/tmp/system-blocklist-WvcniP.map
/tmp/targetfiles-wqUF1M/BOOT/RAMDISK/file_contexts
make_ext4fs -s -T 1478166659 -S
/tmp/targetfiles-wqUF1M/BOOT/RAMDISK/file_contexts -B
/tmp/system-blocklist-WvcniP.map -l 3758096384 -a system
/tmp/system-3giXhK.img /tmp/targetfiles-wqUF1M/system
/tmp/targetfiles-wqUF1M/BOOT/RAMDISK/file_contexts: Permission denied
Running: simg2img /tmp/system-3giXhK.img /tmp/unsparse_system-3giXhK.img
Invalid sparse file format at heade
Failed to read sparse file
Traceback (most recent call last):
File "./build/tools/releasetools/sign_target_files_apks", line 493, in
<module>
main(sys.argv[1:])
File "./build/tools/releasetools/sign_target_files_apks", line 486, in
main
add_img_to_target_files.AddImagesToTargetFiles(args[1])
File
"/home/myron/hdd/home/myron/workspace/aosp/c10w/build/tools/releasetools/add_img_to_target_files.py",
line 278, in AddImagesToTargetFiles
AddSystem(output_zip, recovery_img=recovery_image, boot_img=boot_image)
File
"/home/myron/hdd/home/myron/workspace/aosp/c10w/build/tools/releasetools/add_img_to_target_files.py",
line 67, in AddSystem
block_list=block_list)
File
"/home/myron/hdd/home/myron/workspace/aosp/c10w/build/tools/releasetools/add_img_to_target_files.py",
line 75, in BuildSystem
return CreateImage(input_dir, info_dict, "system",
block_list=block_list)
File
"/home/myron/hdd/home/myron/workspace/aosp/c10w/build/tools/releasetools/add_img_to_target_files.py",
line 141, in CreateImage
assert succ, "build " + what + ".img image failed"
AssertionError: build system.img image failed
It seems like I don't have access permission to
/tmp/targetfiles-wqUF1M/BOOT/RAMDISK/file_contexts,
chown -R myron:myron /tmp didn't solve the problem.
Does anyone know what went wrong? Any help would be appreciated.
--
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
---
You received this message because you are subscribed to the Google Groups
"android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.