Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cm 11.0 #51

Open
wants to merge 912 commits into
base: cm-14.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
912 commits
Select commit Hold shift + click to select a range
8736cc1
Remove "fix permissions" option
mikeNG Jul 23, 2013
b9ecf64
Add power off & reboot to bootloader mode in advanced menu
mikeNG Jul 12, 2013
f427a7d
cwm: Add liblog dependency
rmcc Jul 25, 2013
62c6902
Add a recovery version variable
rmcc Jul 26, 2013
1a6c91f
Use fstab v1 as a default.
rmcc Jul 26, 2013
96d9f22
Remove "fix permissions" option
mikeNG Jul 23, 2013
05ad6a1
Add power off & reboot to bootloader mode in advanced menu
mikeNG Jul 12, 2013
d56d0fd
Fixes for Superuser
koush Jul 28, 2013
ebecbc6
Fixes for Superuser
koush Jul 28, 2013
912b6d9
su installation and detection updates for 4.3
koush Jul 30, 2013
ab6769d
6035
koush Jul 30, 2013
a2aac83
add su daemon runner
koush Jul 30, 2013
bf44d1e
Merge remote-tracking branch 'github/cm-10.1' into cm-10.2
koush Jul 30, 2013
04f02c5
4.3 detection fix
koush Jul 30, 2013
ab43813
Merge remote-tracking branch 'github/cm-10.1' into cm-10.2
koush Jul 30, 2013
37566e2
unset immutable bit on install-recovery.sh
koush Jul 31, 2013
00857c9
Don't treat link-time warnings as errors when linking with libbusybox
steven676 Jul 31, 2013
8b26c06
Fix roots.c to use fs_mgr
koush Aug 1, 2013
d9b4033
move key loading to verifier code
Nov 2, 2012
2ad4587
recovery: save logs from the last few invocations of recovery
May 16, 2013
4dc0a95
Revert "Use fstab v1 as a default."
chirayudesai Aug 4, 2013
c70c202
recovery: ignore voldmanaged volumes
pawitp Aug 3, 2013
935a504
Update wipe data option confirmation
mikeNG Jul 12, 2013
7e87f26
Add sdparted option to partition in ext4 fstype
PhilZ-cwm6 Jun 12, 2013
fce3e08
Merge "Revert "Use fstab v1 as a default."" into cm-10.2
koush Aug 5, 2013
cb9b7a6
Merge "Add sdparted option to partition in ext4 fstype" into cm-10.2
koush Aug 6, 2013
985324f
unlink() equals remove() in this situation can cause data loss and fi…
PhilZ-cwm6 Aug 6, 2013
3860331
fix stat for correct free space when backup path is second storage
PhilZ-cwm6 Aug 9, 2013
0c328c7
Shrink cid
koush Aug 13, 2013
e19f1d8
v6036
koush Aug 13, 2013
6bdc5c6
Enable mount usb for external storage on datamedia devices
PhilZ-cwm6 Aug 14, 2013
5a650a9
Fix issue where android device manager, etc, dont actually wipe data.
koush Aug 16, 2013
6830848
Merge "fix stat for correct free space when backup path is second sto…
koush Aug 16, 2013
c0cab40
Merge "Enable mount usb for external storage on datamedia devices" in…
koush Aug 16, 2013
ead73d8
Merge "Fix issue where android device manager, etc, dont actually wip…
koush Aug 16, 2013
aee5f78
If sd-ext is defined in recovery.fstab, but user did not partition sd…
PhilZ-cwm6 Aug 16, 2013
03667f6
recovery: Only install adb keys once
hyperb1iss Aug 18, 2013
efa3b63
recovery: Revenge of MiniVold
hyperb1iss Aug 17, 2013
ad054c6
recovery: Don't enable UMS function unless needed
hyperb1iss Aug 24, 2013
a0591d6
recovery: Don't automount external storage at startup
hyperb1iss Aug 24, 2013
d30168d
recovery: Add sdcard daemon
hyperb1iss Aug 24, 2013
97451a7
recovery: try to write EMMC partitions more reliably
Jul 8, 2013
5b331f8
recovery: write partitions more conservatively
Jul 9, 2013
a4b5d55
recovery: sleep after writing partition and closing it
Jul 10, 2013
fa9a990
recovery: Support for compressed backups
hyperb1iss Aug 24, 2013
7c576cf
recovery: all vold loglines deserve newlines
mdmower Aug 24, 2013
f0bd6bf
recovery: close zip archive after installation
pawitp Aug 25, 2013
0005c1e
recovery: Cleanups
hyperb1iss Aug 24, 2013
f22626c
recovery: only use vold format for exact path match
pawitp Aug 26, 2013
a8ed457
recovery: don't overallocate for get_android_secure_path
pawitp Aug 26, 2013
ca02861
recovery: fix --update_package using legacy path
pawitp Aug 26, 2013
f13325d
Merge "recovery: fix --update_package using legacy path" into cm-10.2
rmcc Aug 26, 2013
ea09a67
Revert "recovery: fix --update_package using legacy path"
pawitp Aug 26, 2013
efa6d29
Merge "Revert "recovery: fix --update_package using legacy path"" int…
pawitp Aug 26, 2013
a867f0e
recovery: Don't link with minivold
hyperb1iss Aug 27, 2013
83e26bf
Revert "Revert "recovery: fix --update_package using legacy path""
pawitp Aug 27, 2013
9046cda
Recovery: Loki patching support
Shelnutt2 Jul 20, 2013
7cc6afa
Don't print any messages regarding sd-ext to the UI
chirayudesai Sep 8, 2013
bfb14d1
Merge "Recovery: Loki patching support" into cm-10.2
rmcc Sep 10, 2013
ecd5053
Add required libraries to list.
maniac103 Sep 23, 2013
619fbec
Version bump to 6.0.2.8
gweedo767 Sep 24, 2013
fd6b35c
Support f2fs format
Aug 28, 2013
7889b76
Bump to 6.0.3.9
gweedo767 Sep 30, 2013
a638264
recovery: support format external storage to custom fstype using vold
PhilZ-cwm6 Sep 5, 2013
80a3625
Make updating Advanced Menu a simpler task
PhilZ-cwm6 Sep 8, 2013
e506d5b
Fix refresh usb devices when key repeat is enabled
PhilZ-cwm6 Sep 18, 2013
684696c
Fix extract of tgz multi volumes corruption at split point
PhilZ-cwm6 Sep 16, 2013
af5f065
"not enough rainbows, 1 star uninstall"
CEnnis91 May 2, 2013
ed4b49f
fix f2fs formatting from edify scripting
PhilZ-cwm6 Sep 27, 2013
388b651
6040
koush Oct 2, 2013
2620558
Allow sideload to be used in conjunction with other commands.
koush Oct 5, 2013
00f56a4
6.0.4.2
koush Oct 6, 2013
9a786a7
6.0.4.3
koush Oct 6, 2013
0624f20
Update events.c
jeboo Oct 6, 2013
8efc113
loki: Update to 2.0, Add support for LG G2 (and device trees in general)
djrbliss Oct 7, 2013
6603219
6.0.4.4
koush Oct 8, 2013
fbdc080
Merge "Add required libraries to list." into cm-10.2
maniac103 Oct 10, 2013
3144dc2
Make "one confirm" the default action. Create .many_confirm to restore
gweedo767 Oct 12, 2013
358d4f0
Enable optional swipe based touch controls
gweedo767 Oct 12, 2013
cd35208
always do a clean reboot
PhilZ-cwm6 Oct 14, 2013
f4c69bf
fix the following bugs to better handle new vold code
PhilZ-cwm6 Oct 2, 2013
b33e2c2
Do not log to screen when mounting/unmounting sdcards.
PhilZ-cwm6 Oct 17, 2013
8eeed5f
friendly write_recovery_version()
PhilZ-cwm6 Oct 12, 2013
b745eda
One less integer
PhilZ-cwm6 Oct 19, 2013
48ccdce
minui: Match API to AOSP
hyperb1iss Oct 20, 2013
388e6a7
Add guard makefile for allowing simple recovery build
hyperb1iss Oct 22, 2013
2457cc0
Revert "minui: Match API to AOSP"
hyperb1iss Oct 22, 2013
110942f
Prevent scroll drifting in swipe recovery
gweedo767 Oct 22, 2013
0929066
minui: Allow devices to blank/unblank using LCD backlight
intervigilium Oct 22, 2013
80b7826
Merge "minui: Allow devices to blank/unblank using LCD backlight" int…
rmcc Oct 24, 2013
16faa40
recovery: Add a proper CleanSpec.mk
hyperb1iss Oct 26, 2013
652ef0b
recovery: Clean ALL the things
hyperb1iss Oct 27, 2013
67d5c22
Revert "Revert "minui: Match API to AOSP""
rmcc Nov 5, 2013
00492db
updater: introduce and set_metadata and set_metadata_recursive
nickkral Sep 7, 2013
fc3dd71
Don't apply permission changes to symlink.
nickkral Sep 10, 2013
232abdd
4.4 compatibility
rmcc Nov 5, 2013
8c0c080
verifier: update to support certificates using SHA-256
Apr 10, 2013
e0a9047
start healthd in recovery
toddpoynor Jun 4, 2013
5544cbb
recovery: copy logs to cache more aggressively
Jul 2, 2013
68edaf7
recovery: preserve recovery logs across cache wipes
Jul 9, 2013
d411cba
fix secure adb in recovery
Sep 11, 2013
f12882f
recovery: fix mounting voldmanaged volumes
pawitp Nov 12, 2013
2eb95fd
Quickly install from last install path
gweedo767 Oct 29, 2013
54c6024
unmount /data on user request for /data/media devices
PhilZ-cwm6 Oct 15, 2013
9cc0672
install zip menu fixes:
PhilZ-cwm6 Nov 3, 2013
10c0a94
clean up reboot to main system and remove old useless variables
PhilZ-cwm6 Nov 4, 2013
5cd054b
Swipe: make swipe thresholds uniform across devices
mdmower Nov 5, 2013
6ad98a3
6.0.4.5
koush Nov 20, 2013
6da91b2
Merge "Quickly install from last install path" into cm-11.0
gweedo767 Nov 21, 2013
8acddae
Merge "unmount /data on user request for /data/media devices" into cm…
gweedo767 Nov 21, 2013
e70b903
Merge "install zip menu fixes: * fix memory overflow if num_extra…
gweedo767 Nov 21, 2013
06ec6f4
Merge "clean up reboot to main system and remove old useless variable…
gweedo767 Nov 21, 2013
dd74441
Merge "Swipe: make swipe thresholds uniform across devices" into cm-11.0
gweedo767 Nov 21, 2013
11b8326
Don't return immediately from reboot commands.
nickkral Oct 24, 2013
1a144b0
Enable incremental builder to find files that moved, and
Nov 7, 2013
3a03519
Support recoveries without CONFIG_EXT4_FS_XATTR
rmcc Dec 8, 2013
af7574f
Remove redundant variable definition
PhilZ-cwm6 Dec 1, 2013
4219d88
Do data/media checks first in format_device()
PhilZ-cwm6 Oct 19, 2013
7083b50
Merge "Remove redundant variable definition" into cm-11.0
gweedo767 Dec 23, 2013
5158c0a
recovery: Add support for performance control
hyperb1iss Dec 6, 2013
a46e1bd
Define paths for recovery settings files in a separate header
PhilZ-cwm6 Dec 1, 2013
cd2f376
Bump recovery to 6.0.4.6
gweedo767 Jan 1, 2014
00e7de3
Merge "Define paths for recovery settings files in a separate header"…
gweedo767 Jan 2, 2014
bb753fe
Hide install icon after success as it is done for regular zip installs
PhilZ-cwm6 Dec 23, 2013
7f254e1
Nandroid menu fixes:
PhilZ-cwm6 Nov 7, 2013
741c7cb
Free up memory from file menu pointers
PhilZ-cwm6 Nov 23, 2013
408fdf1
Do not modify original items pointer when filtering NULL entries
PhilZ-cwm6 Dec 23, 2013
8324241
Loki updates:
PhilZ-cwm6 Dec 23, 2013
7f3e0d6
recovery: Fix the configuration of default_backup_format
crpalmer Jan 7, 2014
186f7bc
Clean up c formatting - 1
mdmower Jan 9, 2014
efec57a
su: Update for latest su daemon compatibility
rmcc Jan 12, 2014
3db302b
Merge "Clean up c formatting - 1" into cm-11.0
gweedo767 Jan 14, 2014
824447d
minui: do not use flexible array initialization
synergydev Nov 7, 2013
e216a26
Remove "Go Back" option from verify root and recovery options
gweedo767 Jan 13, 2014
7a78235
Merge "Remove "Go Back" option from verify root and recovery options"…
gweedo767 Jan 14, 2014
53b6f08
do not use static type
PhilZ-cwm6 Jan 12, 2014
df59bcf
remove unused variable
PhilZ-cwm6 Jan 7, 2014
d7faa36
do not error on missing sd-ext when wiping dalvik cache
PhilZ-cwm6 Jan 12, 2014
b633db3
Fix potential chmod failures
mdmower Jan 9, 2014
1153ae5
Add a copy of the updater binary to the recovery resources
rmcc Jan 13, 2014
a0f0fc0
install: Support downgrade scenarios
rmcc Jan 13, 2014
809de0b
install: Fix possible overflow condition in the updater "scanner"
rmcc Jan 15, 2014
a874b5f
Merge "minui: do not use flexible array initialization" into cm-11.0
rmcc Jan 15, 2014
1404ae2
correctly mount tmpfs as /tmp in recovery
Jan 14, 2014
ebed461
Merge "remove unused variable" into cm-11.0
mdmower Jan 15, 2014
567585c
install: Really fix possible overflow condition in the updater "scanner"
PhilZ-cwm6 Jan 15, 2014
c90b00a
Use cat for adb backup.
koush Jan 17, 2014
d70c1f3
Fix up bu restore.
koush Jan 22, 2014
12de713
6047
koush Jan 22, 2014
d75ea2d
New mount/format capabilities function for Mounts menu
mdmower Jan 16, 2014
6431d59
Enable perf mode only in tar(.gz) compress/extract wrappers
PhilZ-cwm6 Jan 14, 2014
2bb5680
Do not use performance mode during package install
PhilZ-cwm6 Jan 21, 2014
fa2288a
recovery: add overlay interface for recovery mode
Nov 18, 2013
ad6c7e2
recovery: Add support for split display
Dec 9, 2013
6501cd9
recovery: Fix compilation for non MSM target
Dec 27, 2013
56827c6
Fix overlay inclusion on MSM
rmcc Feb 6, 2014
3245208
Fix mkfs.f2fs calling in roots
SkrilaxCZ Nov 15, 2013
66d63f7
Fix recovery reboot command by adding the init sys.powerctl property …
PhilZ-cwm6 Feb 8, 2014
4d0e795
fix display current path when navigating backward in folders
PhilZ-cwm6 Feb 11, 2014
f870897
fix compiler warning
PhilZ-cwm6 Feb 12, 2014
c036d70
Fix mass storage in recovery
pawitp Feb 13, 2014
51c7f50
Merge "Fix mass storage in recovery" into cm-11.0
pawitp Feb 13, 2014
c71a2af
Revert "Don't return immediately from reboot commands."
hyperb1iss Feb 23, 2014
6c3cd5b
nandroid: Allow tar backups of yaffs2 partitions
mikeNG Jan 21, 2014
d5c4302
clean up unused variables and fix compiler warnings
PhilZ-cwm6 Feb 23, 2014
5b2c6d1
update-binary: Add collect_backup_data function
rmcc Feb 25, 2014
919077f
fix fread buffer has no terminating null string
PhilZ-cwm6 Mar 12, 2014
1d42eef
use different USB PIDs for adb and adb+ums modes
jcsullins Mar 15, 2014
8c4b6a9
use correct USB PID for adb and new PID for adb+ums
jcsullins Mar 17, 2014
5d47309
recovery: Compatibility with upstream minui change
hyperb1iss Mar 19, 2014
10a36da
remove unused variable
PhilZ-cwm6 Mar 23, 2014
2371d9d
Make legacy prop environment available to recovery
that1 Mar 7, 2014
da36597
Use legacy property environment if old update-binary
mdmower Mar 20, 2014
69ff8b9
Revert "Add a copy of the updater binary to the recovery resources"
mdmower Mar 20, 2014
ba6b5e8
Only init legacy property environment once
mdmower Mar 27, 2014
797fbc5
loki updates:
PhilZ-cwm6 Mar 4, 2014
b6230df
allow using custom recovery_ui.c
M1cha Mar 11, 2014
f91ee1c
mounts: add find_mounted_volume_by_real_node
M1cha Mar 11, 2014
626f070
add basic support for native dualboot
M1cha Mar 11, 2014
3c9f03c
allow changing menu color
M1cha Feb 20, 2013
867f468
dualboot: add truedualboot support
M1cha Mar 12, 2014
47f8bb0
dualboot: add menu item under advanced to set bootmode
M1cha Mar 12, 2014
3dafc75
dualboot: handle 'format_device'
M1cha Mar 15, 2014
613db95
Version 6.0.4.8
mdmower Apr 10, 2014
569fe1f
Recovery: swap XY on swipe controls
sbrissen Oct 18, 2013
d3c8d42
Prohibit mounting/formatting swap partitions in recovery
steven676 Apr 7, 2014
2cc2297
Fix verify_root_and_recovery menu selections
PhilZ-cwm6 Apr 19, 2014
cf95801
shell pipe: set exit code to error if any pipe element fails
PhilZ-cwm6 Apr 27, 2014
6545c82
cwm: Remove hardcoded paths
tdmcyngn Apr 22, 2014
3edda44
cwm: Honor recovery variant
tdmcyngn May 5, 2014
bb6ed28
Keep 'show log' on screen until user dismisses it
mdmower May 7, 2014
7a2c3cf
dedupe: backup & restore selinux contexts.
xiaolu May 2, 2014
7d53181
create /data/media directory after internal storage is wiped
PhilZ-cwm6 May 9, 2014
8156541
format non vold extra storage to ext4 when no selinux context is defined
PhilZ-cwm6 Dec 30, 2013
6b97d5e
do not include dead code
PhilZ-cwm6 May 31, 2014
5ef9747
cleanup unused code
PhilZ-cwm6 May 31, 2014
7051738
fix null struct exception
PhilZ-cwm6 May 31, 2014
b4da686
cleanup preserve data/media workaround
PhilZ-cwm6 May 31, 2014
340d693
Fix 'media' exception:
PhilZ-cwm6 Jun 4, 2014
f43957e
Support selinux context inside tar archive
PhilZ-cwm6 May 7, 2014
54fd234
f2fs: fix nandroid restore to f2fs partitions
PhilZ-cwm6 May 31, 2014
173f293
Match AOSP get/set_bootloader_message() layouts
mdmower Jun 4, 2014
8528fde
Remove obsolete check on device_flash_type() before trying to read ar…
steven676 May 25, 2014
5c11855
Version 6.0.4.9
mdmower Jun 4, 2014
1040240
fix compiler warnings
PhilZ-cwm6 Jun 5, 2014
93a6755
fix segfault during shell nandroid backup/restore commands
PhilZ-cwm6 Jun 6, 2014
13651e2
Fixup nandroid-md5.sh with legitimate return code
mdmower Jun 10, 2014
4998303
Only chmod backup/blobs directory if it exists
mdmower Jun 10, 2014
1b687b5
enhance the progress thread update
PhilZ-cwm6 Jun 11, 2014
dcd6350
Refresh nandroid progress without on-screen text
mdmower Jun 9, 2014
f5caec7
Enable cmdline nandroid backup of vold volumes
mdmower Jun 12, 2014
15b499b
Progress thread: less aggressive redraw
mdmower Jun 16, 2014
e9a983d
stop showing the background icon progress outside it's scope
PhilZ-cwm6 Jun 16, 2014
e600e99
Code clean-up
mdmower Jun 24, 2014
97d4946
Allow selective restore of more than one partition
mdmower Jun 21, 2014
c8eb16e
Use OpenSSL libcrypto for MD5 checking
mdmower Jun 21, 2014
c7a03bb
Show logo bckgnd after install, backup, restore
mdmower Jun 24, 2014
5b682e6
MD5: add a missing bounds check
mdmower Jun 25, 2014
83cd496
MD5: handle no newline at end of nandroid.md5
mdmower Jun 28, 2014
5ee09a2
recovery: SEARCH should work as SELECT_ITEM
pawitp Jun 30, 2014
e5720dd
Expose ui_has_initialized
mdmower Jun 30, 2014
3367aba
MD5: Abort on errors for cmdline nandroid restore
mdmower Jun 30, 2014
e144ac0
Improve touch code
tdmcyngn Jun 17, 2014
0f71324
Support capacitive touch keys
mdmower Jun 28, 2014
2ee8640
Only show Mount USB storage if UMS possible
mdmower Jun 26, 2014
fe2ad05
Version 6.0.5.0
mdmower Jun 30, 2014
2301cbc
Do not wipe block misc on bootloader msg update
mdmower Jul 9, 2014
547c06f
Allow custom bootloader msg offset in block misc
mdmower Jul 9, 2014
881f631
Set SELinux security contexts correctly for init and services.
stephensmalley Jan 13, 2014
a7498bb
Add seclabel to minivold
mdmower Jul 10, 2014
8e1155a
adbd: switch to su domain when running as root
nickkral Jan 18, 2014
2ffad65
minadbd: remove dead code
colincross Jan 24, 2014
97f9e95
recovery: fix building with pointer-to-int errors turned on
colincross Feb 6, 2014
f6df6a0
add --shutdown_after option to recovery
Mar 18, 2014
cbe5d00
fix vulnerability in bspatch
May 13, 2014
3350c88
exit instead of return if sideload file creation fails
Jan 9, 2013
67cd9db
Let minivold run in the recovery se domain
mdmower Jul 31, 2014
06511b3
Touch: slot and tracking updates
tdmcyngn Jul 17, 2014
9678ca2
fix unnecessarily slow writing of EMMC partitions
Dec 19, 2013
36810d2
Tell vold to use the fstype defined in fstab when formatting
thoemy Jul 29, 2014
3f28d95
Fix BOARD_RECOVERY_BLDRMSG_OFFSET CFLAG
mdmower Aug 15, 2014
f7117c8
remove duplicate, over-general dependency on kernel features.
Sep 6, 2014
6b2b227
ADB sideload command not work
Jan 17, 2014
56877d8
recovery: Fix adb with linux 3.10
benoitgoby Feb 20, 2014
7b47cfd
Version 6.0.5.1
mdmower Sep 13, 2014
90ca138
cwm: Use pathmap for recovery
tdmcyngn Oct 1, 2014
5d9a704
cwm: Declare additional dependencies instead of relying on build hax
tdmcyngn Oct 8, 2014
6a9437f
cwm: Allow device-specific recovery modules
mdmower Nov 5, 2014
90afeeb
Track usage of Vector / SortedVector from libutils DO NOT MERGE
narayank Sep 2, 2015
a8cf70c
Remove mistakenly added bulletin patch
mikeNG Jul 25, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
197 changes: 184 additions & 13 deletions Android.mk
Original file line number Diff line number Diff line change
@@ -1,29 +1,106 @@
ifeq ($(call my-dir),$(call project-path-for,recovery))

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

commands_recovery_local_path := $(LOCAL_PATH)
# LOCAL_CPP_EXTENSION := .c

LOCAL_SRC_FILES := \
recovery.c \
bootloader.c \
install.c \
roots.c \
ui.c \
verifier.c
mounts.c \
extendedcommands.c \
nandroid.c \
nandroid_md5.c \
reboot.c \
../../system/core/toolbox/dynarray.c \
../../system/core/toolbox/newfs_msdos.c \
firmware.c \
edifyscripting.c \
prop.c \
adb_install.c \
verifier.c \
../../system/vold/vdc.c \
propsrvc/legacy_property_service.c

ADDITIONAL_RECOVERY_FILES := $(shell echo $$ADDITIONAL_RECOVERY_FILES)
LOCAL_SRC_FILES += $(ADDITIONAL_RECOVERY_FILES)

ifndef BOARD_TOUCH_RECOVERY
ifdef BOARD_RECOVERY_SWIPE
LOCAL_SRC_FILES += input/touch.c
endif
endif

LOCAL_MODULE := recovery

LOCAL_FORCE_STATIC_EXECUTABLE := true

RECOVERY_API_VERSION := 3
RECOVERY_FSTAB_VERSION := 2

ifdef I_AM_KOUSH
RECOVERY_NAME := ClockworkMod Recovery
LOCAL_CFLAGS += -DI_AM_KOUSH
else
ifndef RECOVERY_NAME
RECOVERY_NAME := CWM-based Recovery
endif
endif

RECOVERY_VERSION := $(RECOVERY_NAME) v6.0.5.1

LOCAL_CFLAGS += -DRECOVERY_VERSION="$(RECOVERY_VERSION)"
RECOVERY_API_VERSION := 2
LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)

ifdef BOARD_TOUCH_RECOVERY
ifeq ($(BOARD_USE_CUSTOM_RECOVERY_FONT),)
BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_15x24.h\"
endif
endif

ifeq ($(BOARD_USE_CUSTOM_RECOVERY_FONT),)
BOARD_USE_CUSTOM_RECOVERY_FONT := \"font_10x18.h\"
endif

BOARD_RECOVERY_CHAR_WIDTH := $(shell echo $(BOARD_USE_CUSTOM_RECOVERY_FONT) | cut -d _ -f 2 | cut -d . -f 1 | cut -d x -f 1)
BOARD_RECOVERY_CHAR_HEIGHT := $(shell echo $(BOARD_USE_CUSTOM_RECOVERY_FONT) | cut -d _ -f 2 | cut -d . -f 1 | cut -d x -f 2)

LOCAL_CFLAGS += -DBOARD_RECOVERY_CHAR_WIDTH=$(BOARD_RECOVERY_CHAR_WIDTH) -DBOARD_RECOVERY_CHAR_HEIGHT=$(BOARD_RECOVERY_CHAR_HEIGHT)

BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_UMS_LUNFILE BOARD_RECOVERY_ALWAYS_WIPES BOARD_RECOVERY_HANDLES_MOUNT BOARD_TOUCH_RECOVERY RECOVERY_EXTEND_NANDROID_MENU TARGET_USE_CUSTOM_LUN_FILE_PATH TARGET_DEVICE TARGET_RECOVERY_FSTAB BOARD_NATIVE_DUALBOOT BOARD_NATIVE_DUALBOOT_SINGLEDATA

ifndef BOARD_TOUCH_RECOVERY
BOARD_RECOVERY_DEFINES += BOARD_RECOVERY_SWIPE BOARD_RECOVERY_SWIPE_SWAPXY
endif

$(foreach board_define,$(BOARD_RECOVERY_DEFINES), \
$(if $($(board_define)), \
$(eval LOCAL_CFLAGS += -D$(board_define)=\"$($(board_define))\") \
) \
)

ifneq ($(BOARD_RECOVERY_BLDRMSG_OFFSET),)
LOCAL_CFLAGS += -DBOARD_RECOVERY_BLDRMSG_OFFSET=$(BOARD_RECOVERY_BLDRMSG_OFFSET)
endif

LOCAL_STATIC_LIBRARIES :=

ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
LOCAL_CFLAGS += -DUSE_EXT4
LOCAL_C_INCLUDES += system/extras/ext4_utils
LOCAL_STATIC_LIBRARIES += libext4_utils libz
LOCAL_CFLAGS += -DUSE_EXT4 -DMINIVOLD
LOCAL_C_INCLUDES += system/extras/ext4_utils system/core/fs_mgr/include external/fsck_msdos
LOCAL_C_INCLUDES += system/vold external/openssl/include

LOCAL_STATIC_LIBRARIES += libext4_utils_static libz libsparse_static

ifeq ($(ENABLE_LOKI_RECOVERY),true)
LOCAL_CFLAGS += -DENABLE_LOKI
LOCAL_STATIC_LIBRARIES += libloki_static
LOCAL_SRC_FILES += loki/loki_recovery.c
endif

# This binary is in the recovery ramdisk, which is otherwise a copy of root.
Expand All @@ -33,25 +110,108 @@ endif

LOCAL_MODULE_TAGS := eng

ifeq ($(TARGET_RECOVERY_UI_LIB),)
ifeq ($(BOARD_CUSTOM_RECOVERY_KEYMAPPING),)
LOCAL_SRC_FILES += default_recovery_keys.c
else
LOCAL_SRC_FILES += $(BOARD_CUSTOM_RECOVERY_KEYMAPPING)
endif

ifeq ($(BOARD_CUSTOM_RECOVERY_UI),)
LOCAL_SRC_FILES += default_recovery_ui.c
else
LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB)
LOCAL_SRC_FILES += $(BOARD_CUSTOM_RECOVERY_UI)
endif

LOCAL_STATIC_LIBRARIES += libvoldclient libsdcard libminipigz libfsck_msdos
LOCAL_STATIC_LIBRARIES += libmake_ext4fs libext4_utils_static libz libsparse_static

ifeq ($(TARGET_USERIMAGES_USE_F2FS), true)
LOCAL_CFLAGS += -DUSE_F2FS
LOCAL_STATIC_LIBRARIES += libmake_f2fs libfsck_f2fs libfibmap_f2fs
endif
LOCAL_STATIC_LIBRARIES += libext4_utils libz
LOCAL_STATIC_LIBRARIES += libminzip libunz libmtdutils libmincrypt
LOCAL_STATIC_LIBRARIES += libminui libpixelflinger_static libpng libcutils

LOCAL_STATIC_LIBRARIES += libminzip libunz libmincrypt

LOCAL_STATIC_LIBRARIES += libminizip libminadbd libedify libbusybox libmkyaffs2image libunyaffs liberase_image libdump_image libflash_image
LOCAL_LDFLAGS += -Wl,--no-fatal-warnings

LOCAL_STATIC_LIBRARIES += libfs_mgr libdedupe libcrypto_static libcrecovery libflashutils libmtdutils libmmcutils libbmlutils

ifeq ($(BOARD_USES_BML_OVER_MTD),true)
LOCAL_STATIC_LIBRARIES += libbml_over_mtd
endif

LOCAL_STATIC_LIBRARIES += libminui libpixelflinger_static libpng libcutils liblog libutils
LOCAL_STATIC_LIBRARIES += libstdc++ libc

LOCAL_C_INCLUDES += system/extras/ext4_utils
LOCAL_STATIC_LIBRARIES += libselinux
LOCAL_STATIC_LIBRARIES += libcrypto_static

RECOVERY_LINKS := bu make_ext4fs edify busybox flash_image dump_image mkyaffs2image unyaffs erase_image nandroid reboot volume setprop getprop start stop dedupe minizip setup_adbd fsck_msdos newfs_msdos vdc sdcard pigz

ifeq ($(TARGET_USERIMAGES_USE_F2FS), true)
RECOVERY_LINKS += mkfs.f2fs fsck.f2fs fibmap.f2fs
endif

# nc is provided by external/netcat
RECOVERY_SYMLINKS := $(addprefix $(TARGET_RECOVERY_ROOT_OUT)/sbin/,$(RECOVERY_LINKS))

BUSYBOX_LINKS := $(shell cat external/busybox/busybox-minimal.links)
exclude := tune2fs mke2fs
RECOVERY_BUSYBOX_SYMLINKS := $(addprefix $(TARGET_RECOVERY_ROOT_OUT)/sbin/,$(filter-out $(exclude),$(notdir $(BUSYBOX_LINKS))))

LOCAL_ADDITIONAL_DEPENDENCIES := \
killrecovery.sh \
parted \
sdparted \
su.recovery \
install-su.sh \
run-su-daemon.sh

LOCAL_ADDITIONAL_DEPENDENCIES += \
minivold \
recovery_e2fsck \
recovery_mke2fs \
recovery_tune2fs \
mount.exfat_static

LOCAL_ADDITIONAL_DEPENDENCIES += $(RECOVERY_SYMLINKS) $(RECOVERY_BUSYBOX_SYMLINKS)

ifneq ($(TARGET_RECOVERY_DEVICE_MODULES),)
LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_RECOVERY_DEVICE_MODULES)
endif

include $(BUILD_EXECUTABLE)

$(RECOVERY_SYMLINKS): RECOVERY_BINARY := $(LOCAL_MODULE)
$(RECOVERY_SYMLINKS):
@echo "Symlink: $@ -> $(RECOVERY_BINARY)"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf $(RECOVERY_BINARY) $@

# Now let's do recovery symlinks
$(RECOVERY_BUSYBOX_SYMLINKS): BUSYBOX_BINARY := busybox
$(RECOVERY_BUSYBOX_SYMLINKS):
@echo "Symlink: $@ -> $(BUSYBOX_BINARY)"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf $(BUSYBOX_BINARY) $@

include $(CLEAR_VARS)
LOCAL_MODULE := killrecovery.sh
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
LOCAL_SRC_FILES := killrecovery.sh
include $(BUILD_PREBUILT)

include $(CLEAR_VARS)

LOCAL_SRC_FILES := verifier_test.c verifier.c

LOCAL_C_INCLUDES += system/extras/ext4_utils system/core/fs_mgr/include

LOCAL_MODULE := verifier_test

LOCAL_FORCE_STATIC_EXECUTABLE := true
Expand All @@ -62,13 +222,24 @@ LOCAL_STATIC_LIBRARIES := libmincrypt libcutils libstdc++ libc

include $(BUILD_EXECUTABLE)


include $(commands_recovery_local_path)/bmlutils/Android.mk
include $(commands_recovery_local_path)/dedupe/Android.mk
include $(commands_recovery_local_path)/flashutils/Android.mk
include $(commands_recovery_local_path)/libcrecovery/Android.mk
include $(commands_recovery_local_path)/minui/Android.mk
include $(commands_recovery_local_path)/minelf/Android.mk
include $(commands_recovery_local_path)/minzip/Android.mk
include $(commands_recovery_local_path)/minadbd/Android.mk
include $(commands_recovery_local_path)/mtdutils/Android.mk
include $(commands_recovery_local_path)/mmcutils/Android.mk
include $(commands_recovery_local_path)/tools/Android.mk
include $(commands_recovery_local_path)/edify/Android.mk
include $(commands_recovery_local_path)/updater/Android.mk
include $(commands_recovery_local_path)/applypatch/Android.mk
include $(commands_recovery_local_path)/utilities/Android.mk
include $(commands_recovery_local_path)/su/Android.mk
include $(commands_recovery_local_path)/voldclient/Android.mk
include $(commands_recovery_local_path)/loki/Android.mk
commands_recovery_local_path :=

endif
30 changes: 30 additions & 0 deletions CleanSpec.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,33 @@
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/EXECUTABLES/recovery_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/EXECUTABLES/dump_image_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/EXECUTABLES/flash_image_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/EXECUTABLES/erase_image_intermediates)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libflashutils_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libmmcutils_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libmtdutils_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libbmlutils_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libcrecovery_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libvoldclient_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libminui_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libdedupe_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libedify_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libdump_image_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/liberase_image_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libflash_image_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libminizip_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libminadbd_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libmkyaffs2image_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libunyaffs_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libminelf_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libbml_over_mtd_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libmake_ext4fs_intermediates)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libminui_intermediates)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/RECOVERY_EXECUTABLES)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/EXECUTABLES/updater_intermediates)
Loading