yashsingh1/xdaforums huggingface dataset:
[Motorola Atrix 2] jahuang:
Merry Christmas! Jim.

I followed your dirctions in the first post.

For test, I re-do the whole process, and I record the step, please find the attachment as below.

screenshot.pdf

I run the script, at last we found this.

./etc/resolv.conf
./etc/shadow
./etc/passwd
reboot: not found
We are done and your phone will now reboot, go visit the xda-developers thread a
nd perform the next steps when your phone starts back up.

Like before, when I link to the TV, press the "ctrl+alt+T", just jump a window says there no terminal.

Also I check it again just like you told me. Then got this:

root@edison:/# fdisk -l /dev/block/mmcblk0 | grep -i linux
fdisk -l /dev/block/mmcblk0 | grep -i linux
/dev/block/mmcblk0p2 1413 1936 4209030 83 Linux
root@edison:/# fdisk -l /dev/block/mmcblk1 | grep -i linux
fdisk -l /dev/block/mmcblk1 | grep -i linux
/dev/block/mmcblk1p1 * 2 2 128 83 Linux
/dev/block/mmcblk1p2 5 8 512 83 Linux
/dev/block/mmcblk1p3 9 12 512 83 Linux
/dev/block/mmcblk1p5 17 20 512 83 Linux
/dev/block/mmcblk1p6 21 24 512 83 Linux
/dev/block/mmcblk1p7 25 56 4096 83 Linux
/dev/block/mmcblk1p8 57 60 512 83 Linux
/dev/block/mmcblk1p9 61 64 512 83 Linux
/dev/block/mmcblk1p10 65 72 1024 83 Linux
/dev/block/mmcblk1p11 73 88 2048 83 Linux
/dev/block/mmcblk1p12 89 92 512 83 Linux
/dev/block/mmcblk1p13 93 96 512 83 Linux
/dev/block/mmcblk1p14 97 128 4096 83 Linux
/dev/block/mmcblk1p15 129 192 8192 83 Linux
/dev/block/mmcblk1p16 193 264 9216 83 Linux
/dev/block/mmcblk1p17 265 360 12288 83 Linux
/dev/block/mmcblk1p18 361 364 512 83 Linux
/dev/block/mmcblk1p19 365 368 512 83 Linux
/dev/block/mmcblk1p20 369 400 4096 83 Linux
/dev/block/mmcblk1p21 417 4256 491520 83 Linux
/dev/block/mmcblk1p22 4257 9856 716800 83 Linux
/dev/block/mmcblk1p23 9857 12064 282624 83 Linux
/dev/block/mmcblk1p24 12065 22752 1368064 83 Linux
/dev/block/mmcblk1p25 22753 60607 4845440 83 Linux
/dev/block/mmcblk1p26 60608 60608 128 83 Linux
root@edison:/# fdisk -l /dev/block/mmcblk2 | grep -i linux
fdisk -l /dev/block/mmcblk2 | grep -i linux

Wish you have a good holiday! If you have time please help me to check what is wrong, ths!
[Motorola Atrix 2] jimbridgman:
Thank you, and Merry Christmas to you too!

This is good, I can see that your SDcard is now seen by the linux part of android.

Have you rebooted your phone before trying to connect it to the TV, to use webtop? It looks like the reboot command did not run.

If you have not rebooted, try rebooting (power off, then power the phone back on) then when the phone comes up, try using webtop and try the terminal.

If rebooting does not work, and you still do not get the terminal after a reboot, do this:

Grab these two files:

mountosh.orig:

http://dl.dropbox.com/u/45576654/mountosh.orig.tar

mountosh:

http://dl.dropbox.com/u/45576654/mountosh.tar

Now you will remove the old ones from your phone, and then copy these files over to it.

adb shell
su
mount -o remount, rw /system
rm /system/bin/mountosh
rm /system/bin/mountosh.orig
cd /data/local
rm mountosh
rm mountosh1
exit
exit

Now copy the files you downloaded above, to your phone, make sure you are in the directory you saved them to on your computer:

adb push mountosh.tar /data/local
adb push mountosh.orig.tar /data/local

Now to put the files in place and change the permissions and reboot.

adb shell
su
cd /data/local
tar -xvf mountosh.tar
tar -xvf mountosh.orig.tar
cp mountosh.orig /system/bin/mountosh.orig
cp mountosh /system/bin/mountosh
chown root /system/bin/mountosh.orig
chown root /system/bin/mountosh
chmod 755 /system/bin/mountosh.orig
chmod 755 /system/bin/mountosh
mount -o remount, ro /system
reboot

That should do it now. Let me know if you are all set.
[Motorola Atrix 2] jahuang:
Thanks Jim!

I follow up the steps as above.

Everything is OK.

Finally, when I plug into TV, we get this pic as below. (sorry, I can't insert the pic here)

TV output screenshoot

It seems something wrong about the file permissions, just I guess.
[Motorola Atrix 2] voodoomurphy:
Well I got my lapdock for Christmas and I was wondering if there are any 100% successful installs of this other than Jim himself? After my troubles with it I decided to hold off until we had multiple successful reports. Do we have any?
[Motorola Atrix 2] jimbridgman:
You need to make sure it is actually installed. You can do this using root explorer or something similar.

It should be installed as:

/osh/usr/bin/gnome-terminal

If that is not there, then run the following:

adb shell
su
cd /data/local
cd osh; tar jxvf /data/local/mbm.tar.bz2
mount -o remount, rw /
mkdir /var/lib/dpkg/updates
mount -o remount, ro /
exit
exit

This all happened like this because the first time that you ran the script, the SDcard was not partitioned correctly, so the script only did half the job, everytime it runs, and detects that it has been run before, it trys to start from where it left off before, so... Only part of it completed correctly since you did not follow the steps exactly as outlined in the first three posts.
[Motorola Atrix 2] jimbridgman:
I have made a ton of improvements to the script, since you tried it last.

Give it a try, but just make sure you follow the directions EXACTLY as stated in the first three or four posts. Don't skip something, or do it another way that you think might be faster, or better. I have designed it to be done in the exact steps outlined....

This is difficult because there are things being "hacked" to MAKE android allow you to override a ton of things that it normally does not allow.

There will always be issues, that is why companies hire me, to do this kind of stuff for *NIX boxes, because it is not easy to begin with. But I do know that there are several who have gotten this to work, but with help from me, again this is not for the faint of heart. This will never work 100% right out of the box, due to a few things android does, that we will have to look at while it is happening, due to things like tomoyo and several "security" features of the OS.

I am willing to help when you run into trouble. If you run into trouble, I can help you get going fairly fast if you PM your IM info, I can jump on IM, and we can do real time, rather than constantly posting back and forth here.
[Motorola Atrix 2] voodoomurphy:
Oh heck Jim I didn't mean to imply that there was anything wrong on your side. You've always been amazingly helpful even when morons like me don't always follow instructions. I think I'm going to air on the side of caution (due to my ability to screw things up) and wait until we have a way to restore the linux side of things before I tweak it again. My wife just got me the lapdock for christmas, so if I screw it up again and make it so I can't use it there in no amount of PM help from anyone that will save me from a night on the couch. As we say in World of Warcraft: You can't off tank wife aggro.
[Motorola Atrix 2] jimbridgman:
Oh, no that is not what I thought, just sometimes, a kick in the pants, is all some people need to jump off the cliff with you. :D

Wait a week, then after the initial "newness" of that dock wears off for the Wife. I totally understand that quote, mine has killed me for "temporarily" taking something off-line before.
[Motorola Atrix 2] jahuang:
It's so strange, I follow your directions, but last I can't find the gnome-terminal from the folder. you can see the pic below.

Folder screenshot pic

When I run the command, I got this:

./etc/toy/exception_policy.conf
./etc/toy/domain_policy.conf
./etc/shadow-
./etc/pam.d/
./etc/pam.d/sshd
./etc/mailcap
./etc/init/
./etc/init/ssh.conf
./etc/default/
./etc/default/rsync
./etc/default/ssh
./etc/default/debsums
./etc/debsums-ignore
./etc/cron.daily/
./etc/cron.daily/man-db
./etc/cron.daily/debsums
./etc/gshadow-
./etc/rc2.d/
./etc/rc4.d/
./etc/gshadow
./etc/mtab
./etc/resolv.conf
./etc/shadow
./etc/passwd

root@edison:/data/local# mount -o remount, rw /
mount -o remount, rw /
root@edison:/data/local# mkdir /var/lib/dpkg/updates
mkdir /var/lib/dpkg/updates
root@edison:/data/local# mount -o remount, ro /
mount -o remount, ro /
root@edison:/data/local# exit
exit
shell@edison:/$ exit
exit
[Motorola Atrix 2] jimbridgman:
That was my bad there was a typo in my code, here it is corrected, this should work, and put the terminal in place.

adb shell
su cd /data/local
cd[B] /osh[/B]; tar jxvf /data/local/mbm.tar.bz2
exit
exit
[Motorola Atrix 2] jahuang:
When I run the script as above, then I find the "gnome-terminal" in OSH, but another question is: when I link to the TV, the screen shows a Motorola Logo like a screensaver(when you reboot the phone, you will always see it in the beginning), and can't show the web top.

Then the TV will turn to black screen (still have signal), and the phone will also turn to black, no virtual keyboard or pad.

Need your help, ths! Jim.
[Motorola Atrix 2] jimbridgman:
Try this:

adb shell
su
cd /etc
mv tomoyo toy
/system/bin/reboot

That should fix the Red M screen staying up.
[Motorola Atrix 2] jahuang:
Yes! Done.

But the Virtual keyboard and mouse can't work, just like crash.
[Motorola Atrix 2] jimbridgman:
Sorry but that I am not sure about. It looks like hack works now though.

You might try the hdmi hack again.

Sorry I don't have a way to test that one, as I have the HD dock.

Jim
[Motorola Atrix 2] jahuang:
Many thanks, Jim.

My dock will arrived soon. I'll test it to find if it can work with the dock.
[Motorola Atrix 2] madetoservehim:
Shortcuts

Thanks for the guide! I followed it exactly and it works, almost. I can't get into the terminal after getting into webtop. Ctrl+Alt+T doesn't do anything for me, and so I can't get into the terminal to do what I want to do =) What am I doing wrong?
[Motorola Atrix 2] jimbridgman:
Ok, I need you to run the following commands so I can see where it might have failed.

Run the following commands from a shell / command line, then post them back here.

adb shell
su
cd /data/local
busybox df -h | grep -i osh
/sbin/fdisk -l /dev/block/mmcblk0 | /system/bin/grep Linux
ls -l /system/bin/mountosh
ls -l /system/bin/mountosh.orig
[Motorola Atrix 2] jahuang:
Hello Jim, Happy new year!

When the fastboot files comes out,

[Fastboot Files] Gingerbread 2.3.5 for ATRIX 2 MB865 AT&T USA [Fastboot Files]

I flash my phone and re-do the script in post 1 step by step, when script finished as usual, no error out, but when you plug into the HD dock, and press ctrl+alt+T, you will get the message that means no terminal.

Then I follow your command as post #72, then I can find the terminal, but the other question is something seems wrong with below.

adas@localhost:/data/home/adas$ sudo apt-get install chromium
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed: chromium-bsu chromium-bsu-data libalut0 libglc0 libglewmx1.5 libglpng libglu1-mesa libopenal1 libsdl-image1.2 libsdl1.2debian libsdl1.2debian-alsa ttf-uralicSuggested packages: libportaudio2
The following NEW packages will be installed: chromium chromium-bsu chromium-bsu-data libalut0 libglc0 libglewmx1.5 libglpng libglu1-mesa libopenal1 libsdl-image1.2 libsdl1.2debian libsdl1.2debian-alsa ttf-uralic0 upgraded, 13 newly installed, 0 to remove and 1 not upgraded.
Need to get 0B/2,855kB of archives.
After this operation, 5,841kB of additional disk space will be used.Do you want to continue [Y/n]?
[COLOR="Blue"][B]dpkg: cannot scan updates directory `/var/lib/dpkg/updates/': No such file or directory[/B][/COLOR]
E: Sub-process /usr/bin/dpkg returned an error code (2)
adas@localhost:/data/home/adas$
[Motorola Atrix 2] jimbridgman:
Easy the directory is not there, that is easy to fix.... remember the script bailed because the very first time you ran it, it did not see your ext3 partition, so you will have to create it manually, with the following:

adb shell
su
mount -o remount, rw /
mkdir /var/lib/dpkg/updates
mount -o remount, ro /

Now all you have to do is mount / rw EVERY time you reboot your phone, or certain things will not work, such as installing packages, like you just saw.

to do this after every boot, install the terminal application from the market, and run this in the terminal app after EVERY reboot:

su
mount -o remount, rw /
[Motorola Atrix 2] jahuang:
It's ok. Thanks!

Little question, can we change the source list in this ubuntu? It's so slowly in updating.
[Motorola Atrix 2] jimbridgman:
Great! I am so glad that it is working correctly for you.

No, if you change the sources list, it will break compatibility.
[Motorola Atrix 2] jahuang:
Hoho, thank u Jim, I can't reach this without you great support.
[Motorola Atrix 2] Deliberate:
Could add this mod already completed on the next supercharged v5? That would be awesome if it was included in the rom!
[Motorola Atrix 2] jimbridgman:
I could give the script to lfaber06, to include it, but you will still have to run it on the phone afterward, because it actually needs to copy your webtop partition to your sdcard, then modify the files on the sdcard. You will still have to partition your sdcard as well.

He does have the mount script, so if you do this mod, it should still work with his rom, since this moves webtop to the sdcard.

I will get with lfaber06 and see if maybe we can have the install script run the webtop hack during the rom flash. You will still need to partition your sdcard though.

Jim
[Motorola Atrix 2] extide:
I'd say make the running of this script optional, as I would never use it and would prefer not to use up any space on my sdcard.
[Motorola Atrix 2] Deliberate:
Id be down. But im unsure how to do all of the necessary actions.
[Motorola Atrix 2] Deliberate:
If its not to much to ask. Can we put this into v5 of lfabers supercharged rom? That way no one screws it up."cough cough" me... lol!
[Motorola Atrix 2] mtnlion:
It's really not that hard. Jim's code that has to be entered can be copy/pasted and the partioning tools are real easy to use.

Sent from my MB865
[Motorola Atrix 2] Deliberate:
Ya? I just don't wanna screw up my phone. Ahhh... is it awesome?
[Motorola Atrix 2] tallnerd1985:
Hey jimbridgman, nice guide you have here. It looks very similar to the guide written in the Motorola Bionic section :)
[Motorola Atrix 2] jimbridgman:
Thanks, that means alot!

I learned a lot of it from your post and a few others. Then I modified the steps to get it all to work on our phone, and made the shell wrapper for it.

Jim
[Motorola Atrix 2] tallnerd1985:
Nice,

Glad to see the same method works on your phones. Can't wait to see Ubuntu for Android does as far as GPU acceleration goes within the WebBuntu environment like they demo'ed on the video.
[Motorola Atrix 2] jimbridgman:
Oh I know, ubuntu is it right now for Linux. Sort of how redhat was in 90s, but they are all pro now (rehat that is).... I can't wait to see what Ubuntu turns up with for the andriod distro. It looks promising

Jim
[Motorola Atrix 2] Deliberate:
If u made a backup of your system could this basically be flushable? Well... restoreable...? Lol
[Motorola Atrix 2] theandre:
Guys I do not know if anyone already posted this but I think it is relevant

http://www.viddler.com/v/644c9ce0
[Motorola Atrix 2] tallnerd1985:
it is very relevant my friend because you are already using it on the Atrix 2. The only difference is that you are using a stripped down version of what you see on your guy's phone. All they did at Canonical was change out the image on the /OSH partition with a full distro of Ubuntu 12.04 with tweaks to interface with the Motorola portal.apk to pull relevant data such as signal strength, missed calls, txt, etc, etc. It was easy for them cause they are the ones who leased this out to Motorola in the first place.
[Motorola Atrix 2] dudemaaan:
Any idea if the canonical version is available or when it will be? I've seen a lot of talk about the canonical version, but I wasn't sure what it's distribution plan was going to be. Is it a special ROM? A downloadable app? Something limited to factory phones?
[Motorola Atrix 2] tallnerd1985:
For the Atrix/Bionic/RAZR, its a matter of porting over the distro and using the pre built software that launches Webtop mode to boot up Ubuntu instead of Webtop. It can be done now but it will be easier to kang a OEM handset that already has it opposed to modifying a generic ARM distro to work just like it did in the video. Other phones will require a lot work to get it running but there are groups that are working on doing a universal method to use other distros besides Ubuntu such as Mint, Arch, etc, etc.
[Motorola Atrix 2] dudemaaan:
Ooh that would be cool. I have an Atrix 2 on the way, so looking forward to this. I noticed in the video that launching Android apps was also possible, is this also possible on the current Ubuntu that's discussed in this thread?
[Motorola Atrix 2] tallnerd1985:
That's really the only thing that Webtop does initially until you do the hack here which enables you install Linux apps or modify the desktop environment.
[Motorola Atrix 2] Deliberate:
If u someone were to make a backup of there system. Could this be flashable? Like v5 of SC rom?
[Motorola Atrix 2] jimbridgman:
The hack still needs to be done, since you need to partition your sdcard, to make it all work. The hack is really just a gzip file, that gets applied to the webtop install on your phone. It is way too large to create a backup and distribute, it is over a gigabyte in size, hence the reason my script copies the /osh partition onto your SDcard parition, and then applies the hack to the copy on the SDcard.

Also a flashable zip would be just as bad, again since it is over 1.5GB in size, before the hack.
[Motorola Atrix 2] Deliberate:
Oh ok. That would probably be why you posted the hack instead of a flashable zip. Lol. Sorry for the dumb question. Now im like... duhhhhh...
[Motorola Atrix 2] jimbridgman:
No worries. Not a dumb question at all, it was a great thought.

Jim
[Motorola Atrix 2] Deliberate:
Ha ha. Why thank you! :)
[Motorola Atrix 2] dudemaaan:
Will this hack work with the 2.3.6 update?
[Motorola Atrix 2] jimbridgman:
Yes, it is not dependant on any perticular version of android or webtop/ubuntu.

Jim
[Motorola Atrix 2] cainn24:
Well, this has certainly been an adventure thus far. First of all, thanks jimbridgman for putting in the effort to give us a chance to get this working. It is much appreciated. Next, on to the details:

I started with a fresh rooted stock 2.3.6, with the HDMI webtop hack. My first problem was that I had forgotten to install BusyBox, so I didn't have tar. Easily fixed.

Then I was able to successfully extract and run the setup_webtop script. It seemed to go off without a hitch, but at the very end threw out the following:

link_image[1964]: 2444 could not load needed library 'liblog.so' for '/system/bin/reboot' (link_image[1964]: 2444 could not load needed library 'libgcc_s.so.1' for 'liblog.so' (load_library[1106]: Library 'libgcc_s.so.1' not found))CANNOT LINK EXECUTABLE

...at that point I just rebooted the phone manually.

Upon successfully loading up webtop for the first time, I was unable to bring up a terminal with control-alt-t. I fixed this as per the instructions in post #77, with following notes:

"tar jxvf /data/local/mbm.tar.bz2" didn't work. I had to extract "mbm.tar" from "mbm.tar.bz2", push it to the phone, and run "tar -xvf /data/local/mbm.tar" (from the /osh directory of course).

When trying to boot up Webtop after this, I was left hanging at the Motorola logo for about a minute until finally the screen went blank. I resolved this as per the instructions in post #79. Finally, I was able to boot into Webtop and get a terminal with cntrl-alt-t.

The problem I am having now is that I can't access apps on the phone, and the window that usually mirrors the phone display is blank. Haven't done a sudo apt-get update yet.
[Motorola Atrix 2] cainn24:
Ok, after beginning again with a fresh restore of 2.3.6, I've made some progress in troubleshooting this myself. In a nutshell, the ext3 partition on my sdcard is not being mounted to /osh, so when webtop loads it's still loading the default Motorola version. I was able to determine this because the additions contained in mbm.tar were not present when I perused the /osh directory, but they are definitely present on the ext3 partition on my sdcard along with everything else. So setup_webtop.sh seems to be doing it's job (aside from a failure to automatically reboot at the very end, which isn't a big deal), but it appears that the modified mountosh script is not (I've checked /system/bin and the "mmcblk0" version is present, which is the correct version as the ext3 partition on my sdcard is at position 0).

What's the best way to troubleshoot this so we can determine what is going wrong?

Thanks :)

UPDATE: Ok, so the mountosh script is looking for BusyBox in /system/bin, but I had it installed in /system/xbin, which is where the BusyBox installer I used puts it by default. I have now reinstalled BusyBox to /system/bin, and so the ext3 partition on my sdcard is now being mounted at /osh as it should be.

Perhaps some magic could be added to the mountosh script to cater for this?

I'm encountering the blank screen issue again at the moment, but at least webtop is trying to boot from where it should be trying to boot from :) Progress!

UPDATE 2: Renamed toymoyo in /osh/etc and we're finally off and away. Awesome stuff. The only thing that doesn't work is that the phone screen no longer functions as a trackpad/keyboard, but I'm using a bluetooth keyboard/mouse anyway, so it's not a big issue for me.

Thanks again jimbridgman for making this possible. Finally I can have some real fun with webtop :)
[Motorola Atrix 2] jimbridgman:
Good job, that is exactly what I would have had you do.

Now as for the busybox thing. I forced the placement of /system/bin, because there are MANY other things that also force the same placement, and almost all of the one-click root hacks that we had when I first wrote this, also placed busybox and all the links in /system/bin. It really is the correct placement for it by the way.

I will take a look, at several of the scripts in this hack, and make some fixes for the issues you had minus the busybox one. It seems several people have been some issues, and it has been a while since I made any updates to them.
[Motorola Atrix 2] cainn24:
Perhaps a note about this in the OP would suffice? After all, good practice or not, one of the most popular BusyBox installers puts it in /system/xbin by default, and that was the reason for the majority of my problems.
[Motorola Atrix 2] bigjocker:
Success report

Hi,

I want to report success on unlocking the webtop on my Atrix 2. Here are the considerations I had to take in order to get it working.

I followed the instructions to the letter: created a new 8GB partition at the end of my SD and formatted it as ext3. Then downloaded the tar file, unpacked and ran the scripts. It did not work at first:

1.- Upon checking the mountosh script I can see it asumes that busybox is installed on /system/bin, and I had installed it on /system/xbin. I reinstalled busybox on /system/bin and ran the scripts again. An easy check for this is executing 'df /osh' on a terminal, seeing 1G means it did not work, 8G (in my case) means it did.

2.- After rebooting my phone and docking it I could see the animated motorola logo, but after that only a blank screen. It is solved using:

adb shell

su

cd /etc

mv tomoyo toy

/system/bin/reboot

After that everything is all right.

Thank you very much!!! :D