Merge "Update deapexer extract call with more input"
diff --git a/finalize-cleanup.sh b/finalize-cleanup.sh
index efa2707..e3bca63 100755
--- a/finalize-cleanup.sh
+++ b/finalize-cleanup.sh
@@ -9,7 +9,7 @@
     repo selfupdate
 
     repo forall -c '\
-        git checkout . ; git clean -fdx ;\
+        git checkout . ; git revert --abort ; git clean -fdx ;\
         git checkout @ ; git b fina-step1 -D ; git reset --hard; \
         repo start fina-step1 ; git checkout @ ; git b fina-step1 -D ;'
 }
diff --git a/finalize-step-1.sh b/finalize-step-1.sh
index 4e3e0c4..373dd28 100755
--- a/finalize-step-1.sh
+++ b/finalize-step-1.sh
@@ -6,13 +6,13 @@
 
 # set -ex
 
-function revert_local_changes() {
+function revert_to_unfinalized_state() {
     repo forall -c '\
-        git checkout . ; git clean -fdx ;\
+        git checkout . ; git revert --abort ; git clean -fdx ;\
         git checkout @ ; git b fina-step1 -D ; git reset --hard; \
         repo start fina-step1 ; git checkout @ ; git b fina-step1 -D ;\
         previousHash="$(git log --format=%H --no-merges --max-count=100 --grep ^FINALIZATION_STEP_1_SCRIPT_COMMIT | tr \n \040)" ;\
-        if [[ $previousHash ]]; then git revert --no-commit $previousHash ; fi ;'
+        if [[ $previousHash ]]; then git revert --no-commit --strategy=ort --strategy-option=ours $previousHash ; fi ;'
 }
 
 function commit_changes() {
@@ -31,7 +31,7 @@
 
     repo selfupdate
 
-    revert_local_changes
+    revert_to_unfinalized_state
 
     # vndk etc finalization
     source $top/build/make/finalize-aidl-vndk-sdk-resources.sh