Fire TV 2 - Ubuntu (Headless) Install Guide - Fire TV Original Android Development

This guide is intend to help you with "installing" Ubuntu 14.04 (12.04 also works) on the Amazon Fire TV 2 after @rbox recovery has been setup. Only headless mode is possible, similar to Ubuntu Server, but it still makes a nice little ARMv8 development box. Starting X.org or running systemd based Linux distributions will likely never be possible due to features missing from the Amazon kernel. Creative use of the framebuffer is possible if desired, maybe eventually a terminal emulator could be started. As long as you don't mount and modify mmcblk0pX there should be no possible way to mess up Android or brick the device. It's 100% reversible by just removing the SD card. You accept all responsibility for what you do with this work should something go wrong and the device becomes inoperable. With disclaimers and precursor knowledge out of the way let's get started.
To follow this guide you will need:
A micro SD card (2 GB+ recommended)
A Linux system
To login into Ubuntu you will need either:
A 1.8 V TTY USB serial device connected to the UART
A pair of USB serial devices and a null modem cable
I actually used a pair of Xbee's for testing the ttyUSB0 stuff, so hence a pair of FTDI chips would also work.
Preparing the SD Card
To get started you need to first partition the micro SD card:
Type = MBR
Part 1 = 100 MB, Fat32 (vfat)
Part 2 = Remainder, Ext4
Extract the attached zip file to the root of the first partition (extracted filename must be "ramdisk-recovery.cpio.lzma"). This is an alternative initramfs that simply uses busybox to clean up from the partial Android boot and prepare the filesystem for regular Linux. Extract an Ubuntu core root filesystem archive, ubuntu-core-14.04.4-core-arm64.tar.gz, to the root of the second partition as the root user (to preserve ownership/permissions). Make sure you sync or eject the device when done with this work so the data gets flushed to the SD card.
Now we need to make a few changes to the root filesystem to avoid usability issues and allow logins.
Replace /etc/fstab with the following contents to correct some mount options. This "disables" SELinux which fixes dpkg errors and some other login annoyances.
Code:
/dev/mmcblk1p2 / ext4 defaults,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs ro,relatime 0 0
Replace /etc/init/console.conf with the following contents to allow logins from the UART. Once the root password has been set (root is disabled by default) you can remove "-a root" if desired.
Code:
# console - getty
#
# This service maintains a getty on console from the point the system is
# started until it is shut down again.
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]
respawn
exec /sbin/getty -s -a root console
Create /etc/init/ttyUSB0.conf with the following contents to allow logins from an attached USB serial device. This should help people who don't want to take apart their device to solder wires onto the UART test points. SSH would of course be an alternative but it's not installed by default in Ubuntu core and this guide is about the building blocks not providing pre-made images (yet). Since udev doesn't work due to devtmpfs not being enabled in the kernel you will need to attach the USB serial device before booting for this to work. As before you can remove "-a root" later if desired once the root password is set. Also you should change the baud rate if needed.
Code:
start on (tty-device-added ttyUSB0)
stop on (runlevel [!2345] or tty-device-removed ttyUSB0)
respawn
exec /sbin/getty -L -a root 115200 ttyUSB0 vt102
Preparing the Fire TV
Until the search order for the initramfs file is changed by @rbox you will need to rename the initramfs on the system partition so it will continue to search for one on the SD card or USB stick. You need to connect to the device using adb either over USB or the network to execute the following commands.
Code:
adb$ su
adb# mount -o remount,rw /system
adb# mv /system/recovery/ramdisk-recovery.cpio.lzma /system/recovery/ramdisk-recovery.cpio.lzma.bak
adb# mount -o remount,ro /system
Right now this prevents "su" from working, which should be fixed by @rbox in due time. To get "su" working again you should extract the original recovery initramfs file to a USB stick and boot the device with that USB stick inserted instead of the previously created SD card. Then to restore "su" you can repeat the above steps just swapping the order of the files in the "mv" command.
Booting Ubuntu
After connecting your serial device of choice simply insert the SD card and power on the device. It's that easy! With luck you should get a shell prompt that is already logged in as root. It's a good idea to set the root password before going much further. The device isn't too useful without networking, so you can install more packages. To solve that connect an ethernet cable (since it's simpler) and type "dhclient eth0" to get online. At this point you can install openssh-server using apt-get or do anything else you'd normally do on an Ubuntu VM or headless Ubuntu system. I'm interested in hearing what people plan to do with a more-or-less high-end ARM development system.

Tips and Tricks
NOTE: These changes, unless otherwise noted, are performed while logged into the target Ubuntu system.
Setting the Hostname
You can change the hostname using the following command:
Code:
echo sloane > /etc/hostname
You should also create a simple /etc/hosts file that matches the chosen hostname.
Code:
127.0.0.1 localhost
127.0.1.1 sloane
Enable Ethernet at Boot
Create the file /etc/network/interfaces.d/eth0 with the following contents:
Code:
auto eth0
iface eth0 inet dhcp
Allow Users Network Access
Since we are stuck running an Android kernel you need to create the following group and add users who need network access (such as ping) to this special group.
Code:
groupadd -g 3003 aid_inet
usermod -G aid_inet -a root
usermod -G aid_inet -a <username>
Removing Failed Services
There are a few services that fail to start due to hardware limitations. We should just prevent them from starting in the first place. We have no VT support enabled in the kernel (boo) so we can just remove the ttyX login prompt services. Also the console setup doesn't work since our console is a serial device not a virtual terminal or other "graphical" type terminal emulator.
Code:
rm /etc/init/tty?.conf
echo manual > /etc/init/console-font.override
echo manual > /etc/init/console-setup.override
Fix /dev Hotplug
As stated before udev doesn't work due to missing kernel features. The busybox applet mdev is a simple replacement for most users. After installing the "busybox-static" package run the following command:
Code:
ln -s /bin/busybox /sbin/mdev
Now add the following line to /etc/rc.local before "exit 0".
Code:
echo /sbin/mdev > /proc/sys/kernel/hotplug
Pre-installing SSH
See: http://forum.xda-developers.com/showpost.php?p=65595013&postcount=13 (thanks @segfault1978)

Thanks a lot, that was exactly the thing I was searching for. Since before today the Raspi3 came out, this box is the cheapest ARMv8 development machine available. With your instruction I was able to login via SSH and install all required software for my development environment. No GUI needed for that, I'm doing all remotely via SSH. Again, thank you!

segfault1978 said:
Thanks a lot, that was exactly the thing I was searching for. Since before today the Raspi3 came out, this box is the cheapest ARMv8 development machine available. With your instruction I was able to login via SSH and install all required software for my development environment. No GUI needed for that, I'm doing all remotely via SSH. Again, thank you!
Click to expand...
Click to collapse
Awesome to hear that it worked for you. Just curious if you went the USB serial route or soldered to the UART pins.

There is also the Dragonboard 410c which is a quad core A53 but has a bit more than the raspberry pi. The price is higher though but it has been out probably a year or so. Just FYI. The raspberry pi 3 is a good deal.

zeroepoch said:
Awesome to hear that it worked for you. Just curious if you went the USB serial route or soldered to the UART pins.
Click to expand...
Click to collapse
None of these methods (since I was in my weekend and all cables and adapters reside in my office)
I placed all .deb-files for openssh-server including all requiremens onto the microSD card, and placed a call "dpkg -i /*.deb" with logging options in /etc/rc.local. I also configured network by mounting the sd card, editing /etc/network/interfaces, and last changed /etc/shadow to have a valid root account for login. It took my some try-and-error loops, but finally it worked as expected. Call me crazy, but I succeeded without any hardware.
---------- Post added at 09:09 PM ---------- Previous post was at 09:03 PM ----------
zeroepoch said:
There is also the Dragonboard 410c which is a quad core A53 but has a bit more than the raspberry pi. The price is higher though but it has been out probably a year or so. Just FYI. The raspberry pi 3 is a good deal.
Click to expand...
Click to collapse
Thank you for the hint, I'll have a look for the availability of this board in germany.

I'm facing a memory problem, resulting in a reboot of the device when all RAM is being used. My compile session takes more than 1.x GB of RAM for the quite complex compilation of all required packages. I can reproduce the situation where all memory is consumed and the device instantly reboots when hitting "no memory left" situation. Since "swapon" is not supported by the kernel (really?): is there any way to enable swap functionality, i.e. via a kernel module? How to overcome this situation where more memory is needed?

segfault1978 said:
None of these methods (since I was in my weekend and all cables and adapters reside in my office)
I placed all .deb-files for openssh-server including all requiremens onto the microSD card, and placed a call "dpkg -i /*.deb" with logging options in /etc/rc.local. I also configured network by mounting the sd card, editing /etc/network/interfaces, and last changed /etc/shadow to have a valid root account for login. It took my some try-and-error loops, but finally it worked as expected. Call me crazy, but I succeeded without any hardware.
Click to expand...
Click to collapse
That is pretty crazy, but since you knew the changes required it worked Not everyone I expected to have such experience. I figured someone might even try to do a qemu chroot or debbootstrap to preinstall openssh. Multiple ways to solve the same problem I guess.
segfault1978 said:
I'm facing a memory problem, resulting in a reboot of the device when all RAM is being used. My compile session takes more than 1.x GB of RAM for the quite complex compilation of all required packages. I can reproduce the situation where all memory is consumed and the device instantly reboots when hitting "no memory left" situation. Since "swapon" is not supported by the kernel (really?): is there any way to enable swap functionality, i.e. via a kernel module? How to overcome this situation where more memory is needed?
Click to expand...
Click to collapse
Looking at the default kernel config from the source code drop from Amazon I see:
Code:
# CONFIG_SWAP is not set
Swap can not be compiled as a module. Even if you chose to use a USB stick or something as the swap device It wouldn't work. Given that we can't change the kernel we can't try stuff like zram or zswap either. The only other suggestion I might have is if you're using "-j4" or something while compiling just remove that so it does a single threaded compile. I'm sure you already tried that. Beyond that you could look at using the Linaro AArch64 toolchain and cross compile. Since we're running Ubuntu you shouldn't need to worry about static binaries.

zeroepoch said:
Looking at the default kernel config from the source code drop from Amazon I see:
Code:
# CONFIG_SWAP is not set
Swap can not be compiled as a module. Even if you chose to use a USB stick or something as the swap device It wouldn't work. Given that we can't change the kernel we can't try stuff like zram or zswap either. The only other suggestion I might have is if you're using "-j4" or something while compiling just remove that so it does a single threaded compile. I'm sure you already tried that. Beyond that you could look at using the Linaro AArch64 toolchain and cross compile. Since we're running Ubuntu you shouldn't need to worry about static binaries.
Click to expand...
Click to collapse
Unfortunately, I'm not compiling with parallel processes (I'm compilig Icinga2 for arm64), I'm running
Code:
dpkg-buildpackage -us -uc
within the source package. One single cpp call consumes so much memory (which is crazy in my eyes, never seen such a big compiler process until today), so I'll investigate the option of cross compiling and afterwards creating the deb file outside of the machine.
Code:
cd /root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib/base && /usr/bin/aarch64-linux-gnu-g++ -DI2_BASE_BUILD -Doverride="" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -pthread -std=c++11 -Wno-inconsistent-missing-override -fPIC -I/root/icinga2-2.4.3 -I/root/icinga2-2.4.3/lib -I/root/icinga2-2.4.3/obj-aarch64-linux-gnu -I/root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib -I/root/icinga2-2.4.3/third-party/execvpe -I/root/icinga2-2.4.3/third-party/mmatch -I/root/icinga2-2.4.3/third-party/socketpair -o CMakeFiles/base.dir/base_unity.cpp.o -c /root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib/base/base_unity.cpp
I'm a novice in android devices: What would be required to use a custom kernel? A hacked boot loader, which is not available for the AFTV2?

segfault1978 said:
I'm a novice in android devices: What would be required to use a custom kernel? A hacked boot loader, which is not available for the AFTV2?
Click to expand...
Click to collapse
Yep... we need to be able to use fastboot to boot an unsigned kernel and initramfs (boot.img). I tried at one point to overwrite the boot partition with own image and it failed to boot. Since I had the preloader stuff worked out already I was able to restore the original boot image and get it working again.
On a side note, if you don't mind could you post the list of packages needed to install SSH server from rc.local? Others might find that useful. To get around the unset password issue you could have also saved a public key in /root/.ssh/authorized_keys which would also avoid you needing to change /etc/ssh/sshd_config to allow password logins as root.

segfault1978 said:
within the source package. One single cpp call consumes so much memory (which is crazy in my eyes, never seen such a big compiler process until today), so I'll investigate the option of cross compiling and afterwards creating the deb file outside of the machine.
Code:
cd /root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib/base && /usr/bin/aarch64-linux-gnu-g++ -DI2_BASE_BUILD -Doverride="" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -pthread -std=c++11 -Wno-inconsistent-missing-override -fPIC -I/root/icinga2-2.4.3 -I/root/icinga2-2.4.3/lib -I/root/icinga2-2.4.3/obj-aarch64-linux-gnu -I/root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib -I/root/icinga2-2.4.3/third-party/execvpe -I/root/icinga2-2.4.3/third-party/mmatch -I/root/icinga2-2.4.3/third-party/socketpair -o CMakeFiles/base.dir/base_unity.cpp.o -c /root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib/base/base_unity.cpp
Click to expand...
Click to collapse
I see you are not using -pipe which is good, but a quick search suggested something that might not be simple since this package has it's own build system but changing from -O2 to -O1 might help.

I noticed that Debian has the package available for the same version and already built for arm64.
https://packages.debian.org/sid/icinga2
Maybe you already tried that. You could try going back to jessie which is probably an older version but I think most jessie packages work with Ubuntu 14.04.

zeroepoch said:
Yep... we need to be able to use fastboot to boot an unsigned kernel and initramfs (boot.img). I tried at one point to overwrite the boot partition with own image and it failed to boot. Since I had the preloader stuff worked out already I was able to restore the original boot image and get it working again.
On a side note, if you don't mind could you post the list of packages needed to install SSH server from rc.local? Others might find that useful. To get around the unset password issue you could have also saved a public key in /root/.ssh/authorized_keys which would also avoid you needing to change /etc/ssh/sshd_config to allow password logins as root.
Click to expand...
Click to collapse
This is the list of packages I manually downloaded for ARM64 (unfortunately I used Debian packages which worked first, but leads to a hell situation afterwards when dealing with other dependencies; be sure to use Ubuntu packages in order to avoid problems afterwards):
Code:
busybox_1.22.0
libedit2_3.1
libgssapi-krb5
libk5crypto3
libkeyutils1
libkrb5
libkrb5support0
libwrap0
openssh-client
openssh-server
openssh-sftp-server
This is the piece of calls in /etc/rc.local, right before the exit:
Code:
dpkg --force-all -i /*.deb > /install.log 2>/install.err
echo $? >> /install.log
echo "installation finished" >> /install.log
It took about 1-2 minutes before SSH started to work automatically, you can mount the SD card afterwards in another system in order to check the written logfiles.

Here are some notes for getting wireless working. In addition to the normal OS steps (installing wpasupplicant or wireless-tools and editing /etc/network/interfaces or using wicd) you will need some firmware files from /system (/dev/mmcblk0p13).
Code:
mount -o ro /dev/mmcblk0p13 /mnt
cp -r /mnt/etc/firmware/ /lib/
cp -r /mnt/etc/Wireless /etc/
umount /mnt

segfault1978 said:
None of these methods (since I was in my weekend and all cables and adapters reside in my office)
I placed all .deb-files for openssh-server including all requiremens onto the microSD card, and placed a call "dpkg -i /*.deb" with logging options in /etc/rc.local. I also configured network by mounting the sd card, editing /etc/network/interfaces, and last changed /etc/shadow to have a valid root account for login. It took my some try-and-error loops, but finally it worked as expected. Call me crazy, but I succeeded without any hardware.
Thank you for the the fire tv guide.
Click to expand...
Click to collapse

So, what's the verdict on this? I want to use my firetv 2 as an emby server. Is it worth it trying to get Ubuntu to run?
Sent from my Mi A1 using Tapatalk

mrchrister said:
So, what's the verdict on this? I want to use my firetv 2 as an emby server. Is it worth it trying to get Ubuntu to run?
Click to expand...
Click to collapse
If it has arm64 packages and headless you can give it a try. If you don't like it you can just revert the ramdisk and go back to Android.

Ok sweet, thanks for the reply
Sent from my Mi A1 using Tapatalk

Just curious if anyone's tried running Plex server on this?
I've been looking for a better solution without shelling out $500+ for a dedicated NAS. AFTV is tiny so I could hardwire it and hide it away.
Thanks

I got the same idea. Right now the firetv is still being used as a media streamer but I'm thinking of doing this soon

Related

[How To] ssh, the quick and dirty way

So you've rooted your phone, hacked your webtop, but then you realize that your Ubuntu doesn't have ssh. Wait, what? What the hell is *nix for if you don't have ssh?!
Time to fix that.
Based upon the existing packages, the Ubuntu installation is Jaunty/9.04. In this case, the packages to install for clean dependencies are these:
libedit2
openssh-client
passwd
For each package, you want to download the package that's listed as Published to /mnt/sdcard-ext (before you complain that I'm using old packages, when starting up, I prefer to have a consistent OS, rather than picking and choosing packages from several different versions).
Installation ended up being simpler than I expected, although I ended up remounting /mnt/sdcard-ext as /osh/mnt/sdcard-ext so that I could have a decent work area in my chroot. Here were the commands I used (including the remount) after downloading the three .deb files into /mnt/sdcard-ext:
Settings→SD card & phone storage→Unmount SD card
From the Android terminal:
su
mkdir /osh/mnt/sdcard-ext
mount -t vfat /dev/block/vold/179:33 /osh/mnt/sdcard-ext
From LXTerminal:
sudo chroot /osh
dpkg -i *.deb
exit
Settings→SD card & phone storage→Mount SD card (this will forcibly unmount the SD card from the other directory and mount it in the normal directory)
Congratulations! ssh has just been installed.
Is this the process people are using to install other. deb packages? Apt-get isn't working for me.
Sent from my MB860 using XDA App
edounn said:
Is this the process people are using to install other. deb packages? Apt-get isn't working for me.
Click to expand...
Click to collapse
I'm actually not sure what other people are doing.
Personally, I'm reluctant at the moment to use the second-layer package management tools, since there really isn't much free space in /osh, and I'd rather not trigger a domino effect of package installation by accident. As such, I'd prefer to be a lot more precise in what packages I'm installing.
Besides of which, the custom Motorola Ubuntu packages do cause some issues. For example, they shipped a version of Awn that normally ships with Ubuntu 9.10, so it's difficult to touch (if you want to go back to that version but stock, it starts an upgrade loop that becomes difficult to manage). But, you can try setting your depot to launchpad.net, which might work out for you.
some static linked binaries i built
I built a few static binaries today as I too don't really want to screw with trying to force some packages in alongside the base system.
I included a tarball (seems like the forums won't take a tar.gz) with scp, sftp, ssh, and wget in it. They are all static linked arm binaries so you shouldn't have any dependency issues. They're not built with anything special, I just grabbed the latest openssh and wget and built them.
I've only tested the ssh and wget, but I would assume that both scp and sftp also work. If there is enough interest I can post the rest of the openssh suite, I got the entire suite to build (didn't test it though).
Let me know if things work, I may build other things as a bunch of static linked binaries, or just setup a chroot to run more stuff from the webtop.
If anyone is looking for an SSH daemon on the android side of the device, this is an excellent guide to do it:
http://teslacoilsw.com/dropbear
Also, I've uploaded the compiled binaries for 2.2.1 (Dropbear Telsa v0.52) and the stock ssh client that comes with the android 2.2.1 SDK (Dropbear v0.49)
would this help with xsession i.e. ssh -X [email protected]
I believe xauth is all you need for X11 forwarding via SSH, and that's included in the webtop os.

[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.

MILESTONE CM7 RC4 USB Tethering with Linux

I've managed to enable USB Tethering between my Milestone with CM7 RC4 and a Linux box. Maybe it is possible also for Mac OS X with same method.
I'm still testing it, with good results, but it is not easy at all for end users. It can become really easy if it gets integrated into a ROM.
CHANGES:
1) set ro.modem_available=1 in build.prop
2) upload tether-nat to /system/xbin
3) Recompile Usb.apk from CM7 RC4 source with patch attached.
I have the already compiled apk, but I don't know if I can attach it here, for legal reasons.
4) Append attached code to /system/etc/rootfs/init.rc
DISCLAIMER: If you don't fully understand what I've written, do not try this. I should have posted this to Development forum, but I don't have enough posts and I'm not a spammer. Use everything AT YOUR OWN RISK.
HOW IT WORKS:
By sending usb_mode_modem to usbd trough its control socket, the Milestone is seen as a standard ACM modem from the PC. The corresponding serial port on Android is /dev/ttyGS0 .
Simply starting pppd on both ends, and correctly setting up ip forwarding, nat and routing tables does the trick.
ON THE LINUX BOX:
Open a terminal and write
sudo pppd nodetach persist defaultroute 172.16.0.2:172.16.0.1 /dev/ttyACM0
(and please set correct DNS servers before trying.)
Notes: every server app on the phone is also accessible from PC, like dropbear. At IP address 172.16.0.1
Motorola Phone Portal is not working, because it doesn't "detect" the usb connection nor wifi connection, so it doesn't even start listening to the TCP port.
Someone knows how to bypass this check?
When using this mode, ADB is not available. Looks like the PC can't detect the phone as a modem, if ADB is enabled. You don't have to manually toggle it.
Dropbear can be used as a replacement.
It asks for root permission in order to use setprop as a signaling mechanism to Android's init to start and stop pppd daemon, in order to not have it always running and wasting resources.
Maybe it is possible to use on device-added and on device-removed triggers with fake device nodes, in order to not require root privileges, but it is more complicated.
If a Moderator could move this thread to Development, this could be a great thing, if I can still post to it.
Massimo M.
tether
hey can u do a easy steps for doing this???
DISCLAIMER: If you don't fully understand what I've written in the first post, do not try this. I should have posted this to Development forum, but I don't have enough posts and I'm not a spammer. Use everything AT YOUR OWN RISK.
Be prepared to reinstall ROM if you have big issues. It means DO BACKUPS!
Only for CyanogenMod 7.0 RC4 (it should work on newer versions, but I haven't tested it.)
Copy Usb-new.apk on root of your sdcard.
Copy setup.txt on root of your sdcard.
Get a shell (ADB, or Terminal emulator).
Become root ( su )
cd /sdcard
sh setup.txt
reboot the phone.
Connect the USB cable, and choose Phone as a modem.
On the pc (Linux, any distro should work)
sudo modprobe cdc-acm
echo nameserver 8.8.8.8 |sudo tee /etc/resolv.conf
sudo pppd nodetach persist defaultroute 172.16.0.2:172.16.0.1 /dev/ttyACM0
and then open the browser!
I haven't tested setup.txt on my phone, only in a android-like directory hierarchy on my pc. I won't be online until Monday.
Try to understand everything!! And be careful.
The most difficult part was compiling Usb.apk, which I've attached now.
maxximino said:
I've managed to enable USB Tethering between my Milestone with CM7 RC4 and a Linux box. Maybe it is possible also for Mac OS X with same method.
I'm still testing it, with good results, but it is not easy at all for end users. It can become really easy if it gets integrated into a ROM.
CHANGES:
1) set ro.modem_available=1 in build.prop
2) upload tether-nat to /system/xbin
3) Recompile Usb.apk from CM7 RC4 source with patch attached.
I have the already compiled apk, but I don't know if I can attach it here, for legal reasons.
4) Append attached code to /system/etc/rootfs/init.rc
DISCLAIMER: If you don't fully understand what I've written, do not try this. I should have posted this to Development forum, but I don't have enough posts and I'm not a spammer. Use everything AT YOUR OWN RISK.
HOW IT WORKS:
By sending usb_mode_modem to usbd trough its control socket, the Milestone is seen as a standard ACM modem from the PC. The corresponding serial port on Android is /dev/ttyGS0 .
Simply starting pppd on both ends, and correctly setting up ip forwarding, nat and routing tables does the trick.
ON THE LINUX BOX:
Open a terminal and write
sudo pppd nodetach persist defaultroute 172.16.0.2:172.16.0.1 /dev/ttyACM0
(and please set correct DNS servers before trying.)
Notes: every server app on the phone is also accessible from PC, like dropbear. At IP address 172.16.0.1
Motorola Phone Portal is not working, because it doesn't "detect" the usb connection nor wifi connection, so it doesn't even start listening to the TCP port.
Someone knows how to bypass this check?
When using this mode, ADB is not available. Looks like the PC can't detect the phone as a modem, if ADB is enabled. You don't have to manually toggle it.
Dropbear can be used as a replacement.
It asks for root permission in order to use setprop as a signaling mechanism to Android's init to start and stop pppd daemon, in order to not have it always running and wasting resources.
Maybe it is possible to use on device-added and on device-removed triggers with fake device nodes, in order to not require root privileges, but it is more complicated.
If a Moderator could move this thread to Development, this could be a great thing, if I can still post to it.
Massimo M.
Click to expand...
Click to collapse
Hi
I am trying to send the AT Command directly from the terminal of the phone:
stop ril-daemon
cat /dev/ttyGS0 &
echo -e 'ATI\r' > /dev/ttyGS0
But the terminal is like not responding. Why?? Did someone try??
Thank you very much for the help.

Webtop2sd

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

Chrooted Linux "Ubuntu Maveric"

Below is a download with a flashable.zip and an ubuntu.img file.
Why is this good?
The new ics updates do not allow webtop with out a dock, kernel problems same problems as the overclocking the new kernel does not support modules at this time, Or the modules are not compiled with the new kernel. This is a suppliment then for those who wish to have a linux distro. If you plug in your phone with a regular hdmi cable you can use the pocket-cloud.apk to view the ubuntu desktop
Working:
Flash plugin 10 full desktop version, (This is a full desktop flash. from ubuntu desktop version of flash 10.1)
synaptic download
apt-get
vncserver
openssh
gdm
python
FIreFox 3.5
Firefox flash plugin working
Mozilla Thunderbird
Working on:
Wine for games, it is currently installed but missing some files if you manually download and install each lib file you should have a working wine, might be able to edit a repository
This is a chrooted enviroment made for android phones, this enviroment was build from scratch using ubuntu to build a chrooted enviroment from scratch for a rootfs file system.
To begin make sure your sdcard-ext has 3.5 gb free or more.
(if you wish to use sdcard instead of your sdcard-ext then you will have to make an edit in the linux.sh file)
To chroot into linux once your have the files in the correct spots you need only to have terminal emulator, and a vncserver connect (pocket-cloud.apk is free from the market.)
You will need to be rooted or the ability to mount a loop file, and chroot into a chrooted enviroment wich usually requires root privleges. Although there may be ways to vnc connect into it with out being rooted using adb, and adb shell, that will not be discussed here.
So if your rooted, and your have 3.5 gb free space on sdcard-ext then run the:
bioniclinux.zip from your recovery
This will push the files to the correct place, except the ubuntu.img
Put the ubuntu.img on sdcard-ext
by typeing:
adb push ubuntu.img /sdcard-ext/ubuntu.img
In your terminal emulator type: linux
(after you used the bioniclinux.zip and pushed the ubuntu.img to sdcard-ext.)
open pocket cloud free
type:
host: localhost or empty or 127.0.0.1 or 127.0.0.0.1 (not sure how many zeros)
username: ubuntu
password: ubuntu
prot 5901
Not Working:
Wine, missing files, wine is still installed if you remove it you could posiible free up some space,
apt-get update
apt-get dist-upgrade This can be fixed if you edit the /etc/acct/source.list
and fix missing packages and delete old sources, The only reason I left it was because upgradeing can breake Flash player 10.1
and dist-upgrade can breake the whole .img If anyone wants to upgrade and fix the source.list let me know
Change log:
Removed uneeded files. Freed up close to 1 gb
installed Chess 3d
upgraded apt-get
Ubuntu.img V2
if you cannot connect with those settings try
username: android
password: android
prot 5901
and if those dont work try
username: android
password: ubuntu
prot 5901
Having troubles make sure you put the ubuntu.img in the correct place, and name is case sensitive, so make sure it says ubuntu.img not Ubuntu.img
check the linux.sh in /system/xbin/linux.sh or /system/bin/linux.sh make sure it is in both places with adb you can do
adb pull /system/xbin/linux.sh
adb push /system/bin/linux.sh
adb pull /system/xbin/linux
adb push /system/bin/linux
That might fix the problem of not seeing the linux comand, if you cant mount your .img make sure inside the linux.sh it is in the correct location
for example one of the linux.sh might say /sdcard/ubuntu.img
the other might say /sdcard/-ext/ubuntu.img
for the location make sure your location of the image is in same place as the linux script
if you have the linux script or the zip you can put it on your sdcard in the same place as your ubuntu.img and type from the terminal
losetup /dev/block/loop0 /sdcard-ext/ubuntu.img
mount -o rw -t ext3 /dev/block/loop0 /data/local/mnt/Linux
Click to expand...
Click to collapse
then try
su
sh /sdcard/linux.sh
or
sh /system/xbin/linux.sh
or
sh /system/bin/linux.sh
Click to expand...
Click to collapse
that should start the chrooted enviroment
Anyone want to upload the .img to a better file sharing site? send me link for download, faster download speed would be nice.
One thing I noticed was the hostname.sh has beenchanged to an upstart service, so in order to get internet you must make an edit to the rc_enter.sh you could use a root explorer or nano editor in terminal
nano /etc/init.android/rc_enter.sh
Chane the /etc/init.d/hostname.sh to:
service start hostname
Also it would be a good idea to add this to the file just before service start hostname put:
echo "localhost 127.0.0.1 192.168.1.1 192.168.157.1 192.168.43.1" > /etc/init/hostname
echo "localhost 127.0.0.1 192.168.1.1 192.168.157.1 192.168.43.1" > /etc/hostname
echo "nameserver localhost" > /etc/resolv.conf
echo "nameserver 127.0.0.1" >> /etc/resolv.conf
echo "nameserver 192.168.1.1" >> /etc/resolv.conf
echo "nameserver 192.168.157.1" >> /etc/resolv.conf
echo "nameserver 192.168.43.1" >> /etc/resolv.conf
(Just to be sure i also added)
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
_
Now you should get internet threw it. If you have wifi you dont need to take those steps but you will not have internet until you are connected to wifi unless you follow those steps to edit the hostname
{
"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"
}
Images of desktop and me posting and editing a post on xda forums using the full desktop version of firefox for ubuntu.
I hope we all can start to build on this img and get it to be more flavor full and userfriendly and even get some gaming.
I see that valve works now with linux maybe we can get valve to work with this.
Also this is very productive for developers, I did not install any developing tools for space, but if you wish you could easily install several tools to help you. maybe an android-kitchen or even cynanogen build tools to build kernal and such. pull your kernel config and you could easily all on your phone with this linux create and edit your bionics kernel. Or build a whole rom with cynanogen mod tools.
Another thing that would be good would be cpu overclocking and maybe even unlocking the second cpu for chrooted eviroment. It already runs when using the android, but maybe we can unlock it fully to always run like the first cpu.
Made for sdcart-ext place ubunti.img there. More updates and info will be coming hope you enjoy.
androidifyme said:
Why is this good?
The new ics updates do not allow webtop with out a dock, kernel problems same problems as the overclocking the new kernel does not support modules at this time, Or the modules are not compiled with the new kernel.
Click to expand...
Click to collapse
compatible with leak 232+?
if using stock motoblur, is this retasking the HDMI port to enable ubuntu OVER or in addition to webtop (if we have a lapdock or HD dock for example)?
sounds interesting.
At this time it does not effect webtop, I bet we could get this to work for the webtop2sd or even the regular webtop.
When the usb drive is mounted on your pc there is an action script that allows for usb mass storage, when your bionic is connect to a dock script runs to hijack the hdmi and turns on webtop, that webtop script we already have edited a few post I have seen to add different desktops and such, It would be possible to put our img in webtop if we didnt touch the scripts used to mount it. basically you would have to replace webtop with this but keep the scripts in tact to lauch webtop from your dock, if anyone wants to help I would be willing to look into this.
yes, we would need to hijack the hdmi_hotplug and either insert a mount/remount like webtop2sd, OR ... what the eventual goal of that project was... boot from USB! (was this ever accomplished on Atrix?) for that matter, do we even *need* to hijack HDMI if webtop 3.0 can run the chrooted VNC natively like a phone would? (could be a staging point)
i believe with ICS device drivers, it would be a lot simpler to hot swap linux distros on thumb drives for example, or even more daring.. dual boot into bactrack anyone?
Here is a way we can make the linux distro take over the screen and usb event paths, its originaly for the nook but if anyone wants to take a look.
http://thomaspolasek.blogspot.ca/2012/04/arch-linux-lxde-w-xorg-mouse-keyboard_16.html
Setup our DNS (only have to do this once) echo "nameserver 8.8.8.8" > /etc/resolv.conf echo "nameserver 4.2.2.2" >> /etc/resolv.conf
Update arch pacman -Syu
Install Xorg and LXDE on your Arch Linux Chroot pacman -S xorg-xinit xf86-video-fbdev xf86-input-evdev lxde
Edit your /etc/X11/Xorg.conf file cd /etc/X11 rm Xorg.conf sudo wget http://y.uk.to/files/xorg.conf (or try http://pastebin.com/raw.php?i=8CM7NKhd) You may need to edit the device references for the keyboard and mouse in Xorg.conf! (/dev/input/event5 and /dev/input/event4 might be different) More information is found below
Go on your Nook Tablet and Run the Nook Tweaks app Turn on USB-Settings ---> USB Host Mode Turn on USB-Settings ---> External VBus
Connect your USB devices to your Nook Color Tablet Obtain a female to female usb connector Connect a hub to one side of the female connector Connect a usb keyboard/mouse to the hub Connect a mini-usb to the nook and then to the other side of the female connector
If you need to figure out what devices your keyboard and mouse are on, then cd /dev/input
run the cat command on each input* .... and check if your keyboard/mouse input results in a change on the output from cat for example, when I press a key on my keyboard cat /dev/input/event5 outputs some binary characters.
Now we will setup our linux framebuffer (****UPDATE 1****)
pikpok sent me this suggestion in the comments section.
You can use "setprop ctl.stop media & setprop ctl.stop zygote" in adb shell to kill zygote server and media, if you want to return to android you can replace stop with start and run again, it's much better than chmod
Now we will setup our linux framebuffer (hack)
Try pikpok's suggestion first, if it doesn't work then try out this hack of mine.
Temporary hack to stop the android system from accessing the frame buffer device. I plan on writing a patch that toggles access to this framebuffer from linux. But right now what I do is I change permissions on the framebuffer and then wait for the android system to lose connection to the framebuffer device. Once android loses the connection I run the Xorg server on the framebuffer, it hijacks the graphics output. If anyone has any idea on a better way to this please feel free to post on the comments section. Eventually (again this is a hack) the android system will appear to freeze (the screen stops updating)
cd /dev/graphics chmod 000 /dev/graphics/fb0 chown root:root /dev/graphics/fb0
If the graphics don't freeze right away, then keep running and killing the xorg server over and over until it does.
Start LXDE session (starts Xorg Server) xinit /usr/bin/lxsession &
If everything is configured good, you will get a full LXDE desktop with mouse and keyboard support. For any xorg server problems, have a look at the /var/log/Xorg*.log file
To stop the xorg server you can run (not the safest way but it doesn't really matter for this) killall X
BAM. Fully working linux system using the linux framebuffer with mouse/keyboard support.
In addition to support the USB keyboard and mouse, it is possible for other USB devices that are support ed by linux to be connected. Example of devices such as USB-DVI, USB-SERIAL, Arduino, etc...
Notes about the SD Card and EMMC:
It is possible to chroot into any part of the filesystem of Nook as long as you have rwx access. For my personal usage I chroot into the 8th partition on the EMMC (~4GB) of space and run Arch Linux from there, I find the EMMC runs faster than the SD Card.
that is definately an interesting option, i actually have a nook & xoom i could try this out on. i think that working within the API provided by moto for HDMI cloning might be the most direct and "seamless" display option. if im not mistaken the webtop itself scales and optimizes any application into "webtop" (basically tablet) mode. this is different from a simple cloning, which is preferable the if distro was being run through VNC.
there IS however a dock configuration for webtop (2.0 im sure of, need to test 3) where the display is outputed through HDMI, but the phone display is turned into a simulated mouse and keyboard combo. this would mean it is theoretically possible to run the chrooted OS when HDMI cable is detected, and automatically retask the phone as a HID. bluetooth / usb input is also supported at this point through the dock USB ports.
additionally, HDMI audio routing is only enabled @ 1 resolution output setting (the one for lapdock, need to double check #s). utilizing this feed would probably be the ultimate goal of the linux system (and would give the OS the highest resolution audio possible to work with)
cheers!
Can I get a bump already.
Will this work with any Droid Bionic ROM? I want to install on a custom ROM for use with my LapDock.
Can this allow me to install Ubuntu as WebTop onto the Liquid ROM I am running on the Safe Partition?
Droid Bionic Running:
Unsafe Leaked 6.7.232 Webtop v3.0.0 / LapDock functions perfectly
Safe Strapped Liquid 1.5-ICS-TARGA-MR2.3 is Rooted / No Webtop / my lapdock only charges
I would like to point out that WINE will never work with this as WINE is not a CPU emulator (WINE after all stands for Wine Is Not an Emulator).
Therefore althrough WINE does work on ARM you could only run ARM compiled .exe files which right now there arnt any, this may change once Windows 8 is released for ARM but still it will be pretty useless.
Other than that great to see more device specific guides! the more devices the better
zacthespack said:
I would like to point out that WINE will never work with this as WINE is not a CPU emulator (WINE after all stands for Wine Is Not an Emulator).
Therefore althrough WINE does work on ARM you could only run ARM compiled .exe files which right now there arnt any, this may change once Windows 8 is released for ARM but still it will be pretty useless.
Other than that great to see more device specific guides! the more devices the better
Click to expand...
Click to collapse
I don't know what I am doing here but you're wrong, WINE does work for ARM and apps for x86 works and ARM plus WINE, I tried it myself a long ago with my Atrix, I think I disscused this with you before.
TravisAntonio said:
I don't know what I am doing here but you're wrong, WINE does work for ARM and apps for x86 works and ARM plus WINE, I tried it myself a long ago with my Atrix, I think I disscused this with you before.
Click to expand...
Click to collapse
I was simply repeating whats been said here http://wiki.winehq.org/ARM if you have shown otherwise then great and by all means prove me wrong but you might want to talk with the WINE ARM team to let them know what does work
This is all pretty interesting... im liking the idea of linux on my phone. I cant wait to see how this progresses.
Sent from my Transformer Pad TF300T
Wow! Thank you for this.
I do have an issue though. I would love to get this running.
I entered the information in to PocketCloud as a VNC (is that correct?) and then when I launch "linux" in terminal emulator it says that the linux module isn't found in Busybox.
I followed the instructions (at least I think I did). I flashed the zip in recovery.
What am I missing?
Thank you.
check the linux.sh in /system/xbin/linux.sh or /system/bin/linux.sh make sure it is in both places with adb you can do
adb pull /system/xbin/linux.sh
adb push /system/xbin/linux.sh
adb pull /system/xbin/linux
adb push /system/bin/linux
That might fix the problem of not seeing the linux comand, if you cant mount your .img make sure inside the linux.sh it is in the correct location
for example one of the linux.sh might say /sdcard/ubuntu.img
the other might say /sdcard/-ext/ubuntu.img
for the location make sure your location of the image is in same place as the linux script
if you have the linux script or the zip you can put it on your sdcard in the same place as your ubuntu.img and type from the terminal
su
sh /sdcard/linux.sh
or
sh /system/xbin/linux.sh
that should start the chrooted enviroment
androidifyme said:
One thing I noticed was the hostname.sh has beenchanged to an upstart service, so in order to get internet you must make an edit to the rc_enter.sh you could use a root explorer or nano editor in terminal
nano /etc/init.android/rc_enter.sh
Chane the /etc/init.d/hostname.sh to:
service start hostname
Also it would be a good idea to add this to the file just before service start hostname put:
echo "localhost 127.0.0.1 192.168.1.1 192.168.157.1 192.168.43.1" > /etc/init/hostname
echo "localhost 127.0.0.1 192.168.1.1 192.168.157.1 192.168.43.1" > /etc/hostname
echo "nameserver localhost" > /etc/resolv.conf
echo "nameserver 127.0.0.1" >> /etc/resolv.conf
echo "nameserver 192.168.1.1" >> /etc/resolv.conf
echo "nameserver 192.168.157.1" >> /etc/resolv.conf
echo "nameserver 192.168.43.1" >> /etc/resolv.conf
(Just to be sure i also added)
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
Click to expand...
Click to collapse
Issue With Above Info
Just wanted to mention this is actually off. The nameserver [DNS server] you have listed here. Sorry if this was covered before don't have time to read all replies... 192.168 is reserved only for LAN use [not to be accessible to the Internet only behind a router on a private network]. So those may work for you via WiFi on your home network, but to others they won't be able to talk to those servers [unless a few have those same addresses on their private network setup for the same function].
Then Why does it still work stupid?
It works because the last one you have 8.8.8.8 is a public DNS on the internet so Ubuntu is essentially looking for a website address and 192.168.1.1 FAIL 157.1 FAIL 43.1 FAIL 8.8.8.8 FOUND.
Resolution [verified]
Also, OpenDNS [a very fast and nice FREE DNS nameserver service available worldwide] [http://www.opendns.com/home-solutions ] (scroll down to almost bottom of page there is a dark bar that lists the 2 server addresses if they were to ever change, or you want to check out signing up for an account so you can parental control and/or set custom settings like landing page for not found address (HTTP 404 error) etc.]
Free Worldwide Name [DNS] Servers:
Primary Nameserver [DNS]: 208.67.222.222
Secondary Nameserver [DNS]: 208.67.220.220
[you can use either server as a primary or secondary they just ask you to use 222.222 as primary and 220.220 as Secondary].
So, if you want to edit the OP with those they should work in 99.99% of all cases [can't vouch for people behind the Great Firewall of China or elsewhere if they severely filter the internet [speaking to the majority here]]. Now, usually if using a router [most cable modems are routers] then if you view the below info about opening a command prompt you can open one and type ipconfig [or if not on Windows view your basic network connection info]. Look for an entry labeled Gateway: This in 99% of cases will also have a DNS server [very basic] running and would be the address you could use when on your home network [99% of routers are generally set to 192.168.1.1 or 192.168.10.1 [or some variation on this theme [and yes you could in theory use almost any set of IP addresses on a LAN but I am trying to help the majority of general users]].
Verification [semi as ping helps you know if there is even a computer, but doesn't tell you if that computer runs a DNS server sprcifically]
If you want to see if an address works for you? Then try the following [Windows command listed as that again is the majority Linux users usually know their own ping but replace ping with hping if not sure as there is a good chance hping has been installed by default or by another package already]
Open a command prompt [click Start, run, then type "cmd" [as usual without quotes] in the white box and click OK or hit <ENTER>
When the Black Screen with white text [default yours may be different but should be text only and usually says C:\Blah]
Now type:
Ping 192.168.43.1 [or whatever can even use a website like www.google.com if you would like but we are checking certain addresses here]
Now it should start listing some text on the screen. If you see something like [I stopped it usually default for ping is to try 4x then exit]:
Code:
Pinging 192.168.43.1 with 32 bytes of data:
Request timed out.
Ping statistics for 192.168.43.1:
Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),
You can't talk to anything at that address [whether it is your network or the internet doesn't have that address anywhere, or there is something suchas a firewall blocking the ping command [be sure to enable ECHO ping on your router if not [usually is] and that you check your firewall settings to be sure that it is not filtering the packets].
Sorry this got long, just wanted to explain the issue, how to address it and how to verify things fully.
---------- Post added at 01:22 PM ---------- Previous post was at 01:12 PM ----------
ErisDroid? said:
Wow! Thank you for this.
I do have an issue though. I would love to get this running.
I entered the information in to PocketCloud as a VNC (is that correct?) and then when I launch "linux" in terminal emulator it says that the linux module isn't found in Busybox.
I followed the instructions (at least I think I did). I flashed the zip in recovery.
What am I missing?
Thank you.
Click to expand...
Click to collapse
Search the Play Market for Busybox installer [I prefer the one by Sterricson] and run that, grant it root [be patient on first open it takes it a min to request root usually], then allow it do it's checks [see status bar at top of screen fill as it runs and I suggest you say yes to the backup]. When it finishes tap Install and tap Normal install if prompted. This will ensure your busybox is correctly installed [it should have been your system saying command not found not busybox command not found something is a tiny bit off should have been more like sh: can't find command unless you actually used busybox as the shell itself [not advised is doable but not advised and I don't know any devs on XDA who have set their ROMs to do so [could be wrong I am sure there are devs here I don't know ]].
Ensure you ran his installer zip in recovery so that the linux file is in /system/xbin [or system/bin [some phones go one way others go the other and yes both directories are usually always there as even if it uses xbin usually there are file links to /system/bin for everything that is actually in /system/xbin].
If his installer sets it up in a way that your phone deosn't like follow as the OP states and open the zip find that file named linux [with no extension in Windows should appear as a white blank page icon]. Once you find that file just copy to your SDCard where the ubuntu.img file is.
Once done open terminal
Type in the following
cd /sdcard <ENTER enter key go key whatever your keyboard uses>
now type linux <ENTER> and that starts the server you should see starting vnc server or something verifying it is starting [unless author of the script omitted that which I highly doubt]
NOW try opening androidvnc, pocket cloud, whatever you use [I prefer AndroidVNC, but to each their own].
---------- Post added at 01:29 PM ---------- Previous post was at 01:22 PM ----------
zacthespack said:
I would like to point out that WINE will never work with this as WINE is not a CPU emulator (WINE after all stands for Wine Is Not an Emulator).
Therefore althrough WINE does work on ARM you could only run ARM compiled .exe files which right now there arnt any, this may change once Windows 8 is released for ARM but still it will be pretty useless.
Other than that great to see more device specific guides! the more devices the better
Click to expand...
Click to collapse
Yeah this is right when speaking of Android and WINE, THOUGH THEY ARE APPARENTLY WORKING TO GET WINE ON NATIVE ANDROID YAY, oh and yes they have a proof of concept video, BUT they have yet to release it at all.
As noted by the above quote it is indeed a CPU issue, WINE is coded really only for use with x86 based processors only, you have to basically re-code the whole thing so that it can use ARM instructions AND works with Android [theres a catch because yes there is BASIC support in WINE for ARM as of 2009 [See link below] which is 99.99999% of all Android devices [there are a couple now and more coming from intel with x86 based processors but TRUST me unless they SEVERELY upgraded x86 code ARM code is MUCH better battery use wise so I won't be buying any x86 based mobile devices myself.
http://wiki.winehq.org/ARM
Original poster I am replying to was thinking more along these lines An ANDROID based WINE client that runs is not quite to market yet see:
http://www.engadget.com/2013/02/04/wine-android-windows-apps/
Another Note here folks, I love the Windows, Linux, Unix Emulator [Title as listed on play market Just search Windows Emulator it comes up as first result [as of this writing]] As it does as it says allows the install of one of those systems in Android. I am not sure how well it may run on the Bionic [I use a Tmo Galaxy S2 [T989 1.5GHz Dual Core] and the awesome Nexus 7 [ Grouper 32G] I am here as I saw this while looking at other stuff for another person's phone I am working on
P.S see how easy that was when there is a disagreement or you want to be sure you give fully qualified answers you just do a little internet searching and find reputable [best you can] sources that may settle the question between you
Can someone upload Ubuntu.img
Can someone please upload the Ubuntu.img to somewhere besides 4shared.
Just for clarification:
The first reason I put the 192.168.0.1 and 157, and 43 is because the chrooted enviroment will connect to internet if your phone has a data connection pretty much no matter what because of 8.8.8.8 yes, but if no data, I added those dns for the wifi and virtual wlan0 and lan0, or eth0 on your phone and most of those default to the above addresses,
Second the wine that is installed on here is the wine/arm, but I think there are some broken dependencies, I was only trying to get wine to run for windows programs not an os, like the qemu emulator i think there is an apk in the market or online for it.
Yes I forgot to say you would need busybox to install and run this, so first make sure you have busybx installed, rooted, /system/xbin/linux, /system/xbin/linux.sh, /sdcard/ubuntu.img
open terminal type :
linux
[email protected]:vncserver
then connect to your localhost:ubuntu:ubuntu:5901
if you have any question or errors dont be affraid to message me or post here.
RealPariah said:
Issue With Above Info
Just wanted to mention this is actually off. The nameserver [DNS server] you have listed here. Sorry if this was covered before don't have time to read all replies... 192.168 is reserved only for LAN use [not to be accessible to the Internet only behind a router on a private network]. So those may work for you via WiFi on your home network, but to others they won't be able to talk to those servers [unless a few have those same addresses on their private network setup for the same function].
Then Why does it still work stupid?
It works because the last one you have 8.8.8.8 is a public DNS on the internet so Ubuntu is essentially looking for a website address and 192.168.1.1 FAIL 157.1 FAIL 43.1 FAIL 8.8.8.8 FOUND.
Resolution [verified]
Also, OpenDNS [a very fast and nice FREE DNS nameserver service available worldwide] [http://www.opendns.com/home-solutions ] (scroll down to almost bottom of page there is a dark bar that lists the 2 server addresses if they were to ever change, or you want to check out signing up for an account so you can parental control and/or set custom settings like landing page for not found address (HTTP 404 error) etc.]
Free Worldwide Name [DNS] Servers:
Primary Nameserver [DNS]: 208.67.222.222
Secondary Nameserver [DNS]: 208.67.220.220
[you can use either server as a primary or secondary they just ask you to use 222.222 as primary and 220.220 as Secondary].
So, if you want to edit the OP with those they should work in 99.99% of all cases [can't vouch for people behind the Great Firewall of China or elsewhere if they severely filter the internet [speaking to the majority here]]. Now, usually if using a router [most cable modems are routers] then if you view the below info about opening a command prompt you can open one and type ipconfig [or if not on Windows view your basic network connection info]. Look for an entry labeled Gateway: This in 99% of cases will also have a DNS server [very basic] running and would be the address you could use when on your home network [99% of routers are generally set to 192.168.1.1 or 192.168.10.1 [or some variation on this theme [and yes you could in theory use almost any set of IP addresses on a LAN but I am trying to help the majority of general users]].
Verification [semi as ping helps you know if there is even a computer, but doesn't tell you if that computer runs a DNS server sprcifically]
If you want to see if an address works for you? Then try the following [Windows command listed as that again is the majority Linux users usually know their own ping but replace ping with hping if not sure as there is a good chance hping has been installed by default or by another package already]
Open a command prompt [click Start, run, then type "cmd" [as usual without quotes] in the white box and click OK or hit <ENTER>
When the Black Screen with white text [default yours may be different but should be text only and usually says C:\Blah]
Now type:
Ping 192.168.43.1 [or whatever can even use a website like www.google.com if you would like but we are checking certain addresses here]
Now it should start listing some text on the screen. If you see something like [I stopped it usually default for ping is to try 4x then exit]:
Code:
Pinging 192.168.43.1 with 32 bytes of data:
Request timed out.
Ping statistics for 192.168.43.1:
Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),
You can't talk to anything at that address [whether it is your network or the internet doesn't have that address anywhere, or there is something suchas a firewall blocking the ping command [be sure to enable ECHO ping on your router if not [usually is] and that you check your firewall settings to be sure that it is not filtering the packets].
Sorry this got long, just wanted to explain the issue, how to address it and how to verify things fully.
---------- Post added at 01:22 PM ---------- Previous post was at 01:12 PM ----------
Search the Play Market for Busybox installer [I prefer the one by Sterricson] and run that, grant it root [be patient on first open it takes it a min to request root usually], then allow it do it's checks [see status bar at top of screen fill as it runs and I suggest you say yes to the backup]. When it finishes tap Install and tap Normal install if prompted. This will ensure your busybox is correctly installed [it should have been your system saying command not found not busybox command not found something is a tiny bit off should have been more like sh: can't find command unless you actually used busybox as the shell itself [not advised is doable but not advised and I don't know any devs on XDA who have set their ROMs to do so [could be wrong I am sure there are devs here I don't know ]].
Ensure you ran his installer zip in recovery so that the linux file is in /system/xbin [or system/bin [some phones go one way others go the other and yes both directories are usually always there as even if it uses xbin usually there are file links to /system/bin for everything that is actually in /system/xbin].
If his installer sets it up in a way that your phone deosn't like follow as the OP states and open the zip find that file named linux [with no extension in Windows should appear as a white blank page icon]. Once you find that file just copy to your SDCard where the ubuntu.img file is.
Once done open terminal
Type in the following
cd /sdcard <ENTER enter key go key whatever your keyboard uses>
now type linux <ENTER> and that starts the server you should see starting vnc server or something verifying it is starting [unless author of the script omitted that which I highly doubt]
NOW try opening androidvnc, pocket cloud, whatever you use [I prefer AndroidVNC, but to each their own].
---------- Post added at 01:29 PM ---------- Previous post was at 01:22 PM ----------
Yeah this is right when speaking of Android and WINE, THOUGH THEY ARE APPARENTLY WORKING TO GET WINE ON NATIVE ANDROID YAY, oh and yes they have a proof of concept video, BUT they have yet to release it at all.
As noted by the above quote it is indeed a CPU issue, WINE is coded really only for use with x86 based processors only, you have to basically re-code the whole thing so that it can use ARM instructions AND works with Android [theres a catch because yes there is BASIC support in WINE for ARM as of 2009 [See link below] which is 99.99999% of all Android devices [there are a couple now and more coming from intel with x86 based processors but TRUST me unless they SEVERELY upgraded x86 code ARM code is MUCH better battery use wise so I won't be buying any x86 based mobile devices myself.
http://wiki.winehq.org/ARM
Original poster I am replying to was thinking more along these lines An ANDROID based WINE client that runs is not quite to market yet see:
http://www.engadget.com/2013/02/04/wine-android-windows-apps/
Another Note here folks, I love the Windows, Linux, Unix Emulator [Title as listed on play market Just search Windows Emulator it comes up as first result [as of this writing]] As it does as it says allows the install of one of those systems in Android. I am not sure how well it may run on the Bionic [I use a Tmo Galaxy S2 [T989 1.5GHz Dual Core] and the awesome Nexus 7 [ Grouper 32G] I am here as I saw this while looking at other stuff for another person's phone I am working on
P.S see how easy that was when there is a disagreement or you want to be sure you give fully qualified answers you just do a little internet searching and find reputable [best you can] sources that may settle the question between you
Click to expand...
Click to collapse
Thanks for the post, This is great help
Also if you wanted to try to highjack the hdmi instead of the phones frame buffer we might be able to do that.
by taking over /dev/graphics/fb1 ,I have not personaly tested this, or someone who worked on the webtop2sd might be able to use this instead of the webtop2sd linux versoin used.
You can use "setprop ctl.stop media & setprop ctl.stop zygote" in adb shell to kill zygote server and media, if you want to return to android you can replace stop with start and run again, it's much better than chmod
Now we will setup our linux framebuffer (hack)
Try pikpok's suggestion first, if it doesn't work then try out this hack of mine.
Temporary hack to stop the android system from accessing the frame buffer device. I plan on writing a patch that toggles access to this framebuffer from linux. But right now what I do is I change permissions on the framebuffer and then wait for the android system to lose connection to the framebuffer device. Once android loses the connection I run the Xorg server on the framebuffer, it hijacks the graphics output. If anyone has any idea on a better way to this please feel free to post on the comments section. Eventually (again this is a hack) the android system will appear to freeze (the screen stops updating)
cd /dev/graphics chmod 000 /dev/graphics/fb1 chown root:root dev/graphics/fb1
If the graphics don't freeze right away, then keep running and killing the xorg server over and over until it does.
Start LXDE session (starts Xorg Server) xinit /usr/bin/lxsession &
If everything is configured good, you will get a full LXDE desktop with mouse and keyboard support. For any xorg server problems, have a look at the /var/log/Xorg*.log file
To stop the xorg server you can run (not the safest way but it doesn't really matter for this) killall X
BAM. Fully working linux system using the linux framebuffer with mouse/keyboard support.
androidifyme said:
Just for clarification:
The first reason I put the 192.168.0.1 and 157, and 43 is because the chrooted enviroment will connect to internet if your phone has a data connection pretty much no matter what because of 8.8.8.8 yes, but if no data, I added those dns for the wifi and virtual wlan0 and lan0, or eth0 on your phone and most of those default to the above addresses,
Second the wine that is installed on here is the wine/arm, but I think there are some broken dependencies, I was only trying to get wine to run for windows programs not an os, like the qemu emulator i think there is an apk in the market or online for it.
Yes I forgot to say you would need busybox to install and run this, so first make sure you have busybx installed, rooted, /system/xbin/linux, /system/xbin/linux.sh, /sdcard/ubuntu.img
open terminal type :
linux
[email protected]:vncserver
then connect to your localhost:ubuntu:ubuntu:5901
if you have any question or errors dont be affraid to message me or post here.
Thanks for the post, This is great help
Also if you wanted to try to highjack the hdmi instead of the phones frame buffer we might be able to do that.
by taking over /dev/graphics/fb1 ,I have not personaly tested this, or someone who worked on the webtop2sd might be able to use this instead of the webtop2sd linux versoin used.
You can use "setprop ctl.stop media & setprop ctl.stop zygote" in adb shell to kill zygote server and media, if you want to return to android you can replace stop with start and run again, it's much better than chmod
Now we will setup our linux framebuffer (hack)
Try pikpok's suggestion first, if it doesn't work then try out this hack of mine.
Temporary hack to stop the android system from accessing the frame buffer device. I plan on writing a patch that toggles access to this framebuffer from linux. But right now what I do is I change permissions on the framebuffer and then wait for the android system to lose connection to the framebuffer device. Once android loses the connection I run the Xorg server on the framebuffer, it hijacks the graphics output. If anyone has any idea on a better way to this please feel free to post on the comments section. Eventually (again this is a hack) the android system will appear to freeze (the screen stops updating)
cd /dev/graphics chmod 000 /dev/graphics/fb1 chown root:root dev/graphics/fb1
If the graphics don't freeze right away, then keep running and killing the xorg server over and over until it does.
Start LXDE session (starts Xorg Server) xinit /usr/bin/lxsession &
If everything is configured good, you will get a full LXDE desktop with mouse and keyboard support. For any xorg server problems, have a look at the /var/log/Xorg*.log file
To stop the xorg server you can run (not the safest way but it doesn't really matter for this) killall X
BAM. Fully working linux system using the linux framebuffer with mouse/keyboard support.
Click to expand...
Click to collapse
That's interesting I would have thought you could run a script and grep the interface IP if you are tying the Cell in for data. I know this takes time and all, but what I would suggest is you could prolly throw it in the linux wrapper script you have or if that is too early in the process maybe throw a script that loads on login to the image to do so and re-build. Again I know you just started this and that takes time just throwing it out there..
Also, if it is for LAN WiFi doesn't DHCP run and able to grab an IP?
I understand the ARM deal, I just threw in the emulator name for those who don't understand what WINE truly is and are trying to find something to run a more robust Windows environment [why, I am not sure, but hey there it is LoL].

Categories

Resources