Skip to content

feat: added 'create' option on CLI to create IMG from rootFS files#216

Closed
abd3-13 wants to merge 1 commit into
ravindu644:mainfrom
abd3-13:main
Closed

feat: added 'create' option on CLI to create IMG from rootFS files#216
abd3-13 wants to merge 1 commit into
ravindu644:mainfrom
abd3-13:main

Conversation

@abd3-13

@abd3-13 abd3-13 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

reworked to fit the organized structure of codebase.

Add image creation workflow for DroidSpaces

This change introduces ds_create_image() in create_img.c, it creates an ext4 root filesystem image from given archive.

What this does

  • Creates a sparse disk image file
  • Formats it as ext4
  • Attaches it to a loop device
  • Creates and mounts a temporary mount point
  • Extracts the rootfs archive into the mounted image
  • Syncs and cleans up loop device and mount point

Key components

  • create_sparse_image() : initializes sparse image file
  • attach_loop() / detach_loop() : manages loop device binding
  • make_mount_point() : creates temporary mount directory
  • extract_archive() : extracts tar-based rootfs into image
  • ds_create_image() : orchestrates the full image build process

Notes
It Requires root privileges
It validates archive format before extraction
It Supports xz, gzip, bzip2, and tar archives

@ravindu644

Copy link
Copy Markdown
Owner

Sorry, the same is achievable using a simple shell script.

Droidspaces is just a container runtime that boots an already-extracted rootfs.

@ravindu644 ravindu644 closed this Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants