Closed in favour of this thread.
There's a typo that jdkramar found, but I expect that most of you won't hit it (unless you've modified your /etc/sudoers), and those that will know enough to fix the script.
----- Your regularly scheduled post below. -----
For those users who have requested a full Linux on their Android device, I now present a relatively easily upgradable Ubuntu on the Motorola Atrix. It's not perfect, but it's surprisingly good.
There are a number of problems we have with the webtop environment that we would like to address in order to have "proper" Ubuntu, including (additional explanation below about each of these points):
- The restrictiveness of the environment Motorola's set up (easy to bypass).
- A lack of disk space to do anything (only having ~80 MB free really hurts).
- An unwillingness to create a third Linux-based environment.
- A non-functional apt/aptitude (easy to fix).
Note: This is different than the "webtop over HDMI sans dock" effort. If you're looking for that, please look at this other thread instead. Although unrelated, they shouldn't conflict with each other.
You will be hacking your device. The base script that modifies your device has been reasonably well tested and operates with a decent level of paranoia, so it is highly unlikely that the script will break anything. However, any software you install after you have access to a full Ubuntu presents a very real chance that you will either soft-brick your device or get it into an infinite reboot loop, particularly if you don't know what you're doing. Having a decent knowledge of Unix/Linux is recommended if you wish to proceed. You take full responsibility for what may happen to your device if you execute this script.
You'll need a rooted Atrix in order to do this*, although I doubt anyone's surprised about that. The attached setup script takes care of the steps in post #4, but you should note a few things:
Before you execute the script:
- In response to the request that threads indicate whether or not this will work on any Motorola Atrix, it should. If you'd like verification, send me the output of "/usr/bin/dpkg-query -l" on your Atrix's unmodified Ubuntu, and I can double-check. So far, this is verified to work on:
- AT&T (me! )
- The script will create a 1 GB filesystem file in /data, so you'll need to have at least that much free space there.
- Before running the install script, you'll need to have seven or less apps in the Media area. You can check this by going to Settings → Applications → Manage applications, then checking the Media area tab. The number of apps there will need to be seven or less. If you have more than that, temporarily uninstall apps or move them back to the phone (you can move them back after the script runs and reboots).
While you execute the script:
- When the script asks question, it offers reasonably "sane" options by default (although it does try to be safe).
- Resetting a filesystem file means that it will use the file that's already there, but set it back to match your original /osh partition. It's generally quite a bit faster than deleting it and recreating it, but deleting it is sometimes the right decision (like if you want to change its size).
- The script asks about your MAC (mandatory access control) files because it can't be sure that you haven't altered your original files to your taste. If you have no idea what that sentence just said, pick either the very permissive or somewhat permissive MAC configuration files (the former should cause you fewer headaches).
- If you haven't altered your AWN configuration (the tray at the bottom), I suggest you install the modified app launcher configuration (which is the default). If you have altered the configuration, the script won't ask, assuming that you'd like to keep your current one.
- Since the setup script downloads Ubuntu packages on the fly (it made more sense than trying to have a giant archive with all of the packages embedded in it), the quality of your connection may result in the script dying partway through. If this happens, you should just be able to restart the script; it'll start again from the beginning, but nothing bad should happen as a result. If enough people report problems with downloading packages, I'll look into a workaround.
After you execute the script:
- I've seen a couple of instances where on the first reboot to the alternate /osh partition where MotoBlur thinks that the SIM card has changed. Another reboot fixes this.
- For those users who have used a previous version of the script, an upgrade script(s) are included to bring you up to the current level of what's automated.
- For those users who have used a previous version of the script and made changes after that, the upgrade script(s) should be able to handle those changes gracefully.
If you want to uninstall:
Using adb with root access:
- adb shell
- cd /system/bin
- mv mountosh mountosh.new
- mv mountosh.orig mountosh
- cd /data
- rm ubuntu.disk
- cd /home/adas/.gconf/apps/avant-window-manager
- rm -r window_navigator
Once installation is complete, you can start playing with synaptic to install packages. You may need to be careful upgrading any of the -mot/~mot versioned packages, as that can break functionality. I'm still compiling a list of which packages can be upgraded versus which can be left alone (listed below).
Here's a brief runthrough of the type of operations you can do afterwards. Upon rebooting, the webtop screen now looks like this (note the altered set of icons in the tray):
Running synaptic brings up a list of available packages:
If we're looking for a decent image viewer, eog should do the trick:
Once we install it, Nautilus (the file manager) now has an interesting option in the menu for pictures, Open with "Image Viewer":
Selecting that brings up what you would expect (moved off to the side so that it doesn't take up the entire desktop):
I haven't yet tested upgrading to Ubuntu 9.10 yet (let alone Ubuntu 10.x), but everything else looks to work fine, with the usual caveats. Further updates to come as they're available!
- 1.0.6: "By default, Wget will assume a value of 10 seconds." my foot!
- 1.0.5: More fixes:
- Having a space in the directory structure should no longer be disruptive to the script's behaviour.
- Questions are now case-insensitive.
- More tweaks to the somewhat permissive TOMOYO configuration files.
- If the LXTerminal binary has been deleted (as appears to be the case on Bell), it is now re-installed.
- The built-in package tester is now more resilient. It supports 1.4.26 and 1.4.52 properly.
- The script now asks whether the dock should just be blown away with the replacement, rather than trying to make assumptions.
- 1.0.4: Quite a few fixes:
- Rename upgrade scripts, so that people get less confused (hopefully!).
- Tweak the check for whether it's already running from the filesystem file, since the earlier check didn't actually work (doh!).
- /osh/data doesn't exist by default, so have the script stop assuming that.
- Tweak the pulseaudio re-install so that it's a bit more reliable.
- The expected list of packages to manipulate doesn't work for 4.1.26. Set it to the 4.1.26 numbers for now, and re-factor for 4.1.52 with the next revision.
- Reroute /bin/ps' stderr to /dev/null so that it doesn't pollute stdout.
- The set of unmount instructions at the end need to be split up, since you can rightfully get to the end while skipping some of the mount instructions.
- Prior to attempting to alter /system, ensure that it's mounted read/write.
- 1.0.3: Not everybody runs batch files from the command line, so add a "pause" at the end so that users can see what happened.
- 1.0.2: Apparently, relying on the score that aptitude returns as the check for whether or not it's okay to auto-fix things is too unreliable. So, instead, opt for the (somewhat riskier, but should be reasonable) check of the number of packages to remove/install/upgrade/downgrade. The check can be made package-specific if need be, but I'd rather have a script that I can re-use later for other upgrades if I need it.
- 1.0.1: If the package management auto-fix doesn't go through, it's not likely that the script will be able to install gksu or synaptic either, so those steps need to be fixed.
- 1.0: The "very permissive" MAC option was broken. That's now been fixed, along with completing the automation of the entire process.
- 0.7.2: Added a check for having a free loop device, and also re-added a "very permissive" MAC option.
- 0.7.1: Removing /sbin/tomoyo-init appears to cause the X environment not to load at all, so disallow that option for now.
- 0.7: In addition to making it slightly more user-friendly (by adding questions for when the script isn't sure how to handle a situation), it now handles through to the initial dpkg installation.
- 0.5.2: Dump rsync's output to /tmp/rsync.out since it takes a really long time, allowing for users to tail the output if they know how. Also, run adb kill-server at the end of the script so that the adb daemon doesn't continue to run (which makes it really annoying to try and delete the directory).
- 0.5.1: 0.5 had a bug where it tried to check for a return from psneuter, which kills the adb connection (so no return value could be obtained). Instead, use whoami to verify whether or not psneuter succeeded in running.
- 0.5: The attached script should handle up through to the rsync phase automatically. There's a considerable amount of error checking, so it should be safe to use (I've uploaded a version of the script that should take you as far as the mountosh swapping, which means that you'll now be using a different Ubuntu partition than the default).
* This is a technicality, since the script hacks your device to be able to run commands over ADB as root.
----- Donation notes -----
If you want to donate, rather than to me, why not donate to the Japanese earthquake/tsunami relief effort instead? Here are a couple of (non-attributed) pointers if you don't know where else to look:
- International Federation of Red Cross and Red Crescent Societies: no minimum; USD, CHF, EUR; Visa/MC
- American Red Cross: $10 minimum (ouch); USD; Visa/MC/AmEx/Discover/Amazon
- Canadian Red Cross: no minimum (?); CAD; Visa/MC/AmEx/PayPal