Skip to content

Commit 4b805b4

Browse files
committed
update tools
1 parent ad673a3 commit 4b805b4

39 files changed

+68
-106
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
bin/*
21
obj
32
libs
3+
bin
4+
build_cmake.sh
5+
build

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ set(common_include
1313
)
1414

1515
add_subdirectory(cmake)
16+
17+
install(TARGETS sefcontext_decompile img2simg simg2img make_ext4fs DESTINATION ${BIN})

cmake/make_ext4fs_tools/CMakeLists.txt

Lines changed: 63 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,66 @@ cmake_minimum_required(VERSION 3.14.2)
22

33
project(make_ext4fs_tools)
44

5-
add_subdirectory(make_ext4fs)
6-
add_subdirectory(img2simg)
7-
add_subdirectory(simg2img)
8-
add_subdirectory(sefcontext_decompile)
5+
set(SEFCONTEXT_DECOMPILE ${SRC}/sefcontext_decompile)
6+
set(MAKE_EXT4FS ${SRC}/extras/ext4_utils)
7+
set(IMG2SIMG ${SRC}/core/libsparse)
8+
9+
set(SEFCONTEXT_DECOMPILE_SRC_FILES
10+
${SEFCONTEXT_DECOMPILE}/sefcontext_decompile.cpp
11+
)
12+
13+
set(IMG2SIMG_SRC_FILES
14+
${IMG2SIMG}/img2simg.c
15+
)
16+
17+
set(SIMG2IMG_SRC_FILES
18+
${IMG2SIMG}/simg2img.c
19+
)
20+
21+
set(MAKE_EXT4FS_SRC_FILES
22+
${MAKE_EXT4FS}/allocate.c
23+
${MAKE_EXT4FS}/canned_fs_config.c
24+
${MAKE_EXT4FS}/contents.c
25+
${MAKE_EXT4FS}/crc16.c
26+
${MAKE_EXT4FS}/ext4_sb.c
27+
${MAKE_EXT4FS}/ext4_utils.c
28+
${MAKE_EXT4FS}/ext4fixup.c
29+
${MAKE_EXT4FS}/extent.c
30+
${MAKE_EXT4FS}/indirect.c
31+
${MAKE_EXT4FS}/make_ext4fs.c
32+
${MAKE_EXT4FS}/make_ext4fs_main.c
33+
${MAKE_EXT4FS}/sha1.c
34+
${MAKE_EXT4FS}/uuid.c
35+
${MAKE_EXT4FS}/wipe.c
36+
)
37+
38+
set(CMAKE_C_FLAGS " \
39+
-D_GNU_SOURCE \
40+
-DANDROID \
41+
-DHOST \
42+
")
43+
44+
include_directories(
45+
${common_include}
46+
${MAKE_EXT4FS_SRC_FILES}
47+
)
48+
49+
50+
add_executable(make_ext4fs ${MAKE_EXT4FS_SRC_FILES})
51+
target_link_libraries(make_ext4fs
52+
selinux
53+
sparse
54+
zlib)
55+
56+
add_executable(img2simg ${IMG2SIMG_SRC_FILES})
57+
target_link_libraries(img2simg
58+
sparse
59+
zlib)
60+
61+
add_executable(simg2img ${SIMG2IMG_SRC_FILES})
62+
target_link_libraries(simg2img
63+
sparse
64+
zlib)
65+
66+
add_executable(sefcontext_decompile ${SEFCONTEXT_DECOMPILE_SRC_FILES})
67+
target_link_libraries(sefcontext_decompile)

cmake/make_ext4fs_tools/img2simg/CMakeLists.txt

Lines changed: 0 additions & 22 deletions
This file was deleted.

cmake/make_ext4fs_tools/make_ext4fs/CMakeLists.txt

Lines changed: 0 additions & 42 deletions
This file was deleted.

cmake/make_ext4fs_tools/sefcontext_decompile/CMakeLists.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

cmake/make_ext4fs_tools/simg2img/CMakeLists.txt

Lines changed: 0 additions & 22 deletions
This file was deleted.

prebuilt_binary/img2simg-arm64-v8a

86 KB
Binary file not shown.
77.4 KB
Binary file not shown.

prebuilt_binary/img2simg-x86

101 KB
Binary file not shown.

0 commit comments

Comments
 (0)