-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathchroot-remaster
executable file
·147 lines (135 loc) · 5.17 KB
/
chroot-remaster
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#!/bin/bash
set -ex
echo 'force-unsafe-io' > /etc/dpkg/dpkg.cfg.d/unsafe-io
echo 'Debug::pkgProblemResolver "true";' > /etc/apt/apt.conf.d/debug
echo 'Acquire::http { Proxy "http://localhost:3142"; };' > /etc/apt/apt.conf.d/cacher
apt-get update
mv /usr/sbin/invoke-rc.d /usr/sbin/invoke-rc.d.bak
ln -s /bin/true /usr/sbin/invoke-rc.d
# Set up phone PPA.
# FIXME: this presently is done before removal although it would be more
# reliable after, because we need it to supply our mangled session.
apt-get -y install software-properties-common
apt-add-repository -y ppa:plasma-phone/ppa
apt-get update
# Hold ubuntu-touch-session at a managled version. We specifically break
# runtime dependencies as they include unity8. The package is however also
# apparently very important to the correct function of the image due to !unity
# bits.
apt-get install --force-yes -y \
ubuntu-touch-session=0.108+15.04.20150407-0ubuntu1+kubuntu1
apt-mark hold ubuntu-touch-session
apt-get remove -y \
unity8 \
lightdm \
myspell-ca myspell-es myspell-it myspell-pl myspell-pt-br myspell-pt-pt \
language-pack-touch-ast language-pack-touch-bg language-pack-touch-bs language-pack-touch-ca language-pack-touch-cs language-pack-touch-da language-pack-touch-de language-pack-touch-el language-pack-touch-en language-pack-touch-es language-pack-touch-eu language-pack-touch-fi language-pack-touch-fr language-pack-touch-gd language-pack-touch-gl language-pack-touch-he language-pack-touch-hu language-pack-touch-id language-pack-touch-it language-pack-touch-ja language-pack-touch-ko language-pack-touch-lt language-pack-touch-lv language-pack-touch-ms language-pack-touch-nb language-pack-touch-nl language-pack-touch-oc language-pack-touch-pl language-pack-touch-pt language-pack-touch-ro language-pack-touch-ru language-pack-touch-sk language-pack-touch-sl language-pack-touch-sr language-pack-touch-sv language-pack-touch-tr language-pack-touch-ug language-pack-touch-uk language-pack-touch-zh-hans language-pack-touch-zh-hant
# Possibly relevant. At least relevant enough to not be removed for the time
# being.
# apg \
# system-image-common \
# system-image-dbus \
# account-plugin-facebook \
# account-plugin-flickr \
# account-plugin-google \
# account-plugin-twitter \
# adwaita-icon-theme \
# humanity-icon-theme \
# suru-icon-theme \
# indicator-bluetooth \
# indicator-keyboard \
# indicator-location \
# indicator-network \
# indicator-transfer \
# qtdeclarative5-ubuntu-contacts0.1 \
# qtdeclarative5-ubuntu-content1 \
# qtdeclarative5-ubuntu-telephony-phonenumber0.1 \
# qtdeclarative5-ubuntu-telephony0.1 \
# qtdeclarative5-ubuntu-ui-extras-browser-plugin \
# qtdeclarative5-ubuntu-ui-extras0.2 \
# qtdeclarative5-ubuntu-web-plugin \
# qtdeclarative5-ubuntuone1.0 \
# qtdeclarative5-usermetrics0.1 \
# qtubuntu-sensors \
# ubuntu-application-api2-test \
# ubuntu-application-api2-touch \
# ubuntu-download-manager \
# ubuntu-keyboard \
# ubuntu-location-provider-here \
# ubuntu-location-service-bin \
# ubuntu-mobile-icons \
# ubuntu-mono \
# ubuntu-push-client \
# ubuntu-system-settings \
# ubuntu-system-settings-online-accounts \
# ubuntu-upload-manager \
# ubuntuone-client-data \
# unity-asset-pool \
# unity-control-center \
# unity-plugin-scopes \
# unity-scope-mediascanner2 \
# unity-settings-daemon \
# unity-system-compositor \
# ibus \
# nano \
# obex-data-server \
# qtmir-android \
# telephony-service \
# url-dispatcher \
# whoopsie \
# whoopsie-preferences \
# FIXME: powerd might be relevant but depends on ubuntu-apps-api2
# FIXME: there are plenty of relevant packages danling now, this needs
# a full review of dangling packages and removal if not wanted or holding
# via some meta if wanted.
apt-get -yf install
# Hybris
apt-get install -y \
libhybris \
libhybris-common1 \
libhybris-test \
libhybris-utils
# Foundation wiring we will need to work with ubuntu-touch tooling.
# This might also need parts of ubuntu-touch-session
apt-get install -y \
initramfs-tools-ubuntu-touch \
ubuntu-touch-generic-initrd \
ubuntu-touch-customization-hooks \
system-image-common \
system-image-dbus \
system-image-cli \
apparmor
# More Foundation. In particular everything here is related to enabling
# the phablet user which is an extrausers user.
apt-get install -y \
lxc-android-config \
libnss-extrausers \
libpam-modules \
libpam-modules-bin
# KF5 Stack
apt-get install -y \
konsole \
kwin \
plasma-phone-components \
qtwayland5 \
xwayland \
simplelogin
apt-get -y clean
# Cleanup
rm -f /etc/dpkg/dpkg.cfg.d/unsafe-io \
/etc/apt/apt.conf.d/debug \
/etc/apt/apt.conf.d/cacher
mv /usr/sbin/invoke-rc.d.bak /usr/sbin/invoke-rc.d
# Rename the simplelogin job to lightdm.
# A lot of the ubuntu-touch jobs do explicitly "start/stop on lightdm" which
# means they will not work without the job.
# This includes important bits such as adbd, so to work around this we simply
# pretend that simplelogin is lightdm. For the time being anyway.
mv /etc/init/simplelogin.conf /etc/init/lightdm.conf
# mkdir /userdata
# touch /userdata/.writable_image
# touch /userdata/.adb_onlock
# setprop persist.service.ssh true || true
#
# echo -n "manual
# exec /usr/sbin/sshd -D -o PasswordAuthentication=yes" > ssh.override