linuxonandroid ubuntu12.04-v4-core启动文件(N7100 Android 4.3)
一. 测试环境
手机型号:三星 N7100 Android 4.3 已root,已禁用selinux(Permissive)
系统版本:linuxonandroid ubuntu12.04-v4-core
small和full应该也可以使用此脚本。安装教程:
http://jingyan.baidu.com/article/25648fc1db54c69191fd00e7.html
环境的搭建不再详述。
二. 修改后的bootscript4-3.sh
官网的脚本bootscript.sh,经本人测试,在N7100 Android4.3上有点小问题。
在官网的脚本基础上,修改了存储卡的名字为手机上显示的实际名字。测试可以正常使用。
全部代码如下:
###########################################
# Linux boot script V8.1 #
# for N7100 Android v4.3 #
# Built by Zachary Powell (zacthespack) #
# and Martin Møller (Tuxling) #
# Thanks to: #
# Johan Vromans #
# Marshall Levin #
# Vaykadji
# shile #
# and to everyone at XDA! #
# Feel free to edit/use this script as you#
# like but credit Linuxonandroid.org #
###########################################
# $ver: V8.1 for N7100 Android v4.3 #
###########################################
###########################################
# This is a function we use to stop the #
# script in case of errors #
###########################################
error_exit() {
echo "Error: $1"
exit 1
}
###########################################
# Set up variables #
###########################################
if [ -f /data/data/com.zpwebsites.linuxonandroid/files/busybox ]; then
export bbox=/data/data/com.zpwebsites.linuxonandroid/files/busybox
elif [ -f /data/data/com.zpwebsites.linuxonandroid.opensource/files/busybox ]; then
export bbox=/data/data/com.zpwebsites.linuxonandroid.opensource/files/busybox
else
export bbox=/system/xbin/busybox
fi
export usermounts=android # Base folder all user mounts are done in, should be moved to app later
export imgfile=$(dirname $0)/ubuntu.img # Default image file, another can be set by using an argument
export bin=/system/bin
export mnt=/data/local/mnt
export USER=root
if [[ ! -d $mnt ]]; then mkdir $mnt; fi
export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export HOME=/root
###########################################
# Handle arguments if present #
###########################################
if [ $# -ne 0 ]; then
if [ -f $1 ]; then # Is full path present?
imgfile=$1
elif [ -f $(dirname $0)/$1 ]; then # Is only a filename present?
imgfil