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 20prog="$0" 21while [ -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 30done 31oldwd=`pwd` 32progdir=`dirname "${prog}"` 33cd "${progdir}" 34progdir=`pwd` 35prog="${progdir}"/`basename "${prog}"` 36cd "${oldwd}" 37 38libdir=`dirname $progdir`/framework 39classpath=$libdir/signature-tools.jar:$libdir/dex-tools.jar:\ 40$libdir/stringtemplate.jar:$libdir/antlr-2.7.7.jar 41 42javaOpts="" 43while expr "x$1" : 'x-J' >/dev/null; do 44 opt=`expr "$1" : '-J\(.*\)'` 45 javaOpts="${javaOpts} -${opt}" 46 shift 47done 48 49COREDEX=${ANDROID_PRODUCT_OUT}/../../common/obj/JAVA_LIBRARIES/core_intermediates/classes.dex 50 51if [ ! -f ${COREDEX} ]; then 52 echo ERROR: $COREDEX not found 53 exit -1; 54fi 55 56sig --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 \ 63java.beans \ 64java.io \ 65java.lang \ 66java.lang.annotation \ 67java.lang.ref \ 68java.lang.reflect \ 69java.math \ 70java.net \ 71java.nio \ 72java.nio.channels \ 73java.nio.channels.spi \ 74java.nio.charset \ 75java.nio.charset.spi \ 76java.security \ 77java.security.acl \ 78java.security.cert \ 79java.security.interfaces \ 80java.security.spec \ 81java.sql \ 82java.text \ 83java.util \ 84java.util.concurrent \ 85java.util.concurrent.atomic \ 86java.util.concurrent.locks \ 87java.util.jar \ 88java.util.logging \ 89java.util.prefs \ 90java.util.regex \ 91java.util.zip \ 92javax.crypto \ 93javax.crypto.interfaces \ 94javax.crypto.spec \ 95javax.imageio \ 96javax.imageio.event \ 97javax.imageio.metadata \ 98javax.imageio.plugins.bmp \ 99javax.imageio.plugins.jpeg \ 100javax.imageio.spi \ 101javax.imageio.stream \ 102javax.net \ 103javax.net.ssl \ 104javax.security.auth \ 105javax.security.auth.callback \ 106javax.security.auth.login \ 107javax.security.auth.x500 \ 108javax.security.cert \ 109javax.sql \ 110javax.xml.parsers \ 111org.w3c.dom \ 112org.xml.sax \ 113org.xml.sax.ext \ 114org.xml.sax.helpers 115