From 51a0e82eb29a6dfc79f93479883383fbdbf8bcc2 Mon Sep 17 00:00:00 2001 From: Dees_Troy Date: Wed, 5 Sep 2012 15:24:24 -0400 Subject: TWRP-ify AOSP code Pull in most TWRP sources Stub out partition management code Make it compile -- probably will not boot Kind of a mess but have to start somewhere --- extra-functions.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 extra-functions.h (limited to 'extra-functions.h') diff --git a/extra-functions.h b/extra-functions.h new file mode 100644 index 000000000..2cbd477ee --- /dev/null +++ b/extra-functions.h @@ -0,0 +1,36 @@ +#ifndef _EXTRAFUNCTIONS_HEADER +#define _EXTRAFUNCTIONS_HEADER + +int __system(const char *command); +FILE * __popen(const char *program, const char *type); +int __pclose(FILE *iop); + +// Device ID variable / function +char device_id[64]; +void get_device_id(); +static char* copy_sideloaded_package(const char* original_path); +int install_zip_package(const char* zip_path_filename); + +void wipe_dalvik_cache(); +void wipe_battery_stats(); +void wipe_rotate_data(); + +static long tmplog_offset = 0; + +// Battery level +char* print_batt_cap(); + +void update_tz_environment_variables(); + +void fix_perms(); + +void run_script(const char *str1, const char *str2, const char *str3, const char *str4, const char *str5, const char *str6, const char *str7, int request_confirm); + +void install_htc_dumlock(void); +void htc_dumlock_restore_original_boot(void); +void htc_dumlock_reflash_recovery_to_boot(void); + +void check_and_run_script(const char* script_file, const char* display_name); +int check_backup_name(int show_error); + +#endif // _EXTRAFUNCTIONS_HEADER \ No newline at end of file -- cgit v1.2.3