forked from CyanogenDefy/android_external_bootmenu
-
Notifications
You must be signed in to change notification settings - Fork 3
/
extendedcommands.h
77 lines (55 loc) · 2.68 KB
/
extendedcommands.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#define BM_ROOTDIR "/system/bootmenu"
#ifndef BOARD_BOOTMODE_CONFIG_FILE
#define BOARD_BOOTMODE_CONFIG_FILE "/cache/recovery/bootmode.conf"
#endif
static const char *FILE_PRE_MENU = BM_ROOTDIR "/script/pre_bootmenu.sh";
static const char *FILE_POST_MENU = BM_ROOTDIR "/script/post_bootmenu.sh";
static const char *FILE_2NDINIT = BM_ROOTDIR "/script/2nd-init.sh";
static const char *FILE_2NDBOOT = BM_ROOTDIR "/script/2nd-boot.sh";
static const char *FILE_STOCK = BM_ROOTDIR "/script/stock.sh";
static const char *FILE_ADBD = BM_ROOTDIR "/script/adbd.sh";
static const char *FILE_SDCARD = BM_ROOTDIR "/script/sdcard.sh";
static const char *FILE_CDROM = BM_ROOTDIR "/script/cdrom.sh";
static const char *FILE_SYSTEM = BM_ROOTDIR "/script/system.sh";
static const char *FILE_DATA = BM_ROOTDIR "/script/data.sh";
static const char *FILE_OVERCLOCK = BM_ROOTDIR "/script/overclock.sh";
static const char *FILE_OVERCLOCK_CONF = BM_ROOTDIR "/config/overclock.conf";
static const char *FILE_CUSTOMRECOVERY = BM_ROOTDIR "/script/recovery.sh";
static const char *FILE_STABLERECOVERY = BM_ROOTDIR "/script/recovery_stable.sh";
static const char *FILE_BOOTMODE_CLEAN = BM_ROOTDIR "/script/bootmode_clean.sh";
static const char *FILE_DEFAULTBOOTMODE = BM_ROOTDIR "/config/default_bootmode.conf";
static const char *FILE_BOOTMODE = BOARD_BOOTMODE_CONFIG_FILE;
static const char *FILE_BYPASS = "/data/.bootmenu_bypass";
static const char *SYS_POWER_CONNECTED = "/sys/class/power_supply/ac/online";
static const char *SYS_USB_CONNECTED = "/sys/class/power_supply/usb/online";
static const char *SYS_BATTERY_LEVEL = "/sys/class/power_supply/battery/charge_counter"; // content: 0 to 100
#if STOCK_VERSION
static const char *FILE_ROOT = BM_ROOTDIR "/script/unroot.sh";
static const char *FILE_UNINSTALL = BM_ROOTDIR "/script/uninstall.sh";
int show_menu_system(void);
#endif //STOCK_VERSION
int int_mode(char* mode);
const char* str_mode(int mode);
int show_menu_boot(void);
int show_menu_overclock(void);
int show_menu_tools(void);
int show_menu_recovery(void);
int usb_connected(void);
int adb_started(void);
int battery_level(void);
int snd_init(int ui);
int snd_boot(int ui);
int stk_boot(int ui);
int show_config_bootmode(void);
int get_default_bootmode(void);
int set_default_bootmode(int mode);
int get_bootmode(int clean);
int bootmode_write(const char* str);
int next_bootmode_write(const char* str);
int bypass_sign(const char* mode);
int bypass_check(void);
int exec_and_wait(char** argp);
int exec_script(const char* filename, int ui);
int real_execute(int r_argc, char** r_argv);
int set_usb_device_mode(const char *mode);
int mount_usb_storage(const char *part);