web analytics

With the recent launch of the testing images of Ubuntu on Nexus 7 there has been lots of interest and people have asked why Xubuntu, Lubuntu, Kubuntu etc were not selected simply put those are community flavors and this is a Canonical initiative so its really up to the Community to bring those flavors to the Nexus 7 if they so choose.

For those interested in testing other flavors on the Nexus 7 the first place to start might be to look at the script that is behind the Ubuntu One-Click Installer for Nexus 7 (below) and then go from their making your own image also this site has the .img files which the script currently uses.

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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
#
# Chris Van Hoof <redacted@redacted.com>
#
# Desktop installer for the Galaxy Nexus 7
#
NOTICE_ACCEPTED=”$HOME/.${0##*/}.notice-accepted”
IMAGES=(boot.img rootfs.img)
CHECKSUM=”ubuntu-nexus7-sha256sum.txt”
SERVER=”http://hwe.ubuntu.com”
SERVER_PATH=”uds-r/nexus7″
XDG_DIRS=”$HOME/.config/user-dirs.dirs”
XDG_DOWNLOAD_DIR=”$HOME/Downloads”
if [ -f "$XDG_DIRS" ]; then
source $XDG_DIRS
fi
WORKDIR=”$XDG_DOWNLOAD_DIR/UbuntuNexus7″
usage_notice () {
if [ ! -e $NOTICE_ACCEPTED ];
then
zenity –ok-label=Agree –title “Ubuntu Nexus7 Usage Notice” \
–height 550width=515 \
–text-info \
filename=/usr/share/doc/ubuntu-nexus7-installer/ubuntu-nexus7-USAGE-NOTICE-en.txt
RESPONSE=$?
if [ $RESPONSE -eq 0 ];
then
touch $NOTICE_ACCEPTED
return 0
else
return 1
fi
fi
}
checksum_images () {
sha256sum –check $WORKDIR/$CHECKSUM
if [ $? -eq 0 ];
then
return 0
else
zenity –error –title=”Ubuntu Nexus7 Installer” –text=”Downloaded images failed checksum validation”
return 1
fi
}
download_images () {
wgetprogress=bar:force $SERVER/$SERVER_PATH/$VARIANT/$CHECKSUM -O $WORKDIR/$CHECKSUM 2>&1 |
zenity –title=”Ubuntu Nexus7 Installer” –text=”Downloading Ubuntu Nexus7 Checksum: $CHECKSUM” \
–progress –auto-close –auto-kill
wgetprogress=bar:force $SERVER/$SERVER_PATH/$VARIANT/${IMAGES[0]}-O $WORKDIR/${IMAGES[0]}2>&1 |
zenity –title=”Ubuntu Nexus7 Installer” –text=”Downloading Ubuntu Nexus7 Boot Image: ${IMAGES[0]}” \
–progress –auto-close –auto-kill
wgetprogress=bar:force $SERVER/$SERVER_PATH/$VARIANT/${IMAGES[1]}-O $WORKDIR/${IMAGES[1]}2>&1 |
zenity –title=”Ubuntu Nexus7 Installer” –text=”Downloading Ubuntu Nexus7 Root Filesystem Image: ${IMAGES[1]}” \
–progress –auto-close –auto-kill –percentage=5
}
mk_workdir () {
if [ ! -d $WORKDIR ];
then
mkdir -p $WORKDIR
return 0
fi
}
check_prior_download () {
if [ -f $WORKDIR/"${IMAGES[0]}” -a -f $WORKDIR/”${IMAGES[1]}” ];
then
return 1
else
return 0
fi
}
check_network () {
if [ ! -z "
${SERVER}" ];
then
ping -c 1 “${SERVER##*/}
if [ $? -eq 0 ];
then
return 0
else
zenity –warning –title=”Ubuntu Nexus7 Installer” –text=”Network connection not detected or ${SERVER##*/} is unreachable”
return 1
fi
fi
}
is_fastboot_installed () {
fb_installed=`which fastboot || true`
if [[ -z $fb_installed ]];
then
zenity –warning –title=”Ubuntu Nexus7 Installer” –text=”Fastboot not found:\n\nPlease ensure fastboot is in your PATH or the\nandroid-tools-fastboot package is installed”
return 1
else
return 0
fi
}
fastboot_device_found () {
fb=`sudo -Sp ” — fastboot devices <<<”${SPW}”`
if [[ -z $fb ]];
then
zenity –warning –title=”Ubuntu Nexus7 Installer” –text=”Your tablet was not detected by fastboot:\n\nPlease ensure your tablet is connected via USB\nand boot into fastboot mode by holding down the\npower and volume down buttons”
return 1
else
return 0
fi
}
close_installer () {
zenity –warning –title=”Ubuntu Nexus7 Installer” –text=”Closing Ubuntu Nexus7 Installer”
}
# display usage notice
usage_notice
if [ $? -ne 0 ];
then
close_installer
exit 1
fi
# main
CHOICE=$(zenity –list \
–title=”Ubuntu Nexus7 Installer” \
–text=”Select your action” \
–width=300 \
–height=170 \
–radiolist \
–column=”"
column=”Option” \
FALSE “Install Ubuntu for Nexus7″ \
TRUE “Exit”)
case $CHOICE in
“Install Ubuntu for Nexus7″)
VARIANT=$(zenity –list \
title=”Ubuntu Nexus7 Installer” \
text=”Select the storage capacity of your Nexus7″ \
width=300 \
height=170 \
–radiolist \
column=”" –column=”Storage Capacity” \
FALSE “16GB” \
TRUE “8GB”)
RESPONSE=$?
if [ "
${RESPONSE}" == "1" ];
then
close_installer
exit 1
fi
zenity –title=”Ubuntu Nexus7 Installer” –question –text=”Welcome to the Ubuntu Nexus7 Installer\n\nThe installer will:\n * Download images suitable for running Ubuntu on the Galaxy Nexus7\n * Install the images on the device\n\n The download and flashing process will take a few minutes to complete.\n\nPlease connect your device in fastboot mode.\n\nReady to begin the installation?”
RESPONSE=$?
if [ "
${RESPONSE}" == "1" ];
then
close_installer
exit 1
fi
# check for fastboot
is_fastboot_installed
if [ $? -ne 0 ];
then
close_installer
exit 1
fi
# create WORKDIR for download
mk_workdir
if [ $? -ne 0 ];
then
close_installer
exit 1
fi
# check for prior download
check_prior_download
if [ $? -eq 1 ];
then
zenity –title=”Ubuntu Nexus7 Installer” –question –text=”Previously downloaded images found\n\nWould you like to re-flash using these images?”
RESPONSE=$?
if [ "
${RESPONSE}" == "0" ];
then
USE_EXISTING=”true”
else
USE_EXISTING=”false”
fi
else
USE_EXISTING=”false”
fi
# move over to WORKDIR for download
pushd $WORKDIR
if [ "
${USE_EXISTING}" == "false" ];
then
# ensure network is up and begin download
check_network && download_images
if [ $? -ne 0 ];
then
close_installer
exit 1
fi
fi
# checksum downloaded images
checksum_images
if [ $? -ne 0 ];
then
close_installer
exit 1
fi
# obtain sudo privs for fastboot
SPW=”$(gksudo –print-pass –message “Provide permission to execute: ${0##*/}” — : 2>/dev/null)
# check for null entry or cancel request
if [[ ${?} != 0 || -z ${SPW} ]]; then
zenity –error –title=”Ubuntu Nexus7 Installer” –text=”Password not specified”
close_installer
exit 1
fi
# check password validity
if ! sudo -kSp ” [ 1 ] <<<”${SPW}” 2>/dev/null; then
zenity –error –title=”Ubuntu Nexus7 Installer” –text=”Invalid password specified”
close_installer
exit 1
fi
# check for device
fastboot_device_found
if [ $? -ne 0 ];
then
close_installer
exit 1
fi
# begin flashing process
(
set -e
echo “0″; sleep 2
echo “# Begining Ubuntu Nexus7 installation”
echo “20″
echo “# Erasing boot partition”
sudo -Sp ” — fastboot erase boot <<<”${SPW}
echo “40″
echo “# Flashing boot partition”
sudo -Sp ” — fastboot flash boot ./boot.img <<<”${SPW}
echo “60″
echo “# Erasing userdata partition”
sudo -Sp ” — fastboot erase userdata <<<”${SPW}
echo “80″
echo “# Flashing Ubuntu root file system”
sudo -Sp ” — fastboot flash userdata ./rootfs.img <<<”${SPW}
echo “100″
echo “# Rebooting device”
sudo -Sp ” — fastboot reboot <<<”${SPW}
) |
zenity –auto-close –progress \
–title=”Ubuntu Nexus7 Installer” \
–text=”Flashing Ubuntu on the Nexus7″ \
–percentage=0
if [ ${PIPESTATUS[0]} -ne 0 ];
then
zenity –error –title=”Ubuntu Nexus7 Installer” –text=”Installation failed”
close_installer
exit 1
fi
zenity –info –title=”Ubuntu Nexus7 Installer” –text=”Nexus7 flashed with Ubuntu successfully\n\nIt will take several minutes for the root filesystem\nto be unpacked and installed after reboot”
# pop out of WORKDIR
popd
# invalidate sudo credentials
sudo -K
;;
“Exit”)
exit 0
;;
esac

 

Will you be attempting to hack a community flavor on your Nexus 7? What are your initial thoughts on Ubuntu on Nexus 7?

Tagged with:
 
  • http://profiles.google.com/deanhowell2 Dean Howell

    I would like to see Kubuntu with Plasma Active 3. That seems to be the only software in the Ubuntu repos that is even remotely touch-centric.

    • http://benjaminkerensa.com/ Benjamin Kerensa

      There is already a Plasma project but I don’t think it targets the N7…. If you modified the above script to call images from your own server then you could likely get Plasma going on the N7

      • http://profiles.google.com/deanhowell2 Dean Howell

        Isn’t there a Plasma Active preview in the Ubuntu repos already? It should only matter that Ubuntu targets the N7.

  • http://profiles.google.com/deanhowell2 Dean Howell

    What happened to my comment?

    • http://benjaminkerensa.com/ Benjamin Kerensa

      All comments are held for moderation

  • gilir

    I may be blind, but one piece is missing : the script which create the .img from a seed or a list of packages, or an ISO or anything. It sounds easy to customize the installer script to point to another flavor, but you need an .img of a flavor for this. Any documentation / link is welcome, as I’m very interested to generate a Lubuntu version for Nexus 7 :-)