capacitor-dex-editor 0.0.69 → 0.0.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +22 -0
- package/android/src/main/cpp/CMakeLists.txt +57 -0
- package/android/src/main/cpp/apk/apk_handler.cpp +121 -0
- package/android/src/main/cpp/apk/zip_utils.cpp +425 -0
- package/android/src/main/cpp/arsc/arsc_parser.cpp +390 -0
- package/android/src/main/cpp/dex/dex_builder.cpp +752 -0
- package/android/src/main/cpp/dex/dex_parser.cpp +620 -0
- package/android/src/main/cpp/dex/smali_disasm.cpp +1223 -0
- package/android/src/main/cpp/dex/smali_to_java.cpp +576 -0
- package/android/src/main/cpp/include/apk/apk_handler.h +41 -0
- package/android/src/main/cpp/include/apk/zip_utils.h +57 -0
- package/android/src/main/cpp/include/arsc/arsc_parser.h +98 -0
- package/android/src/main/cpp/include/dex/dex_builder.h +189 -0
- package/android/src/main/cpp/include/dex/dex_parser.h +137 -0
- package/android/src/main/cpp/include/dex/smali_disasm.h +127 -0
- package/android/src/main/cpp/include/dex/smali_to_java.h +50 -0
- package/android/src/main/cpp/include/xml/android_resources.h +495 -0
- package/android/src/main/cpp/include/xml/axml_parser.h +147 -0
- package/android/src/main/cpp/jni_bridge.cpp +872 -0
- package/android/src/main/cpp/third_party/miniz.c +646 -0
- package/android/src/main/cpp/third_party/miniz.h +605 -0
- package/android/src/main/cpp/third_party/miniz_common.h +97 -0
- package/android/src/main/cpp/third_party/miniz_export.h +6 -0
- package/android/src/main/cpp/third_party/miniz_tdef.c +1597 -0
- package/android/src/main/cpp/third_party/miniz_tdef.h +199 -0
- package/android/src/main/cpp/third_party/miniz_tinfl.c +770 -0
- package/android/src/main/cpp/third_party/miniz_tinfl.h +150 -0
- package/android/src/main/cpp/third_party/miniz_zip.c +4895 -0
- package/android/src/main/cpp/third_party/miniz_zip.h +454 -0
- package/android/src/main/cpp/third_party/nlohmann_json/CMakeLists.txt +0 -0
- package/android/src/main/cpp/third_party/nlohmann_json/single_include/nlohmann/json.hpp +24765 -0
- package/android/src/main/cpp/xml/axml_parser.cpp +1701 -0
- package/android/src/main/java/com/aetherlink/dexeditor/CppDex.java +295 -0
- package/android/src/main/java/com/aetherlink/dexeditor/DexManager.java +146 -50
- package/package.json +1 -1
- package/android/src/main/java/com/aetherlink/dexeditor/RustDex.java +0 -203
- package/android/src/main/jniLibs/arm64-v8a/libdex_rust.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libdex_rust.so +0 -0
- package/android/src/main/jniLibs/x86/libdex_rust.so +0 -0
- package/android/src/main/jniLibs/x86_64/libdex_rust.so +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
#include <assert.h>
|
|
3
|
+
#include <stdint.h>
|
|
4
|
+
#include <stdlib.h>
|
|
5
|
+
#include <string.h>
|
|
6
|
+
|
|
7
|
+
#include "miniz_export.h"
|
|
8
|
+
|
|
9
|
+
/* ------------------- Types and macros */
|
|
10
|
+
typedef unsigned char mz_uint8;
|
|
11
|
+
typedef int16_t mz_int16;
|
|
12
|
+
typedef uint16_t mz_uint16;
|
|
13
|
+
typedef uint32_t mz_uint32;
|
|
14
|
+
typedef uint32_t mz_uint;
|
|
15
|
+
typedef int64_t mz_int64;
|
|
16
|
+
typedef uint64_t mz_uint64;
|
|
17
|
+
typedef int mz_bool;
|
|
18
|
+
|
|
19
|
+
#define MZ_FALSE (0)
|
|
20
|
+
#define MZ_TRUE (1)
|
|
21
|
+
|
|
22
|
+
/* Works around MSVC's spammy "warning C4127: conditional expression is constant" message. */
|
|
23
|
+
#ifdef _MSC_VER
|
|
24
|
+
#define MZ_MACRO_END while (0, 0)
|
|
25
|
+
#else
|
|
26
|
+
#define MZ_MACRO_END while (0)
|
|
27
|
+
#endif
|
|
28
|
+
|
|
29
|
+
#ifdef MINIZ_NO_STDIO
|
|
30
|
+
#define MZ_FILE void *
|
|
31
|
+
#else
|
|
32
|
+
#include <stdio.h>
|
|
33
|
+
#define MZ_FILE FILE
|
|
34
|
+
#endif /* #ifdef MINIZ_NO_STDIO */
|
|
35
|
+
|
|
36
|
+
#ifdef MINIZ_NO_TIME
|
|
37
|
+
typedef struct mz_dummy_time_t_tag
|
|
38
|
+
{
|
|
39
|
+
mz_uint32 m_dummy1;
|
|
40
|
+
mz_uint32 m_dummy2;
|
|
41
|
+
} mz_dummy_time_t;
|
|
42
|
+
#define MZ_TIME_T mz_dummy_time_t
|
|
43
|
+
#else
|
|
44
|
+
#define MZ_TIME_T time_t
|
|
45
|
+
#endif
|
|
46
|
+
|
|
47
|
+
#define MZ_ASSERT(x) assert(x)
|
|
48
|
+
|
|
49
|
+
#ifdef MINIZ_NO_MALLOC
|
|
50
|
+
#define MZ_MALLOC(x) NULL
|
|
51
|
+
#define MZ_FREE(x) (void)x, ((void)0)
|
|
52
|
+
#define MZ_REALLOC(p, x) NULL
|
|
53
|
+
#else
|
|
54
|
+
#define MZ_MALLOC(x) malloc(x)
|
|
55
|
+
#define MZ_FREE(x) free(x)
|
|
56
|
+
#define MZ_REALLOC(p, x) realloc(p, x)
|
|
57
|
+
#endif
|
|
58
|
+
|
|
59
|
+
#define MZ_MAX(a, b) (((a) > (b)) ? (a) : (b))
|
|
60
|
+
#define MZ_MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
61
|
+
#define MZ_CLEAR_OBJ(obj) memset(&(obj), 0, sizeof(obj))
|
|
62
|
+
#define MZ_CLEAR_ARR(obj) memset((obj), 0, sizeof(obj))
|
|
63
|
+
#define MZ_CLEAR_PTR(obj) memset((obj), 0, sizeof(*obj))
|
|
64
|
+
|
|
65
|
+
#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
|
|
66
|
+
#define MZ_READ_LE16(p) *((const mz_uint16 *)(p))
|
|
67
|
+
#define MZ_READ_LE32(p) *((const mz_uint32 *)(p))
|
|
68
|
+
#else
|
|
69
|
+
#define MZ_READ_LE16(p) ((mz_uint32)(((const mz_uint8 *)(p))[0]) | ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
|
|
70
|
+
#define MZ_READ_LE32(p) ((mz_uint32)(((const mz_uint8 *)(p))[0]) | ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) | ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) | ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
|
|
71
|
+
#endif
|
|
72
|
+
|
|
73
|
+
#define MZ_READ_LE64(p) (((mz_uint64)MZ_READ_LE32(p)) | (((mz_uint64)MZ_READ_LE32((const mz_uint8 *)(p) + sizeof(mz_uint32))) << 32U))
|
|
74
|
+
|
|
75
|
+
#ifdef _MSC_VER
|
|
76
|
+
#define MZ_FORCEINLINE __forceinline
|
|
77
|
+
#elif defined(__GNUC__)
|
|
78
|
+
#define MZ_FORCEINLINE __inline__ __attribute__((__always_inline__))
|
|
79
|
+
#else
|
|
80
|
+
#define MZ_FORCEINLINE inline
|
|
81
|
+
#endif
|
|
82
|
+
|
|
83
|
+
#ifdef __cplusplus
|
|
84
|
+
extern "C"
|
|
85
|
+
{
|
|
86
|
+
#endif
|
|
87
|
+
|
|
88
|
+
extern MINIZ_EXPORT void *miniz_def_alloc_func(void *opaque, size_t items, size_t size);
|
|
89
|
+
extern MINIZ_EXPORT void miniz_def_free_func(void *opaque, void *address);
|
|
90
|
+
extern MINIZ_EXPORT void *miniz_def_realloc_func(void *opaque, void *address, size_t items, size_t size);
|
|
91
|
+
|
|
92
|
+
#define MZ_UINT16_MAX (0xFFFFU)
|
|
93
|
+
#define MZ_UINT32_MAX (0xFFFFFFFFU)
|
|
94
|
+
|
|
95
|
+
#ifdef __cplusplus
|
|
96
|
+
}
|
|
97
|
+
#endif
|