1 #!/bin/bash 2 # 3 # Copyright (C) 2008 The Android Open Source Project 4 # 5 # Licensed under the Apache License, Version 2.0 (the "License"); 6 # you may not use this file except in compliance with the License. 7 # You may obtain a copy of the License at 8 # 9 # http://www.apache.org/licenses/LICENSE-2.0 10 # 11 # Unless required by applicable law or agreed to in writing, software 12 # distributed under the License is distributed on an "AS IS" BASIS, 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 # See the License for the specific language governing permissions and 15 # limitations under the License. 16 17 # Set up prog to be the path of this script, including following symlinks, 18 # and set up progdir to be the fully-qualified pathname of its directory. 19 20 prog="$0" 21 while [ -h "${prog}" ]; do 22 newProg=`/bin/ls -ld "${prog}"` 23 newProg=`expr "${newProg}" : ".* -> \(.*\)$"` 24 if expr "x${newProg}" : 'x/' >/dev/null; then 25 prog="${newProg}" 26 else 27 progdir=`dirname "${prog}"` 28 prog="${progdir}/${newProg}" 29 fi 30 done 31 oldwd=`pwd` 32 progdir=`dirname "${prog}"` 33 cd "${progdir}" 34 progdir=`pwd` 35 prog="${progdir}"/`basename "${prog}"` 36 cd "${oldwd}" 37 38 libdir=`dirname $progdir`/framework 39 classpath=$libdir/signature-tools.jar:$libdir/dex-tools.jar:\ 40 $libdir/stringtemplate.jar:$libdir/antlr-2.7.7.jar 41 42 javaOpts="" 43 while expr "x$1" : 'x-J' >/dev/null; do 44 opt=`expr "$1" : '-J\(.*\)'` 45 javaOpts="${javaOpts} -${opt}" 46 shift 47 done 48 49 COREDEX=${ANDROID_PRODUCT_OUT}/../../common/obj/JAVA_LIBRARIES/core_intermediates/classes.dex 50 51 if [ ! -f ${COREDEX} ]; then 52 echo ERROR: $COREDEX not found 53 exit -1; 54 fi 55 56 sig --compare \ 57 --from sig ${ANDROID_BUILD_TOP}/cts/tools/signature-tools/spec/android.spec \ 58 --name android cupcake reference \ 59 --to dex ${COREDEX} \ 60 --name Android 1.0 \(current build\) \ 61 --out ${ANDROID_BUILD_TOP}/out/delta \ 62 --packages \ 63 java.beans \ 64 java.io \ 65 java.lang \ 66 java.lang.annotation \ 67 java.lang.ref \ 68 java.lang.reflect \ 69 java.math \ 70 java.net \ 71 java.nio \ 72 java.nio.channels \ 73 java.nio.channels.spi \ 74 java.nio.charset \ 75 java.nio.charset.spi \ 76 java.security \ 77 java.security.acl \ 78 java.security.cert \ 79 java.security.interfaces \ 80 java.security.spec \ 81 java.sql \ 82 java.text \ 83 java.util \ 84 java.util.concurrent \ 85 java.util.concurrent.atomic \ 86 java.util.concurrent.locks \ 87 java.util.jar \ 88 java.util.logging \ 89 java.util.prefs \ 90 java.util.regex \ 91 java.util.zip \ 92 javax.crypto \ 93 javax.crypto.interfaces \ 94 javax.crypto.spec \ 95 javax.imageio \ 96 javax.imageio.event \ 97 javax.imageio.metadata \ 98 javax.imageio.plugins.bmp \ 99 javax.imageio.plugins.jpeg \ 100 javax.imageio.spi \ 101 javax.imageio.stream \ 102 javax.net \ 103 javax.net.ssl \ 104 javax.security.auth \ 105 javax.security.auth.callback \ 106 javax.security.auth.login \ 107 javax.security.auth.x500 \ 108 javax.security.cert \ 109 javax.sql \ 110 javax.xml.parsers \ 111 org.w3c.dom \ 112 org.xml.sax \ 113 org.xml.sax.ext \ 114 org.xml.sax.helpers 115