当然对于一般情况,out\target\common\obj\JAVA_LIBRARIES\framework_intermediates\classes.jar对于我们来说就足够了。
DESTINATION_FOLDER=Debug_libs
SOURCE_FOLDER=‘android/out/target/common/obj/JAVA_LIBRARIES‘
FILE_NAME=‘classes-full-debug.jar‘
echo $DESTINATION_FOLDER
if [ -d $DESTINATION_FOLDER ]
then
echo "Checking destination ... OK"
else
echo "Creating destination ..."
mkdir $DESTINATION_FOLDER
if [ $? -ne 0 ]
then
echo "Error!"
exit
fi
fi
echo "Copy files ..."
dirs=`ls $SOURCE_FOLDER | tr ‘\n‘ ‘ ‘`
for i in $dirs
do
if [ -f ${SOURCE_FOLDER}/${i}/$FILE_NAME ]
then
file=${i%_intermediates}-${FILE_NAME}
echo Copy $file
cp ${SOURCE_FOLDER}/${i}/$FILE_NAME ${DESTINATION_FOLDER}/$file
if [ $? -ne 0 ]
then
echo "Error! Cannot copy ${SOURCE_FOLDER}/${i}/$FILE_NAME"
exit
fi
fi
done