-
-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gadget: Support loading assets from APK on Android
On Android, when apps have `extractNativeLibs` set to `false`, the configuration and potentially script files for frida-gadget are not extracted and cannot be read from the filesystem. Co-authored-by: Ole André Vadla Ravnås <[email protected]>
- Loading branch information
Showing
4 changed files
with
122 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,51 @@ | ||
[CCode (cprefix = "", gir_namespace = "Minizip", gir_version = "1.0", lower_case_cprefix = "mz_")] | ||
namespace Minizip { | ||
[SimpleType] | ||
[CCode (cheader_filename = "minizip/mz_strm.h,minizip/mz_zip.h,minizip/mz_zip_rw.h", cname = "gpointer", cprefix = "mz_zip_reader_", | ||
has_destroy_function = false)] | ||
public struct Reader { | ||
public static Reader create (out Reader stream = null); | ||
[CCode (cname = "mz_zip_reader_delete")] | ||
public static void destroy (ref Reader stream); | ||
|
||
public Status open_file (string path); | ||
public Status close (); | ||
|
||
public Status locate_entry (string filename, bool ignore_case); | ||
|
||
public Status entry_save_file (string path); | ||
public Status entry_save_buffer (uint8[] buf); | ||
public int32 entry_save_buffer_length (); | ||
} | ||
|
||
[CCode (cheader_filename = "minizip/mz.h", cname = "int32_t", cprefix = "MZ_", has_type_id = false)] | ||
public enum Status { | ||
OK, | ||
STREAM_ERROR, | ||
DATA_ERROR, | ||
MEM_ERROR, | ||
BUF_ERROR, | ||
VERSION_ERROR, | ||
|
||
END_OF_LIST, | ||
END_OF_STREAM, | ||
|
||
PARAM_ERROR, | ||
FORMAT_ERROR, | ||
INTERNAL_ERROR, | ||
CRC_ERROR, | ||
CRYPT_ERROR, | ||
EXIST_ERROR, | ||
PASSWORD_ERROR, | ||
SUPPORT_ERROR, | ||
HASH_ERROR, | ||
OPEN_ERROR, | ||
CLOSE_ERROR, | ||
SEEK_ERROR, | ||
TELL_ERROR, | ||
READ_ERROR, | ||
WRITE_ERROR, | ||
SIGN_ERROR, | ||
SYMLINK_ERROR, | ||
} | ||
} |