Remove "cp $(out) ." from genrule
$(out) is the correct location for the output, and "." is the root of the source tree. Remove "cp $(out) ." to avoid writing to the source tree.
Bug: 185211826
Change-Id: Ie936d8b396e044f8ef4307df53232bea6cc770d6
Test: treehugger
diff --git a/Android.bp b/Android.bp
index 68da5c5..c8bf759 100644
--- a/Android.bp
+++ b/Android.bp
@@ -43,8 +43,7 @@
out: ["ThemePicker_res.zip"],
cmd: "INPUTS=($(in)) && "
+ "RES_DIR=$$(dirname $$(dirname $${INPUTS[0]})) && "
- + "$(location soong_zip) -o $(out) -C $$RES_DIR -D $$RES_DIR && "
- + "cp $(out) ."
+ + "$(location soong_zip) -o $(out) -C $$RES_DIR -D $$RES_DIR"
}
//