Skip to content

Commit

Permalink
Updates for Android+Apple
Browse files Browse the repository at this point in the history
Former-commit-id: 1424f112ae973bc9061b396fade7d59b30ec20c7
  • Loading branch information
jlinford committed Nov 18, 2014
1 parent 07356d5 commit 001f6c8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
22 changes: 8 additions & 14 deletions README.android
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ We will explain the points above in detail in the following sections.

PREREQUISITES

- Linux host system
- Linux or OS X host system

You need a x86/x64 Linux system to compile and run the tools provided
by TAU package.
Expand All @@ -60,14 +60,6 @@ PREREQUISITES
Make sure JDK (either 1.6 or 1.7) is installed on your host system.
Oracle JDK is highly recommended. Others *PROBABLY WON'T WORK*.

[FIXME]
On OS X (a.k.a "apple") you'll need to jimmy some paths to get this to
work:

cd /System/Library/Frameworks/JavaVM.framework/Versions/Current
sudo ln -s Commands bin
sudo ln -s Headers include

- ANT

To build asmdex.
Expand Down Expand Up @@ -112,8 +104,8 @@ PREREQUISITES
Generate the standalone toolchain, e.g.:

/path/to/android-ndk-r10b/build/tools/make-standalone-toolchain.sh \
--platform=android-L \
--toolchain=arm-linux-androideabi-4.9 \
--platform=android-19 \
--toolchain=arm-linux-androideabi-4.8 \
--install-dir=<NDK_TOOLCHAIN>

Be sure to replace <NDK_TOOLCHAIN> with some installation path.
Expand All @@ -132,8 +124,9 @@ CONFIGURE
-android_version=4.4W \
-android_platform=20

* On OS X (a.k.a "apple") the JDK is installed at
/System/Library/Frameworks/JavaVM.framework/Versions/Current
* On OS X (a.k.a "apple") JDK <VERSION> is installed at
/Library/Java/JavaVirtualMachines/jdk<VERSION>.jdk/Contents/Home


* Make sure the android_version and android_platform are available in the
SDK path you specified as android_sdk.
Expand All @@ -149,7 +142,8 @@ CONFIGURE

BUILD

Simply run "make install"
Run "make install"
[FIXME] Parallel make is not yet supported.

--- 2.2 General usage

Expand Down
14 changes: 10 additions & 4 deletions tools/src/android/tau_apk.sh.skel
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ mkdir -p "$tmpdir"
cp "$apk" "$tmpdir"
pushd "$tmpdir"

#
# Get to work
#

echo "Inflate $apkfile ..."
$JAR xf "$apkfile" || die "Can't inflake $apkfile"

Expand All @@ -93,14 +97,16 @@ fi
zip -r $apkfile lib/armeabi/libTAU.so) || die "Can't add libTAU.so to lib/armeabi"

if [ ! -f ~/.android/debug.keystore ]; then
$KEYTOOL -genkey -keystore ~/.android/debug.keystore \
-storepass android -alias androiddebugkey \
-keypass android -dname "CN=Android Debug,O=Android,C=US" || die "Can't create debug.keystore"
echo "Creating debug.keystore"
$KEYTOOL -genkey -keystore ~/.android/debug.keystore \
-sigalg MD5withRSA -keyalg RSA -keysize 1024 \
-storepass android -alias androiddebugkey \
-keypass android -dname "CN=Android Debug,O=Android,C=US" || die "Can't create debug.keystore"
fi
$JARSIGNER -sigalg MD5withRSA -digestalg SHA1 -keystore ~/.android/debug.keystore \
-storepass android -keypass android $apkfile androiddebugkey || die "Can't sign $apkfile"

popd
$ZIPALIGN 4 "$tmpdir/$apkfile" "$inj" || die "Can't zipalign $apkfile to $inj"
#rm -rf "$tmpdir"
rm -rf "$tmpdir"

0 comments on commit 001f6c8

Please sign in to comment.