yashsingh1/xdaforums huggingface dataset:
[Atrix 4G Android Development] krkeegan:
I was thinking about this too. I see people are getting errors where the phone will not recognize the sdcard. I intend on trying a modified version of these instructions:

http://androidandme.com/2009/08/news/how-to-manually-partition-your-sd-card-for-android-apps2sd/

They are from back in the days when Android was only just starting to allow moving apps to the sdcard. The key that I imagine people are missing is that you have to have a FAT32 partition as the first partition on the sdcard. The phone should recognize the sdcard as long as you have that.

If someone tries this before I get a chance to this weekend, let me know how it goes.
[Atrix 4G Android Development] krkeegan:
Being able to surf with firefox does not mean that apt-get can connect to the interwebs if you are using the firefox installed by Motorola. (I assume you are if you can't get apt-get to work).

Remember you have two environments running in parallel.

To check if you have a network connection in the chrooted environment, try typing in the xterm window where you tried to run apt-get:

ping google.com

hit control-C to stop it. If you can't ping google you have a dns issue or a connectivity issue.
[Atrix 4G Android Development] krkeegan:
Perl Script to Escape Chroot

I was able to find and modify a perl script to escape our chroot. I only modified it to work for our situation, I claim no creative genius to the method used to escape chroot.

What does the script do?

When run as root from our custom chroot environment it escapes out of the chroot jail and runs whatever command specified as the user adas in the regular motorola environment.

Why do we need this?

You may not. But I run xfce4 desktop in our custom chroot environment and no longer have the AWN panel provided by motorola. I also still like to use the firefox browser provided by motorola.

Prior to using this script, there was no way for me to have a shortcut on my xfce4 desktop or panel to launch firefox. I was forced to launch it manually from an lxterminal shell.

Now, I can create a shortcut to firefox, as well as dialer, contacts, and media center on my xfce4 desktop.

How do I use the script?

1. Download it to your chrooted environment and put it in your path somewhere say '/usr/local/bin'.

2. Chmod 755

3. As root run 'unchroot COMMAND' where command is what you want to execute. For example 'unchroot firefox'

4. PROFIT

The script:

#!/usr/bin/perl -w
use strict;
# unchroot Dec 2007
# http://pentestmonkey.net/blog/chroot-breakout-perl
# This script may be used for legal purposes only.
# Modified by krkeegan Jun 2011
# We need a command to run
if ($#ARGV != 0 ) {
print "\nusage: unchroot COMMAND\n\n";
print "Where COMMAND is the command to run from the moto root.\n\n";
exit;
}
# Go to the root of the jail
chdir "/";
# Open filehandle to root of jail
opendir JAILROOT, "." or die "ERROR: Couldn't get file handle to root of jail\n";
# move into subdir
chdir "/tmp";
# Lock ourselves in a new jail
chroot ".";
# Use our filehandle to get back to the root of the old jail
chdir(*JAILROOT);
# Get to the real root
while ((stat("."))[0] != (stat(".."))[0] or (stat("."))[1] != (stat(".."))[1]) {
chdir "..";
}
# Lock ourselves in real root - so we're not really in a jail at all now
chroot ".";
# Execute COMMAND
# All moto root apps expect to be run as user adas
# we also need to spawn a dbus address too
system("sudo -u adas env HOME=/home/adas dbus-launch $ARGV[0]");
[Atrix 4G Android Development] joe ferreira:
krkeegan could you please help me to turn off the awn panels and get xfce4 to autorun instead of awn?

this is awesome and thanks again. this moves us all forward to running xfce4, gnome, kde etc without awn.
[Atrix 4G Android Development] krkeegan:
Possible Solution to Connectivity Issues when Changing Networks

NOTE: If you want to perform this mod, straight foward instructions are here.

SystemR89

Currently the /usr/bin/linux startup script copies the following files before mounting the drives:

sudo cp /etc/hosts $CHROOTDIR/etc/hosts
sudo cp /etc/fstab $CHROOTDIR/etc/fstab
sudo cp /etc/resolv.conf $CHROOTDIR/etc/resolv.conf

We do this because symlinks and hardlinks don't work in between the root environments. However this means that whenever the network connection changes a user has to manually copy these files again, or restart the /usr/bin/linux script.

I think I have a solution that solves the connectivity issue.

What if we make a "/etc-moto" directory in our custom root and then mount the moto config files into it in the /usr/bin/linux file with the following command:

sudo mount -o bind /etc $CHROOTDIR/etc-moto

Then the first time we boot the custom chroot environment, we create the following symlinks:

ln -s /etc-moto/hosts /etc/hosts
ln -s /etc-moto/fstab /etc/fstab
ln -s /etc-moto/resolv.conf /etc/resolv.conf

These would only have to be made the very first time we started the custom chroot environment.

The result should be linked config files that are updated automatically without needing a reboot.

Sounds like it should work, no? EDIT: YUP this totally works. No need to worry about connectivity issues now.
[Atrix 4G Android Development] techiesam:
How do I install gnome or kde ?
[Atrix 4G Android Development] SolidHelix:
I'm assuming its just as easy as downloading the packages through synaptic. But running it, I'm still trying to get xfce4 to run. Can't connect to server or something.
[Atrix 4G Android Development] krkeegan:
How are you trying to start xfce4? Your env variable for the DBUS address may be wrong. You can try launching your program with

dbus-launch COMMAND

that might solve your issues.
[Atrix 4G Android Development] devbro:
Does anyone knows the source of lxterminal and xmessage files in the /usr/bin folder of the easy_v0.2.5-signed.zip?

I am curious to experiment with other program from this soruce to see if I can get a few more useful apps to run natively in webtop.
[Atrix 4G Android Development] starrwulfe:
OK, but where am I typing those commands... LX term for the OSH environment or Xterm for the CHROOTed one?

--also, where the heck can I find a copy of libre office -- what repository would I connect to?
[Atrix 4G Android Development] SolidHelix:
Will that work to run xfce-session?

i got the panel running now after modifying the linux script to run startxfce4 on launch.

lol I edited the script in Vi... that is a retarted program for editing files... the script is a bit messy now as I couldn't find a command to delete blank lines.

Any way to browse to the linux script from leafpad? It seems I am stuck in a different root.

Am I correct in saying that the root I have in xterm is CHROOT? and the one from lxterminal is moto-root? I am new to this stuff but I am figuring it out.
[Atrix 4G Android Development] joe ferreira:
after about 4 hours I got gnome working. most of this was download and install time.

to install

apt-get install gnome-core

to start gnome

gnome-session

after the install on the first boot network services fail to work but after rebooting the phone they came up.

after install with no tweaks it has 23 mb of free space on the 2 gb image file. A few error messages at console level but still fully functional.
[Atrix 4G Android Development] joe ferreira:
what happens when you type startxfce4?

my xfce4 works great here is what I did....

apt-get install xfce4

apt-get install xfce4-goodies

then I type startxfce4 to start it....
[Atrix 4G Android Development] pederb:
Same here, no problems

Cheers
[Atrix 4G Android Development] SolidHelix:
Got it running with startxfce4.

It can't run much though. What apps are you guys running in xfce?
[Atrix 4G Android Development] EricHegnes:
I've been using a 4GB image and trying to get gnome-shell working, but I've been having trouble with jhbuild. If anybody would like to help, I think that the Gnome Shell would look very modern on the webtop.
[Atrix 4G Android Development] krkeegan:
Mod to Fix Network Connectivity Issues

This is a simple mod to solve the need to restart the chrooted environment. The mod is very simple and I will try to make the instructions straight forward, but you may have to adapt them a bit if you have already started modding you install.

Goal

To eliminate the need to restart the chroot environment or to copy the hosts, fstab and resolv config files when changing networks.

Nomenclature

We lack defined terms to refer to the two root environments. To make things easier I am going to use:

Moto-Root

- This is the default root, or the real webtop root provided by Motorola. Most users see this as the LXterminal that is accessible from the AWN panel at the bottom or the small icon in the top panel.

Mod-Root

- This is the alternate chrooted root that we have installed which is located at /osh/opt/WebTopMOD/root. Most users see this as the Xterm program which pops up after clicking the penguin in the AWN panel. (However you can install LXterminal in the Mod-Root also)

Steps

1. Install the mod listed in the OP

2. Click the penguin to start your Mod-Root

3. From the terminal in your Mod-Root type:

mkdir /etc-moto

4. Open a terminal to the Moto-Root, perhaps by clicking the LXterminal icon in the top bar.

5. Type the following command in the Moto-Root terminal:

sudo leafpad /osh/usr/sbin/linux

6. Leafpad will open. Comment out the following lines:

sudo cp /etc/hosts $CHROOTDIR/etc/hosts
sudo cp /etc/fstab $CHROOTDIR/etc/fstab
sudo cp /etc/resolv.conf $CHROOTDIR/etc/resolv.conf

7. Add a new mount line so that the lines look as follows:

#sudo cp /etc/hosts $CHROOTDIR/etc/hosts
#sudo cp /etc/fstab $CHROOTDIR/etc/fstab
#sudo cp /etc/resolv.conf $CHROOTDIR/etc/resolv.conf
sudo mount -o bind /etc $CHROOTDIR/etc-moto

8. Save the file and exit leafpad

9. While still in the Moto-Root terminal window, enter the following command:

sudo mount -o bind /etc /osh/opt/WebTopMOD/root/etc-moto

10. Back to Mod-Root! In a Mod-Root terminal, perhaps xterm window that you still have open, type the following commands:

rm /etc/hosts
rm /etc/fstab
rm /etc/resolv.conf

11. Still in the Mod-Root terminal type the following commands:

ln -s /etc-moto/hosts /etc/hosts
ln -s /etc-moto/fstab /etc/fstab
ln -s /etc-moto/resolv.conf /etc/resolv.conf

12. Finally test your internet connection, while still in the Mod-Root terminal type:

ping google.com

13. You should see success. Hit CTRL-C to stop.

That's it. I don't see any reason why you would need to unmount the Mod-Root anymore. You still need to mount it on every phone reboot, unless you have further modified your install to automatically mount the Mod-Root.
[Atrix 4G Android Development] techiesam:
You can use Escape-dd i.e escape key and then pressing "d" key twice. it should delete blank line.
[Atrix 4G Android Development] aver2one:
Or you can remove all the blank lines at once using

:g/^$/d
[Atrix 4G Android Development] krkeegan:
Damn you vi advanced users. I feel like I could spend days on vi and still not understand it all.

I have created a 2GB Ubuntu 11.04 (natty) image that looks like it will work. The image mounts without errors, but I have not been able to complete the second-stage of debootstrap yet. I was trying to do it all from adb, but I am getting error because of missing ENV variables. I am confident second-stage will work fine if I run it from the WebTop environment when I get home. As soon as I complete the second-stage I will zip it up and post it online.

I am also going to try creating an ext3 mount on the external sdcard. If it works we can create drives larger than 3.99GB.
[Atrix 4G Android Development] fincan:
Hey dicksteele, can you tell me the md5 hash of the untarred 4gb file (linuxdisk), CWM refuses to install mine, I am wondering if the file is getting corrupted during copying to my sd card. You can calculate the hash in linux with "md5sum filename" command or using something like hashtab plugin in windows.
[Atrix 4G Android Development] SolidHelix:
I think you are supposed to extract it and copy directly to your sdcard in the WebTopMOD folder. Don't use CWM for that. Connect mass storage and copy it over. Takes roughly 20 minutes
[Atrix 4G Android Development] fincan:
I actually did that, to the external sd card though. It is not a copy error though, I also cannot install original 2gb one either. After copying the extracted file (linuxdisk) into WebTopMOD/ under my microsd card, I reboot to Tenfar's CWM, and do

Install zip from sdcard - choose zip from sdcard - chooser the file and install. At this point the last two lines say:

Copy a linux disk in /sdcard(-ext)/WebTopMOD!

Install from sdcard complete​

What am I missing?
[Atrix 4G Android Development] pederb:
I do not want to high jack this thread but I love this contrib and use it everyday so here is my issue, I use Iceweasel as a the browser and I can't for the life of me get flash to work with Iceweasel?

Any advices or ideas?

Cheers
[Atrix 4G Android Development] dicksteele:
You don't install the tar file via CWM you install the unsigned.zip. You extract the linuxdisk file from the tar and copy it to your sdcard-ext or sdcard.

I'm on vacation right now, not at a linux machine until Sunday night. But just did it on my laptop. File is attached,

The instructions below for post 1, #3 is for the easy-unsigned.zip.

0) Download Debian disk - http://www.multiupload.com/DVF6BJGJR3

1) Unpack in your internal or external storage (path should be /sdcard(-ext)/WebTopMOD/linuxdisk)

Please don't use "adb push" it corrupt big files

2) Download easy-signed.zip - http://www.multiupload.com/F68D73KF26

3) Install using CWM, reboot and enter in WebTop!
[Atrix 4G Android Development] fincan:
Thanks man, hashes match so I am missing something else. I am installing easy-unsigned.zip that is the one in the CWM that complains about the linuxdisk image.

Anyway, I'll give it a shot from the internal sd, copying the file now.
[Atrix 4G Android Development] dicksteele:
Nothing. That's all there is to it. Now plug in phone to HD monitor and TV to get into Webtop then click on Penguin Icon on taskbar.
[Atrix 4G Android Development] fincan:
Well, there is no penguin in the dock nor a /usr/sbin/linux

I will beat this thing!
[Atrix 4G Android Development] fincan:
Weird, it started to work after I moved image under WebTopMOD/linuximage/linuximage

How can I check the remaining free space on the webtopmod? df -kh does not work?
[Atrix 4G Android Development] dicksteele:
I've been doing it under an lxterminal. It's a mounted partition. Don't have a hdmi tv or monitor right now to say what it is.

Really the webtopmod/linuximage/linuximage should not work.

It should just be the FILE linuxdisk under a webtopmod directory on sdcard-ext, or sdcard.

And the linuxdisk image has nothing to do with /usr/sbin/linux file. That should have been installed from the easy-unsigned.zip. You used the lastest version 2.5 correct ?
[Atrix 4G Android Development] fincan:
I am not sure, but I am not going to question it since it works just fine :)

Didn't think about running df from lxterminal, it worked with that. I think I did something and it has nothing to with the file being in the wrong folder but I'm too sleepy right now to understand it.

Thanks a lot for the help dicksteele, and thanks SystemR89 for making this possible :)
[Atrix 4G Android Development] krkeegan:
2G Ubuntu 11.04 (natty) Image

I successfully made a 2GB Ubuntu image. It should be a complete drop in replacement for the image offered in the OP. I also included a md5 hash for it. I have noticed a few people have had issues copying the file to their phones.

Enjoy:

http://www.multiupload.com/NAN7WIHEUQ
[Atrix 4G Android Development] dicksteele:
I thought I tried this once and it bombed on mount errors. Copying over now to a virgin sdcard and trying again.

edit: sweet it worked.
[Atrix 4G Android Development] SolidHelix:
Anyone ever figure out the absolute maximum size in bytes that you can make the linuxdisk image? Using DD I made one 3.8gb and copied the contents of the 2gb one the OP posted. Works perfect. But what is the actual maximum the sdcard will allow and what is the formula for it in DD?
[Atrix 4G Android Development] dicksteele:
I used this command to create a blank image and it worked.

dd if=/dev/zero of=ubuntu.img bs=1MB count=0 seek=4096
[Atrix 4G Android Development] SolidHelix:
wont that make a full 4gb file? i tried that but it wouldn't copy to my sdcard
[Atrix 4G Android Development] dicksteele:
It does, and it does. Copy that is.

I'm going to try making a 4GB of krkeegan's 2G Ubuntu 11.04 (natty) Image now.

Going to take a little while, copying into linux vm and back.
[Atrix 4G Android Development] starrwulfe:
Sorry for the delay in reading this, I had a very busy weekend! I am going to do this in a few hours following your guide (which I've printed out so I can work in the cafe on campus here)

Thanx to you and all the fellow modders here on XDA; I feel like I did back in the days of my HTC 8129 TYTN again! LOL.:D
[Atrix 4G Android Development] Viamonte:
Firstly, congratultions on the work done, and thank you for your dedication. You allow us to extract a lot more value for our bucks.

Ok, being a total noob with an Atrix, a Lapdock, and trying to get the most out of it, I therefore ask:

When I install OpenOffice, it will be under the chroot enviroment, right? That being so, is it unable to save/load files? Because that's the impression I got on reading chroot on the wikipedia, hence rendering the entire process... useless? I'm probably wrong, just making sure...

Second question, I see absolutely no one has been able to run chromium... but firefox 4 seems to be going alright, am I correct? On that front, is it lighter or heavier than the stock Motorola Firefox?

Third, have anyone been able to run even 480p videos with a steady 25+fps on any media player on this Debian? Because i failed miserably at that on Sogarth's mod. 480p Youtube was fine, but any videos I saved on the SD Card ran like crap on media players.
[Atrix 4G Android Development] starrwulfe:
quick question:

My linux image in SDcard/WebtopMOD goes to 0 bytes whenever I undock and do something else, then return to the dock later on. Is there something I'm screwing up here? am I supposed to be unmounting this somehow and if so, how do I do that?

Sorry--it's new to me, so... orz
[Atrix 4G Android Development] pederb:
NO, you use Synpatic to install OpenOffice with if you are a total noob like me, and no you can not use Firefox 4, the only browser I got to work is Iceweasel which is Debian modified Firefox 3.5 and Flash does not work properly, at least not for me.

Cheers
[Atrix 4G Android Development] Viamonte:
K Ill try this week. University tests week, so might take a while. Regardless, about media playing.. anyone havign success improving movies performance?
[Atrix 4G Android Development] krkeegan:
RE: 2GB Ubuntu Natty Image

It mounted and partially worked, but I was not able to get synaptic or aptitude to run properly. I took that as a omen of future problems. I suspect it is either a kernel incompatibility issue, or some other problem related to the disparate nature of jaunty and natty.

I have instead downgraded to the most recent LTS, lucid. So far aptitude works properly. If I have a chance I will upload an image of lucid for others to use.
[Atrix 4G Android Development] airbillion:
Great, i have been waiting to try an ubuntu image. Thanks!
[Atrix 4G Android Development] dicksteele:
K, I just started messing with it. Got a 4GB image loaded and trying synaptic now.....

EDIT: Not good. Ka Boom. Webtop locked up like a MF. Pulled battery and so far so good. Loaded my 4GB debian to see wtf.
[Atrix 4G Android Development] dicksteele:
Interesting. Just happened to me also. Deleted 0 byte file copying 4GB back over and going to reboot.
[Atrix 4G Android Development] prscarp:
Is the 4gb file exactly 1 byte less then 4gb?
[Atrix 4G Android Development] crnkoj:
awesome :D

dang tho just realized i dont have enough space for the 6gb image ^ ^ damn this aura with its maps =/
[Atrix 4G Android Development] starrwulfe:
Oh, I'm staying tuned to Kholk's kexec thread, for sure!

I'd like to make what Motorola/Google should have made this phone be in the first place... an Android/Chrometop!

I want to take hexxeh's ChromeOS Flow (ChromeOS with Umbuntu underpinnings) or JoliOS and have a true cloud computing experience--yet still be able to fall back on certain local apps if I need to.

There isn't a better way to test the concept of cloud personal computing than to use something that's always connected to the internet-- and the Atrix's webtop always has a connection!
[Atrix 4G Android Development] lunzi88:
screenies are great, but possible to post up a video to see how well it runs?? Could hardly wait for your simplified method to come out!!
[Atrix 4G Android Development] crnkoj:
uhm, is there a way to turn off the atrix's display while in webtop mode over the HDMI hack, its kinda annoying (but dont press the power/fingerprint button, it ****s up the resolution and you cant set it right than lol)?
[Atrix 4G Android Development] SystemR89:
Easy method is now ready!
[Atrix 4G Android Development] primeboss:
Thanks for your work, but does this work with thr hdmi hack?
[Atrix 4G Android Development] SystemR89:
Yes, I've neither lapdock or dock

Note that my package doesn't contain the patched files so you have to install HDMI hack separately.
[Atrix 4G Android Development] primeboss:
Dude, you are awesome!, anyplans on using other linux oses? Such as ubuntu or maby even chrome os?
[Atrix 4G Android Development] SystemR89:
You can easily switch to Ubuntu changing squeeze (or stable) tag in debootstrap with your favorite Ubuntu distribution. I really like Debian and I think that is better than Ubuntu so I won't switch distribution.

Chrome OS is essentially a minimal OS built around Chrome browser, it's not a good idea use it. You can install Chromium on Debian to achieve the same result in an easier way!
[Atrix 4G Android Development] XxKILLx3RxX:
So we have to still do the "Use:" instructions even if we install it the easy way?
[Atrix 4G Android Development] pederb:
I assume this works with LapDock as well?

If you use the "Easy" version, do you still have to do the "Use" section or is it part of the "Easy" ?

Cheers
[Atrix 4G Android Development] SystemR89:
No use instructions are for custom method.
[Atrix 4G Android Development] SystemR89:
I can't test it but there are no reason to assume that doesn't work with lapdock..
[Atrix 4G Android Development] tassadar898:
does this mean we can install moonlight and watch silverlight like netflix?
[Atrix 4G Android Development] primeboss:
Easy method worked perfectly, thank you SO MUCH.

Also is there a way to used the easy method to have the debian on the external sd card?

Also is there a way to uninstall from using the easy method to go back to using the regular webtop. 2gb is a lot of space. U
[Atrix 4G Android Development] pederb:
Installation went fine, but none of the desktop icons work? If I click on Firefox it blinks for a while and then nothing, same with XTerm and Facebook?

Any Ideas?
[Atrix 4G Android Development] primeboss:
This is probably a really important question for people. How do you uninstall (from easy version at least), do i just delete the DEBIAN folder?
[Atrix 4G Android Development] airbillion:
This is awesome thanks for your work. Could you please post a mini how to for installing ubuntu instead of debian. I am a lot more familiar with ubuntu. Thanks!
[Atrix 4G Android Development] brunnogama:
First, thank you for this work man!

So, there´s any way to instal a KDE distro based? Like OpenSuse, Kubuntu etc?

If not, how can we install Ubuntu in place of Debian?

One more time: thanx!
[Atrix 4G Android Development] XxKILLx3RxX:
I would think that a general way to uninstall would have been to back up with cwm prior to installing. And just restore to that? I'm kind of new to CWM. (Or does cwm make it so you have to go back to stock and flash the backup?)

Also, it looks like multiupload is down. When I downloaded the debian enabler earlier today in only came with a png file and a folder called root, with nothing inside of it.