Tested on:
- Ainol Novo 7 Paladin (JZ4770 MIPS SoC) with ICS 4.0.3 and CWM
- Nexus 5 (ARM) with KK 4.4 and TWRP
Not tested on x86.
I checked to make sure "uname -m" is standard in busybox (not a feature
flag). "uname" doesn't seem to exist at all in AOSP, so without busybox,
the original script probably wouldn't have detected the architecture
correctly.
* bin/Superuser-release.apk - Superuser Android app
* libs/armeabi/su - ARM su binary
* libs/x86/su - x86 su binary
+* libs/mips/su - MIPS su binary
## Building the su binary
echo -n -e 'ui_print\n' > /proc/self/fd/$2
# detect binary versions to install
-X86=$(uname -a | grep x86)
-I686=$(uname -a | grep i686)
-I386=$(uname -a | grep i386)
-if [ ! -z "$X86" -o ! -z "$I686" -o ! -z "$I386" ]
-then
+ARCH=$(uname -m)
+
+# x86 needs to match: i486, i686, x86_64, ...
+if echo "$ARCH" | grep -q 86; then
PLATFORM=x86
+elif [ "$ARCH" = "mips" -o "$ARCH" = "mips64" ]; then
+ PLATFORM=mips
else
PLATFORM=armeabi
fi
<arg value="../bin/update.zip"/>
<arg value="armeabi"/>
<arg value="x86"/>
+ <arg value="mips"/>
</exec>
</target>
-APP_ABI := x86 armeabi
+APP_ABI := x86 armeabi mips
NDK_TOOLCHAIN_VERSION=4.7
APP_PIE = false
\ No newline at end of file
String prop = System.getProperty("os.arch");
if (prop.contains("x86") || prop.contains("i686") || prop.contains("i386")) {
return "x86";
+ } else if (prop.contains("mips")) {
+ return "mips";
} else {
return "armeabi";
}