Android_boot_image_editor icon indicating copy to clipboard operation
Android_boot_image_editor copied to clipboard

Error - Packing - Possibly more than just path issue

Open ToddCrimson opened this issue 11 months ago • 2 comments

Editing - See below comment for details, but for help

  • I'm running latest v15_r1
  • Debian 12
  • Made sure that I have all requirements per your requirements
Linux / WSL: sudo apt install git device-tree-compiler lz4 xz-utils zlib1g-dev openjdk-17-jdk gcc g++ python3 python-is-python3 p7zip-full android-sdk-libsparse-utils erofs-utils
  • copied the system.img to the folder

I am not getting the system.img.signed file, see below and please do help.

Thank you

ToddCrimson avatar Jan 26 '25 20:01 ToddCrimson

Ok let me share the whole thing here:

Unpack Command and output

$ ./gradlew unpack
+ java -jar bbootimg/bbootimg.jar unpack
14:20:38.743 [main] INFO  cfig.packable.PackableLauncher - XXXX: args: [unpack]
14:20:38.859 [main] WARN  cfig.packable.PackableLauncher - args: 1, targetHandler: class rom.sparse.SparseImgParser
14:20:38.859 [main] INFO  cfig.packable.PackableLauncher - continue ...
14:20:38.860 [main] WARN  cfig.packable.PackableLauncher - [system.img] will be handled by [SparseImgParser]
14:20:38.915 [main] WARN  cfig.packable.PackableLauncher - 'unpack' sequence initialized
14:20:38.916 [main] WARN  cfig.packable.PackableLauncher - XXXX: args.size: 1
14:20:38.932 [main] INFO  rom.sparse.SparseImage - parsing Android sparse image system.img ...
14:20:38.934 [main] INFO  Helper - CMD: [simg2img, system.img, b81e027c-d05e-46ca-82d8-6e314fa97127], workDir: null
14:20:40.135 [main] INFO  rom.sparse.SparseImage - parsed Android sparse image system.img -> b81e027c-d05e-46ca-82d8-6e314fa97127
14:20:40.142 [main] INFO  Helper - 7z x build/unzip_boot/system.ext4 -y -obuild/unzip_boot/system
14:20:43.629 [main] INFO  avb.AVBInfo - parseFrom(FILE:build/unzip_boot/system.ext4) ...
14:20:43.649 [main] INFO  avb.AVBInfo - FILE:build/unzip_boot/system.ext4: Glance(footer=Footer(versionMajor=1, versionMinor=0, originalImageSize=2113515520, vbMetaOffset=2147008512, vbMetaSize=1856), vbMetaOffset=2147008512).footer
14:20:43.799 [main] INFO  avb.AVBInfo - VBMeta: build/unzip_boot/system.ext4 -> build/unzip_boot/system.ext4.avb.json
14:20:43.803 [main] WARN  rom.sparse.SparseImage - [aosp/plugged/bin/sefcontext_compile, -o, build/unzip_boot/file_contexts.bin, aosp/plugged/res/file_contexts.concat]
14:20:43.925 [main] INFO  rom.sparse.SparseImage - 
┌───────────────────────────────────────┬──────────────────────────────────────┐
│What                                   │Where                                 │
├───────────────────────────────────────┼──────────────────────────────────────┤
│image (sparse)                         │system.img                            │
├───────────────────────────────────────┼──────────────────────────────────────┤
│converted image (ext4)                 │build/unzip_boot/system.ext4          │
├───────────────────────────────────────┼──────────────────────────────────────┤
│extracted content                      │build/unzip_boot/system               │
├───────────────────────────────────────┼──────────────────────────────────────┤
│log                                    │build/unzip_boot/system.log           │
└───────────────────────────────────────┴──────────────────────────────────────┘

14:20:43.926 [main] WARN  cfig.packable.PackableLauncher - 'unpack' sequence completed

Contents of system.log

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,8 CPUs 11th Gen Intel(R) Core(TM) i7-1160G7 @ 1.20GHz (806C1),ASM,AES-NI)

Scanning the drive for archives:
1 file, 2147483648 bytes (2048 MiB)

Extracting archive: build/unzip_boot/system.ext4

WARNINGS:
There are data after the end of archive

--
Path = build/unzip_boot/system.ext4
Type = Ext
WARNINGS:
There are data after the end of archive
Physical Size = 2113515520
Tail Size = 33968128
Cluster Size = 4096
Free Space = 483135488
Modified = 2009-01-01 01:00:00
Created = 2009-01-01 01:00:00
Last Check Time = 2009-01-01 01:00:00
Host OS = Linux
Revision = 1
inode Size = 256
Code Page = UTF-8
Label = /
ID = 0CABA4F7F5C25C458095E0DCEE516C3D
Characteristics = EXT_ATTR RESIZE_INODE DIR_INDEX
Incompatible Features = FILETYPE EXTENTS FLEX_BG
Readonly-compatible Features = SPARSE_SUPER LARGE_FILE HUGE_FILE GDT_CSUM DIR_NLINK EXTRA_ISIZE
Written KiB = 1

Everything is Ok

Archives with Warnings: 1

Warnings: 1
Folders: 193
Files: 2944
Size:       1616235740
Compressed: 2147483648

And finally the error that I get when I pack the file

$ ./gradlew pack
+ java -jar bbootimg/bbootimg.jar pack
14:25:53.422 [main] INFO  cfig.packable.PackableLauncher - XXXX: args: [pack]
14:25:53.714 [main] WARN  cfig.packable.PackableLauncher - args: 1, targetHandler: class rom.sparse.SparseImgParser
14:25:53.715 [main] INFO  cfig.packable.PackableLauncher - continue ...
14:25:53.715 [main] WARN  cfig.packable.PackableLauncher - [system.img] will be handled by [SparseImgParser]
14:25:53.828 [main] WARN  cfig.packable.PackableLauncher - 'pack' sequence initialized
14:25:53.831 [main] WARN  cfig.packable.PackableLauncher - XXXX: args.size: 1
14:25:54.195 [main] WARN  rom.sparse.Ext4Generator - pack: APP, build/unzip_boot/, build/unzip_boot/system
14:25:54.196 [main] INFO  rom.sparse.Ext4Generator - newArgs: --hash_algorithm sha1
14:25:54.196 [main] INFO  Helper - CMD: du -b -k -s build/unzip_boot/system
14:25:54.270 [main] INFO  rom.sparse.Ext4Generator - theSize(raw): 1617137664
14:25:54.271 [main] INFO  rom.sparse.Ext4Generator - theSize(calc reserve): 1633914880
14:25:54.271 [main] INFO  rom.sparse.Ext4Generator - theSize(round 4k): 1633914880
14:25:54.340 [main] INFO  rom.sparse.Ext4Generator - extfs_inode_count: 3331
14:25:54.342 [main] WARN  rom.sparse.Ext4Generator - [mke2fs, -O, ^has_journal, -L, APP, -N, 3331, -I, 256, -M, APP, -m, 0, -t, ext4, -b, 4096, build/unzip_boot/system.ext4.signed, 398905]
mke2fs 1.46.6 (1-Feb-2023)
Creating regular file build/unzip_boot/system.ext4.signed
Creating filesystem with 398905 4k blocks and 3536 inodes
Filesystem UUID: ebd1a17b-5147-4e36-b085-f0d62ed8d464
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912

Allocating group tables: done                            
Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done 

14:25:54.359 [main] WARN  rom.sparse.Ext4Generator - [aosp/plugged/bin/e2fsdroid, -e, -p, out/target/product/shiba/system, -s, -S, build/unzip_boot/file_contexts.bin, -f, build/unzip_boot//APP, -a, /APP, build/unzip_boot/system.ext4.signed]
__populate_fs: No such file or directory while changing working directory to "/home/admin/boot_editor_v15_r1/build/unzip_boot//APP"
e2fsdroid: No such file or directory while populating file system
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:569)
        at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97)
        at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Instance.call(CallerImpl.kt:113)
        at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
        at cfig.packable.PackableLauncherKt.main(PackableLauncher.kt:144)
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
        at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
        at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
        at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:153)
        at rom.sparse.Ext4Generator.makeFileSystem(Ext4Generator.kt:122)
        at rom.sparse.Ext4Generator.pack(Ext4Generator.kt:45)
        at rom.sparse.SparseImage.pack(SparseImage.kt:32)
        at rom.sparse.SparseImgParser.pack(SparseImgParser.kt:52)
        ... 8 more

So what's the issue here?

ToddCrimson avatar Jan 26 '25 21:01 ToddCrimson

Update: Just did a fresh build of Debian 12 / installed / followed the guide / exact same results.

ToddCrimson avatar Jan 26 '25 22:01 ToddCrimson