Tweak to findunusedresources so you can run it as "findunusedresources ." from within an application folder.
diff --git a/tools/findunused/findunusedresources b/tools/findunused/findunusedresources
index 748139a..0039733 100755
--- a/tools/findunused/findunusedresources
+++ b/tools/findunused/findunusedresources
@@ -26,6 +26,10 @@
for app in $apps
do
echo '-----------------------------------------------------------'
+ if [ "$app" == "." ]
+ then
+ app=$(pwd)
+ fi
if [ -d $app/res ]
then
appname=$(basename $app)
@@ -45,7 +49,7 @@
fi
# find the R.java file that contains all the generated resource identifiers
- rDotJava=$(find out/target/common/obj/APPS/${appname}_intermediates/ -name R.java)
+ rDotJava=$(find $ANDROID_BUILD_TOP/out/target/common/obj/APPS/${appname}_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.