( http://blog.csdn.net/quqi99 )
1, 打开“开发者模式”中的“Debug模式”
2, 手机采用USB和Ubuntu 14.04电脑相连后使用lsusb始终看不到设备,折腾了近两小时后换了一根USB线就好了
3, 安装adb与fastboot工具包
wget http://esausilva.com/wp-content/plugins/cimy-counter/cc_redirect.php?cc=platform-tools-linux&fn=http://esausilva.com/misc/android/platform-tools-linux.tar.gz
export ANDROID_HOME=/bak/java/android/adt-bundle-linux-x86_64-20131030/sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH
4, Double Check
hua@node1:~$ sudo lsusb |grep Google
Bus 003 Device 041: ID 18d1:4ee2 Google Inc. Nexus 4 (debug)
hua@node1:~$ cat /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", SYMLINK+="android_adb"
hua@node1:~$ cat ~/.android/adb_usb.ini
18d1
hua@node1:~$ sudo udevadm control --reload-rules && sudo udevadm trigger
hua@node1:~$ adb kill-server && adb start-server
hua@node1:~$ adb devices
List of devices attached
091bbb72 offline
hua@node1:~$ sudo apt-get install mtpfs mtp-tools gmtp
hua@node1:~$ sudo mtp-detect
5, 解锁,要解锁设备,首先请将设备关闭。接下来,同时按住电源键和音量减小键,此时设备将以fastboot模式启动。然后用USB线将Nexus设备与电脑连接起来,打开一个终端,运行如下的命令:
hua@node1:~$ sudo fastboot devices
091bbb72 fastboot
hua@node1:~$ sudo fastboot oem unlock
...
(bootloader) Unlocking bootloader...
(bootloader) erasing userdata...
(bootloader) erasing userdata done
(bootloader) erasing cache...
(bootloader) erasing cache done
(bootloader) Unlocking bootloader done!
OKAY [ 48.615s]
finished. total time: 48.615s
hua@node1:~$ sudo fastboot reboot-bootloader
rebooting into bootloader...
OKAY [ 0.006s]
finished. total time: 0.006s
6, 解锁后android将重置,再次打开“开发者模式”中的“Debug模式”
1, 在android平板上安装UPDATE-UbuntuInstaller.zip解压后一一个安装文件,在电脑上下载后,然后从平板通过http下载解压后的UbuntuInstaller.apk安装。也可以直接在电脑上运行脚本http://humpolec.ubuntu.com/latest/dualboot.sh安装。
wget http://humpolec.ubuntu.com/latest/UPDATE-UbuntuInstaller.zip
unzip UPDATE-UbuntuInstaller.zip
python -m SimpleHTTPServer
2,打开UbuntuInstaller即可图形化的安装并切换至Ubuntu Touch。注意:UbuntuInstaller程序应该使用SuperSu软件给它root权限才能安装。dualboot.sh脚本能自动安装SuperSu
3, 实际上,我在安装成功后无法切换至Ubuntu Touch,所以继续采用下列的安装方式
sudo add-apt-repository ppa:phablet-team/tools
sudo add-apt-repository ppa:snappy-dev/beta
sudo apt-get update
sudo apt-get install phablet-tools android-tools-adb android-tools-fastboot
sudo apt-get install ubuntu-device-flash
ubuntu-device-flash touch --channel=ubuntu-touch/stable/ubuntu --bootstrap
finished. total time: 46.940s
上面使用UbuntuInstaller.apk工具安装Android与Ubuntu Touch失败,但也可以使用MultiROM来安装,同样需要SuperSu工具给MultiROM权限,注意一点就够了(在用MultiROM下载Ubuntu Touch镜像时总失败是因为被墙了的原因)。
root@flo:/data/media/0/Download/UbuntuTouch # ls
device-e357b4c1570f5d586167571a8e5e5a64224e2b6ec5a14fbbe62304228cbfc289.tar.xz
ubuntu-0144c0d9ab780d8b40477987c3004d4c25d1861e6dd067125e77970c11ec76a1.tar.xz
ubuntu-0144c0d9ab780d8b40477987c3004d4c25d1861e6dd067125e77970c11ec76a1.tar.xz.asc
ubuntu-59b0c7aa8af63dda3a06005a6087c1faa4ed8993321293b276e7f7021d0cb0a3.delta-ubuntu-9757249d38ed16e6f64001d84cbb99e95289955deef433d9f00c0b3bc1f0ab51.tar.xz
ut_test_file
[1] https://github.com/LCTT/TranslateProject/blob/master/published/201405/Ubuntu%20Touch%20and%20Android%20Dual%20Boot%20Installation.md
[2] https://wiki.ubuntu.com/Touch/Devices
[3] https://developer.ubuntu.com/en/phone/devices/installing-ubuntu-for-devices/