Fix copy JNI files of Term.apk

Term.apk now contains JNI shared ojbects for all architectures.
Currectly, the script would only extract and copy armeabi object.
Change the script to extract all object and copy the correct ABI
object to the filesystem.

Change-Id: I167eafab523a4104063fec89b7ba136031c1d07c
Signed-off-by: Rocky Zhang <zhangyan.hit@gmail.com>
diff --git a/config/common.mk b/config/common.mk
index b776cd8..3a42ca2 100644
--- a/config/common.mk
+++ b/config/common.mk
@@ -99,9 +99,24 @@
 PRODUCT_COPY_FILES += \
     vendor/cm/prebuilt/common/bin/modelid_cfg.sh:system/bin/modelid_cfg.sh
 
+PRODUCT_COPY_FILES += \
+    vendor/cm/proprietary/Term.apk:system/app/Term.apk
+
+# Copy JNI libarary of Term
+ifeq ($(TARGET_ARCH),arm)
 PRODUCT_COPY_FILES +=  \
-    vendor/cm/proprietary/Term.apk:system/app/Term.apk \
     vendor/cm/proprietary/lib/armeabi/libjackpal-androidterm4.so:system/lib/libjackpal-androidterm4.so
+endif
+
+ifeq ($(TARGET_ARCH),mips)
+PRODUCT_COPY_FILES +=  \
+    vendor/cm/proprietary/lib/mips/libjackpal-androidterm4.so:system/lib/libjackpal-androidterm4.so
+endif
+
+ifeq ($(TARGET_ARCH),x86)
+PRODUCT_COPY_FILES +=  \
+    vendor/cm/proprietary/lib/x86/libjackpal-androidterm4.so:system/lib/libjackpal-androidterm4.so
+endif
 
 # Bring in camera effects
 PRODUCT_COPY_FILES +=  \
diff --git a/get-prebuilts b/get-prebuilts
index 1d9493f..e4e3045 100755
--- a/get-prebuilts
+++ b/get-prebuilts
@@ -5,5 +5,5 @@
 
 # Get Android Terminal Emulator (we use a prebuilt so it can update from the Market)
 curl -L -o $BASEDIR/proprietary/Term.apk -O -L https://github.com/downloads/jackpal/Android-Terminal-Emulator/Term.apk
-unzip -o -d $BASEDIR/proprietary $BASEDIR/proprietary/Term.apk lib/armeabi/libjackpal-androidterm4.so
+unzip -o -d $BASEDIR/proprietary $BASEDIR/proprietary/Term.apk lib/*