Webtop2sd - Motorola Droid Bionic

http://forum.xda-developers.com/showthread.php?t=1119555
Logically speaking, this application should also work with the Bionic correct?
Just wondering, if its deemed safe in this thread to attempt using, I will try it and post back with results.
---------- Post added at 12:30 AM ---------- Previous post was at 12:08 AM ----------
Okay, so I just backed up everything and tried the app, which won't work due to the fact that it checks the phone model number, Theres a manual guide to get ubuntu running on the atrix, and I'm going to start from scratch there. Probably going to be a couple of days before I do anything since I need a new microhdmi...

I tried the app that comes with it to partition the sdcard but it does a device check then it stops with an error message that the device is not an Olympus (Atrix). Maybe we can get the dev to check on the differences, albeit small, for the Atrix and the Bionic.
Worth a shot. I've been playing around with /osh for a few days but had to reflash to stock due to the lapdock staying on the screensaver.

Hey guys, I am working on the same thing at the moment trying to port over Sogarth's method of unlocking the 10.10 maverick build of Ubuntu on our phones.
http://forum.xda-developers.com/showthread.php?t=1000316
The link here is for his old automated .bat script he made for the Atrix that I believe will work for our phones with a little modification to it to reflect Maverick packages instead of the Jaunty packages for their phones.
Please jump into the irc in my sig because I would like to get this going as well.

I would hop in IRC but I'm about to head out the door.
I'm currently approaching this situation from two directions:
1.) I'm dumping /osh/ (webtop partition) and uploading it to dropbox as soon as I can get a complete dump. (hopefully tonight) and providing it to the original Atrix dev to see if he can hook us up with an app to help do whats needed
2.) I'm also attempting the manual method as soon as I get a new microHDMI cable (I was using a cheap adapter).
You are 100% correct though, you should be able to get that install script working just by changing the packages to reflect the updated Ubuntu. MAKE SURE you backup ANY files before you change them (and preferably a complete backup of /osh/. Since we have SU on our phones we have free reign over the /osh partition, so be careful in there.
OT: I can't wait until we can get on-demand CPU overclocking for this thing... if it clocks as well as past mobile chips... Toggle 1.2-1.4ghz and plug it in the LapDock. You'd have a damned fine netbook...
(Not necessarily talking to any experienced users or noobs, the disclaimer about Linux & SU is for everyone reading this thread - I'm relatively experienced in the Linux world... and I need to be reminded of SU's power sometimes.)
I just realized that their phone's Ubuntu distribution is under the 9.x series versus the 10.x series. A lot of Major changes happened to Ubuntu between 9.x and 10.x that affected the way the operating system talked to devices and booted, they stopped using HAL and moved to a new boot method, I am uncertain whether or not the install script will work or not, though I'm somewhat confident it will, given the nature of webtop (Android does the hardware abstraction, and the booting, we just run a second set of executable's on a different X window session attached to a different display) This should mean that the portions that would normally prevent us from just duplicated the script are omitted from the Ubuntu distribution entirely. As long as we keep a backup we should still be fine.

No worries, just remember to keep FXZ and RSD handy. I've screwed up the /osh partition a couple times but that has saved me from complete disaster so far

Good call on bringing this up. Let me know if you need to test anything for this.

@xaero252
So I modified Sogarth's script to use Maverick build of all the tools it downloads and installs but the problem with the script is that it needs the phone to have the ro.secure=0 so that ADB always launches with root access without manually initiating su each line of code. I am not sure if there is a way around it or if we have to modify the script differently. Anywho, I've upload a copy of the work I've done to the script.

Is it just an sh script? If so and ut doesn't reboot the phone at all you could launch a SU terminal and do "su sh script.sh"
oh i see the issue now... we would have to be able to edit the boot loader for that method... if i'm correct though his android app doesnt use the pc for much... if you change that variable on boot do you think it woukd work?
Hmm, I have an idea, its not as polished as the pc based script, however it should still work presuming you can get a SU terminal to run on the phone ( I happen to have one running right now ) I'm going to see if I can't adapt that to a bash script. probably going to take a while.
Curiously we happen to have a 1.5gb partition for Ubuntu on built in memory, where as the atrix only had a 600 or so mb partition... This is great because we should likely be able to continue to install /, /boot and such to internal memory, and use the sd card (even left as ntfs) for /home...
Couple of things: reading through the script it looks like 100% of the commands he runs could be run on the phone via a bash script run as su. The idea is this: convert the entire script over to bash, copy the script, and the required files to the phone, and execute the script from the phone. The only other concern I can see is the wget package included with the script not being compatible with maverick, which doesn't seem likely.
I'm gonna start working on rewriting the script linux native. My idea is to use a terminal emulator (they are free on the market) and run su script.sh and pray. I need to get a new microHDMI before I do this though, so I can test my results reliably.

xaero252 said:
Is it just an sh script? If so and ut doesn't reboot the phone at all you could launch a SU terminal and do "su sh script.sh"
oh i see the issue now... we would have to be able to edit the boot loader for that method... if i'm correct though his android app doesnt use the pc for much... if you change that variable on boot do you think it woukd work?
Click to expand...
Click to collapse
As far as correcting that, no one has attempted doing custom kernels yet so to do the edit to get root access out of the gate is moot at this point.
Hmm, I have an idea, its not as polished as the pc based script, however it should still work presuming you can get a SU terminal to run on the phone ( I happen to have one running right now ) I'm going to see if I can't adapt that to a bash script. probably going to take a while.
Click to expand...
Click to collapse
Your linux skills are probably 10 folds better than mine but I believe if you convert my modified script, which has all the necessary links to the correct packages for our phone, then it might just work.
Curiously we happen to have a 1.5gb partition for Ubuntu on built in memory, where as the atrix only had a 600 or so mb partition... This is great because we should likely be able to continue to install /, /boot and such to internal memory, and use the sd card (even left as ntfs) for /home...
Couple of things: reading through the script it looks like 100% of the commands he runs could be run on the phone via a bash script run as su. The idea is this: convert the entire script over to bash, copy the script, and the required files to the phone, and execute the script from the phone. The only other concern I can see is the wget package included with the script not being compatible with maverick, which doesn't seem likely.
Click to expand...
Click to collapse
The WGET I packaged in the .zip is the correct for Maverick along with all the files in the \bin directory are corrected to match our phone. If you can convert all this to a bash script, that would be awesome instead having to do each command via ADB Shell. The only problem I had with this is every time I tried to run the DPKG command on the .deb I downloaded manually, it threw up an error saying it could not find the file or destination.
On a side note, you are correct that we have 1.5gb partition opposed to their 700mb so we could honestly forget the part about creating a ubuntu.disk on the /data partition and modify the /osh directly for now until the time we need more space. After that, we can see if Sogarth will incorporate your script into his Webtop2sd app or we could make a 3gb ubuntu.disk on the /data partition since we have plenty of space there.
I'm gonna start working on rewriting the script linux native. My idea is to use a terminal emulator (they are free on the market) and run su script.sh and pray. I need to get a new microHDMI before I do this though, so I can test my results reliably.
Click to expand...
Click to collapse
Make sure you get the adapter as well to trigger Webtop cause at the moment our phone wont do webtop directly over HDMI without the HD Dock, Webtop adapter or Laptop dock. If you want to test the script out for now, hit me with the script and I will test it for ya

Related

[MOD] Full Ubuntu on the Atrix (now fully automated: 4.1.26/4.1.52)

----- Announcements -----
Closed in favour of this thread.
As noted in the poll, interest is high enough in a union filesystem that it will be the next thing investigated. Unfortunately, anybody who wants to move from any version 1.x or earlier of this script will probably need to re-install everything for version 2.x, as the way the target filesystem is designed is going to change dramatically. Sorry.
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.
Caveats:
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! )
Bell
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
su
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
reboot
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):
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
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!
Changelog:
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
In regards to the above list, a bit of explanation:
The restrictiveness of the environment Motorola's set up (easy to bypass).
As shown in the above steps, renaming and/or removing /sbin/tomoyo-init is all it takes to disable TOMOYO Linux. Leaving it in place isn't necessarily a bad idea, since it means that any of the standard entry points into an Atrix are reasonably locked down. The TOMOYO configuration file that I'll shortly be attaching leaves certain executables completely unlocked (those that need to be able to run anything), but finding out what's hitting up against the limits is a simple matter of setting everything to run_level 2 and checking dmesg.
A lack of disk space to do anything (only having ~80 MB free really hurts).
As I note above, 1 GB isn't much either. On the other hand, what I'm going to look into when I have that mythical thing called free time is to use my internal contacts to get a copy of the kernel source code and then see if I can build myself a FUSE module. At that point, I should be able to pull off a union mount, which should help dramatically.
We haven't figured out how to repartition the Atrix's partition scheme, so we don't have much flexibility on making the existing partition larger. Creating a filesystem file in the Internal Storage would be nice, but a) that partition (p18) isn't available when mountosh runs, and b) it'd make it difficult, if not impossible, to cleanly USB mount the partition. Creating a partition on the SD card would be nice, but a) mmcblk1 isn't available when mountosh runs either, and b) there would be similar constraints if a user ever wanted to pull the SD card.
An unwillingness to create a third Linux-based environment.
I respect what the people who are trying to create a "clean" chrooted environment are trying to do, but it feels to me that there's the whole "throwing the baby out with the bathwater" aspect here, since there really isn't that much more to do beyond what Motorola's provided. Besides of which, some of what Motorola has done with their environment isn't possible to duplicate without taking the files (like the aiw (Android In Window) package). So I would prefer to take the approach of taking the chains off the existing system.
A non-functional apt/aptitude (easy to fix).
Not much to say here, right?
The script builds a larger disk using /data as its home. The primary advantage is that we have access to it at the right point during boot. The primary disadvantage is that we don't have anywhere as much as we'd like to have (since /data is 2 GB total). But, you work with what you've got!
Known package issues:
Be careful upgrading any of the -mot/~mot packages, as that can break functionality. I'm still compiling a list of which packages can be upgraded versus which can be left alone.
Can be upgraded with loss of functionality:
libnautilus-extension1-1:2.26.2-0ubuntu1-mot1
nautilus-1:2.26.2-0ubuntu1-mot1
nautilus-data-1:2.26.2-0ubuntu1-mot1
Upgrading these packages plus at least one additional package I've not yet fully identified breaks viewing mountable storage and the ability to unmount it.
xserver-xorg-core-2:1.6.0-0ubuntu14
Using the stock xserver-xorg-core 2:1.6.0-0ubuntu14 that's already installed without recovering /usr/bin/Xorg appears to lead to a loss of the status bar at the top. This particular issue is now handled by the script.
Cannot be upgraded:
gtk2-engines-1:2.18.1-0ubuntu1~mot1
This breaks aiw (Android In Window) so that there's no frame around the window and it can no longer be manipulated in any way.
xscreensaver-5.10-6-motorola1?
xscreensaver-data-5.10-6-motorola1?
xscreensaver-data-extra-5.10-6-motorola1?
This will likely break displaying aiw (Android In Window) as the unlocking mechanism for the screensaver. Still needs to be tested.
Archived notes:
The below steps are performed by the script in the first post, but in case you really wanted to know what's going on behind the scenes....
----- The setup script takes care of steps starting here. -----
From here on until noted otherwise, all commands are assumed to be run as root (so you either are root, or you're calling every command via sudo).
First, we should make sure that there's enough free space on the device:
/bin/df -h /data
There should be at least 1.0G under the Used column. If not, you won't have enough to create a decent disk. If so, then you can keep going:
/bin/dd if=/dev/zero of=/data/ubuntu.disk bs=1024 count=1048576
/sbin/losetup /dev/block/loop7 /data/ubuntu.disk
/sbin/mkfs -t ext3 -m 1 -b 2048 /dev/block/loop7
mkdir /tmp/osh
/bin/mount -t ext3 /dev/block/loop7 /tmp/osh
At this point, we've created a 1 GB disk file (1,024×1,024=1,048,576), formatted it as ext3, and mounted it in /tmp/osh. The next step is that we need to grab a copy of rsync so that we can perform our copy. I'll assume that rync is in /mnt/sdcard-ext for now:
mkdir /tmp/deb
/usr/bin/dpkg-deb -x /mnt/sdcard-ext/rsync* /tmp/deb
/tmp/deb/usr/bin/rsync -avx /osh/ /tmp/osh/
And now we have a duplicate of our /osh partition, but with more space this time (1 GB instead of 756 MB, which isn't great, but is a hell of a lot better). And, we know how to intercept the point in init.rc where /osh is mounted so that we can redirect it. Put the following into a file named mountosh.new, then copy it to /mnt/sdcard-ext. Here's the file:
Code:
#!/system/bin/sh
# Run mountosh.orig
/system/bin/mountosh.orig "[email protected]"
# Then, mount the filesystem file over the existing /osh
# partition.
/sbin/losetup /dev/block/loop7 /data/ubuntu.disk
/system/bin/mount -t ext3 /dev/block/loop7 /osh
After that:
mv /system/bin/mountosh /system/bin/mountosh.orig
cp /mnt/sdcard-ext/mountosh.new /system/bin/mountosh
chmod 0755 /system/bin/mountosh
chown 0 /system/bin/mountosh
chgrp 2000 /system/bin/mountosh
You can now reboot your device, and you should now boot into the new partition we've just created.
----- The 0.5 version of the setup script performs up through here. -----
Here, an interesting question pops up: do you want mandatory access control (MAC) in place? In my case, I don't have a problem with it, so I can provide updated TOMOYO configuration files that reflect that. If you would prefer to disable it completely, run the following commands:
rm osh/etc/tomoyo/exception_policy.conf
touch osh/etc/tomoyo/exception_policy.conf
rm osh/etc/tomoyo/domain_policy.conf
touch osh/etc/tomoyo/domain_policy.conf
and then reboot your device again. This configures TOMOYO so that it monitors nothing.
Next, we go through and install a series of packages which are either loaded in a broken state (because Motorola force-installed conflicting packages afterward) or packages which are expected to be present. Some of these packages have specific paths listed afterward; if there are, then those files need to be backed up before package reinstallation, then restored afterward. This is important.
coreutils
cpio
dbus
/etc/init.d/dbus
dbus-x11
/etc/X11/Xsession.d/75dbus_dbus-launch
dhcp3-client
findutils
gpgv
pulseaudio
/etc/pulse/daemon.conf
/etc/pulse/default.pa
udev
/etc/init.d/udev
xserver-xorg-core
/usr/bin/Xorg
You'll need to install each package with:
dpkg -i --root=/osh --force-overwrite <package>
At this point, we can now update the list of APT sources so that we can start querying the public Ubuntu depots. Edit your /etc/apt/sources.list to have these entries:
Code:
deb http://ports.ubuntu.com jaunty main universe multiverse restricted
deb http://ports.ubuntu.com jaunty-security main universe multiverse restricted
deb http://ports.ubuntu.com jaunty-updates main universe multiverse restricted
I would also recommend that you add this line to the bottom of your /etc/apt/apt.conf.d/05aptitude file, since the reality of the situation is that we still don't have much space (it'll turn off auto-installing packages that aren't necessary but are recommended):
Code:
Apt::Install-Recommends "false";
At this point, you should be able to run the following with no problems:
apt-get update
----- The 0.7 version of the setup script performs up through here. -----
If this succeeds, we can move on to running aptitude:
aptitude
It will complain that a number of package installations are broken. This is expected, as that's how Motorola built out the distribution. The current script executes the "default" solution, which at the time of writing is four uninstallations, one downgrade, and ten installs. Also make sure that no "unnecessary" packages are uninstalled, since some of them are actually necessary.
We can then install gksu and aptitude so that we have graphical access to the package repositories from aptitude.
----- The 1.0 version of the setup script performs up through here. -----
You my friend are incredibly good. This is insane
Edit: removed huge quote...
Might be a good idea to not quote the entire massive post.
Looking forward to seeing where this goes... How well does it run?
This is great. Can't wait to try it monday. Keep up the good work.
Sent from my MB860 using XDA Premium App
how does this perform vs the included webtop mode?
CC Lemon said:
Looking forward to seeing where this goes... How well does it run?
Click to expand...
Click to collapse
lasersocks said:
how does this perform vs the included webtop mode?
Click to expand...
Click to collapse
It is the included webtop mode - it's just a matter of pulling off some of the restrictions that Motorola put on it. I should probably tweak it just a bit more to where I'm happy with it, and then I'll be able to start making suggestions on what to install. One of the things that people would probably want most is synaptic (graphical package manager), for example, and I should just have a script that installs it for people.
if you get this working, can you make a video please? would be nice to see how it is.
pure genius
can u post a video about your work ? =)
Very good work! You should join the irc sometime.
freenode
#moto-atrix
Now with more scripting!
I've added a version 0.5 of a setup script that automates some of what happens (I've denoted how far in the process it performs right now). It should print out a user-friendly version of what it's doing, in addition to what it's failing on if it fails. Appropriate notes added in the first post as well.
Sogarth said:
Now with more scripting!
I've added a version 0.5 of a setup script that automates some of what happens (I've denoted how far in the process it performs right now). It should print out a user-friendly version of what it's doing, in addition to what it's failing on if it fails. Appropriate notes added in the first post as well.
Click to expand...
Click to collapse
I'll try again. Got up until mounting new partition. Created mountosh.new copied over to phone rebooted. Didn't mount. Didn't have anything in /sbin dir. Like losetup.
Back to .sbf now. Going to try script and give it another go.
I cant wait for my Atrix I'm getting more and more excited every day seeing whats happening here
Thanks a lot for this, especially that I'm not very advanced linux user
Does the usb mice and keyboard work properly? Or other usb-stuff?
dicksteele said:
I'll try again. Got up until mounting new partition. Created mountosh.new copied over to phone rebooted. Didn't mount. Didn't have anything in /sbin dir. Like losetup.
Back to .sbf now. Going to try script and give it another go.
Click to expand...
Click to collapse
Hmm... that's really, really strange.
Edit ubuntu.bad and comment out the reboot line, then. Should just be a matter of adding rem at the beginning of that line.
Also, you shouldn't have to use the sbf. Using the soft brick recovery instructions should be enough, since all you would need to do would be to rename mountosh to mountosh.new, then rename mountosh.orig back to mountosh to get the original state back.
Sogarth said:
Now with more scripting!
I've added a version 0.5 of a setup script that automates some of what happens (I've denoted how far in the process it performs right now). It should print out a user-friendly version of what it's doing, in addition to what it's failing on if it fails. Appropriate notes added in the first post as well.
Click to expand...
Click to collapse
Shouldn't for /f "tokens=*" %%l in ('%~dp0adb.exe shell "chmod 6755 /tmp/psneuter > /dev/null 2>&1 && echo PASS"') do set retval=%%l
be chmod 0755 ? Getting error can't execute psneuter. First I thought it was because I already had one in tmp from AROOT. Trying again now.
Sogarth said:
Hmm... that's really, really strange.
Edit ubuntu.bad and comment out the reboot line, then. Should just be a matter of adding rem at the beginning of that line.
Also, you shouldn't have to use the sbf. Using the soft brick recovery instructions should be enough, since all you would need to do would be to rename mountosh to mountosh.new, then rename mountosh.orig back to mountosh to get the original state back.
Click to expand...
Click to collapse
I was running Gingerblur. Wanted to start fresh. And it wasn't from running batch file. It was before you creating batch. Tried from first post instructions. No biggie. I'm having fun !!!
dicksteele said:
Shouldn't for /f "tokens=*" %%l in ('%~dp0adb.exe shell "chmod 6755 /tmp/psneuter > /dev/null 2>&1 && echo PASS"') do set retval=%%l
be chmod 0755 ? Getting error can't execute psneuter. First I thought it was because I already had one in tmp from AROOT. Trying again now.
Click to expand...
Click to collapse
No, it's actually chmod 6755 since it's setting u+s. What's a bug in there (and I'm about to upload a fixed version) is that /tmp/psneuter actually kills the connection immediately, so it can never return "PASS". I added in a user check afterward instead.
A fixed 0.5.1 uploaded.

Booting Ubuntu on the O2X

I've spent some (much) time this week with trying to get ubuntu running on the optimus 2x. I have succeeded to boot and get the wifi, X11 and the touch screen sort-of working.
The ramdisk is completely replaced with a busybox executable, some symlinks to it and a shell script that mounts the necessary stuff (/dev/block/mmcblk1p2 as ext3), changes root directory and calls /sbin/init.
USING THE FOLLOWING WILL VOID ANY WARRANTY YOU MIGHT HAVE LEFT AND MIGHT ALSO BRICK YOUR PHONE!
Seriously, don't do this if you don't wish to risk the data on your phone.
I will be providing some demo images for people who don't have a build environment up and running. These images will not work particularly well, don't get your hopes up .
If you want to have a big linux installation (more than 3 GB) you can flash the images to the second partition on your external sd (obviously you have to create this yourself first). You can use the following boot image (which assumes that linux is on /dev/block/mmcblk1p2 with ext3:
https://ha.xxor.net/o2x/boot-20110813.img
I have also targzipped the modifications to the file system that were required to get stuff going here:
https://ha.xxor.net/o2x/o2x-20110813.tar.gz
This should be extracted directly to the root file system.
The kernel source code is up at https://github.com/ergoen/LG-Optimus-2x-linux-kernel
Things that have been done to get this to "work":
1. Boot partition
Apart from grabbing the busybox stuff from some nexus one boot image (I'm sorry whoever fixed it, I don't remember where I got it from ) the boot command line had to be modified a bit, changing stuff from the default usually ends up in a phone that won't boot, but I discovered that it's possible to append new arguments to the default ones. So the following have been appended:
console=tty0 root=/dev/mmcblk1p2 init=/sbin/init
The console=tty0 makes sure that you see stuff on the screen while ubuntu get's running. The last two are not necessary to boot, but ubuntu seem to like (need?) them (or at least the init=/sbin/init), since otherwise you never get to the login prompt on the screen.
2. The Ubuntu installation
To make it possible to communicate with the phone at all adbd was put into the /sbin/ folder and a symlink was created /system/ -> /. Also the "/sbin/adbd recovery &" command was added to rc.local to make it autostart.
2.1. Modules and wifi
We need the /lib/modules/2.6.32.9 directory. Most files inside that were generated using the "depmod" command, the exception is wireless.ko which was taken from android, the firmware and nvram files needed for the wifi chip to work were placed in the /lib/firmware/wl/ folder. To make the wifi module autoload with the proper firmware "wireless" was added to /etc/modules and the file /etc/modprobe.d/wireless.conf was created with the contents describing the location of the firmware and nvram.
To make the wifi autoconnect on boot the /etc/network/interfaces file was modified with the following contents:
auto wlan0
iface wlan0 inet dhcp
wpa-driver wext
wpa-conf /etc/wpa_supplicant.conf
(To make the wifi autoconnect to your wireless you need to run the command "wpa_passphrase networkname networkpassword > /etc/wpa_supplicant.conf using adb or chroot)
2.2. X11
Getting X up by running xinit produces a simple black screen on the phone. At first I thought the problem was that the refresh rate was set to 106 Hz, indeed changing it with xrandr and pushing a new mode got me a visible xterm on Kubuntu 11.04:
https://ha.xxor.net/o2x/xterm.jpg.
On Ubuntu 10.10 it even gave me a nice colored gdm screen:
https://ha.xxor.net/o2x/gdm.jpg
But the image I got there was static and wasn't being updated. Turns out the reason the screen was black earlier with the 106 Hz rate and the reason why the screen is now just showing an image is that the framebuffer device doesn't update the screen like it should..
By modifying the kernel source to redraw the screen every 50 ms (~20 Hz) it's possible to get a scren that works. This is an ugly hack in the tegra-fb driver though, so I'm open for suggestions on how to solve it in a better way!
2.3. Touchscreen
By default the only thing the touchscreen does is force the mouse up in the left corner, I think this is due to some multitouch thing. Some more kernel hacking (basically half-disabling multitouch) makes the touchscreen work.
Pictures:
https://ha.xxor.net/o2x/SAM_0671.jpg
https://ha.xxor.net/o2x/SAM_0672.jpg
Video:
http://vimeo.com/27662093
Thans to RaYmAn and lilstevie on #tegralinux for all their help this far!
3. Misc
(K)Ubuntu 11.04 uses a new version of libc which crashes with the current nvidia kernel (2.6.32.9) on this hardware (http://developer.nvidia.com/tegra/forum/errata-657451-tls-bit-20-cp15-c13-3), so I'm going back to Ubuntu 10.10 until someone ports a newer kernel to the Optimus 2x or this problem can be solved in another way.
edit 1: Ubuntu 10.10 with much more working X11 noted in section 2.2.1.
edit 2: X11 working even more, touchscreen works aswell!
edit 3: Landscape mode works with both X11 and the touchscreen now, getting ready for alpha 1!
Current status:
Working:
- adb (best way of controlling device currently)
- X11 (only framebuffer with hardcoded refresh rate of ~20Hz)
- landscape mode fixed! =D
- touchscreen (probably only single touch)
- wifi (only when running things from console, ubuntus network manager does not recognize it)
Not working:
- Basically everything else
Alpha 1:
EDIT: Seems that multiupload has screwed up and this link was going to some crap, anyway this is not relevant anymore
Username 'ubuntu', password 'ubuntuxda'. Don't use this if you don't know how to restore the boot partition! (Or else you won't be able to boot back into android!)
Experiments:
Tried disabling the CONFIG_TEGRA_ERRATA_657451 switch in the kernel to make newer linux versions boot. This might be a bad idea in the long run, but this far things are working better than with the switch enabled..
I tried Ubuntu via chroot method posted in other thread, but I'm a noob.. Can you please explain what is different about your ubuntu?? Does it boot without Android and doesn't need VNC stuff?
Yes, it boots instead of android when turning on the phone, but it doesn't work completely, so I mostly put it up here so that people could help test and fix/hack things.
You rock! Unfortunately I'm no dev, so can't help but hopefully others will, so we'll get a fully working linux on our phone, and maybe later even meego. Is there btw drivers for the gpu? Because hdmi, with usb host ofc, would be really useful!
Anyway, good job, really!
This looks great ergoen! I'm no dev either but I can't wait until it's available to everyone, I would love to have Ubuntu running on my O2x.
Best of luck!
gpu drivers are closed source, and the ones released by nvidia require a newer kernel (2.6.38), so thats not really possible yet.
Newer kernel will be necessary anyway though, since the crashes I'm getting seems to be due to a bug in tegra which gets worked around in 2.6.36. I'm not skilled enough to perform that port though. I will of course give it a try, but most likely I'll go for some older version of ubuntu and/or perhaps meego instead.
Håller med tidigare poster. Would be awesome with native Ubuntu and Meego on the phone... keep up the good work, can't wait to follow this development.
Sent from my Optimus 2X using XDA Premium App
ergoen said:
... I realized that it tried to run the screen at [email protected], which is hmm, wrong . So setting up a script at /etc/xprofile, which makes sure the refresh rate is 60Hz...
Click to expand...
Click to collapse
What would happen if you changed this to 72Hz instead? I saw that info when I was browsing System Information in some app. Im not a dev At. All. But tell me what you think it's probably a stupid question
Sent from my Optimus 2X using XDA Premium App
I can give it a try later, not that it would make any difference .
edit: 72 Hz also seems to work, cool, that's higher refresh rate than my computer screen...
ergoen said:
I've spent some (much) time this week with trying to get ubuntu running on the optimus 2x. I have succeeded to boot and get the wifi working, also X sort-of works (software fb). I have only slightly modified the kernel (built with CONFIG_SIGNALFD=y so that Meego wont complain in a related attempt to get that os booting). The ramdisk is completely replaced with a busybox executable, some symlinks to it and a shell script that mounts the necessary stuff (/dev/block/mmcblk1p2 as ext3), changes root directory and calls /sbin/init.
USING THE FOLLOWING WILL VOID ANY WARRANTY YOU MIGHT HAVE LEFT AND MIGHT ALSO BRICK YOUR PHONE!
Seriously, don't do this if you don't wish to risk the data on your phone.
I will not provide a complete root file system for two reasons:
1. It's pretty easy to make yourself, grab the omap3 kubuntu mobile image from the kubuntu site, or use rootstock from an ubuntu installation to build one yourself.
2. My upload sucks, and putting several hundred MB onto the interwebz would hurt me.
However, I have placed an image of my boot partition here (assumes you've got ubuntu on the second partition of the external memory card formatted with ext3):
https://ha.xxor.net/o2x/boot.img
I have also targzipeed the modifications to the file system that were required to get stuff going here:
https://ha.xxor.net/o2x/o2x.tar.gz
This should be extracted directly to the root file system you aquired earlier.
Things that have been done to get this to "work":
1. Boot partition
Apart from grabbing the busybox stuff from some nexus one boot image (I'm sorry whoever fixed it, I don't remember where I got it from ) the boot command line had to be modified a bit, changing stuff from the default usually ends up in a phone that won't boot, but I discovered that it's possible to append new arguments to the default ones. So the following have been appended:
console=tty0 root=/dev/mmcblk1p2 init=/sbin/init
The console=tty0 makes sure that you see stuff on the screen while ubuntu get's running. The last two are not necessary to boot, but ubuntu seem to like (need?) them (or at least the init=/sbin/init), since otherwise you never get to the login prompt on the screen.
2. The Ubuntu installation
To make it possible to communicate with the phone at all adbd was put into the /sbin/ folder and a symlink was created /system/ -> /. Also the "/sbin/adbdb recovery &" command was added to rc.local to make it autostart.
2.1. Modules and wifi
We need the /lib/modules/2.6.32.9 directory. Most files inside that were generated using the "depmod" command, the exception is wireless.ko which was taken from android, the firmware and nvram files needed for the wifi chip to work were placed in the /lib/firmware/wl/ folder. To make the wifi module autoload with the proper firmware "wireless" was added to /etc/modules and the file /etc/modprobe.d/wireless.conf was created with the contents describing the location of the firmware and nvram.
To make the wifi autoconnect on boot the /etc/network/interfaces file was modified with the following contents:
auto wlan0
iface wlan0 inet dhcp
wpa-driver wext
wpa-conf /etc/wpa_supplicant.conf
(To make the wifi autoconnect to your wireless you need to run the command "wpa_passphrase networkname networkpassword > /etc/wpa_supplicant.conf using adb or chroot)
2.2. X11
Getting X up by running xinit produces a simple black screen on the phone. After some troubleshooting and voodoo magic I realized that it tried to run the screen at [email protected], which is hmm, wrong . So setting up a script at /etc/xprofile, which makes sure the refresh rate is 60Hz, and running it after xinit gets you a xterm!!!
https://ha.xxor.net/o2x/xterm.jpg
Telling /etc/X11/xinit/xinitrc to run it makes sure that it gets set up properly by the startx script, unfortunately startx doesn't go through for me on kubuntu because of some weird error caused by a hardware problem in tegra: (http://developer.nvidia.com/tegra/forum/errata-657451-tls-bit-20-cp15-c13-3).
Unfortunately this (probably) means that either we'll have to stay with old versions of libc or get a newer kernel (2.6.36 contains fix). Old libc seems backwards, but porting a new kernel requires a bit more skill than I possess.
2.2.1. Ubuntu 10.10
Grabbed the image ubuntu-netbook-10.10-preinstalled-netbook-armel+omap.img.gz from http://cdimage.ubuntu.com/ubuntu-netbook/ports/releases/maverick/release/ . After first unpacking the tgz, then unpacking the raw disk image to partition images (with 7zip on windows) and then flashing the 1.img file to the second partition on my sdcard I managed to run a much more bug free ubuntu than before.
Ubuntu 10.10 (Maverick) uses an older version of som libraries that don't crash with the old o2x kernel.
This has lead to the following:
https://ha.xxor.net/o2x/gdm.jpg
Obviously touch screen isn't working properly (pressing it puts the pointer into the upper left corner :S) so can't get further than this currently.
3. Misc
avahi-daemon and cups seems to be crashing all the time and restarting, so removing them (apt-get purge if ubuntu/kubuntu) will make the boot much cleaner. Also I get lots of alignment trap kind of errors that shouldn't be there for different kinds of services, (due to tegra bug mentioned earlier).
edit 1: Ubuntu 10.10 with much more working X11 noted in section 2.2.1
Click to expand...
Click to collapse
Its good you got it to work.Saves me some work.I was gonna begin this project my self after the 19th when my exams end.Maybe i could help you.
ergoen said:
I can give it a try later, not that it would make any difference .
edit: 72 Hz also seems to work, cool, that's higher refresh rate than my computer screen...
Click to expand...
Click to collapse
Most computer screens usually support atleast 72hz also, it's just that it only works with d-sub, and sometimes only at a lower resolution.. It's possible to make special drivers to some screens to enable higher refresh rate through dvi also.
Anyway, it's good the screen on the phone refreshes at 72hz instead of 60 for android, but in linux I really don't see the benefit.. Doesn't hurt to have though. Btw, if we would stay on this kernel, can we use the drivers from android then? Shouldn't gpu also work? Or are the drivers limited and don't allow xorg for example? Sorry if it's stupid question, don't have that much knowledge how android works yet.
Update: X11 and touchscreen work on Ubuntu 10.10 Maverick with new kernel (just a few hacks )!
manasgirdhar: sure! Lot's of things to do new kernel is needed for anything newer than ubuntu 10.10, and even here things like sound etc (cpu scaling maybe too) don't work.
kruppin: actually i removed the xorg.conf now, the phone thinks its running at 106 Hz and it works. Unfortunately in practice it goes at more like 20 Hz because of the hack I made to enable the fbdev output in the kernel. Android doesn't use X11, so those drivers wont be of any use. (I will post the kernel modifications to github soon)
edit: kernel source up on https://github.com/ergoen/LG-Optimus-2x-linux-kernel
A List of Things working at 2nd Post would be nice.
So anybody could fast see Updates,...
Edit:
Have you tried some "cleaner" Linux like Debian?
Alpha 1 is up in the second post for anyone who wants to test it (don't ^^).
I have not tried debian no, I thought ubuntu would be the easiest to google errors and bugs for .
You are great! i was hopin' for this since I have mine. You should try to make usb(otg) work to get some devices going i will try to test it soon
That's amazing We have to test USB OTG function. If it works by default, I'll try this right now
It is possible to make a dual-boot: ubuntu and android?
I don't think usb otg works since I am basically using the android version of the kernel, I also won't be able to try since I don't have a cable... (will buy one sooner or later).
Dual boot probably works if you flash the boot.img onto the recovery partition instead of the boot partition (/dev/block/mmcblk0p7 instead of /dev/block/mmcblk0p5). I have not tried this though. That way regular booting would give android and booting while holding volume down would give ubuntu, only problem with this is that cwm will be gone and the only way to fix broken things would be to flash with nvflash.
well it is not a major deal if have cifs avail needs kernel support as well. Benee mentioned (might) some otg support, mayb u could ask.
also, you might give E17 a try, it is butter-fast, and has a touch module for keyboard (letter zooming.!..) LINK
this can be compiled on a lot of hw, and gives good response with fbdev non-accel drivers also.
and most linux apps work on it fine. ofc until we have 2d/3d accel and might try compiz/fusion as well
LINK
Great job ergoen!
I've worked on exactly the same some weeks ago but i never accomplished it. because i stuck creating a working ramdisk. Which toolchain do you use?
MfG

How to switch from Ubuntu to Fedora 18

First of all, I need to acknowledge that I'm standing on the shoulders of giants, in composing this post. Mad props have to go to Rob Clark, for writing Freedreno and the Fedora installer I used. I also have to give credit to the people who made Ubuntu possible on the Touchpad (jshafer817, BodemM, castrwilliam, jcsullins, Calc1Programmer, Mystikal57, and lots of other people...I couldn't possibly post them all here, but that in no way diminishes my gratitude to them for all their hard work!)
Second of all, this is rough. Like "only shows kernel messages, good for nothing as it is" rough. I'm posting this to help spur on more work, so we can get things up and running faster.
Thirdly, you must have Ubuntu already installed to use this process, and it WILL destroy your Ubuntu install. I repeat, this WILL destroy your Ubuntu install. Only do this if you want to play with something that doesn't work right yet, and are willing to sacrifice something that does work to get it. You also need moboot 0.3.8 (which you already probably have if you have a working Ubuntu install).
Finally, no warranties. This will probably not work very well for you. I can't guarantee that bad things won't happen, and I will not be responsible if they do. I'm also LAUGHABLY FAR from being an expert, so look critically at these instructions before you go ahead, I can't guarantee I didn't miss anything. This is also probably not the most optimal method...the best method is probably what Rob posted in the readme, but that assumes you don't already have a Linux installed, which won't work so well for those of us with 16GB Touchpads.
Ok, having said all that, here's the good stuff.
Go to https://github.com/freedreno/touchpad-fedora and download the zip file.
Unzip it somewhere. There will be a bunch of scripts, a boot folder and a rootfs folder.
On your Touchpad, either in Android via a root terminal, or in WebOS with a root terminal, mount your /boot as read-write "sudo mount -o rw,remount /boot"
Go into the newly writable /boot, and delete uImage.Ubuntu (you'll need the free space...you can copy it to your computer or the SD Card if you want to reinstall it later). Copy uImage.Fedora to /boot. When you're done this, you should probably remount /boot as read-only "sudo mount -o ro,remount /boot"
Create a folder on your SD Card. Doesn't matter what you call it, but copy all the files from the rootfs folder there. There should be 11 of them, numbered 00 to 10.
Boot into WebOS, if you're not there already, and make sure you have WTerm installed and set up for root access.
Erase your Ubuntu partition, but don't destroy it. "mke2fs -F -T ext3 /dev/store/ubuntu-root" in WTerm. ***THIS IS DESTRUCTIVE***DANGER WILL ROBINSON***BE SURE BEFORE YOU DO THIS***
Make a temporary directory to mount your ubuntu partition on. "mkdir -p /tmp/linux"
Mount your newly formatted ubuntu partition. "mount /dev/store/ubuntu-root /tmp/linux"
CD into the folder you created that has the 00 through 10 files in it, and untar each one of them into /tmp/linux. The way I did this was to simply type "tar -C /tmp/linux -xvzf 00" and hit Tab. When it finished, I hit the up arrow, backspaced over the filename, then typed 01 and hit Tab, and so on for all eleven files.
When the files are all untarred, I typed "sync" (not sure why, it's in the script), and unmounted the temporary directory "umount /tmp/linux"
Last but not least, we have to rename the volume from ubuntu-root to fedora-root. "lvrename store ubuntu-root fedora-root"
That's it. You can close WTerm and reboot. When the moboot menu comes up, you'll see that Ubuntu is gone and Fedora is there, select it to boot. According to Rob's blog post, adb and rndis are working, so you can get access to a shell using adb, when it finishes booting.
Let me know how it works out for you, and please reply if you can improve my method (or if I screwed something up!).
I got rndis working...all I had to do was do it on my linux laptop, it didn't seem to work in Windows (surprise, surprise). With that running, I was able to get to yum via the adb shell. I yummed up gnome-shell, and it seemed to install OK, but I got an error when I tried to startx. It said there were no screens available, and it failed. I googled around a bit on that error, and it suggested I check into systemctl, where I noticed that "systemd-modules-load.service" had failed, and I saw module loading failure messages in dmesg, makes me think freedreno isn't loading right. I'll work on it some more after breakfast.
Turns out Rob forgot to add libdrm to the rootfs downloads. He added it last night to the git, and I've updated this guide to reflect that. Still doesn't boot to a GUI, but I'm closer than I was. startx throws an error about "no screens found", must need to be configured. I'll work on it later this evening and see what I can come up with.
Got it (sorta)! The libdrm version Rob supplied didn't quite match the Xorg version. A simple 'sudo yum update' and a reboot, and I have a GUI. Now to figure out how to add a user without a keyboard...
If this gets working I'm deff going to install. I'm dying for gnome 3 on a tablet.
Sent from my Nexus 7 using xda app-developers app
Head to your local Walmart (I think every town has one lol ) and buy the Bluetooth crapple keyboard....assuming it will work..but you might want to look it up...I just seen one there the other day.
Sent from my Galaxy Nexus using xda app-developers app
---------- Post added at 01:45 AM ---------- Previous post was at 01:41 AM ----------
OK quick search says yes it will pair...also if on the cheap..... http://dx.com/p/mini-bluetooth-keyboard-for-android-wince-nokia-symbian-s60-cellphones-black-37863 was successful under webos....so probably under android or Linux assuming your Bluetooth works.
Sent from my Galaxy Nexus using xda app-developers app
Great guide, can't wait to try this on my TP! It's been a while since I last messed around with it and this seems quite useful, as Gnome 3 is kinda optimized for touchscreens.
I was wondering though, does it matter which version of Ubuntu is installed or does it overwrite everything anyway?
https://github.com/freedreno/touchpad-fedora
Appears to have been a small update 4 days ago.
Sent from my Nexus 7 using xda app-developers app

[GUIDE]BackTrack 5 Chroot (Backtop2)

[Project dormant unless someone else picks it up]
NOTE: This is a chroot for the Webtop, not the Android+VNC chroot method.
Hi everyone, this is my first guide (I'm not sure I can call it that yet, or if this is in the right section) so bear with me.
I tried the Debian chroot guide (http://forum.xda-developers.com/showthread.php?t=1093790), and I really liked the idea, but I had too many apt-get issues and it often crashed my Webtop, so I tried building my own Ubuntu Lucid chroot using rootstock, but internet didn't work.
I later saw this: http://forum.xda-developers.com/showthread.php?t=1184161, but the links were dead and the scripts it referenced were out of date. I'll sort of combine the two guides here since Backtrack actually works surprisingly well.
Just on a side note though, I haven't fully tested the Backtrack tools, but the only thing I haven't found to work are the wireless tools.
Let's start!
Required:
-Rooted Atrix (with Blur based ROM)
-LXTerminal installed on Webtop
-Enough free space (around 4 GB just for room)
-7-Zip
-Some Linux/Unix distro native or in a VM
1. Install the easy-signed.zip from the Debian chroot guide:
http://forum.xda-developers.com/showthread.php?t=1093790
but the other files aren't needed.
Make a folder called WebTopMOD (case-sensitive) on either external or internal memory for later.
2. Look here for reference: http://forum.xda-developers.com/showthread.php?t=1184161, but the links are dead. Active links are here:
Part 1: http://www.mediafire.com/?x9cgxzdx84vc6uj
Part 2: http://www.mediafire.com/?xaoidipkg1o7vgo
Part 3: http://www.mediafire.com/?po3nznbxgvdipur
Use 7-Zip to uncompress the three files (called bt.7z.001,002,003) and you'll get a bt.img.
Full bt.img in a zip:
DL from Mega or from Google Drive
3. The image isn't usable in this state yet, since the image is formatted with ext2, and we need ext3.
Copy the image over to your Linux VM or computer on a easy-to-find directory, and open up a Terminal window (usually CTRL+ALT+T).
In Terminal, type this in:
Code:
cd <directory where you put bt.img>
mkdir tmp tmpbt
sudo mount -o loop bt.img tmpbt
dd if=/dev/zero of=linuxdisk count=0 bs=1MB seek=4096 (This is the size of the chroot image you want, in MB)
mkfs.ext3 linuxdisk (just type y when it asks)
sudo mount -o loop linuxdisk tmp
sudo cp -rf tmpbt/* tmp
sudo umount tmp
sudo umount tmpbt
[Sorry, made a mistake twice] Copy the newly made linuxdisk file to a directory named WebTopMOD on your internal memory or sdcard-ext (folder and file names are case-sensitive).
4. Start Webtop, then open LXTerminal, then start the chroot by typing in:
Code:
/usr/sbin/linux
and after it loads for a bit, you'll get an xterm window with the shell for Backtrack!
If you want to quit the Gnome session, closing xterm doesn't work, since by issuing the commands to kill the webtop processes, it also kills the webtop window manager, and if you do close it there's some kind of weird glitch with a small popup window constantly disappearing and reappearing. (It'll be a WIP for now I guess, the only full solution is to reboot your Atrix). It seems to have to do with the way the linux command mounts the chroot disk under loop50, I'll try and make something to fix this later.
-----------------Extras moved below-----------------------
Pictures:
Chromium Running
BT Desktop (Gnome)
BT Desktop with AIW
THANKS TO:
k.taylor89 for the original Backtop Method
SystemR89 for the Debian chroot and scripts to make this work
The original developers of the Backtop chroot image
And any others I may have forgotten!
Extras:
If you want a GUI (Gnome):
k.taylor89 said:
You first need to kill off all the webtop crap do this by typing the following in xterm.
"ps ax|grep awn|awk '{print $1}'|xargs kill"
"ps ax|grep panel|awk '{print $1}'|xargs kill"
Then start gnome by typing "gnome-session" in xterm.
Click to expand...
Click to collapse
If you want to take it step further and start Gnome after bootup, this isn't a full solution yet but you could edit your start-oshwt-1.sh and 2 scripts so that the chroot automatically starts on bootup without anything else in Webtop, and from there start gnome-session. I'm testing that now.
Installing Apps:
Since this is based off of Ubuntu Lucid, you can install anything from the Lucid repos, you just have to fix the sources list since the Backtrack sources don't seem to work.
Code:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.old (Backup just in case)
sudo nano -w /etc/apt/sources.list
Comment out (#) any line with the backtrack servers, and uncomment any line with the Ubuntu repos.
Press Control+X, Y, then Enter, then run apt-get update to update the repos.
Apps like Chromium install and run without a hassle (just run apt-get install chromium-browser), but I actually get the error "Bus error" for some reason when Chromium remains idle, it seems to be an unsolved bug in the version of Chromium for armel devices in the Lucid repos, if anyone else has a fix, please do tell.
First.
I think its only for lapdock ..........
3n3rg1c said:
First.
I think its only for lapdock ..........
Click to expand...
Click to collapse
Oh sorry yeah I forgot to mention that. I mean I guess if you have the mod that lets you use Webtop anywhere, that'll work too.
Hi,
The "Part 3: http://www.mediafire.com/?po3nznbxgvdipu" doesn't work.
Could you fix it.
Thank you.
sintoo said:
Hi,
The "Part 3: http://www.mediafire.com/?po3nznbxgvdipu" doesn't work.
Could you fix it.
Thank you.
Click to expand...
Click to collapse
Oh sorry I copied the link incorrectly, updated in OP.
i've gotten it running on my ubuntop model, when i ran it from the terminal it would not give me any issues when closing it back up. is there a way to only launch the gnome panel? running: gnome-panel in the terminal didn't work
etruj said:
i've gotten it running on my ubuntop model, when i ran it from the terminal it would not give me any issues when closing it back up. is there a way to only launch the gnome panel? running: gnome-panel in the terminal didn't work
Click to expand...
Click to collapse
I'm not sure if there is a way to start just gnome panel because of the way the chroot is implemented, since to run gnome-panel, an X session must already be running within the chroot and I need to figure that out.
My first two times i lUnched the session the wallpaper would flicker and then just the panels would come up. Now i get hit with the errors and loop pop ups. Maybe there is a way to launch the session then kill everything but the panel?
Sent from my MB860 using xda app-developers app
etruj said:
My first two times i lUnched the session the wallpaper would flicker and then just the panels would come up. Now i get hit with the errors and loop pop ups. Maybe there is a way to launch the session then kill everything but the panel?
Sent from my MB860 using xda app-developers app
Click to expand...
Click to collapse
The workaround I found worked so far was to modify the start-oshwt-2 script so that it would run a very slightly modified version of the script that automatically starts gnome-session (gnome-panel alone is really stubborn, still haven't figured that out) and doesn't start whatever window manager in WebTop to avoid flickering errors and panel only errors (but of course you don't have access to anything from the actual WebTop, but you could also have start-oshwt open a Terminal window from WebTop too).
Can you attach the script?
Sent from my MB860 using xda app-developers app
etruj said:
Can you attach the script?
Sent from my MB860 using xda app-developers app
Click to expand...
Click to collapse
Just rename it to linux, and copy it to wherever you like on your Atrix. You can also copy it to a directory within your terminal path.
This isn't my script, it's from the Debian chroot, just modified to automatically start gnome-session (credit to SystemR89)
You might need to chmod +x the file.
Also, if you want to start it automatically from start-oshwt-2.sh, make sure you copy the file to a directory within the terminal path, and add the line
Code:
sfalv -i "linux"
and comment out any other line that starts a different X window manager.
running "sudo gnome-panel" gives me the panel while staying inside the original ubuntop. i think i can just swap out that one line in your script to get it working. thanks! also noticed my chrome crashes after a few minutes, ill post the error code and screen grabs soon but was wondering if you ever experienced anything like it?
etruj said:
running "sudo gnome-panel" gives me the panel while staying inside the original ubuntop. i think i can just swap out that one line in your script to get it working. thanks! also noticed my chrome crashes after a few minutes, ill post the error code and screen grabs soon but was wondering if you ever experienced anything like it?
Click to expand...
Click to collapse
Yes, in fact. It's a bus error, and I tried to fix it, but the fix doesn't work (and it only seems to affect Chromium).
Sorry for bumping such an old thread, but I was wondering if anyone wanted to take this project over, since I don't have an Atrix anymore and don't have anything to work with.
Thanks.

[Q] Installing Linux Mint 17 on tf701t?

Hello, recently purchased a asus tf701t laptop/tablet hyrbid and the device itself is perfect. Powerful cpu, good storage and an insane 2k resolution for a 10' inch screen which I don't think has been done before.
However I absolutely hate android (no offense to android developers) and decided to try installing Linux Mint 17 which can be installed on any regular laptop easily. Essentially, I want to get rid of both android bootloader and the OS itself and replace that with Grub bootloader and Linux Mint 17 OS. But android is fighting me every step of the way trying to prevent me from doing just that I unlocked the bootloader so my warrenty is void now.
But beyond that I can't install linux iso because the android bootloader isn't registering the usb stick (with linux iso on it) so I can't launch the linux live iso at all. I tried using cdrom iso using disk to launch through usb and still doesn't come up in the bootloader options. I know its possible to use linux on these devices because I've seen people have done it before on the internet.
I am now at this point starting to consider android itself as malware as the very definition of the word, ....lets start with the fact that they locked the bootloader, prompting me to give ip address just to enable me to unlock the bootloader (malicious and very dodgy). No root access therefore, third party programs are required to enable root which further my belief that android os is more malware than it is a legitimate operating system. Lastly, either possibly no usb driver for bootloader or usb port is locked out by design at bootloader (either way, might explain why I can't use usb linux iso).
What I can't understand is, why google can lock down a device tighter than fort knox on a Asus brand device. This is like buying a brand new car and not being able to open your own car even though you purchased it. What google has done is borderline illegal and I'm abit astonished how they can get away with it...
Sorry for the rant guys I'm abit fustrated atm. Can anyone please help me? I really love linux mint and if its possible to format android and install linux mint on this device I would be eternally grateful
Update: I attempted to flash the device with the command: fastboot -i 0x0B05 flash recovery recovery.img which works...but when I reboot and push power and down volume into bootloader...and try to get into recovery...the screen looks like its about to load into it but then resumes boot of android.
I'm really puzzled by this. So cannot flash a custom recovery for some strange reason
Its not so simple I dont think. You might want to watch whats happening on this thread for now.
http://forum.xda-developers.com/transformer-tf701/general/native-linux-asus-tf701t-t2973119
I would think you would have to completely replace the bootloader with something like uboot maybe if you wanted to wipe the tablet. But I dont think anyone knows. Then you could end up with some permanent brick. There would be no recovery or fastboot option if you were somehow able to get some kind of boot loader on this thing. I have no idea.
Edit: Also there is no arm based Linux Mint afiak.
YayYouFixedIt said:
Its not so simple I dont think. You might want to watch whats happening on this thread for now.
I would think you would have to completely replace the bootloader with something like uboot maybe if you wanted to wipe the tablet. But I dont think anyone knows. Then you could end up with some permanent brick. There would be no recovery or fastboot option if you were somehow able to get some kind of boot loader on this thing. I have no idea.
Edit: Also there is no arm based Linux Mint afiak.
Click to expand...
Click to collapse
Thanks I appreciate the reply. I understand this won't be easy but I'm stubborn that way
Can you give me some advice on where I can start learning how to place a native linux os on the device? Would grub bootloader work with tf701t?
have you considered returning your tf701 and replacing it with the tf700 infinity? you can replace the OS with ubuntu.. theres much more support for that model than the tf701
tf701mega said:
have you considered returning your tf701 and replacing it with the tf700 infinity? you can replace the OS with ubuntu.. theres much more support for that model than the tf701
Click to expand...
Click to collapse
Out of curiosity, have you used the tf700t? it is good for development, but it could run pretty slow at times. It might of been because of the tegra 3 processor, because the tf300t also had this performance issue. I was barely able to type up documents on a CM Rom because the tablet would lag when typing out and would then force close and corrupt my document.
atleast for me, that was the reason why I went with this one rather than the tf700t. This is just my 2 cents about getting the tf700t. I would suggest trying it out before getting it.
Sent from my K00C using Tapatalk 2
Just how stubborn are you?
How much work do you want to put into this? There are two options, the easy route that you probably will consider imperfect, and the much more complicated route that I'm not certain will work. I'll do my best to explain both.
The method I use is to install a linux distro (in my case, ubuntu) inside a chroot. There are several apps on the android market to help you set this up. The one I used sets up an Xvnc server, so you can view your linux desktop by using an android VNC viewer -- but it's just connecting locally, not going over the network.
This works nicely out of the box, but it's slow, partly because it's using the VNC protocol and partly because there's no 2d hardware acceleration. I tinkered with my setup and installed XSDL, a native android X server with hardware acceleration. I had to modify the linux startup script to skip starting Xvnc and instead connect to XSDL (which is on :0.0 like a normal X server).
This works great and is fairly fast. For me, this is a good compromise between a full-fledged linux laptop and the convenience of android apps written specifically for a multitouch screen. I generally do most of my stuff in Android, but I can drop into my Ubuntu desktop whenever I need more power.
The really big downside is that it's hard to prevent Android's low-memory killer from sacrificing XSDL when I haven't used it for awhile. I've mucked about with various solutions involving oom_score_adj and such, and that helps, but android still ends up killing my X server sometimes.
So, that's the easy method. For the more complicated method, I'm just theorizing, and this stuff may not work. You're going to need to either already have somewhat deep linux knowledge or be willing to learn Here goes.
In this post, I described how I managed to boot my tf701t after the internal memory card died a horrible death. The important bit here is that I learned how to boot any initrd/kernel combination using fastboot, and how to roll that combination into a boot.img so that the tablet always boots it. This is what you'll need to do both for the installation and for future boots into your Linux install.
First off, choose your Linux distro. I don't think you'll be able to use Mint, since, as someone pointed out above, there's no ARM build of Mint. However, there is an ARM build of Debian and Mint has the "debian edition", so maybe there is an ARM version. It may be, though, that the Mint folks only built their special stuff (Cinnamon/mate/whatever) for x86 platforms. I'd recommend Ubuntu as a compromise since I know it runs on the tf701t.
For the initial installation, put the contents of the install ISO onto an SD card -- just copying your bootable USB drive over should work. Now for the tricky bit: you'll need to pull the kernel and initrd ("ramdisk", "initial ramdisk" -- usually initrd-<something>.gz) off of the usb drive and into a working directory on a Linux laptop or desktop (let's call it the "host"). You might get away with just fastbooting this kernel/ramdisk directly. Install the fastboot package for your distro (Ubuntu has one, anyway). Connect up your tablet, put it in fastboot mode (I think that's done by booting with volume up and down held) and do 'fastboot boot <your kernel> <your ramdisk>'.
This will boot the kernel and load up the initrd, which is a tiny little linux filesystem stored in memory. The kernel runs a program called init inside the ramdisk and init takes over and boots into the actual installer. The question in my mind is how it goes about finding the ISO contents. If it searches by filesystem UUID, and there's a good chance that it does, then it will find your the ISO contents on the SD card just fine and the installer will start up.
If not, well, things will get a lot more complicated. Normally what one would do in a case like this would be to pass kernel command-line arguments (you do this in the SYSLINUX bootloader for distros like Ubuntu) telling it where to find the installation media. We can't do that because fastboot doesn't let you pass command-line arguments. Instead, you'd need to extract the initrd on the Host machine, modify the init script in some way to tell it where to find the installation media (probably /dev/block/mmcblk1p1), and then repackage it. I went into somewhat shallow detail on how to do the extract/repackage parts of this, but this is where either prior linux knowledge or a willingness to do some research comes in. Hints: gunzip the initrd, then use the cpio tool to extract it.
Okay, so let's say that you get the installer booting. The next big question is whether it's going to work at all. In theory the graphics chip inside the tf701t is supported by linux, but in practice, maybe it's only supported by a kernel module that Samsung built. Maybe you'd need to substitute the stock kernel. The next question is whether X has a module that will work with the graphics chip. But maybe even if it doesn't you can use a text-mode installer. That would at least let you get a system installed that you could then hack on to try to get X running.
So, let's say you do get linux installed (probably onto the internal SD card, /dev/block/mmcblk0). Now you want to boot it. You'll need to look into the installed system and steal its kernel and ramdisk, and get them onto the Host machine. Or maybe you could just extract them from the debian packages, since I'm not sure how you'd get things off of that internal SD at this stage. As a hint, these may well NOT be the same kernel/initrd as in the installer.
Once you've got the kernel/ramdisk, you can try to boot into them with fastboot. If that works (big if), then you'll want to be able to boot them without fastboot. That's where the 'fastboot flash:raw' command comes in. It takes a kernel/ramdisk, builds an android boot.img out of them, and flashes it to the device. From then on, the device will boot that kernel and ramdisk by default.
So, in theory this could work. The biggest potential stumbling block is whether X is going to natively support the graphics chip. If it doesn't, you may be stuck using the basic framebuffer driver, or maybe that won't even work at all. ...or you could just settle for the chroot method and be done with it
Good luck. I'm very interested to hear whether this works. I'm probably not going to try it myself since I like Android enough that I want to keep it around. I also can't walk you through this in finer detail because of external limits on my time, but I'd be happy to answer theoretical questions and specific technical questions, so long as you're willing to do the legwork of reading manpages and such I hope this works out for you!
Oh, one thing just occurred to me: skip the part in the installer about installing grub. It's not going to work on this device and may cause problems. You'll take care of the bootloader part yourself with the fastboot flash:raw command.
Oh, I see there's already some decent progress in this thread. Also it looks like I totally missed the -c option in fastboot that lets you pass kernel command-line arguments... that'll definitely be a time-saver. Given what I see over in that thread, it looks like we may actually get a reasonable native linux on our TF701t. Not sure how far the OP has gotten on things like mouse/keyboard input, though.
I have to say, I'm pretty excited! It'd be super cool to be able to dual-boot native linux and android on this tablet. Best of both worlds.
lexelby said:
How much work do you want to put into this? There are two options, the easy route that you probably will consider imperfect, and the much more complicated route that I'm not certain will work. I'll do my best to explain both.
The method I use is to install a linux distro (in my case, ubuntu) inside a chroot. There are several apps on the android market to help you set this up. The one I used sets up an Xvnc server, so you can view your linux desktop by using an android VNC viewer -- but it's just connecting locally, not going over the network.
This works nicely out of the box, but it's slow, partly because it's using the VNC protocol and partly because there's no 2d hardware acceleration. I tinkered with my setup and installed XSDL, a native android X server with hardware acceleration. I had to modify the linux startup script to skip starting Xvnc and instead connect to XSDL (which is on :0.0 like a normal X server).
This works great and is fairly fast. For me, this is a good compromise between a full-fledged linux laptop and the convenience of android apps written specifically for a multitouch screen. I generally do most of my stuff in Android, but I can drop into my Ubuntu desktop whenever I need more power.
The really big downside is that it's hard to prevent Android's low-memory killer from sacrificing XSDL when I haven't used it for awhile. I've mucked about with various solutions involving oom_score_adj and such, and that helps, but android still ends up killing my X server sometimes.
So, that's the easy method. For the more complicated method, I'm just theorizing, and this stuff may not work. You're going to need to either already have somewhat deep linux knowledge or be willing to learn Here goes.
In this post, I described how I managed to boot my tf701t after the internal memory card died a horrible death. The important bit here is that I learned how to boot any initrd/kernel combination using fastboot, and how to roll that combination into a boot.img so that the tablet always boots it. This is what you'll need to do both for the installation and for future boots into your Linux install.
First off, choose your Linux distro. I don't think you'll be able to use Mint, since, as someone pointed out above, there's no ARM build of Mint. However, there is an ARM build of Debian and Mint has the "debian edition", so maybe there is an ARM version. It may be, though, that the Mint folks only built their special stuff (Cinnamon/mate/whatever) for x86 platforms. I'd recommend Ubuntu as a compromise since I know it runs on the tf701t.
For the initial installation, put the contents of the install ISO onto an SD card -- just copying your bootable USB drive over should work. Now for the tricky bit: you'll need to pull the kernel and initrd ("ramdisk", "initial ramdisk" -- usually initrd-<something>.gz) off of the usb drive and into a working directory on a Linux laptop or desktop (let's call it the "host"). You might get away with just fastbooting this kernel/ramdisk directly. Install the fastboot package for your distro (Ubuntu has one, anyway). Connect up your tablet, put it in fastboot mode (I think that's done by booting with volume up and down held) and do 'fastboot boot <your kernel> <your ramdisk>'.
This will boot the kernel and load up the initrd, which is a tiny little linux filesystem stored in memory. The kernel runs a program called init inside the ramdisk and init takes over and boots into the actual installer. The question in my mind is how it goes about finding the ISO contents. If it searches by filesystem UUID, and there's a good chance that it does, then it will find your the ISO contents on the SD card just fine and the installer will start up.
If not, well, things will get a lot more complicated. Normally what one would do in a case like this would be to pass kernel command-line arguments (you do this in the SYSLINUX bootloader for distros like Ubuntu) telling it where to find the installation media. We can't do that because fastboot doesn't let you pass command-line arguments. Instead, you'd need to extract the initrd on the Host machine, modify the init script in some way to tell it where to find the installation media (probably /dev/block/mmcblk1p1), and then repackage it. I went into somewhat shallow detail on how to do the extract/repackage parts of this, but this is where either prior linux knowledge or a willingness to do some research comes in. Hints: gunzip the initrd, then use the cpio tool to extract it.
Okay, so let's say that you get the installer booting. The next big question is whether it's going to work at all. In theory the graphics chip inside the tf701t is supported by linux, but in practice, maybe it's only supported by a kernel module that Samsung built. Maybe you'd need to substitute the stock kernel. The next question is whether X has a module that will work with the graphics chip. But maybe even if it doesn't you can use a text-mode installer. That would at least let you get a system installed that you could then hack on to try to get X running.
So, let's say you do get linux installed (probably onto the internal SD card, /dev/block/mmcblk0). Now you want to boot it. You'll need to look into the installed system and steal its kernel and ramdisk, and get them onto the Host machine. Or maybe you could just extract them from the debian packages, since I'm not sure how you'd get things off of that internal SD at this stage. As a hint, these may well NOT be the same kernel/initrd as in the installer.
Once you've got the kernel/ramdisk, you can try to boot into them with fastboot. If that works (big if), then you'll want to be able to boot them without fastboot. That's where the 'fastboot flash:raw' command comes in. It takes a kernel/ramdisk, builds an android boot.img out of them, and flashes it to the device. From then on, the device will boot that kernel and ramdisk by default.
So, in theory this could work. The biggest potential stumbling block is whether X is going to natively support the graphics chip. If it doesn't, you may be stuck using the basic framebuffer driver, or maybe that won't even work at all. ...or you could just settle for the chroot method and be done with it
Good luck. I'm very interested to hear whether this works. I'm probably not going to try it myself since I like Android enough that I want to keep it around. I also can't walk you through this in finer detail because of external limits on my time, but I'd be happy to answer theoretical questions and specific technical questions, so long as you're willing to do the legwork of reading manpages and such I hope this works out for you!
Oh, one thing just occurred to me: skip the part in the installer about installing grub. It's not going to work on this device and may cause problems. You'll take care of the bootloader part yourself with the fastboot flash:raw command.
Click to expand...
Click to collapse
Very stubborn
Sorry I didn't respond sooner as I was away with family for Christmas.
Thank you for the guide, it was extremely helpful. I am still working on getting the device ready so I'll update as I progress.
Thanks again

Categories

Resources