Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
androidifyme
Old
(Last edited by androidifyme; 8th February 2013 at 08:03 PM.)
#1  
Account currently disabled - OP
Thanks Meter 40
Posts: 75
Join Date: Oct 2011
Default 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


Quote:
losetup /dev/block/loop0 /sdcard-ext/ubuntu.img

mount -o rw -t ext3 /dev/block/loop0 /data/local/mnt/Linux
then try

Quote:
su
sh /sdcard/linux.sh
or
sh /system/xbin/linux.sh
or
sh /system/bin/linux.sh

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.
Attached Files
File Type: zip signed_bioniclinux.zip - [Click for QR Code] (130.5 KB, 216 views)
 
androidifyme
Old
(Last edited by androidifyme; 8th February 2013 at 06:56 AM.)
#2  
Account currently disabled - OP
Thanks Meter 40
Posts: 75
Join Date: Oct 2011
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


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.
 
androidifyme
Old
(Last edited by androidifyme; 21st July 2012 at 10:19 AM.)
#3  
Account currently disabled - OP
Thanks Meter 40
Posts: 75
Join Date: Oct 2011
Made for sdcart-ext place ubunti.img there. More updates and info will be coming hope you enjoy.
 
nitephlight
Old
#4  
nitephlight's Avatar
Member
Thanks Meter 4
Posts: 43
Join Date: Mar 2012
Quote:
Originally Posted by androidifyme View Post
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.
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.
 
androidifyme
Old
#5  
Account currently disabled - OP
Thanks Meter 40
Posts: 75
Join Date: Oct 2011
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.
 
nitephlight
Old
#6  
nitephlight's Avatar
Member
Thanks Meter 4
Posts: 43
Join Date: Mar 2012
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?
 
androidifyme
Old
#7  
Account currently disabled - OP
Thanks Meter 40
Posts: 75
Join Date: Oct 2011
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/201...yboard_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.
 
nitephlight
Old
#8  
nitephlight's Avatar
Member
Thanks Meter 4
Posts: 43
Join Date: Mar 2012
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!
 
androidifyme
Old
#9  
Account currently disabled - OP
Thanks Meter 40
Posts: 75
Join Date: Oct 2011
Can I get a bump already.
 
cystic
Old
(Last edited by cystic; 18th August 2012 at 09:27 PM.)
#10  
Junior Member
Thanks Meter 0
Posts: 2
Join Date: Jan 2010
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

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

One Stop Guide Shop for the Newbie and Dev

It’s been well established that XDA-Developers isthedestination for resources relating to … more

What Happened at Google I/O 2013 – XDA Developer TV

Unless you just emerged from a deep, dark, dank cavern under the Earth, you know … more

Forums Added for the LG Optimus G Pro and Sony Xperia Tablet Z

Not too long ago, we talked about how Sony was continuing its AOSP efforts on … more

Permanent Screen Off for the Visually Impaired

Most of us take the simple act of waking up our devices and having a quick glance at the … more