20
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Nexus 4 に Ubuntu Touch をインストールしてみた

Posted at

まぁ、なんということでしょう。Nexus 4 で Ubuntu Touch が使えてしまいました。

参考:ADDICTIVETIPS - How To Install Ubuntu Touch On Your Android Device

ビフォーアフター

1.ビフォー
OS: Nitrogen OS Oreo 8.1.0_r7
カスタムリカバリ: TWRP for mako twrp-3.2.1-0
root化済

2.アフター
OS: Ubuntu Touch 15.04
カスタムリカバリ: Ubuntu Touch の独自のものに書き換えられる。

インストール、その前に

1.この作業はリスクが伴いますので、実践は自己責任でお願いします。

2.現在使っているROM、アプリ、データ等をしっかりバックアップします。Ubuntu Touch のインストーラを実行すると、少なくとも、ROM が Wipe(消去)され、独自のカスタムリカバリに書き換えられます。

インストール

1.パソコンでADBツールをインストールします。

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 17.10
Release:	17.10
Codename:	artful
$ sudo apt-get install android-tools-adb android-tools-fastboot

2.Nexus 4 は電源を入れ、パソコンとUSBケーブルで接続します。

3.パソコンで ubports から UBports Installer をダウンロードし起動します。

$ sudo chmod +x ubports-installer-0.1.4-beta-x86_64.AppImage
$ ./ubports-installer-0.1.4-beta-x86_64.AppImage

デバイス名で「Nexus 4」を指定します。自動認識される場合があります。

チャンネルで「15.04/Stable」を指定します。

初期化されるのでしっかりバックアップしてください、と確認画面が表示されます。

パソコンのパスワード入力を促されます。

Ubuntu Touch をダウンロードしています。

Ubuntu Touch を Nexus 4 に書き込んでいます。

再起動しインストールが終わりました。

画面

sshdの設定

パソコンから Nexus 4 へ ssh接続できるようにします。

参考:askubuntu - How can I access my Ubuntu phone over ssh?

1.パソコンでの設定

$ mkdir ~/.ssh
$ chmod 700 ~/.ssh
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/soma/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again: 
Your identification has been saved in /home/soma/.ssh/id_rsa.
Your public key has been saved in /home/soma/.ssh/id_rsa.pub.
The key fingerprint is:
The key's randomart image is:

2.Nexus 4 での設定

システム設定→About→開発者モード→開発者モード→ON

$ adb shell android-gadget-service enable ssh
ssh enabled
$ adb shell mkdir /home/phablet/.ssh
$ adb push ~/.ssh/id_rsa.pub /home/phablet/.ssh/authorized_keys
[100%] /home/phablet/.ssh/authorized_keys
$ adb shell chown -R phablet.phablet /home/phablet/.ssh
$ adb shell chmod 700 /home/phablet/.ssh
$ adb shell ip addr show wlan0|grep inet
    inet 192.168.3.104/24 brd 192.168.3.255 scope global wlan0
    inet6 fe80::1268:3fff:fefc:3ede/64 scope link tentative dadfailed

3.ssh接続してみる

$ ssh phablet@192.168.3.104
The authenticity of host '192.168.3.104 (192.168.3.104)' can't be established.
RSA key fingerprint is SHA256:*******************************************.
Are you sure you want to continue connecting (yes/no)?
 yes
Warning: Permanently added '192.168.3.104' (RSA) to the list of known hosts.
Welcome to Ubuntu 15.04 (GNU/Linux 3.4.0-7-mako armv7l)

 * Documentation:  https://help.ubuntu.com/

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

phablet@ubuntu-phablet:~$

カスタムリカバリを TWRP に戻したい時

1.Nexus 4 の電源を切り、【電源ボタン】と【音量下ボタン】を同時に長押しブートモードに入る。

2.パソコンで TWRP for mako をダウンロードし、Nexus 4 に TWRPイメージを書き込む。その後 Nexus 4 を再起動する。

$ fastboot flash recovery twrp-3.2.1-0-mako.img
target didn't report max-download-size
sending 'recovery' (9516 KB)...
OKAY [  0.322s]
writing 'recovery'...
OKAY [  0.506s]
finished. total time: 0.828s

おわりに

まぁ、なんということでしょう。思い入れの品が新しい Ubuntu Touch となって甦りました!
(=^・^=)

20
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?