Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add e2fsdroid and ext2simg #36

Merged
merged 1 commit into from
Jan 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions vendor/CMakeLists.mke2fs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,32 @@ target_link_libraries("${ANDROID_MKE2FS_NAME}"
libext2fs libsparse libbase libzip liblog libutil Threads::Threads z)
target_include_directories("${ANDROID_MKE2FS_NAME}" PRIVATE
e2fsprogs/lib)

add_executable(e2fsdroid
e2fsprogs/contrib/android/e2fsdroid.c
e2fsprogs/contrib/android/basefs_allocator.c
e2fsprogs/contrib/android/block_range.c
e2fsprogs/contrib/android/base_fs.c
e2fsprogs/contrib/android/fsmap.c
e2fsprogs/contrib/android/block_list.c
e2fsprogs/contrib/android/perms.c)

include(CheckIncludeFile)
CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H)

if(HAVE_SYS_TYPES_H)
target_compile_definitions(e2fsdroid PUBLIC HAVE_SYS_TYPES_H)
endif(HAVE_SYS_TYPES_H)

target_link_libraries(e2fsdroid
libext2fs libsparse libzip libcutils liblog libutil libbase libselinux libsepol z pcre2-8 pthread)
target_include_directories(e2fsdroid PRIVATE
e2fsprogs/lib e2fsprogs/lib/ext2fs selinux/libselinux/include core/libcutils/include e2fsprogs/misc)

add_executable(ext2simg
e2fsprogs/contrib/android/ext2simg.c)

target_link_libraries(ext2simg
libext2fs libsparse libbase libzip liblog libutil z pthread)
target_include_directories(ext2simg PRIVATE
e2fsprogs/lib core/libsparse/include)
2 changes: 2 additions & 0 deletions vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ install(TARGETS
lpmake
lpunpack
simg2img
e2fsdroid
ext2simg
DESTINATION bin)

# Install common completion files.
Expand Down