For those of you who want to install Ubuntu on your Android smartphone or tablet device, here’s our universal guide on how to do it. (This guide is based off my original guide at NexusOneHacks.net)
*Note – This guide should work on most “rooted” Android smartphones/tablets with no further modification.
We will be running Ubuntu “chrooted” under Android OS, which just means that we will be running a “virtual” Ubuntu OS that runs on top of the Android OS. Your Android OS will work fully (e.g. your phone will keep working normally) while the Ubuntu runs on top of it.
First of all, you should have your Android device “rooted” because you need root access to run Ubuntu off your Android.
Second, your Android OS must support loop devices. Most newer Android smartphones/tablets come with this support so we can mount our Ubuntu image as a loop device. If not, you will either have to build your own kernel with support for loop devices or you can try an aftermarket ROM for your phone as most aftermarket ROMs come with support for it.
For example, G2 Phone and Nexus One both come with loop device support so there’s no need for us to compile a new kernel for it but for others, you may have to.
How do you know this? Just try installing Ubuntu and if it doesn’t boot, your Android device needs a kernel with loop device support. Otherwise you are fine.
How to Install Ubuntu on Android! (Windows)
First, download the following Ubuntu.zip file (from a preferred mirror), unzip and copy over the whole ubuntu directory to the SD card of your Android smartphone/tablet device:
(Turn USB storage ON then copy over the Ubuntu folder to the root directory of your SD card.)
(What it looks like after copied over to the SD Card)
1) Again, make sure you have your Android smartphone/tablet “rooted”!
2) You must have Android SDK installed or have access to adb.exe.
3) Make sure your Android phone/tablet is in debugging mode. Go to Settings->Applications->Development and make sure USB Debugging is checked ON.
4) Connect your Android device to your computer via USB cable and set the USB mode to “Just Charge”.
5) Your Android device should be recognized as “ADB Device” under Device Manager. If not, install appropriate drivers.
For all HTC Android smartphones/tablets (such as G2 Phone, Nexus One), you can download Windows drivers here:
HTC Windows 64-bit driver download – Click Here to Download Driver
HTC Windows 32-bit driver download – Click Here to Download Driver
6) Open up a command prompt by typing “cmd” under Start->Search programs and files.
7) Browse to your SDK directory where you installed the Android SDK:
Then go into platform-tools directory:
9) Type “adb devices” to double-check your Android device is recognized.
In this example, I used an HTC G2 Phone, which shows up at “HT09SR204261″. This is fine. However, if you get an empty device, that means you didn’t install the drivers for your phone/tablet correctly. (Go back to #5)
10) Type “adb shell” to enter the Android shell.
Then type “su” to enter super user mode, then type “cd /sdcard” and “cd ubuntu” to enter the ubuntu directory in your SD card of your Android device.
11) Next, type “sh ubuntu.sh” to run the script which will basically get your Ubuntu image ready to run on your Android smartphone/tablet.
If you get error messages, don’t worry and keep going.
12) Type “bootubuntu” to enter Ubuntu. (Next time you enter Ubuntu, you just need to type “bootubuntu” from your/sdcard/ubuntu directory, no need to run ubuntu.sh again.
If you got “root@localhost” at this point, congratulations! This means your Android OS comes with loop device support and Ubuntu is now running “chrooted” on top of your Android OS!!!
However, if you failed at this point, your Android OS probably doesn’t support loop devices, try installing another ROM or compiling your own kernel with loop device support.
How to Install Programs on your Ubuntu!
Once you’ve got Ubuntu running on your Android device, it’s time to install some Ubuntu packages(or programs).
Type “apt-get update” to update, this is the first thing you will need to do before installing any new programs.
How to Install OpenSSH-server on your Android Ubuntu!
Type “apt-get install openssh-server” to install OpenSSH-server. What is OpenSSH-server? If you want to connect to your Android Ubuntu via an IP address (and SSH into it), you will want to do this.
How to Install TightVNCServer on your Android Ubuntu!
If you want to access the GUI of your Android Ubuntu, you can install TightVNCServer, which allows you to access the Android Ubuntu via Android VNC app on your Android smartphone/tablet or even access it remotely from your desktop computer.
Type “apt-get install tightvncserver” to install.
How to Fix Language Issues
Above is after I connected to my Android Ubuntu via SSH2. Well, for some reason my default language switched to German. To fix that, just type “export LANG=en_US.UTF-8″:
How to Install LXDE!(optional)
Next, we will install LXDE (Lightweight X11 Desktop Environment). Although we can use Ubuntu’s default GNOME (and trust me I love that), LXDE takes up less memory so our GUI access will be faster.
If you like GNOME, you can skip this step though.
Type “apt-get install lxde”
Next, let’s setup xstartup file so that when TightVNCServer is started, the LXDE runs instead of GNOME:
Type “cat > /root/.vnc/xstartup”
Then type:
cat > /root/.vnc/xstartup
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
icewm &
lxsession
Then hit Ctrl+D twice and enter to save the file.
How to Start TightVNCServer!
Next, let’s start the TightVNCServer and connect to it from our Android phone and my Windows 7 desktop:
Type “export USER=root” and “vncserver -geometry 1024×800″.
Here, you can change the resolution settings 1024×800 to the resolution of your liking.
Now your TightVNCServer is ready to accept any incoming connections from your phone or computer. Just point to the correct IP address and use port number 5901 to connect.
On your Android smartphone, just download the free app “Android-VNC-Viewer” and set the IP address to “127.0.0.1″ and port number 5901 to connect.
And you should be able to get into your Ubuntu like this:
You can also use desktop software like TightVNC Viewer and connect to your phone.
Do “ifconfig” to find out what your IP address is in your Android Ubuntu.
In this example, mine was connected to “192.168.1.131″.
Then connect to “192.168.1.131:5901″ on your TightVNC Viewer:
Here’s LXDE running on my desktop off my G2 Phone’s Ubuntu:
Troubleshooting
Ubuntu not running?
Try typing “cp” under Android shell and if you get an error message, it means you need to install Busybox. Install Busybox and try again.
Getting Following errors?
Err http://ports.ubuntu.com karmic/main Packages
404 Not Found
Err http://ports.ubuntu.com karmic/universe Packages
404 Not Found
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/karmic/main/binary
-armel/Packages.gz 404 Not Found
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/karmic/universe/bi
nary-armel/Packages.gz 404 Not Found
E: Some index files failed to download, they have been ignored, or old ones used
instead.
Try:
cat > /etc/apt/sources.list
deb http://old-releases.ubuntu.com/ubuntu/ karmic main universe
Then hit Ctrl+D twice and Enter.
This will update the Ubuntu sources.
Final Thoughts
As said in the video, there will be a lot of improvements in the speed of Android devices in the near future. This year, there will be a slew of dual-core 1Ghz processor-equipped Android devices being introduced. Which just means our Android Ubuntu will run faster and faster
相关推荐
在Ubuntu系统上安装SSH(Secure Shell)是连接远程服务器、进行安全远程操作的重要步骤。SSH是一种网络协议,用于安全地远程登录到服务器,执行命令、传输文件等操作。本指南将详细阐述如何在Ubuntu上安装并配置SSH...
How to install OMNET++ on Ubuntu 12.10
How to Install MATLAB on Mac 如何在 Mac 上安装 MATLAB.pdf
如果您看到“Welcome to nginx”的页面,那么您已经成功安装了 Nginx 服务器。现在,您可以继续安装 Lemp Stack 或设置 FTP 服务器等。 小结 在本教程中,我们学习了如何在 CentOS 6 上使用 yum 安装 Nginx 服务器...
GRANT ALL PRIVILEGES ON phpipam.* TO 'phpipamuser'@'localhost' IDENTIFIED BY 'yourpassword'; FLUSH PRIVILEGES; ``` 请替换'yourpassword'为你选择的密码。 **4. 下载并解压phpIPAM** 从官方源获取最新版本的...
在Ubuntu 18.04上安装和配置NFS服务器是一项基本任务,它允许你在网络中的其他Linux客户端之间共享目录和文件。NFS(网络文件系统)协议是实现这一目标的关键,它允许服务器上的共享目录被客户端挂载,从而访问其中...
在文档 `How to install apache on ubuntu.docx` 中,可能会包含更详细的步骤、注意事项以及可能遇到的问题及其解决方法。记得查阅该文档以获取完整的信息。 总的来说,安装Apache在Ubuntu上是一个简单的过程,但...
Have you ever tried to install macOS Mojave on your laptop Windows 10? but, before visiting begin ...So begins our article, to indicate you ways How to install macOS Mojave 10.14.3 final on VirtualBox.
GRANT ALL PRIVILEGES ON your_database.* TO 'newuser'@'localhost'; FLUSH PRIVILEGES; ``` 最后,退出MySQL客户端: ```sql EXIT; ``` 现在,新用户可以使用用户名和密码登录MySQL并进行数据操作。 记得定期...
在Ubuntu系统上安装OpenJDK的详细步骤 OpenJDK(Open Java Development Kit)是Java开发工具包的一个开源实现,它提供了运行Java应用程序所需的环境。对于开发者和系统管理员来说,安装OpenJDK在Ubuntu上是相当简单...
How To Install Altiris
详细介绍了第一次使用eclipse时,在Eclipse中配置python的IDE教程,图文并茂
How To Break Into The ‘How To Make Money Online’ Niche By Sara Brown
How to install rollup core.doc
### 如何在Ubuntu中安装Legup 1.0与Legup 2.0 #### 概述 Legup是一款开源工具,它具有C-to-Verilog的功能,这意味着它可以将C语言编写的程序转换为Verilog HDL代码,进而用于硬件设计。本指南详细介绍了如何在...
Learn how to build your own innovative Android programs and workflows with tools you can run on Android itself, and tailor the Android default user interface to match your mobile lifestyle needs....
securecrt ubuntu版,在ubuntu上安装securecrt并破解的方法。