[Q] Droid 4 Webtop Development - Motorola Droid 4

First question: Will there be any?
Second question: Can we use Razr stuff to get the ball rolling?
I picked up a lapdock 100 for $100 today and would really like to unleash the full fury of my Droid 4 on it. I came across this for the Razr and my eyes lit up.
I will personally not try any of this until I read up on it more because I am scared I might brick my shiny new phone with no reliable recovery option.
Anybody else interested in something like this on the D4?

greekchampion04 said:
First question: Will there be any?
Second question: Can we use Razr stuff to get the ball rolling?
I picked up a lapdock 100 for $100 today and would really like to unleash the full fury of my Droid 4 on it. I came across this for the Razr and my eyes lit up.
I will personally not try any of this until I read up on it more because I am scared I might brick my shiny new phone with no reliable recovery option.
Anybody else interested in something like this on the D4?
Click to expand...
Click to collapse
I'm definitely interested and will be doing my best to get this working. I need to get myself another microHDMI cable first and make the webtop hack compatible (if its not already)

Have you checked out "Ubuntu Installer" from the market? It'll make you not want Webtop,
Webtop is limited in alot of ways.
Also check this out
http://www.ubuntu.com/devices/android
MoPhoACTV Initiative

would absoloutely love it, but motorola hates us
!!ROOT + Kernel with Loop device support REQUIRED!!
Click to expand...
Click to collapse
i have a feeling our Kernel will not support it, but im trying it now and will post back with results.
hopefully the ubuntu on android project turns out good for us... that would make my lapdock a worthwhile investment.
edit: tried to put it on but it did not quite work... from looking at the log it should work, but what my screen shows (screenshot below) is not working. hmmmm.
Screenshot:
{
"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"
}
Log:

mattlgroff said:
I'm definitely interested and will be doing my best to get this working. I need to get myself another microHDMI cable first and make the webtop hack compatible (if its not already)
Click to expand...
Click to collapse
thanks, great to hear a dev is interested in this. if you are interested in dev'ing ubuntu/webtop on the DroidX i would be more than happy to send you mine to play around with. if not, i completely understand.

Ubuntu working on D4
To get Ubuntu working on the D4:
You must have root, and have busybox installed to /system/xbin/busybox
1. create a directory called ubuntu (EXTERNAL sdcard's root)
2. Download an image(small or large) to that directory
3. download the attached .sh to that directory
5. Remount your external sd card with the following command
mount -o remount,rw,exec,suid /dev/block/vold/179:1 /mnt/sdcard-ext
6. open a terminal
7. cd /mnt/sdcard-ext/ubuntu
8. run ./ubuntud4.sh
Voila it works.
Ignore any errors. Exit when done.
If you cant see a desktop when connecting through VNC.
1. From a terminal type "killall -TERM Xtightvnc" hit enter
2. From a terminal type vncserver
Then user 127.0.0.1:5901 1) instead of port 5900 0)

Nebtop works to enable the web top hack for the D4.

zeroktal said:
To get Ubuntu working on the D4:
You must have root, and have busybox installed to /system/xbin/busybox
1. create a directory called ubuntu (EXTERNAL sdcard's root)
2. Download an image(small or large) to that directory
3. download the attached .sh to that directory
5. Remount your external sd card with the following command
mount -o remount,rw,exec,suid /dev/block/vold/179:1 /mnt/sdcard-ext
6. open a terminal
7. cd /mnt/sdcard-ext/ubuntu
8. run ./ubuntud4.sh
Voila it works.
Ignore any errors. Exit when done.
If you cant see a desktop when connecting through VNC.
1. From a terminal type "killall -TERM Xtightvnc" hit enter
2. From a terminal type vncserver
Then user 127.0.0.1:5901 1) instead of port 5900 0)
Click to expand...
Click to collapse
i have it on the internal SD... is that my issue?

You can put it on the internal. However you'd have to modify the script I gave. As well as remount the internal sdcard with rw,exec,suid. The suid isn't necessary, but I've found it makes ubuntu less flaky.

thanks, im moving it to the external anyways... SD card needed a good cleaning and this gave me a reason to do it... as soon as the transfer finishes im going to give it a shot with your script.. thanks again!

having problems with this line: 8. run ./ubuntud4.sh
i enter
sh ubuntud4.sh
and i get
ubuntud4.sh: 45: syntax error: end of file unexpected (expecting "then")
edit:
poked around a bit and /system/xbin/busybox does not exist.. gotta see what happened to my busybox installation.

also vi ubuntud4.sh see if you have ^M at the end of the file. I've had a few people say theirs did, and some that didn't. If you're does you gotta delete each one. Sorry

just vi'd it and ubuntud4.sh is completely blank on my sd.... gonna put it back on must have been a bad download
edit: put a clean copy in and it had ^M at the end of a bunch of lines, took them all out and tried to run it... error is now:
ubuntud4.sh: 45: syntax error: end of file unexpected (expecting "fi")

Im not near my pc. Ill upload another one when I get a chance.
Sent from my DROID4 using XDA App
---------- Post added at 04:11 AM ---------- Previous post was at 04:01 AM ----------
This is the script from my own phone
##########################################
#Ubuntu boot script V5 for Android #
#Built by Zachary Powell (zacthespack) #
#Thanks to everyone at XDA! #
##########################################
perm=$(id|cut -b 5)
if [ "$perm" != "0" ];then echo "This script requires root! Type: su"; exit; fi
mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/sdcard-ext/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt/ubun
export USER=root
mkdir $mnt
export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export HOME=/root
if [ -b /dev/block/loop254 ]; then
echo "Loop device exists"
else
busybox mknod /dev/block/loop254 b 7 254
fi
#mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt
losetup /dev/block/loop254 $kit/ubuntu.img
mount -t ext2 /dev/block/loop254 $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
/system/xbin/busybox mount -o bind /sdcard-ext $mnt/sdcard
/system/xbin/busybox mount -o bind /sdcard-ext/external_sd $mnt/external_sd
/system/xbin/busybox sysctl -w net.ipv4.ip_forward=1
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:"
ifconfig lo
echo " "
busybox chroot $mnt /root/init.sh
echo "Shutting down Ubuntu ARM"
umount $mnt/sdcard-ext
umount $mnt/external_sd
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
losetup -d /dev/block/loop254

ahhh thanks! at the ends of the longer lines there were still a couple of ^s. took em out and viola! up and running.
only problem is i had to do this:
If you cant see a desktop when connecting through VNC.
1. From a terminal type "killall -TERM Xtightvnc" hit enter
2. From a terminal type vncserver
Then user 127.0.0.1:5901 1) instead of port 5900 0)
only issue now is that did not end up with my desired resolution... 1024x768 instead of the 960x540 that i need for the D4 screen.
thanks again for helping me out!

You can set the geometry like this.
vncserver :1 -geometry 1024x768 (replace 1024x768) with your desired geometry. I use higher, because then I output this on my monitor
Sent from my DROID4 using XDA App

what i want to do is output it to the lapdock.. so higher res is actually my goal as well. thanks so much for all your help!
got it working perfectly through the lapdock! thanks! had to keep the res at 960x540 because it doubles the pixels when you make the phone go fullscreen on the lapdock.. oh well.

Really? Mines good, what vnc client did you use?
Sent from my DROID4 using XDA App

will wifi/4g still work if I do this?

yes, this does not have any "negative" effects... think of it as installing an app... it does not replace your OS, it runs inside of it.

Related

Ubuntu on droid incredible - SUCCESS!

Hi guys,
As I'm sure most of you already know, some super-smart devs have already gotten ubuntu running on evo and nexus 1. I haven't heard any news of anyone doing this on the incredible.
I would love this functionality, but I'm no dev and have no experience building kernels. Anyone with the appropriate know how interested in having a look at the evo forum, and see if they can compile a kernel that will allow us to run ubuntu on or incredibles?
Just fyi: feedback from evo users suggest that all ubuntu functionality is working, including full flash support and even hulu.com!
Are you as excited as I am? Lets get to work on this- let me know and I'll help anyway I can.
Sent from my ADR6300 using XDA App
Ok, hadn't done this before, but it turned out to be pretty easy. I have compiled the kernel, and packaged it into an update.zip file signed with test keys. You can flash this straight from CW recovery.
If anyone is interested, this "kupdate-signed.zip" will update the kernel to the one I have compiled.
This kernel is completely identical to the stock htc kernel, except that it has the
CONFIG_BLK_DEV_LOOP=y
set so that we can run Ubuntu.
FInd it here: www<dot>4shared<dot>com/file/-kxtUfIw/kupdate-signed<dot>html
--samwathegreat
Ok, so the kernel seems to work perfectly for me, however I am unable to get ubuntu running.
I'm not sure where the problem lies, but I think it has to do with our restricted access to /system and /data.
Hopefully someone here can figure out what it is that I'm missing......I've tried following the instructions while booted into recovery and mounting /system and /data > everything works fine when I run the ubuntu.sh file, but I can't run the bootubuntu file under recovery........so after rebooting phone and trying to run bootubuntu, I get all kinds of errors and ultimately it fails.
After viewing the contents of bootubuntu file, I noticed that once again, it's trying to mount the /system partition......
If this is indeed because of the nand lock, then why does the procedure work on the evo 4g? I was under the impression that it incorporated the same nand lock as the incredible?
Any ideas?
Thanks
Edit:
The nand lock is indeed the culprit...just found out that evo users have full nand unlock available. I wasn't aware of that -hopefully we have the same soon on the incredible.
Patiently waiting...
Sent from my ADR6300 using XDA App
I was looking through the
bootubuntu a few days ago and if I remember correctly it was just moving some if the scripts into the system partition. We could probably boot into recovery and move the files in manually then edit the scripts to remove the system access.
Think its possible? I haven't looked at the scripts in a few days...
Sent from my ADR6300 using XDA App
If you need someone to test let me know.
Sent from my HTC Incredible using Tapatalk
I posted a thread about chroot earlier with no reply. No true nand unlock means no chroot which means no dual booting into ubuntu/debian/meego etc. Also no response from unrevoked if they plan on releasing a true nand unlock.
Other big problem is input.
http://forum.xda-developers.com/showthread.php?t=631389
That's about putting debian on the nexus as well using adb which might be possible but ending the session might have to be a battery pull. The big problem are sound drivers, GSM radio/modem drivers and on screen input.
Dvdivx:
Thanks, we're on the right track, however fastboot won't work on our devices either...again because of nand (that's why I had to make my kernel into an update.zip and sign with test keys - the evo boys just use fastboot to update their kernels). MAYBE we could get one of the distros installed in recovery with update.zip, but I don't see how we could boot android too if we go this method.
Shame I went to all the trouble of building that kernel....oh well. Maybe we will have nand unlock soon and get to use it yet.
Keep me posted if you find something out that hasn't been mentioned here. Thanks.
Sent from my ADR6300 using XDA App
I've been trying this for the last few days and stumbled uppon this thread when trying to get around the problem of mount -o loop.
I'm using http[://]nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-nexus-oneandroid/ as my guide and running through the two scripts manually adjusting as needed.
Thanks to your kernel i was able to get the ubuntu.img mounted. Here is what I've done so far...
#running jager chocolate rom with
#reboot recovery
mkdir /tmp/system
mount -o rw -t yaffs2 /dev/block/mtdblock3 /tmp/system
cd /tmp/system
cp /sdcard/ubuntu/fsrw .
cp /sdcard/ubuntu/bootubuntu .
cp /sdcard/ubuntu/unionfs .
cp /sdcard/ubuntu/mountonly .
chmod 4777 fsrw
chmod 4777 bootubuntu
chmod 4777 unionfs
chmod 4777 mountonly
#reboot and connect with adb shell
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
mkdir /data/local/ubuntu
mount -o rw,loop -t ext2 $kit/ubuntu.img $mnt
busybox mount --bind /dev/pts $mnt/dev/pts
busybox mount --bind /proc $mnt/proc
busybox mount --bind /sys $mnt/sys
sysctl -w net.ipv4.ip_forward=1
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost" > $mnt/etc/hosts
chroot $mnt /bin/bash
So.... now I've got "[email protected]:/#"
And...
# uname -a
Linux localhost 2.6.29 #1 PREEMPT Sun Jul 11 03:35:47 EDT 2010 armv7l GNU/Linux
# chroot $mnt /bin/bash
[email protected]:/# cat /etc/issue
Ubuntu 9.10 \n \l
I think I'd call that a success.... Someone care to confirm?
Done with the following:
apt-get update
apt-get install tightvncserver
apt-get install lxde
export USER=root
vncserver
Over to androidVNC... The connection is taking forever to go through
When i go back to the terminal and cat /root/.vnc/localhost:1.log I see the following:
xrdb: No such file or directory
xrdb: can't open file /root/.Xresources
Segmentation fault
Edit: Nevermind... it works. When I entered the address in androidvnc, localhost was autocorrected as locals and I didn't notice.
The following script I saved as ubuntu.sh to handle creating the environment variables and such that is required each time you launch ubuntu. i call it with sh ubuntu.sh since I cant make it executable on the sdcard and don't feel like booting into recovery to put it in /system/bin until I work out the little issues. The only problem with below is that it is not un mounting the ubuntu image... Any ideas?
#####BEGIN ubuntu.sh#####
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
export USER=root
mount -o rw,loop -t ext2 $kit/ubuntu.img $mnt
busybox mount --bind /dev/pts $mnt/dev/pts
busybox mount --bind /proc $mnt/proc
busybox mount --bind /sys $mnt/sys
sysctl -w net.ipv4.ip_forward=1
echo Running ubuntu!
chroot $mnt /bin/bash
#After exit, cleanup
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
#####END ubuntu.sh#####
Also, I was able to launch a few applications inside my VNC session including firefox. It was really really slow (i guess as expected). i would be interested in a performance comparison from someone who has both an incredible and one of other devices people have made run ubuntu in this fashion.
Ok so I've wiped my phone and started from scratch to come up with an easy procedure...
All that you need is the kernel samwathegreat posted, ubuntu.img (in /sdcard/ubuntu) and the following script. You only need to boot into recovery to do a nandroid backup and to install the kernel.
###### BEGIN ubuntu.sh ######
export PATH=/system/bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
export USER=root
mkdir /data/local/ubuntu
mount -o rw,loop -t ext2 /sdcard/ubuntu/ubuntu.img /data/local/ubuntu
busybox mount --bind /dev/pts /data/local/ubuntu/dev/pts
busybox mount --bind /proc /data/local/ubuntu/proc
busybox mount --bind /sys /data/local/ubuntu/sys
sysctl -w net.ipv4.ip_forward=1
echo waiting for things to settle...
sleep 5
echo Running ubuntu!
chroot /data/local/ubuntu /bin/bash
#After exit, cleanup
umount /data/local/ubuntu/dev/pts
umount /data/local/ubuntu/proc
umount /data/local/ubuntu/sys
umount /data/local/ubuntu
###### END ubuntu.sh ######
Here is everything in one zip file: www megaupload com/?d=WO094E5Q
FANTASTIC!
pez:
Thanks so much!
I'm thrilled that my kernel did indeed go to some good use. You obviously have greater linux knowledge than I, as i would not have been able to do the scripting myself.
In the true spirit of teamwork, we've accomplished this WITHOUT having nand access. To me, this is quite an accomplishment.
Thanks to everyone that worked on this! Also - Although I did build the kernel myself, I feel that credit must also go to "Koush", who provided the means and instructions to package the kernel into an update.zip file, and sign with test keys.
Good Luck everybody, and have fun playing with ubuntu on your Incredible!!!
-samwathegreat
Here is a really crappy video I recorded. I open the browser at the start to show I disabled all network access and am indeed connecting to localhost.
http://www.youtube.com/watch?v=HMYvQ5r_OyA
If someone else could replicate my success and post a better video I'd appreciate it.
Edit: Just saw your reply samwathegreat. Did you get a chance to try it yourself? I wrote a little howto on androidforums.com (http://androidforums.com/all-things...-run-ubuntu-droid-incredible.html#post1127643) hoping that others would be able to confirm they were successful too.
Also, the key mapping is messed up when connecting with VNC, but I haven't had time to find out why.
This is pretty awesome. I'll have to try this later just for the hell of it.
Too cool. My ROM has a kernel capable of this. I'm gonna try!
ihtfp69 said:
Too cool. My ROM has a kernel capable of this. I'm gonna try!
Click to expand...
Click to collapse
Hell, you should package this in with your rom.
Gimpeh said:
Hell, you should package this in with your rom.
Click to expand...
Click to collapse
Seconded!
Vote called motion carried, the I's have it.
Gimpeh said:
Hell, you should package this in with your rom.
Click to expand...
Click to collapse
Wouldn't having something like this in your sky raider rom bloat it and cause more battery use having it run in the background?
kentoe said:
Wouldn't having something like this in your sky raider rom bloat it and cause more battery use having it run in the background?
Click to expand...
Click to collapse
If it's running all the time. As long as you have a kill command it should be fine.

[GUIDE] Build Debian image to run on Tab via chroot

I've been experimenting and gathering information all day on how to build a Debian image to run on the Tab (and any other ARM Android devices, for that matter). I've found all the stuff on how to use the Ubuntu images posted, but I really wanted to know how to build a minimal system that I could have complete control over. (I used the latest version of Debian available, Squeeze, when building this, so anything that references "Squeeze" in the commands is because of that. You can easily substitute in a more generic name for files.)
I am going to break this down into a few sections.
Requirements:
Debian or Ubuntu machine (I used a VM with Ubuntu 11.04 installed on it)
Rooted Tab with BusyBox installed
Create the Image:
On the Linux machine you will need to install debootstrap
Code:
sudo apt-get install debootstrap
Create a blank image, format it and then mount it
Code:
dd if=/dev/zero of=squeeze.img bs=1M count=512
mkfs.ext4 -F squeeze.img
sudo mkdir /mnt/squeeze/
sudo mount -t ext4 -o loop squeeze.img /mnt/squeeze/
Note: The image file above is for 512MB, change it to "count=1024" for 1GB, I tried 512MB and it was very limited in space once X was installed.
Run debootstrap and install the system into the image
Code:
sudo debootstrap --verbose --arch armel --foreign squeeze /mnt/squeeze/ http://ftp.debian.org/debian
Unmount the image
Code:
sudo umount /mnt/squeeze/
Install the Image
Create a folder on the Tab, I used /sdcard/debian/ as my storage for my Debian files. Copy your newly created image over into the folder.
Installation will involve the following:
Creating a mount point and mounting the image
Chrooting into the Debian system
Setting some variables
Running the debootstrap installation
Either in a terminal on the device or using adb, do the following to install the system. (The code is commented to better explain how things are working.)
Code:
# Gain root access
su
# Create a mount point and mount the image file into it
# You can substitute any folder instead /data/local/debian/
mkdir /data/local/debian/
mount -o loop,noatime -t ext4 /sdcard/debian/squeeze.img /data/local/debian/
# Chroot into the Debian system
chroot /data/local/debian/ /bin/sh
# Set some required variables
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/
export USER=root
# Set the shell prompt just in case it got overwritten by something else
export PS1='[email protected]$HOSTNAME:${PWD-?} # '
# Run debootstrap
sh /debootstrap/debootstrap --second-stage
# Start a bash shell
/bin/bash
DO NOT EXIT THE SHELL BEFORE MOVING ON TO THE NEXT SECTION
First Boot
Technically the system is running, but if you start to use it you will quickly notice some things just aren't right. There are a few things that I've found that I've needed to do in order to get things running right. You should only need to do these the first time the system is run.
In the Debian shell that is still running on the Tab, do the following
Code:
# This is for working DNS
echo "nameserver 8.8.8.8" > /data/local/debian/etc/resolv.conf
echo "nameserver 8.8.4.4" >> /data/local/debian/etc/resolv.conf
echo "127.0.0.1 localhost" > /data/local/debian/etc/hosts
# Needed to install packages from the repository
echo "deb http://ftp.debian.org/debian/ squeeze main contrib non-free" > /etc/apt/sources.list
echo "deb-src http://ftp.debian.org/debian/ squeeze main contrib non-free" > /etc/apt/sources.list
# Do the initial update of the package repository
apt-get update
Once that is complete return to the Android system by running the exit command
Code:
exit
So that's a fully running system right there. But we haven't addressed starting and shutting down the system.
Here is what a simple boot script would look like to both run and stop the system:
Code:
clear
echo "Mounting Debian Squeeze..."
mount -t ext4 -o loop squeeze.img /mnt/squeeze/
echo "Setting environmental variables..."
export PATH=$bin:/usr/bin:/usr/sbin:/bin:/sbin:$PATH
export TERM=linux
export HOME=/
export USER=root
export PS1='[email protected]:${PWD-?} # '
echo "Mounting devpts/proc/sysfs..."
mount -t devpts devpts /data/local/debian/dev/pts
mount -t proc proc /data/local/debian/proc
mount -t sysfs sysfs /data/local/debian/sys
echo "Chrooting into Debian Squeeze..."
chroot /data/local/debian/ /bin/bash
echo "Unmounting devpts/proc/sysfs..."
umount /data/local/debian/dev/pts
umount /data/local/debian/proc
umount /data/local/debian/sys
echo "Unmounting Debian Squeeze..."
umount /mnt/squeeze/
You will notice that the script also mounts and unmounts additional system filesystems. Also, the script basically pauses right after the chroot command waiting for the process to end, which occurs when you type exit inside of the Debian system. In effect, the script queues up the umount commands for whenever the Debian system is exited.
I use a script similar to that (without the mount/umount because I prefer to do that myself) to start my system. I have it saved to /sdcard/debian/debian and I start the system with the following command:
Code:
su
sh /sdcard/debian/debian
Issues:
The following issues have been encountered:
If the image file is mounted then unmounted, if you try to remount the image again it will error out. (Reboot to solve)
Optional Installation:
Of course the steps above leave you with a working system, but no doubt you will want more functionality.
I've installed TightVNC using the following command:
Code:
apt-get install tightvncserver
To start it:
Code:
vncserver -geometry 1280×752
After that you can connect to it using any VNC software, either local or over the network. If you connect local, be sure to use 127.0.0.1:5901.
Note: This does not install a window manager, if you VNC into the Tab you will get a blank desktop.
I also found that the less command was missing. Turns out the easy fix was to do the following:
Code:
apt-get install less
Finally...
All of this has just been what I've encountered so far today, haven't done much more than set up the system. Please let me know if I'm missing any key parts of the system or if there are any ways that this could be more streamlined.
Hope this helps someone
Thanks man, after rooting my SGT i have been looking for something like this, i'll try it when arrive home.
does touch screen work?
hardt2788 said:
does touch screen work?
Click to expand...
Click to collapse
Dear god man read! It runs as a Virtual Machine on your tablet and you use a VNC client to control it. So yes touchscreen works but it is not a duel boot and is "piggy backing" off android.
So if someone emails you can switch to the email app then back to the vnc app.
You need pills.
Sent from my GT-P7510 using XDA Premium App
maniac3389, have you tried running lxde instead of gnome to see if it runs any faster?
hardt2788 said:
does touch screen work?
Click to expand...
Click to collapse
Sorry, been a few days since I've been on here. Well, the concept is that you run a VNC server in the Debian system and you "remote" into it via a VNC client on the Honeycomb side.
jamezelle said:
maniac3389, have you tried running lxde instead of gnome to see if it runs any faster?
Click to expand...
Click to collapse
Been a bit since I've worked with it, it installed and worked but something was quirky about it. (can't recall what it was)

How to install ubuntu on the Droid 4

How to install ubuntu on the Droid 4
Note to mods: this thread is a branch off of this thread
Huge thanks to zacthespack for creating the ubuntu installer app and original boot script and to zeroktal for modifying the script to work on the D4 and helping me get it working on my device.
I decided to take my experience in setting this up and put it into a how-to so that others could enjoy the experience of having ubuntu on the Droid 4. If zackthespac or zeroktal have any problems with me making and putting this guide up, please let me know and I will remove it.
Knowledge Required:
working knowledge of command line
working knowledge of vi
OR the ability to learn how to use both
Tools Required:
A rooted Motorola Droid 4
BusyBox (Android Market)
Terminal Emulator (Android Market)
Android VNC Viewer (Android Market)
Ubuntu Installer App (Android Market)
zeroktal's ubuntud4.zip file (attached to this post and mediafire)
Vi Cheat Sheet (lagmonster.org)
Step by Step:
Install BusyBox, Terminal, and Android VNC Viewer
Install and run Ubunutu Installer App
Follow the on-screen instructions and click next
Download either the Small or Large image to your phone, (use zeroktal's ubuntud4.zip file instead of the boot script provided in the guide) after the image downloads (will take a while because the file is HUGE) click next
For this screen, the instructions differ from the app.
1. With your D4 plugged into your PC in USB Mass Storage, create a directory (folder) called ubuntu in the EXTERNAL sdcard's root*
2. Extract the image you downloaded to that directory
3. Download and extract the attached .sh (ununtud4.zip) to that directory
4. Disconnect your phone from your PC
5. Open terminal and run the following commands:
su [ENTER]
mount -o remount,rw,exec,suid /dev/block/vold/179:1 /mnt/sdcard-ext [ENTER]
cd /mnt/sdcard-ext/ubuntu [ENTER]
sh ubuntud4.sh [ENTER]
960x540 [ENTER]**​If you get an error message: ubuntud4.sh: 45: syntax error: end of file unexpected (expecting "then") see troubleshooting section below.​killall -TERM Xtightvnc [ENTER]
vncserver :1 -geometry 960x540 [ENTER]**​6. Open androidVNC app and enter the following settings:
Nickname: Anything you want
Password: ubuntu
Address: localhost
Port: 5901
Color Format: 24-bit color (4 bpp)
7. Hit connect
8. Hit your menu soft button and then set input mode to touchpad
9. You have ubuntu on your Droid 4!
To "shut down" ubuntu:
press the menu button, select disconnect in VNC
In terminal type this command 3 times (terminal will close itself when you are done):
exit [ENTER]
To "start up" ubuntu again:
Follow steps 5-8 above
Troubleshooting:
If you get the error message: ubuntud4.sh: 45: syntax error: end of file unexpected (expecting "then") you are about to have fun with vi at the command line.
Do the following from inside terminal:
su [ENTER]
cd /mnt/sdcard-ext/ubuntu [ENTER]
vi ubuntud4.sh [ENTER]​If you see ^M or ^ at the end of any line (remember to scroll all the way to the right to see the end of long lines) remove it. once you do that, everything should work just fine. (See the Vi Cheat Sheet above for help with Vi)
Note: Vol Up + E is [ESC] by default in this terminal emulator
Notes:
* It does not have to be on the external SD, but if you put it on the internal SD you will have to modify things as needed-- if you dont know what needs to be changed, just put it on the external SD.
** Screen size can be whatever you want it to be, but 960x540 is the size of the D4 screen.
*** This is a fairly involved process... especially when it comes to editing the .sh file in vi things can get very frustrating and hard, but just take your time and you will get it. As always, doing anything with root access on your phone, especially on the command line has risks. I am not responsible if anything goes wrong with your phone... proceed at your own risk!
greekchampion04 said:
Notes:
* It does not have to be on the external SD, but if you put it on the internal SD you will have to modify things as needed-- if you dont know what needs to be changed, just put it on the external SD.
** Screen size can be whatever you want it to be, but 960x540 is the size of the D4 screen.
*** This is a fairly involved process... especially when it comes to editing the .sh file in vi things can get very frustrating and hard, but just take your time and you will get it. As always, doing anything with root access on your phone, especially on the command line has risks. I am not responsible if anything goes wrong with your phone... proceed at your own risk!
Click to expand...
Click to collapse
I actually got it up and running on my internal sdcard partition. Pretty much just have to modify the Mount remount command, and a few lines in the script.
Here's the original command
Code:
mount -o remount,rw,exec,suid /dev/block/vold/179:1 /mnt/sdcard-ext
And the modified one
Code:
mount -o remount,rw,exec,suid /dev/block/vold/179:57 /mnt/sdcard
Only things you have to change are the device location(179:57) and mount location(drop the -ext after sdcard)
Now, after that you also have to modify the script a bit. Just go through it, and anywhere that you see sdcard-ext, drop the -ext off the end.
thanks for putting that up for everybody! like i said, if you know what you are doing its not a hard swap to make.
Is anyone else getting just a gray screen when they remote in? What could be causing this?
i had that same problem at first... did you use zeroktal's ubuntud4.zip file? or did you use the ubuntu.sh file included in the app?
I used the sh file included. I did however fix the problem, when mounting at the start i confused vold with void. I did not get the file system mounted properly. This method does work!! however I am currently trying to get bash on my droid to replace sh as the shell. I've checked the forums but have not found anything yet about someone installing bash on the droid 4. With no way for nandroids I feel i should wait before I kill sh.
Sent from my DROID4 using XDA App
If you mod your init.sh in your root directory to the following, your vnc will work on startup without issue. It will also shutdown vnc on exit.
#!/bin/bash
#############################################
# Asks User to screen size and saves as REZ #
#############################################
#echo "Now enter the screen size you want in pixels (e.g. 800x480), followed by [ENTER]:"
#read REZ
##############################################
# Pick which desktop environment to use, this#
# is done by having a xstartup file for each #
# desktop, then renaming the one you want to #
# use to 'xstartup' before boot #
##############################################
echo "Please select which Desktop environment you want to use, type the number to select it then press [ENTER]"
echo "1 - LXDE"
echo "2 - Gnome"
echo "Make your Selection:"
read DESKTOP
if [ $DESKTOP == 1 ]
then
mv /root/.vnc/lxstartup /root/.vnc/xstartup
fi
if [ $DESKTOP == 2 ]
then
mv /root/.vnc/gxstartup /root/.vnc/xstartup
fi
###########################################
# Tidy up previous LXDE and DBUS sessions #
###########################################
rm /tmp/.X* > /dev/null 2>&1
rm /tmp/.X11-unix/X* > /dev/null 2>&1
rm /root/.vnc/localhost* > /dev/null 2>&1
rm /var/run/dbus/pid > /dev/null 2>&1
############################################################
# enable workaround for upstart dependent installs #
# in chroot'd environment. this allows certain packages #
# that use upstart start/stop to not fail on install. #
# this means they will have to be launched manually though #
############################################################
dpkg-divert --local --rename --add /sbin/initctl > /dev/null 2>&1
ln -s /bin/true /sbin/initctl > /dev/null 2>&1
###############################################
# start vnc server with given resolution and #
# DBUS server, (and optionally an SSH server) #
###############################################
dbus-daemon --system --fork > /dev/null 2>&1
/etc/init.d/ssh start
vncserver :1 -geometry 960x540
echo
echo "If you see the message 'New 'X' Desktop is localhost:1' then you are ready to VNC into your ubuntu OS.."
echo
echo "If VNC'ing from a different machine on the same network as the android device use the 1st address below:"
##########################################
# Output IP address of android device #
##########################################
ifconfig | grep "inet addr"
echo
echo "If using androidVNC, change the 'Color Format' setting to 24-bit colour, and once you've VNC'd in, change the 'input mode' to touchpad (in settings)"
echo
echo "To shut down the VNC server and exit the ubuntu environment, just enter 'exit' at this terminal - and WAIT for all shutdown routines to finish!"
echo
###############################################################
# Spawn and interactive shell - this effectively halts script #
# execution until the spawning shell is exited (i.e. you want #
# to shut down vncserver and exit the ubuntu environment) #
###############################################################
/bin/bash -i
#########################################
# Disable upstart workaround and #
# kill VNC server (and optionally SSH) #
# Rename used xstartup to its first file#
#########################################
killall -TERM Xtightvnc
/etc/init.d/ssh stop
Also save the follow lines between ### as remount.sh on your system partition. Then chmod 755 /system/remount.sh. Now you can just run run from a terminal /system/remount.sh and voila it remounts correctly and starts ubuntu(with the above fixes). Im still working on the unmounts.
####### for the internal sd card
mount -o remount,rw,exec,suid /dev/block/vold/179:57 /mnt/sdcard
/mnt/sdcard/ubuntu/ubuntu.sh
######
OR
####### for the external sd card
mount -o remount,rw,exec,suid /dev/block/vold/179:1 /mnt/sdcard-ext
/mnt/sdcard-ext/ubuntu/ubuntu.sh
#######
great stuff!
feel free
Feel free and take, modify, repost or edit anything I touch.
QUESTION:
After I delete all the ^M and ^ what do i do next? I try to hit the command ":x" to exit and save changes but it just creates another line. Also when I press VOL UP + E to escape nothing happens.
PhanTuhC said:
QUESTION:
After I delete all the ^M and ^ what do i do next? I try to hit the command ":x" to exit and save changes but it just creates another line. Also when I press VOL UP + E to escape nothing happens.
Click to expand...
Click to collapse
In vi, the command to save and exit is :wq (probably short for write and quit).
remember, read up on the vi quick-reference guide: http://www.lagmonster.org/docs/vi.html
OK I fixed it but now its not letting me connect with androidVNC. All the settings entered is correct but when I try to connect it says:
"VNC connection failed!" localhost/127.0.0.1:5901 - Connection refused"
ok, i've gone thru this a few times (slowly and deliberately) and must be missing something...the directions seem pretty straightforward! here's what i know...
busy/terminal/vnc are all installed
small 2.5gb image is unzipped in /sdcard-ext/ubuntu directory
the attached .sh file from page 1 is in the same directory
i removed all ^M using vi
but when I try sh ubuntud4.sh i get an error...
"mkdir failed for /data/local/mnt/ubun, No such file or directory"
(plus a few other errors)
should the directory be "ubun" or "ubuntu"? am I typing something incorrectly?
copy and paste new script
Copy and paste the new scripts I posted. They will fix your problem. Remember to use the remount script from /system/ the rest will work perfectly if you are root. I'll check back later on your progress.
Ok, well I started from scratch (deleted both .img and .sh files) and it's still not working.
I have all the apps installed (and yes rooted, SU works just fine)
I used Ubuntu Installer app to download the image zip (tried both the large and small img)
I downloaded the .sh file from the first post
The /sdcard-ext/ubuntu/ folder now has two files: "ubuntu.img" and "ubuntud4.sh"
All ^M characters have been removed from .sh file
Still no joy...
Ideas? What am I missing?
In terminal, I can set SU permissions and the mount/cd commands work just fine...it's the last sh command that spits out a bunch of errors about not being able to create/find the directories.
I'm going to format the sdcard and try again...any help is appreciated.
Update: Even after re-formatting the SD and following the steps exactly, no luck!
Did you remember to remount the sdcard with exec and suid permissions?
Andbuntu will work much better than this method. It works on every single phone with modification to the "environmental variables".
http://code.google.com/p/andbuntu/
Follow the directions in the script to make the process much easier than the first post.
instructions:
generate an image with rootstock on an ubuntu computer.
put it on /sdcard/ubuntu/ubuntu.img
run the script on your phone with "sh /path/to/script"
Here is the script. http://andbuntu.googlecode.com/svn/trunk/uboot
Also, run "firstRun" to make things like terminals work properly.
Adamoutler: That didnt work for me. The permissions were incorrect on the mounted partitions.
Sent from my DROID4 using XDA App

[chroot] Ubuntu or BT5 chroot script

What is a note without the use of a Desktop Environment?
I love the Resolution of this screen 1280x800 (same size as my laptop) why not put it to good use and get Ubuntu running on this thing.
Root is Required with Busybox
Your device needs to be rooted
you can follow this guide http://forum.xda-developers.com/showthread.php?t=1837907
What did I do?
Not much, credit goes mostly to mSullivan and edounn (from I717). I just modified the script and the ubuntu.img file to work for T-Mobile Galaxy Note devices and uploaded the modified IMG to my own web server.
Instructions
Download the Ubuntu.zip Img from here (1.6gb)
extract ubuntu.zip to /sdcard/ubuntu
you should see
ubuntu.sh
mountonly
unionfs
fsrw
ubuntu.img
now from the terminal type
Code:
su
to gain access to root
then type
Code:
sh /sdcard/ubuntu/ubuntu.sh
to start the script
a few questions should pop up about screen resolution and desktop environment
I used
Code:
1280x800
2 - gnome
for my selections
Download Android VNC program and use these as the credentials
Nickname: Ubuntu (or anything you want)
Password: ubuntu (lower case)
IP: 127.0.0.1
Port: 5900
Color: 24bit
Links and what not
this is the original ubuntu.img I modified
http://ubuntuone.com/1Ew1232e3D51PCjYOkkQU7
for backtrack 5 (i have not tested bt5 yet on the note)
you can go directly to the backtrack 5 website and download using
http://www.backtrack-linux.org/downloads/
these options.
Choose: BT5
ARCH: ARM
IMAGE: IMG
I believe it's about 1gb download and 5gb uncompressed and might need to resize the IMG file to use on our fat32 storage. Follow mSullivan post to see how to resize the IMG. (If and when I get BT5 on our devices i will post another howto).
If you already have your own IMG file and don't want to download 1.6gb from my web server. here is the code
Code:
##########################################
#Ubuntu boot script V1 for Tmo Note #
#Built by Donald Hui (x3maniac) #
#Thanks to everyone at XDA! #
##########################################
perm=$(id|cut -b 5)
if [ "$perm" != "0" ];then echo "This script requires root! Type: su"; exit; fi
mount -o remount,rw /dev/block/mmcblk0p24 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt
export USER=root
mkdir $mnt
export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export HOME=/root
if [ -b /dev/block/loop255 ]; then
echo "Loop device exists"
else
busybox mknod /dev/block/loop255 b 7 255
fi
#mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt
losetup /dev/block/loop255 $kit/ubuntu.img
mount -t ext2 /dev/block/loop255 $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
busybox mount -o bind /sdcard $mnt/sdcard
busybox mount -o bind /sdcard/external_sd $mnt/external_sd
busybox sysctl -w net.ipv4.ip_forward=1
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo " "
busybox chroot $mnt /root/init.sh
echo "Shutting down Ubuntu ARM"
umount $mnt/sdcard
umount $mnt/external_sd
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
losetup -d /dev/block/loop255
screenshot Dual Core =)
{
"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"
}
[reserved]
this space is reserved. i'm working on making ubuntu more functional and will be posting the how-to's here as i go
Changing root password for ssh login
remember to change the root password. type
Code:
sudo passwd root
Speeding up VNC
this helps but i can't be too sure. i tried streaming video but still a bit choppy.
using nano to edit the init.sh script in the root folder
Code:
nano /root/init.sh
look for the line that says
Code:
vncserver :0 -geometry $REZ
and add -deferupdate 10 to the end like this
Code:
vncserver :0 -geometry $REZ -deferupdate 10
(Explanation)
-deferupdate time
Time in milliseconds, to defer screen updates (default 40).
Deferring updates helps to coalesce many small desktop changes
into a few larger updates thus saving network bandwidth.
lowering this should help with updates since network bandwidth isn't a problem. I tried lowering this to 0 or 5 but it seems it makes the screen try to refresh faster then it can draw causing weird choppiness when on youtube.
compressing local vnc connection with ssh
this command below compresses the traffic from port 5900(vnc) to port 5901. should help speed up vnc
Code:
ssh -C -L 5901:127.0.0.1:5900 -N -f -l root localhost
I'm not sure if in this case this helps or not. Reason: what this does is compress the information going from one place to another, which requires more CPU. besides on a local environment i don't think it helps but i gave it a try anyway.
(Explanation)
-L 5901:localhost:5900 : Specifies that the given port on the local (client) host is to be forwarded to the given host and port on the remote side. Here you are using port 5900 on the localhost to be forward to localhost on the 5901 port.
-N : Do not execute a remote command i.e. just forward ports.
-f : Requests ssh to go to background just before command execution. Requests ssh to go to background just before command execution. Once password supplied it will go to background and you can use prompt for type commands on local system.
-l root : root is the user to log in as on the remote machine (localhost).
localhost (127.0.0.1): Remote system with VNC server
Running Ubuntu on the Note is pretty awesome.
A few things I noticed:
- For some reason the d key in gnome was set as a shortcut to minimize all windows. (I tried to typed sudo but realizing now you are already root because the shell prompt has a # symbol - old Ubuntu habbits)
- apt-get doesn't work "out of the box" you need to add /sbin to your path something like:
Code:
PATH=$PATH:/sbin
Throw that in your ~/.bash_profile
This is because it's trying to run a program in /sbin but since it's not in your path it crashes.
Also I noticed that many VNC clients don't work well with an external mouse. Jump Desktop seems to work very good with an external mouse (non-free).
Also - since I have a 32GB class 10 SD card I put this on there instead of the main memory. If you want to do this you have to edit this line in the script:
Code:
export kit=/sdcard/ubuntu
to
Code:
export kit=/sdcard/external_sd/ubuntu
nadams said:
Running Ubuntu on the Note is pretty awesome.
A few things I noticed:
- For some reason the d key in gnome was set as a shortcut to minimize all windows. (I tried to typed sudo but realizing now you are already root because the shell prompt has a # symbol - old Ubuntu habbits)
- apt-get doesn't work "out of the box" you need to add /sbin to your path something like:
Code:
PATH=$PATH:/sbin
Throw that in your ~/.bash_profile
This is because it's trying to run a program in /sbin but since it's not in your path it crashes.
Also I noticed that many VNC clients don't work well with an external mouse. Jump Desktop seems to work very good with an external mouse (non-free).
Also - since I have a 32GB class 10 SD card I put this on there instead of the main memory. If you want to do this you have to edit this line in the script:
Code:
export kit=/sdcard/ubuntu
to
Code:
export kit=/sdcard/external_sd/ubuntu
Click to expand...
Click to collapse
thank you for your input to get ubuntu working on internal sd card and path.
as for the "D" key. i remember having to change a shortcut using dconf-tools.
unfortunately i bricked my note by flashing something to the wrong partition. (seriously typo) and havn't been doing anything more with this ubuntu.img. but i will continue to host the file for anyone who needs.
x3maniac said:
thank you for your input to get ubuntu working on internal sd card and path.
as for the "D" key. i remember having to change a shortcut using dconf-tools.
unfortunately i bricked my note by flashing something to the wrong partition. (seriously typo) and havn't been doing anything more with this ubuntu.img. but i will continue to host the file for anyone who needs.
Click to expand...
Click to collapse
Do you think you could post some instructions on how to resize the img disk? I looked in the linked thread and he talks about how to set it up but I don't see anything about resizing it. One of the reasons why I am asking is because there doesn't seem to be enough room for a release upgrade:
Code:
The upgrade has aborted. The upgrade needs a total of 869M free space
on disk '/'. Please free at least an additional 69.2M of disk space
on '/'. Empty your trash and remove temporary packages of former
I tried to run fdisk -l on ubuntu.img just to check out the partition table and I get this error:
Code:
Disk ubuntu.img doesn't contain a valid partition table
Edit: doh - I should of realized that a raw image file wouldn't have a partition table. So to resize:
Code:
dd if=/dev/zero bs=1M count=7168 >> data.img
yes | e2fsck -f data.img
resize2fs data.img
yes | e2fsck -f data.img
Though if you are paranoid you can leave off the yes.
Please note - there are tutorials out there that talk about using cp - this is a bad approach not only because you have to copy the files (this is slow) but some of them don't use the parameter to copy the attributes!
However, this presents a problem of why these Linux images are usually only 3.5GB. Fat32 can only have a file up to 4GB. So if you resize - you will need to format your SD card to ext3. Though exFAT should work - I don't know if Android supports that. I suppose that we could separate the image into different mount points - but eventually I think you will hit the 4GB limit.
Edit 2:
This is more frustrating than it needs to be. So I attempted to format the SD card as ext3/4 - Android refused to automatically mount it (even though it mounts system partitions with ext4). So I'm pretty sure in the Android subsystem it has a
Code:
mount -t vfat /dev/mmcblk1p1 /mnt/sdcard/external_sd
. In any case I tried several applications from the app store to add compatibility - with little success. I managed to get NTFS auto mounted at boot - but Android refuses to read the apps from an NTFS sd card (which I have a feeling would be the same with ext4 if I could get it mounted).
So at this point I am trying 2 partitions: most of the SD card is FAT32, and the second chunk will be ext2 for Ubuntu.
Edit 3:
2 partitions are working great. Just altered the script to mount the partition instead of mounting the file. To be honest I think it's a little faster on a separate partition.
Edit 4:
After upgrading System Monitor no longer sees two cores. I am looking into it.

Chroot. Running Debian 7.8 on Chromecast

How to install chrooted Debian 7.8 on a Chromecast (Debcast?)
English are not my native language but I will try answer any questions
Step 1 – 5 was made on a Debian 7.8 computer (raspbian)
Step 6 – 12 was made in Chromecast shell
1. Install debootstrap
Code:
su
apt-get install debootstrap
2. Download mini-installation for armhf with debootstrap, this will take a while.
Code:
debootstrap --arch=armhf --variant=minbase --foreign wheezy debian http://http.debian.net/debian
3. Tar the downloaded
Code:
tar -cvf debian.tar debian/
4. Send debian.tar to CC,data dir is writable
Code:
cat debian.tar | ssh [email protected][chromecast-ip] 'cat > /data/debian.tar'
5. ssh to chromecast
Code:
ssh [email protected](chromecast-ip)
6. Untar
Code:
cd /data
tar -xvf debian.tar
7. Create a start file for Chroot
Code:
vi /data/chroot.sh
#!/bin/sh
# Fix all PATH for Debian
export ROOT=/data/debian
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH
export HOME=/root
# remount /data. Got an error first time I loged into chroot. remount is a fix for this
# not sure if we need to do this every reboot
echo "Remounting /data"
mount -o remount,defaults /data
# Mount dev for Debian if needed
mountpoint $ROOT/dev –q
if [ ! $? -eq 0 ] ; then
echo "Mounting dev"
mount -o bind /dev $ROOT/dev
fi
# Mount pts for Debian if needed
# It's a fix for direct ssh login to chroot
mountpoint $ROOT/dev/pts –q
if [ ! $? -eq 0 ]; then
echo "Mounting ptst"
chroot $ROOT /bin/mount -t devpts -o OPTIONS devpts /dev/pts
fi
# Mount proc for Debian if needed
mountpoint $ROOT/proc –q
if [ ! $? -eq 0 ]; then
echo "Mounting proc"
mount -o bind /proc $ROOT/proc
fi
# Mount proc for Debian if needed
mountpoint $ROOT/sys –q
if [ ! $? -eq 0 ]; then
echo "Mounting sys"
mount -o bind /sys $ROOT/sys
fi
# start chroot
chroot $ROOT /bin/bash -l
8. run chroot.sh and continue with the installation, this will take a while
Code:
chmod +x chroot.sh
./chroot.sh
debootstrap/debootstrap --second-stage
9. We now got a working minimal chroot jail, almost no programs are installed, before we can install anything we need to update sources.list and add some repositories. Use http://debgen.simplylinux.ch/ to create a sources.list. I use debian mirrors for Sweden.
Code:
echo ”deb http://ftp.se.debian.org/debian stable main” > /etc/apt/sources.list
echo ”deb http://security.debian.org/ wheezy/updates main” >> /etc/apt/sources.list
apt-get update
10. Install vim and ssh
Code:
apt-get install vim ssh
11. change port from 22 to 2222 and restart ssh
Code:
vi /etc/ssh/sshd_config
/etc/init.d/ssh restart
12. Set a password
Code:
passwd
OPTIONAL
1. Install desctop and vnc server, this will take a while and our installation will rise with 400-450M (mine using about 800M total), we only got 1.1G total to play with so be carefull which program you install. A fix to this would be to create a Yaffs2 image for loop mount and then store it on a USB drive.
Code:
apt-get install xfce4 tightvncserver
2. Create a loginpassword to vnc, and choose if you need a guest login
Code:
tightvncserver
3. Start vnc server, 800x600 res.
Code:
vncserver :0 -geometry 800x600 -depth 24
4. Log into chromecast, I used a standalone RealVNC in windows and [chromecast-ip]:0 to login
5. More info at http://elinux.org/RPi_VNC_Server
INFO
- To exit root jail, just type exit
- If you started sshd in root jail you can connect to it with ssh on port 2222.
- No need to start chroot to load a program in chroot, you can start it from outside
Code:
chroot with chroot /data/debian /etc/init.d/ssh start
- you can also kill program from outside, run ps to find out ID and use kill [id]
- Chromecast does support loop mount, but not very many filesystems
o To mount a supported filesystem use
Code:
mount myImage.img /mnt/myImage –o loop=/dev/block/loop0
o does not support ext, ext2, ext3 or ext4
o Does support yaffs2, vfat…
o supported filetypes can be found in cat /proc/filesystems
o yaffs2utils can be compiled in debian (on CC), this program can make same filesystem type as /data, and this file can be loop mounted
o Install git, gcc and make. Then git clone https://github.com/justsoso8/yaffs2utils
Errors:
- stdin is not a tty. Run inside chroot jail:
Code:
/bin/mount -t devpts -o OPTIONS devpts /dev/pts
or outside chroot run
Code:
chroot /data/debian /bin/mount -t devpts -o OPTIONS devpts /dev/pts
. Then try to connect to port 2222 again.
- do this: mount -t proc proc /proc.
Run (outside chroot)
Code:
mount -t proc /proc /data/debian/proc
- Chroot and vi can be found in busybox (busybox chroot, busybox vi) you can create a symlink to it.
Code:
mkdir /data/bin & cd /data/bin
ln /bin/busybox –s vi
ln /bin/busybox –s chroot
export PATH=/data/bin:$PATH
o If you need Busybox it can be downloaded from: http://www.busybox.net/downloads/binaries/latest/busybox-armv7l
TODO:
- Autostart chroot on boot
- Does anyone know how to view shell via HDMI?
- Can keyboards and mouse be connected via a USB hub so we can use CC as a minimal computer?
LINKS:
http://www.hjackson.org/blog/archives/2008/10/18/ssh-stdin-is-not-a-tty
https://wiki.debian.org/ChrootOnAndroid
http://www.cyberciti.biz/faq/how-do-i-compress-a-whole-linux-or-unix-directory/
http://elinux.org/RPi_VNC_Server
http://debgen.simplylinux.ch/
https://bitbucket.org/inkubux/cubox-i/wiki/Plex Wheezy
https://help.ubuntu.com/community/BasicChroot
https://github.com/justsoso8/yaffs2utils
http://www.busybox.net/downloads/binaries/latest/busybox-armv7l
Screenshot:
g
Click for large
How are you using a mouse and keyboard, powered otg
Sent from my iPad using Tapatalk
it's a minimum installation of Debian, but I guess you can install xfce and use X-forwarding with sshd. They got it working on a transcend wifi sd-card so it can be made, not sure how fast it will run.
http://dmitry.gr/index.php?r=05.Projects&proj=15. Transcend WiFiSD
Cool
Ok, I tried X-forwarding, it's not a GUI, it's more like you run a program from a host, and "stream" it to some other computer using a client program and ssh.
Also installed xcfe-desctop and tightvncserver. No problem connecting to chromecast and run programs in vnc.
Is it possible to post a little 'how to' and some screenshots?
sure, give me a few days =)
Pietplezier said:
Is it possible to post a little 'how to' and some screenshots?
Click to expand...
Click to collapse
First post is updated with new information
Mape0661 said:
sure, give me a few days =)
Click to expand...
Click to collapse
Screenshots looks wicked!
Pietplezier said:
Screenshots looks wicked!
Click to expand...
Click to collapse
Thanks! It worked better then I thought it would, it's working like a small computer.
I have tryed to view shell over HDMI, would be fun, but I haven't got it to work yet, only crashed the chromecast.

Categories

Resources