[HOWTO] Install LinuxOnAndroid distros on your sdcard's second partition. - Android General
Hello friends! I'm a year long follower of the LinuxOnAndroid project. I have always wanted to install ubuntu on my sdcard instead of using image files. I waited a long time for an instruction to crop up somewhere on the internet about how to do this, and in the meantime, learnt a lot of things. Then I decided to experiment with the idea a few days ago and also managed to get satisfying results. There was a significant performance boost compared to using a linux image.
While writing this tutorial, I have assumed that you are already quite familiar with the LOA project and that you have already managed to run a linux distro on your android device.
Please note that while this tutorial aims to be applicable for all distros released under the LOA project, I have only run Ubuntu 12.04 small, Ubuntu 13.10 small and Debian small images. I have never had any experience with the other distros. But I'm pretty confident that the instructions can be applied to other distros without any problem. If you encounter any problem while applying the instructions for your device and distro, I'm willing to help you as much as I can.
Warning: I've never bricked my android devices while rooting, modding or hacking them and I hope you will be as lucky. But please remember that I will not be held responsible for any damage or losses suffered by you or your devices while following the instructions given in this tutorial. You will do so at your own risk.
Let's begin.
First of all, Things You'll Need:
Root access on your android device
Busybox
An sdcard of optimum storage capacity. You decide what's optimum for your case. I have a 16GB card with a 4GB partition for ubuntu small image.
Init.d script support for auto-mounting second sdcard partition on boot. You can skip this if you want to mount the second partition only when booting up linux.
Attached zip containing bootscript.sh and 03ubuntu files.
Step 1: Partitioning the sdcard
WARNING: This will erase all data on your sdcard!
Use MiniTool Partition Wizard for windows, gParted for linux or aParted for Android to create the two partitions on your sdcard. I reccomend that you do the partitioning on your PC. Note that you cannot partition your sdcard by connecting your device to your PC my USB. You need to use a card reader. If you have a USB modem with built in card reader, you can use that too.
The first partition will be used by your android device for mass storage. Make it FAT32 or exFAT or vFAT. Note that if you make the first partition exFAT, custom recoveries like CWM will not mount it. This can cause problems, for example, when you are trying to restore a nandroid backup from your sdcard.
As for the format for the second partition (let's call it the linux partition), it depends on what linux filesystems your device supports. You can't use (ex/v)FAT(32). You can only use linux filesystem for installing a linux OS.
If you are using aParted to partition the sdcard, not every format will work. My tablet supports mkfs.ext2 and make_ext4fs but
Code:
mke2fs -t ext3/4
doesn't work. So I used aParted to format the second partition as ext2 and ran
Code:
make_ext4fs /dev/block/mmcblk0p2
in terminal emulator. So my linux partition is ext4. You need to unmount your sdcard to use aParted.
NOTE: Before creating your second partition, make sure your device is able to mount the format that you want to use. Run the
Code:
cat /proc/filesystems
or
mount
command in terminal emulator to check for supported filesystems.
STEP 2: Mounting the sdcard partitions
WARNING: If you are using the Link2SD app or any other app2sd app, you might be prompted to create mount scripts for the second partition. DO NOT CREATE THE MOUNT SCRIPTS. Our linux partition is not meant for app2sd.
In this tutorial, we will be mounting the linux partition automatically on startup. For this, you'll need init.d script support on your device. You can use Uni-Init to check/enable init.d easily. If your device does not support init.d and you've failed to enabled it, you could go for more advanced methods like unpacking your boot image and editing init.rc to mount the linux partition. You could also try the Script Manager app. You can also choose to mount the linux partition only when you boot up linux. Let me know if you'd like instructions for this.
Assuming that you already have init.d support, let us proceed.
Download the attached 03ubuntu script and using a root explorer copy it to /system/etc/init.d/here. I use ES File Explorer. Set file permissions to rwx-rwx-rwx or 777(? I'm not very familiar with numerical permissions). rwx-r-xr-x might also work. You can also use terminal to copy, set file permissions, etc. It's up to you.
EDIT: WARNING! Depending on your device, your MicroSD card might me mmcblk1. You can check using the mount command or from the aParted app. It is mmcblk1 on one of my friends' phone. If this is the case you must edit the 03ubuntu script to replace mmcblk0p2 by mmcblk1p2
The 03ubuntu script mounts the linux partition as ext4 at /mnt/ubuntu. The mount options in the script are meant for the maximum performance but may reduce reliability. I haven't had any problems yet. If your linux partition is not ext4, edit the script accordingly. Some of the mount options used in the script are meant for ext4 filesystems only. Google "best/optimum ext(whatever your linux partition is) mount options" to learn more. My linux partition is mounted with noatime option but becomes relatime sometimes after shutting down linux. Somebody please tell me why this happens.
{
"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"
}
After placing the script in the init.d directory, reboot your phone.
After rebooting, open the /mnt folder. If you see a folder named ubuntu, congratulations, the init.d script worked. But is the linux partition mounted? You can check by opening the /mnt/ubuntu folder. If you see a lost+found or LOST.DIR folder, the partition is very likely to be mounted. Confirm it by running
Code:
mount
in the terminal. Look for the line
Code:
/dev/block/mmcblk0p2 /mnt/ubuntu ext4 rw,noatime,user_xattr,barrier=0,data=writeback 0 0
If you see that line, we're ready to move to the next step.
STEP 3: Copying the files from linux image to linux partition
Now, we install your linux distro on the sdcard. Place the image (a fresh one or the one that you've been using) in your sdcard and run the following commands. Note: You might need to make changes to the commands according to your image location and format.
Code:
su
mkdir /data/local/mnt
mknod /dev/block/loop255 b 7 255
losetup /dev/block/loop255 /mnt/sdcard/ubuntu.img
mount -t ext2 /dev/block/loop255 /data/local/mnt
cp -dpR /data/local/mnt/* /mnt/ubuntu
## wait till copy is complete ##
umount /data/local/mnt
exit
So that was it. You have your favorite linux distro installed on your sdcard now.
But before you go ahead and press that BOOT LINUX button, we still have some things left to do to make it possible to boot from sdcard.
STEP 4: Editing the bootscript.sh and init.sh files
Actually, I did the bootscript editing part for you. I made all (and only) the changes that are required to boot from the sdcard. The modified bootscript is based on the latest (v8) version. Things like sdcard and external sdcard mounts and binds are unchanged. I added comments in the script with my name to mark places where I made the changes. You can look through it if you like.
So now copy the modified bootscript.sh file inside /data/data/com.zpwebsites.linuxonandroid/files/here and set file permissions to rw-------.
After that, comes init.sh. Although the bootscript is common for all distros, it may not be the case for init.sh. You'll find it in /mnt/ubuntu/root/init.sh.
Copy it to your sdcard and keep a copy somewhere safe. Open the script in a text editor (I use Jota+ text editor) and find the following lines and remove them.
Code:
if [ $# -ne 0 ]; then
cfgfile=/root/cfg/$1.config
if [ -f $cfgfile ]; then
echo "Using config file $cfgfile"
else
echo "Config file not found, using defaults!($cfgfile)"
fi
fi
The original permissions for the init.sh file are rwx-rwx-rx
After that, place the modified init.sh file back inside /mnt/ubuntu/root/here and don't forget to set correct file permissions.
STEP 5: Final steps and booting linux
Everything is in place and now you can boot up your linux, or can you? Nope. The Complete Linux Installer app won't let you boot if it does not find an image file.
For this, create an empty file inside /mnt/ubuntu/here and name it ubuntu.img.
In the app, enter the location of linux image as /mnt/ubuntu/ubuntu.img and tap on the awesome boot button.
Voila! You've now successfully installed linux to your sdcard and managed to boot it up too! Well done, my son.
Aaaand...Just a reminder: Don't Update Script if you want to continue booting from thee linux partition.
If you have been successful in achieving the goal of this tut, please leave a feedback with your device name and any modifications that you had to make, if any, to the whole process. That will be of great help to others.
EDIT: RISK OF DOUBLE BOOTING!
In case of booting from linux image, when you (accidentally) tap on the boot widget or the boot button while linux is already running, the app would display a confirmation dialog to chroot into the mounted image. This may not happen when you are booting from the second sdcard partition.
To prevent errors when you accidentally tap on the boot widget/button, add the following code into the bootscript right after the error_exit() function at the beginning of the script.
Code:
echo "Boot up Linux? Make sure it is safe to boot before proceeding!"
read answer
if [ $answer != muchfunny ]; then
error_exit "Aborted"
fi
Replace "muchfunny" with y or yes or any word of your choice.
When you try to boot, you'll have to enter this word to proceed. If you type in the wrong word, it won't boot. This way, you will have a chance to prevent errors when you accidentally tap on the boot widget while linux is already running.
Any user of LOA, not just those who are booting from linux partition, can benefit from this. You could replace "muchfunny" with a secret code to prevent anyone from messing with your linux installation. So it's like implementing password protection.
I'm using this on my tablet.
hello david,
Looks nice and clear, haven't had the chance to try yet but will post my results when i do.
Just wanted to say big thanks for the write up.
Sent from my Nexus 7 using Tapatalk 2
joesnose said:
Looks nice and clear, haven't had the chance to try yet but will post my results when i do.
Click to expand...
Click to collapse
When you do a factory reset in CWM (probably also in other recoveries), the second sdcard partition is wiped.
So it's best to store the backups in the internal sd and remove the sdcard before performing a reset.
If you don't already know, and if you have not run "apt-get clean", you can back up any packages that you downloaded on ubuntu (if you're using it) by keeping a copy of the contents of the archives folder in /var/cache/apt/. In case your linux installation gets corrupted or the partition gets wiped, you can restore the backed-up packages later. So you won't have to download them again.
I have used this thread to install Archlinux using LinuxonAndroid on a Samsung Epic 4G's SD card. I have some issues to sort out with using VNC to access the Archlinux installation but the commandline environment on the Epic 4G works fine.
If you're trying to use this with Ubuntu, there are several issues. First, the image hosted by the LoA project for Ubuntu 13.10 doesn't work for this application: you'll get errors when you try to mount the image for installation to the SD partition. Second, you might try the 13.04 image: it will mount and install but the repositories are all gone because 13.04 is no longer supported.
If you're trying to install this in order to use a specific program (in my case, I'm wanting to use this device as a Prosody server), it's probably best to see which available distro hosted by LoA has up-to-date packages for that program and use that to guide your decision. Based on this logic, I chose Archlinux.
If you aren't using Ubuntu, the bootscript.sh file included with this post becomes problematic as it is littered with Ubuntu-specific calls. It isn't overly difficult to edit: open it in Notepad+ (or similar) and read through it, changing $mnt and $ubuntu to whatever you've named your partition mount folder as. In my case, my mount folder is /archlinux/ and the fake image file (used to spoof the LoA app as detailed in OP's post) is /archlinux/archlinux.img, so this meant simply replacing $mnt and $ubuntu with $archlinux. There are a few instances of $ubuntu that I didn't mess with--in the comments, David has mentioned that they refer to the "usermounts feature" and that he left these alone because he didn't understand it. Are these the usermounts that are defined in the LoA app? I don't know and I haven't tried defining a mount yet (such as partition 1 on the SD card). In short, bootscript.sh will need to be edited to account for a non-Ubuntu installation.
(If you're using Archlinux, LoA hosts a modified bootscript.sh that contains a Archlinux-specific change to mounting /dev/pts, whatever that is. I used this as a base script to work with, then added and deleted the areas that David has edited in his bootscript.sh.)
Accounting for the differences, Archlinux works at the terminal on the device. However, if you try to connect to the automatically configured VNC server, things start to get weird for a Linux noob (which I am). For starters, there isn't a desktop environment defined so when you first connect, you're gonna see a blank gray screen and a cursor. Right-clicking brings up a menu. Almost none of the apps on the menu work, because they aren't installed. I think what you're looking at is the openbox window environment. What you need is a terminal to install something that works better but here's the catch: the terminal isn't installed/working, either (in VNC, not at the device). What I did here might have been a mistake compounding an error: I used the terminal on the device (which is logged in as root) to install a desktop environment using Archlinux's package manager, pacman. Then, I edited the (hidden by default) /home/$yourinstallhere/.vnc/xstartup.sh to boot the installed desktop environment; add a line with the command appropriate to your chosen DE: e.g. gnome-session; startxfce4; startlxde. You can comment out most anything else as those lines are loading the openbox environment and a terminal session. Alternatively, leave those in place as a backup environment and place your DE load command after those, so if your DE doesn't load, you still have the nearly useless gray screen to look at.
Okay, so that got a DE going (after the xstartup script was executed again and possibly the Linux install rebooted). Now what? Well, as mentioned before, terminal still doesn't work. It will open but there isn't a prompt and no keyboard input is shown. Without terminal, Linux is crippled, DE or no DE. This is where I am currently. I can still manage the Archlinux installation from the device's terminal as root but access from VNC is effectively unusable. I don't know why: is it because the DE packages (including a terminal emulator) were installed by root and therefore the VNC user doesn't have the permissions to access them?
In any event, I would like to thank David for posting this thread. The LoA project has little to no documentation or discussion so this has been very helpful to me. Please let me know if you have any ideas regarding VNC access of the installation.
Edit: Additional installation-specific information:
My Epic 4G is running the Cyanogenmod 10.1 stable release. The init.d mount script for the second partition will not automatically run at boot, despite CM supporting init.d and having installed the Universal init.d app. However, the script can be manually executed from within the Universal app and that will mount the partition. I tried adding a 50-second sleep to the script to see if it was just bogging down but that had no effect so I gave that idea up. The test script that the Universal app uses to test if the device has init.d support also doesn't work, which indicates that the Epic 4G CM port may be at fault here.
Using Archlinux's systemctl to manage services from the root terminal on the device is not working as expected. For instance, if I try to restart the vncserver service (systemctl restart vncserver) the terminal returns, "Running in chroot, ignoring request."
Edit #2:
Installed xterm from the device terminal and now I can access xterm from VNC /facepalm (why does the xstartup script call something that isn't installed by default?).
When my device's screen powers off, the VNC session drops because the server apparently kills itself. I have Android set to keep wifi on during sleep. How do I keep VNC active while the device's screen is off?
I seem to have succeeded with having my Epic 4G run an XMPP server (Prosody) within Archlinux on Android. I don't want to take this thread too far off-topic but there were some aspects to my project that would be useful to know for someone installing LoA.
http://sourceforge.net/p/linuxonand...do-users-and-groups-work-under-linuxonandroid
https://android.googlesource.com/pl...r/include/private/android_filesystem_config.h
This is pretty key knowledge to know if you're going to install anything that's going to need to gain control over the Android hardware (e.g., opening sockets). Root at the terminal is probably in all of these groups but the default user (ubuntu or whatever you named your installation) might not be; if your software installs its own user, it definitely won't have these group memberships so you'll have to add them. In my case, Prosody creates its own user and group and refuses to run as root, so I had to give the Prosody user membership in the 3003 group so it could open listening ports (I also had to modify all of the files that should have belonged to Prosody with chown because root took ownership by default). I figured this was something to keep in mind, if you're a fellow Linux noob.
http://forum.xda-developers.com/showthread.php?t=1585009&page=24
Speaking of the "everything as root" problem, I came across this that purports to make the default ubuntu user more typical of what you'd encounter in a Linux distro. I haven't tried it yet but I may need to in the future, if I expand the services offered by my Epic 4G. I still haven't figured out why the VNC server drops when the screen is turned off, though; I probably need to switch servers. The default is xVNC and I have been using Win7 x64 TightVNC Viewer to access it.
Hello there! Thanks for your posts! After encountering problems while trying to get LAMP to run on Ubuntu 12.04 and 13.10, I had given up LoA, until today. I've been using Linux Deploy instead for the past few months. Everything works fine on it. Have you tried it?
Anyway, I've decided to install LoA Debian as image from now. I think dedicating a 4 GB partition to a Linux installation is costly when you have just 14.7 GB of available storage.
Hello David,
I gave up on Linux on Android because I couldn't get it to stay connected to wifi with the screen off. I went back to using an XMPP server on my OpenWRT router instead.
Thank you for the suggestion regarding Linux Deploy. If I have some time, I will try it.
Does your LAMP stack manage to stay constantly connected with the screen off?
hammmy said:
Hello David,
I gave up on Linux on Android because I couldn't get it to stay connected to wifi with the screen off. I went back to using an XMPP server on my OpenWRT router instead.
Thank you for the suggestion regarding Linux Deploy. If I have some time, I will try it.
Does your LAMP stack manage to stay constantly connected with the screen off?
Click to expand...
Click to collapse
Linux Deploy has options to keep screen on and to keep wifi on while the app is running. I'm not sure if this will help with accessing LAMP when the screen is off. BTW, I found other problems with LoA Debian. So I'm back to Linux Deploy Debian. I'll test LAMP with screen off and let you know how it goes.
Instead of running the web servers through a linux installation, I suggest you try the various web server apps available for Android, if you haven't already, that is. I use Palapa Web Server which is free and has a nice interface.
Unfortunately I was unable to get Apache to work. Anyways, like I said, the Android web server apps might best serve your needs.
davidheis said:
Instead of running the web servers through a linux installation, I suggest you try the various web server apps available for Android, if you haven't already, that is. I use Palapa Web Server which is free and has a nice interface.
Click to expand...
Click to collapse
This is a good suggestion but unfortunately the XMPP server apps that I've tried didn't work out. I don't recall exactly why as it's been awhile since I tested them. They are bare-bones and lack configuration options.
hammmy said:
This is a good suggestion but unfortunately the XMPP server apps that I've tried didn't work out. I don't recall exactly why as it's been awhile since I tested them. They are bare-bones and lack configuration options.
Click to expand...
Click to collapse
Oh, okay. I highly recommend Linux Deploy as the distros are downloaded directly from the official sources. Installing to a second partition is very easy too. And it also allows running of custom scripts during startup of your distro. So if you manage to have XMPP working, you won't have to open a terminal to start the service (which is necessary for apache - have to run "service apache2 start").
Let me know if you have any success with Linux Deploy. I may be working with XMPP in the near future, so having a 'take anywhere' server might prove very useful.
Hello David can you make a brief guide on how to install Kali on sdcards second partition. I'm stuck I don't know how to install the linux.IMG on the ext2 partition, I partitioned my SD card using minitool the problem is when I hit install on Linux deploy the IMG will be installed on the SD card but on the fat32 partition not the ext2, which is the path to ext2 ? I can't find it using file explorer maybe you can help me
EDIT: i need to mount the new ext2 partition right? which is the easiest way to do it?
hi... can you provide me a method to access the filesystem (eg. var, etc....) because in the old ubuntu version is no longer supported. i got 404 not found when try to get update(apt-get update). only one solution is modify etc/resource.list file....but ubuntu cant access the filesystem via termimal
Cifs mount on start? I've added it to fstab and mount -a works fine, but it seems that fstab is not being run on start-up? I tried adding the same line I used in fstab to the custom mount points but it does not like it "skip"' it's probably simple syntax, the mount cmd seems to change dep. on where you run it, anyone know the right way to get a cifs mount on start in ld? thanks..
this is what works in fstab/mount -a
//192.168.1.65/media/Cifs /Public/Video cifs username=user,password=pw,iocharset=utf8,file_mode=0777,dir_mode=0777,noperm 0 0
Well hello everyone.
I am going to try this now cause Linux deploy failed for me and it also messed up my external sd card (cause my xperia e3 doesn't have that Much internal).
Then i tried complete linux installer normal installation method but that also didn't worked so now i am going to try this.
I know this thread is very old but that's my only chance left for installing Ubuntu in phone
If anyone can provide any advice or any guidance i will be grateful to him
Thanks In Advance
Related
[Wiki] Google Andriod for Herald and Tmobile Wing
{ "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" } This thread was created to make it possible to run and use Android on our devices. What is Google Android? Android is a software stack for mobile devices that includes an operating system, middleware and key applications. Androids Architecture We need all the help we could get to make this work Other threads on Google Android Google Android for Kaiser!! Linux and Android for Vogue Other helpful Links Android on OMAP thanks to mswiss http://it029000.massey.ac.nz/vogue/
This is the version that still has root access to the OS which makes it possible to edited the rom with-in the rom, thats if we get it ported first of course. Also I dont have the tools right now to take apart the .nbh and rip it apart so if any can please do. The link is below. DREAIMG.NBH This popped up a week ago its the Orange France RUU update for the french G1 Could a kitchen be made out of this?? RUU_DREAM VIA:imfloflo
This thread will remain open for any advancement of android getting ported onto the wing. PLEASE REPORT ALL ISSUES TO THE ORIGINAL THREAD!!! Visit darkstar62's thread (click here) for he has really gotten far with ported linux onto the wing. darkstar62 said: I've developed a kernel and base linux system suitable for installation on the HTC Herald / T-Mobile Wing series of phones. This image is for installation of a root filesystem directly to an SD storage card (no need for a root FS image). Several things don't work so far -- this is early development. But it's enough to play with. My hope is that we can use development on this as a jumping point for getting Google Android to run on the wing. UPDATE (2/10/09): I've added a Resources section to collect the useful information and links that have been posted here and in the other thread. I've also updated the known issues section for Android to reflect what I've discovered so far. UPDATE (2/9/09): I've got an updated kernel config and images for starting Android now! Android will now pull up the boot animation and begin startup. It still does not complete startup, but at least we know we've got the right stuff in the kernel now! I've added instructions at the bottom for installing these and using them with an already set up linux system (per the first set of instructions). UPDATE (2/7/09): Here's some extra files you can grab if you're interested in development: (The patches don't apply cleanly yet against the linwizard kernel) Kernel .config file I've used (against the linwizard 2.6.25 kernel): http://dl.getdropbox.com/u/198699/linux_wing/wing_config Android diffs (between SDK android kernel and kernel.org 2.6.27 kernel): http://dl.getdropbox.com/u/198699/linux_wing/android-2.6.27.patch Contents Part 1: Linux Base System Installation Instructions Part 2: Android Installation Instructions Resources Part 1: Linux Base System Installation Instructions: The below instructions assume you have access to Linux and can read/write to your SD storage card. To start out with, here's what you'll need: Haret + default.txt + kernel (.zip, 1.4mb) Root filesystem contents (.tar.gz, 13.1mb) 1. Repartition your SD card. For this, you'll need to use something like Partition Magic or some other suitable partitioner (in Linux, you can use gparted to resize your Windows partition.) I recommend the following layout: Partition 1: Primary, FAT16 or FAT32 containing your original Windows files (any size of your choosing) Partition 2: Primary, Linux Swap, 128mb Partition 3: Primary, EXT3, >=64mbMy linux partition is 650mb with a 1.2gb Windows partition and 128mb swap -- adjust to preference.2. Format the swap and linux partitions. In linux, run the following: (I assume your SD card is /dev/sdb -- adjust if different) Code: # sudo mkswap /dev/sdb2 # sudo mkfs.ext3 /dev/sdb3 I'm assuming the layout in step 1 as well. 3. Mount the new Linux partition. Run the following: Code: # sudo mount /dev/sdb3 /mnt 4. Copy the base linux system into the new Linux partition. Save the root filesystem .tar.gz file from above to somewhere (I'll assume $HOME). Then run: Code: # cd /mnt # sudo tar -xzvf $HOME/rootfs.tar.gz # cd .. 5. Unmount the linux partition. Run the following command: Code: # sudo umount /mnt 6. Mount the windows partition and copy the Haret executable + kernel. I'll again assume you saved the "haret+kernel.zip" file to $HOME. Run the following: Code: # sudo mount /dev/sdb1 /mnt # cd /mnt # mkdir linux # cd linux # sudo unzip $HOME/haret+kernel.zip # cd / # sudo umount /mnt At this stage, your Linux base system and kernel should be installed. All that's left is to remove your SD card and re-insert it into your phone, start up HaRET and enjoy. 7. Log in Once you're booted into Linux, you can log in with: Username: root Password: wing Plug in a USB cord to log in on your laptop. If your laptop runs linux, you'll need to make sure that the usb0 network interface has the right address: Code: # sudo ifconfig usb0 10.100.0.2 up The phone's address will be 10.100.0.1. You should be able to SSH or telnet in to the phone and mess around. Run "startx" to bring up X and such. What's Working Minimal X server capable of landscape and portrait video modes (KDrive, using the framebuffer (omapfb)) Touch screen support + calibration software (TSC2046 driver + tslib) Console keyboard (some characters are difficult / impossible to type due to the limited key layout and driver) USB gadget support for connecting with my laptop (I can SSH / telnet into the phone, or ssh/telnet from the phone into my laptop) Full access to the SD card (even the Windows FAT side -- mmci-omap driver) Known Issues Bluetooth -- haven't been able to get a working driver, or anything to even recognize that it exists WLAN -- same as bluetooth GPRS / Phone -- same. There appears to be a GSM device, but I haven't been able to do anything with it. Most of the extra buttons don't fire any events LEDs for the most part don't work Battery and power stats aren't available, as well as power management No control of the backlight or display power Sound not functional -- don't have any drivers / software compiled for sound, so I don't know if this would work or not No real time clock (RTC) functionality Part 2: Android Installation Instructions: For these instructions, the recommended procedure is to copy the files you'll need to the Windows side of your SD card and install using the Linux boot system. Make sure you follow the instructions for getting a Linxu base system installed first before following this. First off, grab the following files (Required) Android patched kernel for the wing (same as the below kernel, but with android patches): http://dl.getdropbox.com/u/198699/android/zImage2 Android root filesystem, compiled for the wing: http://dl.getdropbox.com/u/198699/android/root.tar.gz Android /system partition, compiled for the wing: http://dl.getdropbox.com/u/198699/android/system.tar.gz Script for starting Android: http://dl.getdropbox.com/u/198699/android/start_android You can also grab the kernel config file if you're interested in building the kernel (I'll have the android patch set available soon) (Optional): Kernel .config file for the modified kernel: http://dl.getdropbox.com/u/198699/android/kernel_config 1. Copy all files to your wing From Windows Mobile, download the 4 required files above and place them on your storage card: root.tar.gz -- Place in /Storage Card/ system.tar.gz -- Place in /Storage Card/ zImage2 -- Place in /Storage Card/linux (overwrite the file that's already there, or re-name the original first) start_android -- Place in /Storage Card/ 2. Install Android Run HaRET.exe to start Linux. It should boot the new kernel (you most likely won't notice a difference). Once in Linux, run the following commands (you can do it directly with the wing keyboard, or you may elect to use SSH (see instructions above) -- SSH is easer in my opinion): Code: # cd ../.. # mkdir android # cd android # tar -xzf ../mnt/windows/root.tar.gz # tar -xzf ../mnt/windows/system.tar.gz # cp ../mnt/windows/start_android ../bin # chmod 775 ../bin/start_android If using the Wing's keyboard, you'll need to use the following key mapping: '/' --> 'Tab' '-' --> 'Alt + x' '_' --> 'Alt + c' (I think -- it's Alt + one of the letter keys) Numbers -> 'Alt + <top row>' 3. Start Android At this point, android is now installed and ready to run. Simply execute the following command to start Android: Code: # start_android After a few seconds, you should see the Android startup animation appear.Known Issues The omapfb driver currently in use does not support page flipping, preventing the Android GUI from being displayed Resources WMStorage -- turn your wing into a USB SD card reader (Kudos to Kuff!): http://forum.xda-developers.com/showpost.php?p=3263023&postcount=5 Wing Service Manual (kudos to drmidnight!): http://forum.xda-developers.com/showpost.php?p=3291171&postcount=132 Google Andriod for Herald and Tmobile Wing -- the thread that started it all: http://forum.xda-developers.com/showthread.php?t=398830 Enjoy Click to expand... Click to collapse Thanks EDIT: Added darkstar62's most current update (2/10/09) EDIT: Added Wing Linux 0.3 pre3 instructions. Thanks to darkstar62
Current Status Bluetooth -- haven't been able to get a working driver, or anything to even recognize that it exists WLAN -- same as bluetooth GPRS / Phone -- same. There appears to be a GSM device, but I haven't been able to do anything with it. Most of the extra buttons don't fire any events LEDs for the most part don't work Battery and power stats aren't available, as well as power management No control of the backlight or display power Sound not functional -- don't have any drivers / software compiled for sound, so I don't know if this would work or not No real time clock (RTC) functionality Can anyone take photos of these stages. I would love to post them here. Thanks
Good idea. Wondered when someone will come up with it....BUT the main problem will be to port the GSM over...think until now they didn´t succede - did they? Good luck
i think the first thing we should look at is porting linux over to the wing then go from there
BUT another thing that i don´t understand...correct me... WE can only run Android like a VM on a PC. First XDA boots WM6 and then starts an image from android...so it is more like an application running under WM?? And will there be a time where we can delete WM??? thx
we can delete WM when we have a full set of drivers for android And linux- i've never understood people's compulsion for linux. Sure it's opensource and therefore free, but that does not automatically make it better.
fzzyrn said: we can delete WM when we have a full set of drivers for android And linux- i've never understood people's compulsion for linux. Sure it's opensource and therefore free, but that does not automatically make it better. Click to expand... Click to collapse True true free doesnt make it better but atleast it gives us varieties...instead of just WM we could linux(android) also.
papamopps said: Good idea. Wondered when someone will come up with it....BUT the main problem will be to port the GSM over...think until now they didn´t succede - did they? Good luck Click to expand... Click to collapse yeah i think its in that stage for now but imagine if we could make a very Clean rom and cook android into it and make it start at startup we could have it running and a decent speed
I think we can have android running as soon as we complete the "linux kernel" part of the dev roadmap along with the runtime. At this point, android would be "running" but not functioning
alright cool, you guys go work on the linux kernel and ill go.... drink this soda
fzzyrn said: I think we can have android running as soon as we complete the "linux kernel" part of the dev roadmap along with the runtime. At this point, android would be "running" but not functioning Click to expand... Click to collapse how could we get this started? im willing to try anything right now
you would probably need a coder. I haven't read much about android, but you could probably port over WM6 drivers (depending on programming language?)
fzzyrn said: you would probably need a coder. I haven't read much about android, but you could probably port over WM6 drivers (depending on programming language?) Click to expand... Click to collapse I don't think that that will work. I think that you need to start with the basic linux drivers and see if you can port them to mobile. And yes, you would need a coder for that. And sorry to say, that isn't me. But, it t-mobile gets the diamond/whatever they're going to call it, I think that I will be first in line.
N3xt2N0N3 said: yeah i think its in that stage for now but imagine if we could make a very Clean rom and cook android into it and make it start at startup we could have it running and a decent speed Click to expand... Click to collapse Perfect reason for an Just2Clean variant! lol
WM6 are hardly running on our 200 MHz OMAPs and you want to put another OS on top of it? Laughing out loud.
CommZ said: WM6 are hardly running on our 200 MHz OMAPs and you want to put another OS on top of it? Laughing out loud. Click to expand... Click to collapse are you serious? hardly running? its sometimes (quite often to be honest) faster than qualcomm 400mhz... (most of users are still believers of MHZ GOD... ).
I know how fast my machine is. It is often annoyingly slow.
these days, frequency doesn't matter as much as FSB does! But anyway, you would definitely have to write your own drivers, which makes android porting more the responsibility of the manufacturer than of the end user
Ubuntu / Backtrack on Android [Complete Solution]
This guide had been on the Thunderbolt forum for quite some time and I decided it was time to share with the rest of the community Having reviewed almost every other option I can safely and honestly say this is the most simplified, thorough, and customizable install available since its original launch. I will gladly retract this statement when it becomes false, but until then... Installing Ubuntu onto Thunderbolt/Droid/Droid2/Etc: Create a folder on the sdcard named ext2ubuntu, which is /sdcard/ext2ubuntu when listed in terminal or adb Required files for Ubuntu install: Ubuntu.sh http://db.tt/KgDNlMtb Custom Packages for AutoConfig: Coming soon You will also want to download either an ubuntu image or archive. The major difference is that the image must be the same size as your ubuntu installation, so they are larger downloads, or need to be resized before you use them. Ubuntu Prebuilt tar and img downloads: (img: Extract only ubuntu.img and place in /sdcard/ext2ubuntu) (tar: Rename, if desired, and put archive in /sdcard/ext2ubuntu) 10.04: http://android-cruft.googlecode.com/files/lucid-on-android-0.1.tar (This image DOES need to be resized, see next post) 10.10 img: http://www.megaupload.com/?d=56AT71WD (This image file does NOT need to be resized) 11.04 tar: http://db.tt/fuzoy8Te Backtrack img: http://bit.ly/kJweA9 Borrowed from http://forum.xda-developers.com/showthread.php?t=1146255 (This image file does NOT need to be resized) How to build your own Ubuntu Image: http://androlinux.com/android-ubuntu-development/how-to-build-chroot-arm-ubuntu-images-for-android/ Notice: The ubuntu mount folder is symlinked to /system/sd-ext allowing access to it there also. First off you should have a running ubuntu install on your computer or at least a live cd running to create the ext2 partition. Use gparted to add a 4gb (or whatever size you want) ext2 partition to your sdcard. I did this while the phone was mounted in disk drive mode, so you dont need to take the card out. Ubuntu: Get gparted in synaptics or in terminal enter: Code: sudo apt-get install gparted Widows: *Paragon Partition Manager* If you do not need to partition, skip this step. Use adb to run /sdcard/ext2ubuntu/ubuntu.sh Code: adb shell su sh /sdcard/ext2ubuntu/ubuntu.sh Or from terminal (only supported on some ROMs) Code: su bash /sdcard/ext2ubuntu/ubuntu.sh All required scripts will download and install themselves automatically. Currently only ubuntu.sh and the chosen ubuntu image need to be placed in /sdcard/ext2ubuntu for proper install. Scripts include an autoupdate feature that will also keep them current. Follow the instructions and select the appropriate options for your system configuration and download choices. You can now open terminal and type "bootubuntu" to test install A new Sdcard Direct option was added allowing user to replace the installed scripts with a unified "ubuntu" command that runs the scripts directly from the sdcard. This option was offered due to the frequency of updates to allow the user to simply replace the files in /sdcard/ext2ubuntu with newer versions that would run without any further steps. If you get a localhost prompt, you are in but still need a couple things to move past command line. Here is where we part from borrowed and modified instructions that recommend lxde and ice and all the dinky handheld ubuntu shells, and move to the Thunderbolt method. Update vs Restore scripts: Update will base what scripts are put in system on the ones currently there, while restore determines what scripts are currently available on the sdcard. For automatic installation of ubuntu applications, you will want to enter these commands next: Code: su backubuntu 4 Choose your options To view your ubuntu desktop, you will want a vnc viewer for android. I use real vnc, but android-vnc-viewer is free and has all the same features (i just liked the layout of realvnc) The address for ubuntu is 127.0.0.1 The port is 5901 The password is the tightvncserver one you set. i recommend making a folder named android in "your mounted ubuntu folder"/home/ for your personal files since /root is your local folder, but causes permission issues. From your new ubuntu you can use synaptics and download eclipse there, but it can also be downloaded from the localhost prompt using "apt-get install eclipse" I also recommend downloading the android-sdk. To run the sdk from the localhost prompt, simply cd to the android-sdk directory and issue the command: Code: tools/android update sdk -u -s and if you want to specify the downloads performed add Code: -t [specific items such as platform, platform-tool] If you need help with any commands you can add Code: -h to your existing command The htc kitchen can be downloaded from ubuntu using the same instructions found: http://forum.xda-developers.com/showthread.php?t=633246 After it is installed, you have the option to launch this kitchen either from inside your ubuntu install, or from the localhost prompt, which avoids having to run vnc to use it. A compiler toolchain is available http://www.codesourcery.com/sgpp/lite/arm by choosing download the latest release. I use gnu/linux even though it seems to be eabi included in the android source, but I have never used it to be sure. I have been told this one is a lot easier to use anyway. I recommend backing up the ext2 once everything is done. This can be done by (entering "exit" at the localhost prompt and then) entering "backubuntu" in terminal. backubuntu can also update newly downloaded scripts without having to use root explorer or worry about permissions. Just put any new versions in your sdcard/ubuntu folder and select the update option. This replaces the ubuntu2.img with your backup so you dont have to "apt-get" everything over again. This will also save your tightvnc password so make sure you remember it. Sent from my ADR6400L using Tapatalk
Screenshots: https://picasaweb.google.com/110545...authkey=Gv1sRgCLDd48n2oMWzpAE&feat=directlink References: Personal insanity and the inability to accept whats already available http://code.google.com/p/android-cruft/wiki/LucidWithAndroid http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-android/ http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-android/ http://forum.cyanogenmod.com/topic/15702-ubuntu-on-your-g2-anyone/ http://forum.xda-developers.com/showthread.php?t=633246 http://www.codesourcery.com/sgpp/lite/arm http://forum.xda-developers.com/showthread.php?t=987740 http://androidclone.com/forums/showthread.php?tid=23 Sent from my ADR6400L using Tapatalk
Using Debian binaries instead of busybox (Yes you can!)
Yes, it is possible to use Debian (or any other ARM based distribution) binaries instead of busybox. These devices have plenty of horsepower, and a fair amount of space on them. There should be enough room to get proper versions of command line apps baked in NOTE: This is a PROOF OF CONCEPT. Do not attempt unless you are familiar with linux, chroot, and are fine with potentially screwing up your phone! Frankly, I got tired of the limited feature set and compatibility issues that come with busybox. So, I decided to see if I could come up with something better... all it took was a free app from the market, 4 GB carved out of my SD card, and a little bit of time. I've played a bit with chroot (mostly using the "Linux Installer" app): https://market.android.com/details?id=com.galoula.LinuxInstall&hl=en My SD card has a 4GB SD-EXT partition on it, formatted as EXT4, and then a FAT32 partition. I have my phone set up to never unmount the SD-EXT partition. And, since I'm using ICS, it's not using that partition for anything yet anyways. In any case, to save a whole lot of trouble and deal with potential corruption issues, I set up the linux chroot to use a folder instead of an image. This turned out to be handy, because I can access files and play around with bind mounts much more easily than I can with an image file. Right now I've got Debian Stable installed using chroot to my SD-EXT partition. After getting to a Debian prompt, I updated apt: apt-get update apt-get install build-essential Now we have a fully working GCC environment to use. However, the environment that Linux Installer provides comes with most tools already at your disposal. Now what? I don't want to have to chroot to use these utilities. That's a waste of my time Here, we have two options... one is somewhat easy, and one is really easy. These are not statically compiled applications, so we do need a few libraries. To replicate the functionality of busybox (and so much more), you really only need about 15 of them. ---------------------- THE REALLY EASY WAY ---------------------- The really easy way to do this is to bind mount the following folders from the "chroot" (in my case it's /sd-ext/linux) to the root of the android device: /bin /lib /usr /sbin I'm writing this from memory, but I believe (off the top of my head) the proper command is: busybox mount -o bind,rw /sd-ext/linux/bin /bin busybox mount -o bind,rw /sd-ext/linux/lib /lib busybox mount -o bind,rw /sd-ext/linux/usr /usr busybox mount -o bind,rw /sd-ext/linux/sbin /sbin Please correct me if I'm wrong (and this is assuming that your chroot environment is in /sd-ext/linux On some devices, /bin and /sbin already exist. Deal with that however you want. Now, all you have to do is: EXPORT PATH=$PATH:/bin:/usr/bin:/usr/local/bin:/sbin If you've done it properly, you can shut down your chroot environment, go to /bin, and run ./ping 8.8.8.8 If it doesn't work, you screwed up somewhere (or I did!). ---------------------- THE SOMEWHAT EASY WAY ---------------------- On the android side, make the following folder structure: /bin /lib /sbin /usr /usr/bin /usr/lib /usr/local/bin Also, set your path so you can actually use the programs: EXPORT PATH=$PATH:/bin:/usr/bin:/usr/local/bin:/sbin Now, let's say we want to have Debian's version of 'ping' without having to chroot. Do the following: Pop into your chroot environment, head into the /bin folder, and run the following command: ldd /bin/ping This will tell you what shared libraries ping uses. In my case, it uses: /lib/libgcc_s.so.1 /lib/libc.so.6 /lib/ld-linux.so.3 Pop back over to the android side, and run the following commands (assuming that /sd-ext/linux is your chroot environment, and adjusting as necessary for the libraries that are actually used by the program you are attempting to make work) cp /sd-ext/linux/bin/ping /bin cp /sd-ext/linux/lib/libgcc_s.so.1 /lib cp /sd-ext/linux/lib/libc.so.6 /lib cp /sd-ext/linux/lib/ld-linux.so.3 /lib Now type: /bin/ping You will get either get an error message about a shared library, command not found, or (if you're lucky) the Debian version of ping. If you're not so lucky, i'd suggest copying over /usr/bin/ldd from the debian side and using it to figure out (on the android side) which libraries you're missing. ***HUGE NOTE***: Remember that folder structure we're using? It will disappear when you reboot your phone, so back it up! I would actually recommend using bind mounts and a shell script to have a more "persistent" folder structure, but that's just me... Like I said, there's really only about 15 shared libraries or so that are needed to give us a plethora of applications at our disposal. I'll give up a bit of my phone's system space to be able to drop to a proper bash command line and pull up nano, use the full and complete version of tar, gzip, or whatever utility I want. As I'm still playing with this, I don't have a test package or anything to put up. This is more of a proof of concept idea (that I've already partially implemented on my phone). Also, GCC can get you a long way Since we're compiling on-device, there is no cross-compiler necessary. Inside of the chroot, I compiled patchELF http://nixos.org/patchelf.html I thought that utility might come in handy. Compiles slowly (this is a phone we're compiling on), but it works great. The next step is to see if I can bake it in...
[GUIDE] Creating and using filesystem images on Android
Hey all, This is my first post on the forum, so I thought I'd make it a guide. I've run into a few roadblocks with installing some development tools like python and stuff, so I figured I'd try and make a filesystem image to hold all of it, what with Android preventing executables on your SD card from actually executing. You should NOT try and use this for freeing up space by moving apps to it. That just breaks things. Things to know A mount point is where you access the contents of a filesystem through. A filesystem is basically a virtual disk. I'm not responsible for your phone melting into a pool of acid or anything else you want to blame me for. You executed the commands, not me. If there's been guides for this already, I didn't find them. Playing with your system files is dangerous. Be careful Playing with filesystems is even MORE dangerous. Don't do it unless you know what's going on. Reversing and then combining two words in a sentence, then calling it a bit more dangerous is incredibly dangerous and can kill you. Don't do it. As I said earlier: This is not intended to free up internal storage on your phone. It is intended to create extra space to put command-line executables. This was created for those of us who have older phones that don't have a whole lot of internal storage. (Like the Milestone) This should also work on anything that meets the requirements listed below. I use it on a Motorola Milestone A853 running CyanogenMod 7.2.4f UMTS/SHOLES, and it took some tweaking, but it worked. Commands you put into your shell are marked with `bolded text and surrounded by back-ticks. Leave the back-ticks out. (`)` Requirements! (obtained using `which <command name>` or a specified command) Free space on your mSD losetup (configuring loop devices) mknod (creating loop devices) mount (mounting filesystems) mkdir (making directories) su (root access) umount (unmounting) mke2fs (formatting) Linux filesystem support (`cat /proc/filesystems | grep ext`) Here we go! This assumes you are going to use an ext4-formatted filesystem image mounted on /data/development/, with the image located at /mnt/sdcard/development.img. You WILL need to determine your phone's supported ext<num> filesystems using `cat /proc/filesystems | grep ext`. Choose the highest-numbered one. Create the mountpoint, the image, and then format the image to ext4. `mkdir /data/development/``dd if=/dev/zero of=/mnt/sdcard/development.img count=409600 bs=1024``mke2fs -l /mnt/sdcard/development.img -b 1024 -t ext4` Create the block device, set it to point at the image, then mount it. `mknod /dev/block/loop250 b 7 250``losetup /dev/block/loop250 /mnt/sdcard/development.img``mount -t ext4 /dev/block/loop250 /data/development` Test it to see if it works. `touch /data/development/testfile;ls /data/development/` Use it. Unmounting (/!\ For connecting to a computer to avoid corruption /!\) `umount /mnt/sdcard/development.img``losetup -d /dev/block/loop250` Well, that's all I've got. Suggestions and corrections, as well as good feedback are appreciated. Some PAQs (Possibly Asked Questions) Q: I'm getting some errors. Here they are: pastebin.com/some-errors A: Great, I'll see what I did wrong, and if it's something on your end, I'll try and help you out. Q: It dun werk A: Tell me the errors instead of complaining about them. Just saying that does not help me and wastes my time and bandwidth. Q: "No space left on device"; "Operation not permitted"; "No such file or directory" A: SD card full; not root (or SD card is full, or something broke); Mount point doesn't exist or (if 'mount' returns that and the point exists) something not cool happened.
Usage guide on Non-Android devices Some interesting bits of information for use on computers: There's probably not an easy way to read/write/mount EXT2 filesystems on a Windows machine, so if you have a solution that's stable, go for it. Linux computers definitely should support this, and I'm not sure about OSX computers, but in theory would work if you had the right things installed. iPhones ... well I have no idea what you'd do with it there. Linux: On the device: THIS PART IS EXTREMELY IMPORTANT, NOT DOING THIS WILL RESULT IN BROKEN FILESYSTEMS! `umount /mnt/sdcard/development.img` `losetup -d /dev/block/loop250`Plug your phone into your computer, making sure that the computer mounts it and reads it as removable media, and that the image is present. On the computer: (Path of your user folder, and the mount point at which your device's SD is mounted can and very likely will vary from distribution to distribution. Check your paths.) `mkdir /home/user/android-devtools/` `mount -o loop /media/user/android-sd/development.img /home/user/android-devtools/`Now, you can change things within the image as you normally would a file or folder. Be warned, sometimes doing this can create conflicts in the file permissions, so running the right commands on the phone to change the permissions as root (use `chmod` for the permissions) can save you boatloads of trouble getting things to work, or editing files. Mac OSX might or might not be the same, but seeing as I haven't picked up an Apple computer since maybe 5 years ago, let alone attempted filesystem management, I just don't know.
[GUIDE] Ubuntu in a chroot on the Galaxy S4 - now with Native Booting!
Notice (4/16/14): I'm no longer here. I've said "goodbye" to AT&T and their locked bootloader schemes. I'm voting with my wallet - I've sold my I337 and switched to T-Mobile. My apologies to the community, but you're now on your own here. Intro/About/Requirements: This thread started as a guide for people who wanted to run Ubuntu in a chroot, and then connecting to it locally with a VNC client. This method has been used countless times on other devices, with many thanks to @zacthespack and his his group, LinuxonAndroid. Unfortunately, this method did not work out-of-the-box on my device, so I tweaked things to work with the Galaxy S4 and posted them here in this thread. However, the most people immediately noticed that with this method the performance is not great, and some applications can't work in a headless environment. With a comment made by zackthespack, I began researching what it would take to get Ubuntu to write directly to the device's framebuffer. After a few months, I not only managed to accomplish this, but also developed a way to get the Galaxy S4 to boot directly into Ubuntu. As far as I have seen, both of these are a "first" for this handset. All of these methods require root. The VNC Chroot does not require a custom kernel, but the other methods require a custom-built kernel. For the I337 (AT&T) handset, this can pose a problem if you have bootloaders that are MF3+. If you're using MDB/MDL bootloaders still, you shouldn't have a problem with this and you can Loki the custom kernel without issue. Depending on your ROM and/or Kernel, you may also need a new version of BusyBox installed, even for the VNC method. You'll find a few apps on the Play Store that can do this for you. Beware that some of them are not easily reversible (such as TinyBox), so if you're stuck on MF3 with no way to create/restore a nandroid/system backup, you should be careful. Click to expand... Click to collapse Disclaimers: Following this guide and/or flashing anything I've provided to your device is your own responsibility. If something breaks, you break your device, or something explodes, I can't be held liable (I'll help correct any situations you may put yourself in, however). I claim no rights to any proprietary software or intellectual property included in this post or the packages contained herein. By using any of this software, you agree to whatever licenses/agreements that the creators may have included with their software. If you use any of this stuff in your own project, please provide credit where credit is due. For example, if you take my u.sh script and adapt it to some new device (i.e. Galaxy S 5), please at least mention where it came from. Click to expand... Click to collapse VNC Chroot Method (original): This method is loosely based on this thread for the Galaxy S3 and the ubuntu.sh script there. It didn't work for the S4, but I've made several tweaks to it, simplifying it a ton, and otherwise getting it to work perfectly on my S4. I've tried this using my AT&T Galaxy S4 (SGH-I337) on both the MDL build and the MF3 build - both seem to work great. Instructions: Download the Ubuntu 13.04 Small v1 image here. Create a folder on your sdcard labeled "ubuntu" by whatever means you want to. Extract the ubuntu.img from your downloaded zip into this folder. Download my version of the ubuntu.sh and place it on the root of your sdcard. Open the script in a text editor and read through it. Never run a script like this on your android without first knowing what it does - especially when the author is telling you that you need root. If you're happy with it, proceed. Install an terminal emulator of your choice. I personally used this one, and technically an adb shell will work too (but you'll be tethered to your PC...). Install a VNC Client of your choice. I personally used this one, but there might be better/faster ones out there. Open the terminal emulator, and execute the following commands: Code: su sh /sdcard/ubuntu.sh If you see a bunch of errors and get dumped back at the "[email protected]:/ # " prompt, then something went wrong. Report your errors in this thread. Remember, this requires root (and the "su" command to get there, of course). You'll be prompted for some setup parameters, which you can save at the end for later. Just answer each question and press Enter after each: You'll need to provide a new password for the "ubuntu" user. A simple passwords like "ubuntu" works, unless you want some security. Start VNC server? (y/n) - always choose "y". We need this to interact with the device. SSH server? Optional. If you use it, you should enable it. Screen size: Enter whatever you want. I personally used 960x540 (one quarter of the S4's screen size) so that I could actually interact with things using the touch screen. Save settings as defaults? - You might not want to do this until you have a screen size that works best for you. Once you see the prompt, "[email protected]:~# " - you're in! You now have Ubuntu running in a chroot. As the on-screen instructions suggest, type "exit" at this prompt to end the chroot and Ubuntu. It is recommended to do this when you are done so that the ubuntu.sh script can clean up after itself (unmounting things, etc.). Leave your terminal emulator app running! Use your Home button to return home and leave it running. Open you VNC client and connect with the following settings: Nickname: (whatever you want) Password: ubuntu Address: localhost Port: 5900 (default) Username: (leave blank) Color Format: 24-bit color (you can use lower if you want better performance) Connect. For the VNC app I used, I had to zoom in to make the screen fit correctly (use pinch-to-zoom, and then use the "+" button on-screen). Also, you can play around with the Input Mode some if you wish. Enjoy Ubuntu! As you can see, it's not terribly complicated to get this up and running. Once you have set it up the first time, it's a lot smoother from then on out. The script is designed to allow you to use the external SDCard if you wish. Just use place the ubuntu.img in an "ubuntu" folder on your external SDCard, drop the ubuntu.sh on the root of the external SDCard, and use "sh /mnt/extSdCard/ubuntu.sh" instead (don't forget "su"!). Click to expand... Click to collapse Freedreno Chroot Method (NEW): This long-winded tutorial will explain how you can setup Xubuntu-desktop in a chroot. Before attempting any of this, you should read through all the steps and be sure you're comfortable performing the steps needed. This requires roughly 2GB free space on your /data partition - the actual finished install is about 1.4GB, but it will require some extra space while it installs Freedreno and other components. HINT: Keep in mind that your /data partition is shared with your internal sdcard (your internal sdcard gets whatever space is leftover at the end of the /data partition), so you can get an idea how much free space you have by looking at how much space your internal sdcard has available. Instructions: Step 0 (option A) - Build Custom Kernel You will need to install a custom kernel that has specific options enabled in the configuration, along with a few patched files in the source code. This list of changes is based on a delta from the stock I337 MF3 kernel, available at http://opensource.samsung.com/. You should be able to apply these changes to "any" kernel that you can build from source, so this documentation may apply to devices other than the I337. Kernel Mods: Required config changes: Code: CONFIG_DEVTMPFS=y # CONFIG_DEVTMPFS_MOUNT is not set CONFIG_DRM=y CONFIG_MSM_KGSL_DRM=y # CONFIG_KGSL_PER_PROCESS_PAGE_TABLE is not set # CONFIG_MSM_KGSL_PAGE_TABLE_COUNT is not set CONFIG_FB_MODE_HELPERS=y CONFIG_FB_MSM_TRIPLE_BUFFER=y CONFIG_FB_MSM_DEFAULT_DEPTH_BGRA8888=y # CONFIG_FB_MSM_DEFAULT_DEPTH_RGBA8888 is not set Fix for Wi-Fi problems when using MF3 kernel on UCUAMDL bootloaders (i.e. "unadulterated" or "neutered"): Code: CONFIG_PROC_AVC=y Required Patches to kernel source code: https://github.com/freedreno/kernel-msm/commit/4c0281745f8c85707be88acebb557aca0b8f1dba https://github.com/freedreno/kernel-msm/commit/228f65d48d4855d903e3b4642179dfa14eedd040 https://github.com/freedreno/kernel-msm/commit/54b510b2e6bccf08fdf3a8ad00a62b27c2f8c1e6 Additional changes required for sudo to work (added 10-25-13 in v4): Code: # Samsung Rooting Restriction Feature # # CONFIG_SEC_RESTRICT_ROOTING is not set # CONFIG_SEC_RESTRICT_SETUID is not set # CONFIG_SEC_RESTRICT_FORK is not set # CONFIG_SEC_RESTRICT_ROOTING_LOG is not set Additional changes to the initramfs required for sudo to work (added 10-25-13 in v4): Edit fstab.qcom, remove the nosuid, part of the line that references userdata. Step 0 (option B) - Download Custom Kernel Instead Don't want to compile your own kernel from source? If you have the I337, you can use mine! As mentioned above, this kernel is based on the original MF3 source from Samsung, with the modifications listed above. If you are stuck with MF3+ bootloaders on your I337, you will not be able to install this kernel directly (at the time of this writing). MDB/MDL bootloaders are fine, but you will need to flash loki-doki afterwards (this kernel is not pre-lokified!). This kernel might work with other similar variants (such as the M919), but I haven't tested this on anything except my own I337 daily-driver. YMMV. If you run into issues, you might need to wipe cache/dalvik. This will likely only work with TouchWiz-based ROMs (I have not tried it with AOSP). Here's some downloads for you: mf3-freedreno-android-boot-v4.zip - CWM/TWRP flashable zip. - Boots to android, allows Ubuntu with Freedreno to work in a chroot. - Compiled with the original (slightly modified) MF3 initramfs and "mf3-freedreno-minimum-zImage-v4" (below). - Includes minimal configuration changes described above, plus the WiFi fix part. mf3-freedreno-minimum-zImage-v4 - Just the MF3 kernel itself with minimal changes to get the chroot to work. mf3-freedreno-minimum-config-v4 - Yeah, that's right. I'm providing the .config files I used for all of this. Step 0.5 - Install the Kernel Before you can start up the chroot properly, you'll need to have the custom kernel installed. You don't want the "ubuntu-boot" version right now, because you don't have an Ubuntu install to boot to. If you're using my pre-built kernel, first flash mf3-freedreno-android-boot-v4.zip and then flash loki-doki.zip. Step 1 - Companion Files Download this file: mf3-freedreno-companions-v4.zip - Non-flashable zip. This includes the script files, which you should promptly read through both u.sh and launch.sh. It is always good practice to read through any script file you get from the internet, making sure it's doing what you would expect it to. Also check out CREDITS.txt, which includes information about the included upstart-dummy.tar.gz and start-stop-daemon files. Extract the companion files .zip and place its contents on the root of your internal sdcard (/sdcard/). Don't extract the contents of upstart-dummy.tar.gz. This is your $src directory. You can change this if you wish (see script for details). Step 2 - Install/Configure Ubuntu Install an terminal emulator of your choice. I personally used this one, and technically an adb shell will work too (but you'll be tethered to your PC...). At the console/shell, type the following two commands: Code: su sh /sdcard/u.sh bash The script will download Ubuntu Core and install Freedreno, upstart-dummy, and lubuntu-desktop. Total download size will be around 425MB. Total install time will vary, but count on it taking at least 45 minutes to install and configure everything. At the very end, you'll be prompted to enter a password for the new user "ubuntu". Step 2.5 - Exit ubuntu When you see the message "Type 'exit' (without quotes) to leave ubuntu," the install is complete. You'll notice that your prompt changed to "[email protected]". This is the easiest way to confirm that you're actually inside the ubuntu chroot. Type exit and hit Enter to get back to android. Step 3 - Fire it up! From now on, you can start Ubuntu using u.sh in any of these three ways: sh /sdcard/u.sh - This will make initial prep, STOP android (black screen), launch the chroot, install/configure if needed, and will execute "service lightdm start". This will give you the greeter and you can login as "ubuntu". If the lightdm service stops for whatever reason (see info about the home button below), the script will continue by exiting the chroot and rebooting your device. [*]sh /sdcard/u.sh bash - Same as above, except that it will not stop android, not startx (will give bash shell instead), and will not reboot your phone when you exit the shell. [*]sh /sdcard/u.sh destroy - This will do exactly as it sounds - destroy your ubuntu installation. This will unmount your /sdcard from ubuntu (if still mounted somehow) and then recursively delete your ubuntu installation. If you change the source or destination directories in the main script, you should be careful deleting things. NOTE: Remember to ALWAYS run any these from a root shell, whether via terminal emulator, via adb shell, or using SManager (or similar). Step 4 - Note the Home Button and Touchpad Take note that any time you have X running via lightdm, the hardware Home button will kill the X server. This is intentional, and will exit the chroot and reboot your phone. You'll also notice that currently, the touchscreen acts like a giant touchpad (like on a laptop). Use two fingers to right-click or scroll. Direct touchscreen input is not available at this time due to a segmentation fault that evdev causes when used on this device in a chroot. Step 5 - (optional) Make Changes and Do it All Over Again Customize the crap out of it! Edit my u.sh, launch.sh or xorg.conf and have fun. If you find great improvements, please post them in this thread! In future revisions, I might include them. Things should be well documented within the scripts. You might even change the bit at the end of launch.sh that starts "service lightdm start&" instead of "startx" - this would give you the greeter and let you login as the user "ubuntu" if you want. Also note that those three files are the only ones that must remain in your $src directory if you wish to continue to run this as a chroot. By the way, booting directly to Ubuntu after it is installed does not require any of the companion files anymore. Click to expand... Click to collapse Native Boot Method (NEW): This part of the tutorial is for those who wish to take things a step further and boot your device directly into Xubuntu-desktop. This will require that you setup the Freedreno chroot properly, and then you'll be installing a new boot.img. While this doesn't replace your /system partition, you won't be able to boot directly into Android while you have this boot.img installed. Instructions: Step 1 - Install Ubuntu Basically, you need to perform all the steps for the Freedreno Chroot method, and get that up and running first. All you're doing here is swapping out your kernel. Step 2 (option A) - Build Custom Kernel You'll need all of the kernel customizations included in the freedreno chroot method, plus these listed below: NOTE: You will need some proprietary blobs, which can be found on your device in the /etc/firmware directory. Config changes to enable booting directly into Ubuntu (beyond replacing the initramfs...): Code: CONFIG_EXTRA_FIRMWARE_="audience-es325-fw.bin a300_pm4.fw a300_pfp.fw vidc_1080p.fw" CONFIG_CMDLINE="console=tty0 fbcon=vc:0-3" # CONFIG_CMDLINE_FROM_BOOTLOADER is not set CONFIG_CMDLINE_EXTEND=y # CONFIG_CMDLINE_FORCE is not set Optional config changes to enable the framebuffer console when booting directly into Ubuntu - useful for debugging. Code: CONFIG_VT_CONSOLE=y CONFIG_VT_CONSOLE_SLEEP=y CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_DEVPTS_MULTIPLE_INSTANCES=y CONFIG_FRAMEBUFFER_CONSOLE=m CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set # CONFIG_FONTS is not set NOTE: You will need to grab some .ko files that are created, which must be loaded in the following order: Code: insmod /ko/font.ko insmod /ko/softcursor.ko insmod /ko/bitblit.ko insmod /ko/fbcon.ko I recommend that you include these four lines into the init script that is included in the ubuntu ramdisk. These can go pretty much anywhere after the ". /scripts/functions" part, but before it calls out to run-init. Also, don't forget to drop those .ko files into a new /ko directory in the initramfs. If you want to load these with modprobe, I'll leave that up to you (good luck). Replace the entire ramdisk/initramfs: At this time, I'm not going to provide instructions on how to do this. You'll need this mako boot.img straight from Ubuntu, repacked with the zImage created here. For what it's worth, the re-pack tool I'm using includes --cmdline 'androidboot.hardware=qcom user_debug=31 zcache', but I'm not sure if that's needed (especially considering our kernel seems to use qcache?). Anyways, good luck. Step 2 (option B) - Download Custom Kernel Instead Again, if you don't want to compile your own kernel from source, you can download mine and use it. The same warnings and restrictions apply as they do in Step 0 (option B) of the Freedreno Chroot method. And here's your downloads: mf3-freedreno-ubuntu-boot-v4.zip - CWM/TWRP flashable zip. - Boots to Ubuntu directly, but only if your Ubuntu install is located at /data/ubuntu (Default). - Compiled with the original MF3 initramfs and "mf3-freedreno-everything-zImage-v4" (below). - Includes all configuration changes described above. mf3-freedreno-everything-zImage-v4 - Just the MF3 kernel itself with all changes for both chroot and direct booting to Ubuntu. mf3-freedreno-everything-config-v4 - Yet again, I'm providing my complete .config file for this. Step 3 - Install the Kernel Here's the easy part. Flash your completed boot.img, flash loki-doki, and reboot. If you're using my pre-built kernel, first flash mf3-freedreno-ubuntu-boot-v4.zip and then flash loki-doki.zip. Click to expand... Click to collapse Flashable Zip Method (NEWEST): It's finally finished: a flashable .zip that you can use to dump a pre-built rootfs onto your data partition. This will still require that you flash one of the two custom kernels (whether for chroot or native booting), but it will allow you to skip the whole build/install process. ubuntu-install-v4.zip - CWM/TWRP flashable .zip. Requires approx 2GB free space on your data partition during install, and the final install size is approximately 1.3GB (may want more free space to add your own programs/etc.). Output folder is /data/ubuntu. This can be changed in u.sh, but heed the warnings within! Instructions: Instructions for Chroot-style Ubuntu: Download the "companions" .zip and extract its contents to the root of /sdcard. Download the "ubuntu-install" .zip to your internal or external SDCard. Download the "mf3-freedreno-android-boot" .zip to your internal or external SDCard. Make a nandroid backup of your phone, and store it on an external SDCard or your computer. Always a good idea to have this. Install the "ubuntu-install" and "mf3-freedreno-android-boot" .zip files, followed by loki-doki.zip if you need that for your device (e.g. I337). Restart and resume with Step3 of the Freedreno Chroot Method. Instructions for Native Boot Ubuntu: Download the "ubuntu-install" .zip to your internal or external SDCard. Download the "mf3-freedreno-ubuntu-boot" .zip to your internal or external SDCard. Install the "ubuntu-install" and "mf3-freedreno-ubuntu-boot" .zip files, followed by loki-doki.zip if you need that for your device (e.g. I337). Restart and let it start into Ubuntu! NOTE: The username is "ubuntu" and the password is also "ubuntu" - it is highly recommended that you change this ASAP. Click to expand... Click to collapse Known Issues/Bugs: Below is the list of known issues that I can think of, from the top of my head. This will probably be updated later as everyone points stuff out. Some issues only apply to some of the methods, so the applicable methods are listed in parenthesis after each. Sound has not been tested (freedreno/native) 3D graphics or OpenGL support has not been tested (all) Some applications don't work in a headless environment (vnc) Some applications don't like to run as root, such as chromium (freedreno) lightdm is working in companions-v3, so no need to login as root anymore Onboard is not working (freedreno/native) fixed in companions-v3 sudo does not work (all) fixed in kernel-v4 for freedreno/native, but problem remains for (vnc) if you are not using a custom kernel A few kernel Oops's (native) Shutdown menu doesn't always work (freedreno/native) fixed partly in companions-v4 - proper locale settings seem to allow the shutdown menu to work once you are logged in Performance issues due to VNC connection (vnc) No 3G/WiFi/network connection that I'm aware of... (native) No control over 3G/WiFi/network/bluetooth yet (all) Xorg's normal touchscreen driver evdev causes segmentation faults (freedreno/native) Working on a possibly trying to get fbdev to work natively without Freedreno for simplicity (freedreno/native) Anything you'd normally expect from a phone does not exist (freedreno/native) Screen rotation (with or without accelerometer) doesn't work yet (freedreno/native) HDMI/MHL output remains untested at this time. I got it to briefly work once, but I need to revisit this. (freedreno/native) Many more to come, I'm sure... Click to expand... Click to collapse To-Do: Add mirrors to the download links. Add a CWM/TWRP-flashable .zip that just dumps a clean Ubuntu install onto your data partition. This should be easy enough. completed! Fix some of the bugs above. Simplify the launch.sh and xorg.conf files. The u.sh script seems pretty solid. Develop a method that works with only fbdev. This method might eliminate the possibility of 3D acceleration, but should enable screen rotation and other nifty things. Possibly look into getting kexec (or similar) to work on the Galaxy S4 to offer a dual-boot option. Low priority at the moment, because flashing a kernel back and forth is pretty easy stuff. Get Ubuntu Touch to work. This would eliminate a lot of bugs. I mostly need to just buckle-down and build CM10.1 from source, and then slowly visit each step of the Ubuntu Touch boot process.... Ugh. Rebuild Freedreno to try to get Mesa/Gallium3D working properly. I'm probably going to need a lot of help from Rob Clark on this one! More to come... Click to expand... Click to collapse Revision History: [11-13] mf3-freedreno-companions-v2.zip - Updated launch.sh: added some error checking and fixed the Freedreno build process. [11-15] mf3-freedreno-companions-v3.zip - Updated launch.sh to include onboard and English language. Removed florence and xvkbd. Removed .keyb script. Added sudo. Simplified upstart-dummy, and included new upstart-dummy.tar.gz. Prepped for new flashable .zip method. [11-26] mf3-freedreno-companions-v4.zip - Updated launch.sh: included fix for onboard so that it should work anytime lightdm is launched, added some bits for sudo to work, and home button now kills lightdm (not just the Xsession); Updated u.sh: Added check for root, added notes about sudo and nosuid. [11-26] mf3-freedreno-android-boot-v4.zip & mf3-freedreno-ubuntu-boot-v4.zip - Finally fixed sudo! See kernel mods sections for details. [11-26] ubuntu-install-v4.zip - rebuilt with new companions. Click to expand... Click to collapse Aou said: Check out this app: SManager (Script Manager). It makes running the ubuntu.sh or u.sh a whole lot easier, plus you can send it into the background (vnc method only). Just remember to jump back into SManager later, use the Menu Key and open the console to be able to kill the ubuntu.sh. You can also add "bash" as an additional argument (freedreno method only). This seems to be an effective replacement for the Terminal Emulator. Don't forget to choose the "su" option to run either script as root. Click to expand... Click to collapse I have literally spent hundreds of hours working on this project, and many more hours documenting it thoroughly - just so that I could share it with all of you. If you found this guide, custom kernel or scripts to be beneficial, please hit the THANKS button on this post.
This mostly works, but I think I may have made an error. I see it starting the sshd, but not VNC server. I can call vncserver, but when launching the vnc client app I just get stuck at "Establishing Handshake" until it times out. This differs from when I don't call vncserver, where I get immediately connection refused. I'm going to redownload the image and start from scratch, but the image isn't very friendly when I'm trying to figure out how to rerun the initial configuration script...
On my S4 running OTA-MF3 with root, this didn't work for me until i used Busybox Installer from the market. Tried internal and external without it, neither worked. Only thing that looked like an error after that was Code: chown: cannot access '/external-sd/': no such file or directory but this only showed the first time I ran it. Opened VNC connection just fine from my computer to the phone, and though there was slight graphics glitching (orange and red boxes on desktop) it worked just fine and they didn't interfere. Thanks for this!
Tsaukpaetra said: This mostly works, but I think I may have made an error. I see it starting the sshd, but not VNC server. I can call vncserver, but when launching the vnc client app I just get stuck at "Establishing Handshake" until it times out. This differs from when I don't call vncserver, where I get immediately connection refused. I'm going to redownload the image and start from scratch, but the image isn't very friendly when I'm trying to figure out how to rerun the initial configuration script... Click to expand... Click to collapse It's not, I agree. I found that the easiest way to clear the configuration and start anew is to do the following from the "[email protected]" prompt (that is, within ubuntu): Code: rm /root/DONOTDELETE.txt rm /root/cfg/linux.config DeadlySin9 said: On my S4 running OTA-MF3 with root, this didn't work for me until i used Busybox Installer from the market. Tried internal and external without it, neither worked. Only thing that looked like an error after that was Code: chown: cannot access '/external-sd/': no such file or directory but this only showed the first time I ran it. Opened VNC connection just fine from my computer to the phone, and though there was slight graphics glitching (orange and red boxes on desktop) it worked just fine and they didn't interfere. Thanks for this! Click to expand... Click to collapse Interesting. I looked through the image's init.sh, and found something that's relatively new (wasn't in beta): Code: # Fix for sdcard read/write permissions by Barry flanagan chown ubuntu /external-sd/ As far as I can tell, that message is harmless. It's only included in the initial configuration, as it's in the section: Code: if [ ! -f /root/DONOTDELETE.txt ] As for the need to download/install the BusyBox installer, that's not surprising at all. I've had so much trouble BusyBox ever since I switched to MF3. I might include this as an extra step in the OP - thank you.
You kidding right...does this really work? To cool, thanks Aou. Great work.
TheAxman said: You kidding right...does this really work? To cool, thanks Aou. Great work. Click to expand... Click to collapse Yessir, it does indeed work! The S4 handles it very nicely with the extra RAM & CPU it has to spare, so the only limiting factor is VNC. If someone could devise a way to get Ubuntu to draw directly on the screen from within that Chroot, that would be perfect. I don't think it's really possible by design, but this might be the closest we get to running native linux on the I337 until we see some unlocked bootloaders. Thanks
Aou said: Yessir, it does indeed work! The S4 handles it very nicely with the extra RAM & CPU it has to spare, so the only limiting factor is VNC. If someone could devise a way to get Ubuntu to draw directly on the screen from within that Chroot, that would be perfect. I don't think it's really possible by design, but this might be the closest we get to running native linux on the I337 until we see some unlocked bootloaders. Thanks Click to expand... Click to collapse In fact I am currently working on getting xorg to write to androids frame buffer which will mean no more vnc Sent from my Nexus 4 using xda premium
zacthespack said: In fact I am currently working on getting xorg to write to androids frame buffer which will mean no more vnc Sent from my Nexus 4 using xda premium Click to expand... Click to collapse You, sir, are the man. thank you so much for working on this! I threw $10 at you to help fund the skittles/cheetos/carrots/beer/pizza/whatever it takes to help you along.
Added a couple things to the OP. Looks like pure-stock roms will indeed need BusyBox installed, by some means or another. Also, found SManager, which makes executing the ubuntu.sh script much, much easier.
The second script that allows me to launch ubuntu, but the first that allows me to get a real X server on my vnc. Thank you so much ! PS: Why am I unable to install wine ? "Package wine is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source"
This is working pretty good, slow though, do I have it setup right, or did I miss something?
TheAxman said: This is working pretty good, slow though, do I have it setup right, or did I miss something? Click to expand... Click to collapse I have found it to run a bit slow, and with regular crashing of GUI programs too. Is it just slow or unusable? You can always try closing other apps besides terminal and VNC, or try to VNC from a computer even.
tboss1995 said: The second script that allows me to launch ubuntu, but the first that allows me to get a real X server on my vnc. Thank you so much ! PS: Why am I unable to install wine ? "Package wine is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source" Click to expand... Click to collapse Looks like you're not the only one. Check out this thread on the LinuxOnAndroid site: http://forum.linuxonandroid.org/index.php?topic=268.0 TheAxman said: This is working pretty good, slow though, do I have it setup right, or did I miss something? Click to expand... Click to collapse DeadlySin9 said: I have found it to run a bit slow, and with regular crashing of GUI programs too. Is it just slow or unusable? You can always try closing other apps besides terminal and VNC, or try to VNC from a computer even. Click to expand... Click to collapse Most of the slowness comes from interacting with it via VNC, it would seem. Hard to compare to anything else, considering VNC is all we've got at the moment. I wonder if @zacthespack can shed some light on this. As he mentioned before, he's working on getting it to draw directly to the Android screen. I'm certainly not going to ask for any status updates, but I'm wondering if he can confirm that we'd see a speed increase without VNC... EDIT: Also, as I use it more, I am noticing the app crashes too (such as Chromium). Could just be something in the 13.04 image, but also could be because we're running this all on ARM architecture.
Aou said: Looks like you're not the only one. Check out this thread on the LinuxOnAndroid site: http://forum.linuxonandroid.org/index.php?topic=268.0 Most of the slowness comes from interacting with it via VNC, it would seem. Hard to compare to anything else, considering VNC is all we've got at the moment. I wonder if @zacthespack can shed some light on this. As he mentioned before, he's working on getting it to draw directly to the Android screen. I'm certainly not going to ask for any status updates, but I'm wondering if he can confirm that we'd see a speed increase without VNC... Click to expand... Click to collapse RE installing WINE, sure you can install the ARM verson but Wine is not a emulator (infact WINE stands for Wine Is Not a Emulator) so you can only run ARM compiled windows software. Yest there is a good speed increase, as with VNC xorg writes to the vnc server and passes it to the vnc client to then render on the screen. With the new method xorg just writes to Androids frame buffer, no inbetween man. And it can get even faster once we have graphics accelerations although not all chip sets will get that.
zacthespack said: RE installing WINE, sure you can install the ARM verson but Wine is not a emulator (infact WINE stands for Wine Is Not a Emulator) so you can only run ARM compiled windows software. Click to expand... Click to collapse Good point, forgot about that. It's really just a big package of Windows dependencies, responding to API calls, etc. The software that Wine runs is still sending stuff to/from the processor directly, therefore it would have to be compiled for ARM. I wonder what Windows8 programs are available that are compiled for ARM (because of the Microsoft Surface and all...).
Aou said: Good point, forgot about that. It's really just a big package of Windows dependencies, responding to API calls, etc. The software that Wine runs is still sending stuff to/from the processor directly, therefore it would have to be compiled for ARM. I wonder what Windows8 programs are available that are compiled for ARM (because of the Microsoft Surface and all...). Click to expand... Click to collapse There's plenty or ARM software within the built in app store, but I'm not sure where they install to or how one would go about extracting them. I have it on desktop and it shows what processors it runs on. Can't wait for the straight to screen function though Also, I'm going to see if a different image is more stable. Chromium was the most obvious crashing for me and others generally crashed.
DeadlySin9 said: There's plenty or ARM software within the built in app store, but I'm not sure where they install to or how one would go about extracting them. I have it on desktop and it shows what processors it runs on. Can't wait for the straight to screen function though Also, I'm going to see if a different image is more stable. Chromium was the most obvious crashing for me and others generally crashed. Click to expand... Click to collapse I noticed that with 12.04, it doesn't seem to connect to Xorg or something, because when you use VNC, it only shows a grey screen with a cross cursor. Same for both "Lite" and "Full" packages. Haven't tried older (10.x) packages of Ubuntu. The other Linux images should work just fine. Optionally, you can edit the ubuntu.sh script to be more appropriate, but it should theoretically work the same (unless the init.sh is located elsewhere inside the image...).
I tried the Ubuntu 10 image and the Debian image but ubuntu didn't run vnc (vncserver not found or something) and debian kept saying I didn't have permissions.
It appears chromium is incredibly unstable on this image, so I've uninstalled it. I'm currently working on trying to get Minecraft to work, but ever since 1.6.2 and this new launcher, it's incredibly difficult to modify the client files and such. Something is going wrong with liblwjgl.so. I can get the launcher to work correctly, but when it goes to load the game, it can't find liblwjgl.so and says that it might be because of 32bit vs ARM. I did get lwjgl installed correctly, and pulled the ARM version of the .so and stuck it in [what I believe was] the right .jar file, but it still has the error. I'll keep you all posted. If I can get this to work, and if zacthespack can get xorg to draw on the android screen, ... :good: EDIT: Found out that every time the launcher runs minecraft, it downloads several libraries and other crap to run the game, to keep itself current and to support multiple versions, yada, yada. Unfortunately, this means that it downloads https://s3.amazonaws.com/Minecraft..../2.9.0/lwjgl-platform-2.9.0-natives-linux.jar every time you click Play, and overwrites any custom one you might have (i.e. one with ARM libraries inside). I tried revoking write access to the file, but then the launcher aborts the launch because it can't overwrite the file. Any suggestions? EDIT #2: Well, the easy solution was to modify the file, run the launcher, disconnect mobile data temporarily, and then launch the game ("couldn't connect to server .... have local copy of file .... assuming it's good...."). No more errors about that stupid library file. However, the game immediately crashes now with an error report. Investigating this now. PROGRESS!
Problem I'm aware I may need to modify the script in order to accommodate my setup, but I figured I'd post here first before changing anything in case someone else had a similar problem and came up with the solution. I followed all the instructions, except I want to boot from an external USB stick (mounted using StickMount). I reviewed the script, dropped it on the root of the USB stick, and copied the unzipped image to a folder named ubuntu. Here is the output when I run the script: Making mount points and mounting to them... mount: mounting /dev/loop20 on /data/local/ubmnt failed: Operation not supported mount: mounting devpts on /data/local/ubmnt/dev/pts failed: No such file or directory mount: mounting proc on /data/local/ubmnt/proc failed: No such file or directory mount: mounting sysfs on /data/local/ubmnt/sys failed: No such file or directory Connecting to /sdcard... mount: mounting /sdcard on /data/local/ubmnt/sdcard failed: No such file or directory Putting in some settings... net.ipv4.ip_forward = 1 /sdcard/usbStorage/sda1/ubuntu.sh[19]: can't create /data/local/ubmnt/etc/resolv.conf: No such file or directory /sdcard/usbStorage/sda1/ubuntu.sh[20]: can't create /data/local/ubmnt/etc/resolv.conf: No such file or directory /sdcard/usbStorage/sda1/ubuntu.sh[21]: can't create /data/local/ubmnt/etc/hosts: No such file or directory ubuntu is configured with SSH and VNC servers that can be accessed from the IP: (You will see an error about wlan0 if your WiFi is disabled. Safe to ignore.) ----------------- OKAY, starting Ubuntu! ----------------- chroot: can't execute '/root/init.sh': No such file or directory ----------------- Ubuntu has exited! ----------------- Cleaning up - unmounting everything and removing what we made... umount: can't forcibly umount /data/local/ubmnt/dev/pts: No such file or directory umount: can't forcibly umount /data/local/ubmnt/sys: No such file or directory umount: can't forcibly umount /data/local/ubmnt/proc: No such file or directory umount: can't forcibly umount /data/local/ubmnt/sdcard: No such file or directory umount: can't forcibly umount /data/local/ubmnt: Invalid argument Welcome back to your android. Click to expand... Click to collapse I am running as root, BusyBox free has been installed. My terminal app has been granted root privileges. The path to the USB stick is sdcard/usbStorage/sda1. Any help/guidance would be greatly appreciated! :fingers-crossed: