Home | History | Annotate | Download | only in signature-tools
      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 --create dex ${COREDEX} \
     57 --out ${ANDROID_BUILD_TOP}/out/dex \
     58 --name cts_dex_1.0.1 \
     59 --packages           \
     60 java.beans \
     61 java.io \
     62 java.lang \
     63 java.lang.annotation \
     64 java.lang.ref \
     65 java.lang.reflect \
     66 java.math \
     67 java.net \
     68 java.nio \
     69 java.nio.channels \
     70 java.nio.channels.spi \
     71 java.nio.charset \
     72 java.nio.charset.spi \
     73 java.security \
     74 java.security.acl \
     75 java.security.cert \
     76 java.security.interfaces \
     77 java.security.spec \
     78 java.sql \
     79 java.text \
     80 java.util \
     81 java.util.concurrent \
     82 java.util.concurrent.atomic \
     83 java.util.concurrent.locks \
     84 java.util.jar \
     85 java.util.logging \
     86 java.util.prefs \
     87 java.util.regex \
     88 java.util.zip \
     89 javax.crypto \
     90 javax.crypto.interfaces \
     91 javax.crypto.spec \
     92 javax.imageio \
     93 javax.imageio.event \
     94 javax.imageio.metadata \
     95 javax.imageio.plugins.bmp \
     96 javax.imageio.plugins.jpeg \
     97 javax.imageio.spi \
     98 javax.imageio.stream \
     99 javax.net \
    100 javax.net.ssl \
    101 javax.security.auth \
    102 javax.security.auth.callback \
    103 javax.security.auth.login \
    104 javax.security.auth.x500 \
    105 javax.security.cert \
    106 javax.sql \
    107 javax.xml.parsers \
    108 org.w3c.dom \
    109 org.xml.sax \
    110 org.xml.sax.ext \
    111 org.xml.sax.helpers