diff --git a/tools/findunused/findunusedresources b/tools/findunused/findunusedresources index 84c0f8259..6db99d5e7 100755 --- a/tools/findunused/findunusedresources +++ b/tools/findunused/findunusedresources @@ -35,6 +35,7 @@ do if [ -d $app/res ] then appname=$(basename $app) + iappname=$(grep LOCAL_PACKAGE_NAME $app/Android.mk | sed 's/.*:= *//') resources= for res in $(echo $app/res/* $(find $ANDROID_BUILD_TOP/vendor -type d -wholename $ANDROID_BUILD_TOP/vendor/*/$appname/res | grep overlay)) do @@ -51,7 +52,7 @@ do fi # find the R.java file that contains all the generated resource identifiers - rDotJava=$(find $ANDROID_BUILD_TOP/out/target/common/obj/APPS/${appname}_intermediates/ -name R.java) + rDotJava=$(find $ANDROID_BUILD_TOP/out/target/common/obj/APPS/${iappname}_intermediates/ -name R.java) # Simplistically process the content of the file to get the names of all the constants, # and try to find a reference to each constant.