(cpu_target: CPU_Tag) -> string
macOSLinuxWindows
#import "Android/Toolchain";
Procedures#
ABI names#
SHA#
(s: string) -> [SHA_DIGEST_LENGTH] u8
(s: string) -> [SHA256_DIGEST_LENGTH] u8
Project API#
(theme: Android_Default_Theme) -> string
(config: Android_Project_Config, recreate_existing_files := true) -> bool
Manifest API#
(manifest: *Android_Manifest_Binary)
(manifest: Android_Manifest_Binary, print_strings := false, print_resource_ids := false)
SDK API#
(log_errors := false) -> (bool, string)
(cpu: CPU_Tag) -> (triple: string, triple_with_sdk: string)
() -> NDK_Paths
(cpu: CPU_Tag) -> (libc_path: string, libc_platform_path: string)
() -> [] string
(cpu_target: CPU_Tag, output_dir: string) -> bool
Helper API#
() -> string
(app_name: string, package_name: string, output_path := "", activity := DEFAULT_ACTIVITY, debug := false) -> bool
(app_name: string, package_name: string, output_path := "", activity := DEFAULT_ACTIVITY, debug := false) -> bool
Device API#
(app_id: string) -> string
(file_path: string, app_id: string, external_storage_relative_path := "") -> bool
(directories: [] string, app_id: string, dest_relative_path := "", only_update_newer_files := false, force_create_directories := false) -> bool
(directories: [] string, app_id: string, dest_relative_path := "", only_update_newer_files := false, force_create_directories := false) -> bool
(required_reason := "by metaprogram", preferred_model_name := "")
(apk_path: string, reinstall_keeping_data := false, allow_test_apk := false, allow_version_code_downgrade := false, uninstall_and_retry_on_key_mismatch := true, log_errors := true) -> bool
Gradle API#
android_generate_apk2 overloads
(project_path: string, release := false) -> (bool, string)
(project_path: string, release := false) -> bool
(project_path: string, task: string, print_output := true) -> bool
JKS generation#
(java_bin_path: string, keystore_path: string, key_alias := DEFAULT_KEYSTORE_ALIAS, key_password := DEFAULT_KEYSTORE_PASSWORD, algorithm := Android_Signing_Key_Signature_Algorithm.EC, key_size := 0, common_name := "Jai Android", organization_name := "Jai", country_code := "US") -> (bool, Android_Signing_Key)
ASN1 identity#
ASN1 tags#
(s: *string) -> ASN1_Tag
(s: *string) -> u64
ASN1 values#
(data: string) -> s64
(data: string) -> ASN1_Object_Identifier
(oid: ASN1_Object_Identifier) -> string
ASN1 records#
asn1_read_value2 overloads
(s: *string) -> ASN1_Value
ASN1 diagnostics#
asn1_print3 overloads
(name: string, value: ASN1_Value)
Byte readers#
($Int_Type: Type, s: *string, $BIG_ENDIAN := false) -> Int_Type
(s: *string) -> string
($Int_Type: Type, s: *string, $BIG_ENDIAN := false) -> Int_Type
(s: *string, length: int) -> string
ASN1 hex#
to_hex_string2 overloads
(s: string) -> string
ADB process#
(command_args: ..string, device_serial := "", log_adb_command_errors := false, print_captured_output := false, loc := #caller_location, try_and_escape_spaces_in_shell_arguments := true) -> (bool, output_string := "", error_string := "", exit_code := 0)
() -> (Adb_Version_Info, bool)
(return_only_ready_devices := false) -> (bool, [] Adb_Device)
ADB transfer#
(local_source: string, remote_destination: string, only_update_newer_files := false, dry_run := false, compression_algorithm := Adb_Compression_Algorithm.UNSPECIFIED, disable_compression := false) -> bool
(remote_source: string, local_destination := "", preserve_timestamps := true, disable_compression := false, compression_algorithm := Adb_Compression_Algorithm.UNSPECIFIED) -> bool
(path: string) -> bool
(package_name: string) -> (bool, s32)
(package_name: string) -> bool
ADB apps#
(package_name: string) -> bool
(package_name: string) -> bool
(package_name: string) -> (running: bool, success: bool)
SDK discovery#
() -> (bool, string)
() -> (bool, string)
Config flags#
(s: string) -> Android_Config_Changes
X509 structure#
(certificate_data: string) -> ASN1_Value
Android ZIP wire#
(version_word: u16) -> Zip_Version
(version: Zip_Version) -> u16
(eocd: string) -> u32
(eocd: string, new_offset: u32)
(s: string) -> u32
(x: int) -> int
(x: int) -> int
Android ZIP writer#
(w: *Zip_Writer, do_crcs := true, max_alignment := 0)
(w: *Zip_Writer, filepath: string, zip_filename: string, compression := Zip_Compression_Method.NONE, alignment := 0) -> bool
(w: *Zip_Writer, file_data: string, zip_filename: string, compression := Zip_Compression_Method.NONE, alignment := 0) -> bool
(w: *Zip_Writer)
Android APK#
(filepath: string) -> Android_Apk
(apk: *Android_Apk)
(apk: Android_Apk, body: Code, flags: For_Flags)
(apk: Android_Apk)
JKS reader#
(data: string, password: string) -> (bool, certificate: string, encrypted_private_key_info: string)
JKS decryption#
(encrypted_data: string, password: string) -> (bool, string)
(encrypted_private_key_info: string, password: string) -> (bool, private_key_info: string)
APK signing framing#
APK signing digest#
APK signing orchestration#
(unsigned_apk_filepath: string, keystore_filepath: string, keystore_password := "password") -> (bool, string)
(unsigned_apk_filepath: string, private_key_info: string, certificate: string) -> (bool, string)
apk_verify2 overloads
(filepath: string, verbose := false) -> bool
Build API#
Loader API#
(project_config: Android_Project_Config, build_options: Build_Options, android_build_options: Android_Build_Options, force_rebuild_loader := false) -> bool
(project_config: Android_Project_Config, build_options: Build_Options, android_build_options: Android_Build_Options)
Types#
Android_Project_Configstruct
:: struct
:: enum
:: enum
ResStringPool_refstruct
:: struct
Android wire ABI: official androidfw/ResourceTypes.h.
Res_valuestruct
:: struct
ResXMLTree_attributestruct
:: struct
:: enum
:: enum
Android_Manifest_Binarystruct
:: struct
NDK_Pathsstruct
:: struct
:: enum
:: enum
Android_Signing_Keystruct
:: struct
ASN1_Object_Identifierstruct
:: struct
ASN1_Tag_Classenum
:: enum
:: enum
:: enum
ASN1_Tagstruct
:: struct
ASN1_Valuestruct
:: struct
Adb_Version_Infostruct
:: struct
Adb_Devicestruct
:: struct
:: enum
Android_Config_Changesenum flags
:: enum_flags
Zip_Versionstruct
:: struct
:: enum
Zip_Local_File_Headerstruct
:: struct
:: struct
:: struct
Zip_Writerstruct
:: struct
Android_Apkstruct
:: struct
Android_Apk_Entrystruct
:: struct
Algorithm_Idenum
:: enum
:: enum
Digeststruct
:: struct
Signaturestruct
:: struct
Certificiatestruct
:: struct
Apk_Signing_Block_V2struct
:: struct
Android_Build_Optionsstruct
:: struct
Constants#
:: SDK_LEVEL
:: 2
:: 0xffffffff
:: "http://schemas.android.com/apk/res/android"
:: false
:: 2
:: 3
:: "loader"
:: 0xfeedfeed
:: #run -> u32 { return 0xfeedfeed; }
:: ASN1_Object_Identifier.{ parts_count = 11, parts = .[1, 3, 6, 1, 4, 1, 42, 2, 17, 1, 1, 0] }
:: ASN1_Object_Identifier.[OID_SUN_JKS_ENCRYPTION]
:: 0x02014b50
:: 0x06054b50
:: 22
:: 16
:: size_of(Zip_Local_File_Header)
:: 0x0014
:: "APK Sig Block 42"
:: 0x7109871a
:: 0xf05368c0
:: 0x1b93ad61
:: 0x42726577