OSDN Git Service

nativebridge: update short URLs
[android-x86/device-generic-common.git] / nativebridge / bin / enable_nativebridge
index 0f8cd13..609ecdb 100644 (file)
@@ -6,17 +6,19 @@ houdini_bin=0
 dest_dir=/system/lib$1/arm$1
 binfmt_misc_dir=/proc/sys/fs/binfmt_misc
 
+urls[0]=http://t.cn/RBJ7mfG
+urls[1]=http://t.cn/RBJ7eml
+urls[2]=http://t.cn/RBJzLwu
+urls[3]=http://goo.gl/96BPKe
+urls[4]=http://goo.gl/v6c4Co
+urls[5]=http://goo.gl/CtKjxx
+
 if [ -z "$1" ]; then
-       if [ "`uname -m`" = "x86_64" ]; then
-               v=7_y
-               url=http://goo.gl/SBU3is
-       else
-               v=7_x
-               url=http://goo.gl/0IJs40
-       fi
+       v=8_y
+       u=1
 else
-       v=7_z
-       url=http://goo.gl/FDrxVN
+       v=8_z
+       u=2
 fi
 
 if [ -s /system/lib$1/libhoudini.so ]; then
@@ -34,9 +36,10 @@ else
                while [ "$(getprop net.dns1)" = "" ]; do
                        sleep 10
                done
-               wget $url -cO houdini$v.sfs && continue
+               wget ${urls[$u%6]} -cO houdini$v.sfs && continue
                rm -f houdini$v.sfs
                sleep 30
+               let u+=3
        done
 fi
 
@@ -45,6 +48,7 @@ fi
 # this is to add the supported binary formats via binfmt_misc
 
 if [ ! -e $binfmt_misc_dir/register ]; then
+       modprobe binfmt_misc
        mount -t binfmt_misc none $binfmt_misc_dir
 fi
 
@@ -72,6 +76,4 @@ else
        log -pi -thoudini "houdini$1 enabled"
 fi
 
-[ "$(getprop ro.zygote)" = "zygote64_32" -a -z "$1" ] && exec $0 64
-
 exit 0