ubuntu touch折腾血泪史

Author Avatar
稻草人 3月 23, 2016

手中的nexus 5 sim模块坏了,又入了台n5,旧的那台就刷了ubuntu touch.安装过程太过艰难,容我细细道来.

vmware安装ubuntu desktop

  1. 下载vmware player
  2. 下载ubuntu desktop
  3. 安装过程不赘述

主机shadowsocks共享给ubuntu

vmware的连接模式选择NAT,ubuntu系统代理里面选择手工,IP填为主机的IP地址,端口为ss的端口(1080)就可以了.我被很多教程误导改成桥接纠结了很久:(

安装ubuntu touch

支持的设备列表
N5的通道不是很稳定,后面去查了G+社区改成Oneplus One对应的通道了.
官方教程链接:https://developer.ubuntu.com/en/start/ubuntu-for-devices/installing-ubuntu-for-devices/
官方隐藏了2个说明,安卓设备要root+开启开发者模式.
到下载镜像时替换为下面的路径:

sudo ubuntu-device-flash --server=http://system-image.ubports.com touch --channel=ubuntu-touch/stable --device=hammerhead --bootstrap

之后就是等待下载安装完成了.我的ss还算给力,平均1MBps的下载速度,一刻钟就下好了:)
(实际前一天的下载速度是10KBps,当时都死心了)

ubuntu touch系统相关

  1. 申请ubuntu账号,不然无法更新系统镜像或app
  2. 开启开发者模式,在About this phone
  3. 去商店搜索Terminal并安装
  4. 终端里输入如下开启管理员模式
    sudo su
    
  5. 然并卵,系统默认是不开启写权限的,输入如下命令并加入自启动
    sudo mount -o remount,rw /
    nano /etc/rc.local
    
    将第一行加入底部exit 0的前面,退出保存.

使Terminal翻墙

  1. 安装shadowsocks
    apt-get install python-pip
    pip install shadowsocks
    
  2. 之后添加ss的配置文件并保存
    ```
    /etc/config.json

{
“server”:”remote-shadowsocks-server-ip-addr”,
“server_port”:”remote-ss-port”,
“local_address”:”127.0.0.1”,
“local_port”:1080,
“password”:”your-passwd”,
“timeout”:300,
“method”:”aes-256-cfb”
}

3. 启动ss并添加自启动

nohup sslocal -c /etc/config.json &
nano /etc/rc.local

sudo sslocal -c /etc/config.json

4. 安装privoxy

apt-get install privoxy
nano /etc/privoxy/config

在文件的末尾添加一行,注意最后的点号
forward-socks5 / 127.0.0.1:1080 .

5. 重启privoxy

service privoxy restart

6. 修改系统配置文件

nano /etc/profile
export http_proxy=”127.0.0.1:8118”
export https_proxy=”127.0.0.1:8118”
source /etc/profile

nano ~/.bashrc
export http_proxy=”127.0.0.1:8118”
export https_proxy=”127.0.0.1:8118”
source ~/.bashrc

7. 在Terminal里wget一下谷歌

wget https://www.google.com

如果index文件被下载了说明翻成功了:)
万一没成功看下是不是系统时间不对,目前的一个bug是开机自动变成1970年.
目前方法是手动同步网络时间

sudo ntpdate cn.pool.ntp.org
```

ubuntu store

https://uappexplorer.com/

题外话

有人知道如何全局翻墙么,当然带pac更好,商店打开巨慢- -!