Jump to content

Ubuntu for Android on XOLO X900 (OSD)


Guest Zhiming Zhou

Recommended Posts

Guest Zhiming Zhou

Hi:

I've managed to run x86 Ubuntu for Android on XOLO X900.

I have tested several quite useful x86 programs:

Skype/Ubuntu One/sopcast/Flash player/Opera browser ...

I use a displaylink usb display adapter to get video output (via USB OTG of course)

I use motorola lapdock as display device and keyboard/mouse input

and I use Lubuntu 12.04 system, Ubuntu display on external display device,

so it will not affect android system at all

this is final effect:

post-671637-0-57945500-1357535542_thumb.

Please follow my blog post for steps of making Ubuntu for Android on XOLO X900:

http://zohead.com/archives/ubuntu-for-xolo-x900/?lang=en

(This is a multi-language blog post, sorry I really don't want to post the whole content again)

You will need to download udlfb display driver from links in my blog post

Currently shortcomings:

Audio doesn't work

USB display adapter hotplug may cause X server crash

USB OTG and charging can't work simultaneously

The best solution should be patching kernel and enable HDMI frame buffer support

Just enjoy ~~~ ^_^

Regards

Uranus Zhou

Link to comment
Share on other sites

Guest mmbika

Hi Zhiming,

I have Motorola LapDock 100 too and very intersetd in this topic if you can post some video, it would be great.

Also I get frequent disconnects on LapDock while I connect Xolo to LapDock via USB OTG Host cable. It works but gets disconnected every minute and I keep recoonecting host cable to Xolo. What could be reason?

I belive Micro-USB Male conenctor on LapDock is actually having 47K resistor between Pin 3 & 5 so it can charge Motorola Atrix 4G (original LapDock phone) as well as it has powerd USB hub. Somehow if we can connect this Micro-USB Male connector of the dock directly than it will put Xolo into chaging+USB OTG Host mode.

May be but I am not sure. I am woring on doing some mode to achive above.

Link to comment
Share on other sites

Guest Zhiming Zhou

Hi Zhiming,

I have Motorola LapDock 100 too and very intersetd in this topic if you can post some video, it would be great.

Also I get frequent disconnects on LapDock while I connect Xolo to LapDock via USB OTG Host cable. It works but gets disconnected every minute and I keep recoonecting host cable to Xolo. What could be reason?

I belive Micro-USB Male conenctor on LapDock is actually having 47K resistor between Pin 3 & 5 so it can charge Motorola Atrix 4G (original LapDock phone) as well as it has powerd USB hub. Somehow if we can connect this Micro-USB Male connector of the dock directly than it will put Xolo into chaging+USB OTG Host mode.

May be but I am not sure. I am woring on doing some mode to achive above.

I have not encountered USB disconnect problem, maybe something wrong with your USB OTG cable?

I use a MicroUSB female to USB male adapter and a MicroUSB OTG cable

For LapDock, because its power is controled by HDMI signal, you need to make sure HDMI is connected first

And I'm also thinking of your ideas about mode to LapDock,

the biggest problem is MicroUSB port is at the bottem of XOLO X900,

if we direct connect XOLO to MicroUSB male connector,

then MicroHDMI connector on LapDock will be totally shaded by our phone

I'm in China, it's not that easy to upload a video to Youtube (blocked), but I'll try, haha ^_^

Link to comment
Share on other sites

Guest Zhiming Zhou

U mean display through OSD/X900's own HDMI port?

this will need custom kernel, cause stock kernel doesn't contain HDMI frame buffer support

For now, custom kernel still can't be flashed to OSD/X900, so I just use USB display adapter

Link to comment
Share on other sites

I ment directly to the osd/x900 4inch display ? I know this would not be to useful but could still use it too decompile apps etc on device if ubuntu can display on the device screen.

Link to comment
Share on other sites

Guest Zhiming Zhou

I ment directly to the osd/x900 4inch display ? I know this would not be to useful but could still use it too decompile apps etc on device if ubuntu can display on the device screen.

actually this is not too hard

you need to stop android to unlock first framebuffer device,

and edit my Xorg config file to change device name and resolution

1. stop android:

run these command in adb shell after su rooted

setprop ctl.stop media & setprop ctl.stop zygote

chmod 000 /dev/graphics/fb0

chown root:root /dev/graphics/fb0

2. change xorg config:

change /dev/fb1 to /dev/fb0

change 1366x768 to 1024x600

change "displaylink" driver name to "fbdev"

3. startx

Then u should see X on Android phone screen,

the shortcoming of this is you can't use Android and Ubuntu at the same time

Link to comment
Share on other sites

Guest mmbika

I have not encountered USB disconnect problem, maybe something wrong with your USB OTG cable?

I use a MicroUSB female to USB male adapter and a MicroUSB OTG cable

For LapDock, because its power is controled by HDMI signal, you need to make sure HDMI is connected first

And I'm also thinking of your ideas about mode to LapDock,

the biggest problem is MicroUSB port is at the bottem of XOLO X900,

if we direct connect XOLO to MicroUSB male connector,

then MicroHDMI connector on LapDock will be totally shaded by our phone

I'm in China, it's not that easy to upload a video to Youtube (blocked), but I'll try, haha ^_^

I noticed some strange behaviour, when I connect a bluetooth mouse and as long as it is connected, I am not getting USB OTG Host disconnection problem, whether I use bluetooth mouse or not, but I keep it connected which keeps lapdock's keyboard-mouse-and powered USB hub connected.

I modified a normal USB charger cable to make it USB OTG Host as I do not have Micro-USB Female to Normal USB (Type A) Female or Male adapter, I am using it via two connecors - first one is Micro-USB Female to Mini USB (Type B) Male which connects to the Micro-USB Male connector of the dock, second connector I use is Mini USB (Type-B) Female to Normal USB (TYpe A) Female and into this Normal USB (Type-A) USB Connector I connect USB Host cable from xolo.

I am typing this using my modified USB Host Cable which has Micro-USB (Type-A) Male at one end which goes to Phone and it has Normal USB (Type-A) Male at other end which plugs into the two adapter set as described above.

I also bought out Pin 5 (GND) and Pin 4 (ID) from the Micro-USB Male end (which connects to Xolo) and have shortened them for OTG Host mode and open them for charging. I tried to put 47K resistor between above Pin 4 & Pin 5 hoping Xolo to switch to Dock mode and do the OTG Host + Charging function simultaneously but it didn't work.

In addition to above, I have not been able to use trackpad scrolling (horizontal and vertical scrolling) and multi-touch funcion to work so far, all works are single and double tapping and cursor movements.

OK, I made an OTG-cum-Charger cable by installing a way to short and open Pin 4 (ID) and Pin 5 (GND) so I have two-in-one cable for now. I can also install any resistor between above pins and will try to use 39K and 47K ones to see if Xolo charges while in OTG host mode (which is most unlikely as it requires kernel support)

However, I have got landscape mode locked as well as screen standby/ screendim so I am able to use dock for hours without recharging Xolo and in-between during pauses, I open Pin 4 & Pin 5 and Xolo charges off lapdock.

Edited by mmbika
Link to comment
Share on other sites

  • 3 weeks later...

Hi Zhiuming,

I am following your guide and following is pasted from your guide

"

5. Switch from Android to Ubuntu system:

Run su rooted shell, and create a directory as mount point (here is /system/sd) for Ubuntu partition:

mount -o remount,rw /dev/block/mmcblk0p2 /system

busybox mkdir -m 777 /system/sd

mount -o remount,ro /dev/block/mmcblk0p2 /system

Then you can use my startubuntu script to switch from Android to Ubuntu (I mount the first ext4 partition on microSD card here, please modify this script as you like):

http://pastebin.com/raw.php?i=9r21dR7L

I mount /mnt/sdcard directory in Android to /sdcard directory in Ubuntu, and mount /system directory in Android to /android/system directory in Ubuntu, so we can easily access data in Android from Ubuntu system

"

I, however have following confusion.

(1) I installed Link2SD and then removed it. But this gave me permanent access to ext4 partition on my SD card which is mounted as /data/sdext2. I can read and write to that (second) ext4 partition on my SD card via any file manager which is almost 10GB and identified as mmcblk1p2. I do not need to mount it via any script as it gets mounted by default. In such scenario,

(a) Do I still need to creat a seperate directory (such as /sdcard/sd) as mount point for ubuntu partition (as it always mounts at /data/sdext2 without any extra effort) or can I skip that step?

(B) When your guide referes to ext4 partition on SD Card as ubuntu partition, what does that exactly mean? For me whole ext4 partition is mounted as /data/sdext2 and I can access it, so how does it diffrentiate w.r.t specific ubuntu partition ...? Does it mean that I still need a directory named 'ubuntu' on it, i.e. /data/sdext2/ubuntu?

© Your guide referes to copy Lbuntu12.04 files to ubuntu partition, i.e. ext4 partition on SD Card (in my case it will be copied to /data/sdext2). While Lbuntu12.04 has multiple files with one Lbuntu.vmdk file, does it ean that your script directly mounts a VM Ware virtual image?

I am confused here as Lbuntu12.04.vmdk is neither an .img file nor an .iso file. Without any real android compatible VM Ware virtual machine running, does the startubuntu script mounts Lbuntu.vmdk VM Ware virtual image? I am missing something here so more details are much appreciated.

(d) Guide refers that other ubuntu distros/images/versions can also be used. If I put ubuntu12.04.img or ubuntu.iso file in the root of ext4 partition will startubuntu script still work? Do we still need to make an 'ubuntu' folder on ext4 partition (as whole partition is supposed to be an ubuntu partition) and than put files in that 'ubuntu' folder or do can we put all files directly into the root of ext4 partition on SD Card? (because it is by default an ubuntu ext4 partition)

(e) Does it differentiate between desktop ubuntu distros (x86 and x64 ones..32bit and 64 bits) if I were to use them as image/iso files?

Any help appreciated, please.

Link to comment
Share on other sites

Guest Zhiming Zhou

u can modify defines (mount point and partition number) in my script to suite yours:

MNT_PATH="/system/sd"

DEV_PART="p1"

to

MNT_PATH="/data/sdext2"

DEV_PART="p2"

my script doesn't mount vmdk file, u can put your sd card in windows or linux to copy files in vmdk to sd card

1. in windows u can run a sepeate VMWare linux virtual machine (like Ubuntu) to copy files in vmdk to sd card

or

2. in linux and direct use vmware-mount tool to mount vmdk file, and copy files to sd card

other linux distribution images I mean is rootfs image (contains all installed files like vmdk),

not ubuntu.iso install CD image (normally readonly), so previously we need to copy all files in vmdk to sd card

if u already have a installed i386 linux, u even can direct copy all files in linux partition to your sd card

and if u have a installed linux rootfs image (normally loop image), u can modify my script to mount it

and the last point, because XOLO X900 only runs x86 kernel, u can't use x64 linux image

Link to comment
Share on other sites

Thanks, Zhiming

Unzipped Lbuntu1204 contains:

Lbuntu-s001.vmdk...to..Lbuntu-s021.vmdk (21 files), Lbuntu.vmdk, Lbuntu.vmsd, Lbuntu.vmx, nvram and readme.txt (one file each)

Previously I confused that it was just required to put above 25 files on ubuntu partition.

Link to comment
Share on other sites

Guest Zhiming Zhou

Thanks, Zhiming

Unzipped Lbuntu1204 contains:

Lbuntu-s001.vmdk...to..Lbuntu-s021.vmdk (21 files), Lbuntu.vmdk, Lbuntu.vmsd, Lbuntu.vmx, nvram and readme.txt (one file each)

Previously I confused that it was just required to put above 25 files on ubuntu partition.

use another VMware linux or use vmware-mount in Linux, copy all files in vmdk (20 files are snapshot, actually one vmdk file) to sd card

and done, haha ^_^

Link to comment
Share on other sites

use another VMware linux or use vmware-mount in Linux, copy all files in vmdk (20 files are snapshot, actually one vmdk file) to sd card

and done, haha ^_^

I followed this to t as well as tried two different micro-SD cards, partitoned whole card as ext4, partioned ext4 as partion1 and then as partition2 yet I am not yet able to boot into ubuntu.

It gives mounting erros and sucn and such directory not found etc... I guess it (script) is not creating the required directories/files correctly and with correct permissions or whatever it may be and secondly not being able to mount those required ones correctly on my Xolo.

Edited by mmbika
Link to comment
Share on other sites

Guest MrPuddington

Is it possible to run Ubuntu (x86) on an Android Virtual Device (AVD) with Intel Atom (x86) CPU Setting?

I believe so. The real question is: can you run Wine, and then maybe even Microsoft office? Or VMware with real Windows? Surely at some point this must get silly, but I am amazed at the potential of this phone.

Link to comment
Share on other sites

  • 2 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.