在安卓手机、平板上运行ubuntu

笔记本/便携移动设备,手机平板等软硬件
回复
yxtdgui
帖子: 10
注册时间: 2010-10-26 20:29

在安卓手机、平板上运行ubuntu

#1

帖子 yxtdgui » 2012-02-28 22:21

根据安卓电子市场中的ubuntu-installer

首先,到http://sourceforge.net/projects/linuxon ... es/Ubuntu/下载脚本和镜像,分别是ubuntuv6.sh与ubuntu.img 有大小之分,如果只是为了得到完整的bash之类的只要用那个小的,如果是有完整的office、java一类的,就选择大的

然后将这些文件放在/sdcard/ubuntu/中(新版的脚本可能不需要,只要放在同一个目录即可)


最后 需要一个vnc登录软件 电子市场中有 很多模拟终端本身也可以作为VNC登录
地址是127.0.0.1 端口 5900 密码 ubuntu

PS:作者是xda上的,Zachary Powell


下面是那个ubuntuv6.sh

代码: 全选

perm=$(id|cut -b 5)
if [ "$perm" != "0" ];then echo "This script requires root! Type: su"; exit; fi
mount -o remount,rw /dev/block/mmcblk0p5 /system
##########################################
#Set up veriables                        #
##########################################
export kit=$(dirname $0)
export bin=/system/bin
export mnt=/data/local/mnt
export USER=root
mkdir $mnt &>/dev/null
test -d $mnt || mkdir $mnt
export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export HOME=/root
##########################################
#Set up loop device                      #
##########################################
if [ -b /dev/block/loop255 ]; then
	echo "Loop device exists"
else
	busybox mknod /dev/block/loop255 b 7 255
fi
#mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt
busybox losetup /dev/block/loop255 $kit/ubuntu.img
##########################################
#Mount all required partitions           #
##########################################
busybox mount -t ext2 /dev/block/loop255 $mnt
busybox mount -t devpts devpts $mnt/dev/pts
busybox mount -t proc proc $mnt/proc
busybox mount -t sysfs sysfs $mnt/sys
busybox mount -o bind /sdcard $mnt/sdcard

##########################################
#Checks if you have a external sdcard    #
#and mounts it if you do                 #
##########################################
if [ -d /sdcard/external_sd ]; then
	busybox mount -o bind /sdcard/external_sd  $mnt/external_sd
fi
if [ -d /Removable/MicroSD ]; then
	busybox mount -o bind /Removable/MicroSD  $mnt/external_sd
fi
##########################################
#Sets up network forwarding              #
##########################################
busybox sysctl -w net.ipv4.ip_forward=1
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:"
ifconfig eth0
echo " "
##########################################
#Chroot into ubuntu                      #
##########################################
busybox chroot $mnt /root/init.sh

##########################################
#Shut down ubuntu                        #
##########################################
echo "Shutting down Ubuntu ARM"
busybox umount $mnt/sdcard &>/dev/null
busybox umount $mnt/external_sd &>/dev/nu把下面代码另存为ubuntu.sh 然后在终端运行ll
busybox umount $mnt/dev/pts &>/dev/null
busybox umount $mnt/proc &>/dev/null
busybox umount $mnt/sys &>/dev/null
busybox umount $mnt &>/dev/null
busybox losetup -d /dev/block/loop255 &>/dev/null
上次由 yxtdgui 在 2012-02-29 20:19,总共编辑 1 次。
头像
guaicai
帖子: 169
注册时间: 2012-01-29 9:30
系统: Fedora19 Xfce

Re: 在手机平板上运行ubuntu

#2

帖子 guaicai » 2012-02-28 23:30

看来楼主的语文确实不咋地
===============================
XP XP XP XP XP XP XP XP XP XP XP XP
??现在的人问问题都是让人来猜吗??
XP XP XP XP XP XP XP XP XP XP XP XP
===============================
yxtdgui
帖子: 10
注册时间: 2010-10-26 20:29

Re: 在手机平板上运行ubuntu

#3

帖子 yxtdgui » 2012-02-29 19:45

上图了
附件
2012.02.29-19.41.50.jpeg
上次由 yxtdgui 在 2012-02-29 19:55,总共编辑 2 次。
jtshs256
帖子: 22323
注册时间: 2010-07-19 21:41
系统: OS X

Re: 在手机平板上运行ubuntu

#4

帖子 jtshs256 » 2012-02-29 19:46

我的脖子啊…… :em20
躺平
yxtdgui
帖子: 10
注册时间: 2010-10-26 20:29

Re: 在手机平板上运行ubuntu

#5

帖子 yxtdgui » 2012-02-29 19:50

jtshs256 写了:我的脖子啊…… :em20
平板上直接发的 没有修改 :em06
yxtdgui
帖子: 10
注册时间: 2010-10-26 20:29

Re: 在安卓手机、平板上运行ubuntu

#7

帖子 yxtdgui » 2012-03-01 21:16

photor 写了:虚拟机? :em09
是用VNC虚拟网络电脑

先是用shell挂载分区,然后登陆进去
如果只是想用shell的就完了,如果想见到桌面

就需要开启VNC服务,然后在用安卓软件登陆

这些都不是用虚拟机 虚拟机据说开着只能看了 :em06 另外 也都是本地运行 不是用电脑开 然后登陆到电脑 虽然也可以用VNC办到

运行速度没测试过和真机有什么区别 个人觉得应该是不会太大差别 就是内存比真机会少一些 因为外面还开着安卓
我的小平板512M 800Mhz A9 开火狐时需要十秒左右,然后开网页倒是快乐 也试过开办公软件 看PPT 主要是打开时间久 看下面的CPU 满满的占有持续了好久
之后还算流畅 如果用那些一两千的平板 应该体验感不错

有另外的方式,不过没成功 是用CHROOT的,然后把安卓的系统服务关掉

那个镜像我不清楚该怎么做 我到是可以做出来一个空的格式成EXT4或者其他格式的 ****.img 但是不知道怎么在里面安装系统
是用挂载的方式然后chroot吗?
judai
帖子: 66
注册时间: 2008-11-30 12:26

Re: 在安卓手机、平板上运行ubuntu

#8

帖子 judai » 2012-03-10 15:34

软件怎么办,x86的可以用嘛?
yxtdgui
帖子: 10
注册时间: 2010-10-26 20:29

Re: 在安卓手机、平板上运行ubuntu

#9

帖子 yxtdgui » 2012-03-22 20:26

judai 写了:软件怎么办,x86的可以用嘛?
用的是arm的软件 像firefox java 这样的软件都有了arm版的
longxiangsky
帖子: 1
注册时间: 2012-06-29 14:53

Re: 在安卓手机、平板上运行ubuntu

#10

帖子 longxiangsky » 2012-06-29 14:58

请问怎么装软件,插卡手机SD卡的内容啊,我点击SD卡时说permission denied
我是装的LXDE,small版的image
头像
gscsd
帖子: 3
注册时间: 2012-06-29 19:41

Re: 在安卓手机、平板上运行ubuntu

#11

帖子 gscsd » 2012-06-29 21:54

学习了 :em09
头像
百草谷居士
帖子: 4025
注册时间: 2006-02-10 16:36
系统: debian12/xubuntu2404

Re: 在安卓手机、平板上运行ubuntu

#12

帖子 百草谷居士 » 2012-06-30 6:13

楼主说的好像也不是把ubuntu刷入平板,也没有看明白到底怎么回事。
好像只是通过什么方式来运行,好像还是用电脑来连接一样。
反正是没有明白怎么回事?
正如二楼所说,楼主的语文水平太差了,无法在论坛里表达。
Mint 22 / Xubuntu 24.04

为何热衷于搞发行版的多,搞应用程序开发的少?Linux最多余的就是各种发行版,最缺的就是应用程序,特别是行业应用程序。
回复