[Samsung Galaxy Nexus] jimmyco2008:
Welcome to jimmyco2008's Layman's Guide to the Galaxy (Nexus) - Open WebOS Edition!

------------------------------------------------------------------------------------------------------------------------------------

EDIT: I wonder if I can spare you guys all the building and just upload the 1/2 GB WebOS image and Fastboot file... I'm going to try that out, upload them to Google Drive tonight/now, I'll add the link by tomorrow and you guys can try to just download the files instead of building everything, at least for those who just want to try this out. If you're serious about working with this Open WebOS, I recommend going through all the steps to get all the files building gets you, and so you can update your build files as webos-ports.org updates them.

But here's a link to the folder containing the WebOS developer image file (I didn't build the regular image, not sure of the difference) and the fastboot file needed to boot the thing. Get these files, and you can skip to the giant, bolded "LIKE A BOSS" heading somewhere in the middle of the guide below. Keep in mind you still need to meet prerequisites, save the decent resources, if it runs Ubuntu, and ADB/the Android SDK are/is set up, you're clear for takeoff.

Also note that the .ext2 image of WebOS has a different name, relax, it's the same thing!

Download! .. And feel free to mirror, though I doubt demand nor lack of reliability for Google Drive warrants one.

------------------------------------------------------------------------------------------------------------------------------------

Know this before diving in:

- You NEED Linux.. Not OS X, not Windows, some Linux distro... For the Laymen, you'll want Ubuntu 11.10 or above (can't go wrong with the latest 12.10)

- Get 64-bit, no questions asked.

- Building/compiling the WebOS image in Linux/Ubuntu takes A LOT of resources, generally you can build with any old computer, but it'll take a long time.

- I'm saying if you're running Ubuntu full-boot (not in a Virtual Machine), have at least 3GB of RAM and a 60GB hard drive... any decently-modern processor should do, but the slower and older, the longer it will take to build... You're more than welcome to try this with whatever computer you have, just give it plenty of time to do its thing.

- If you're doing this in a Virtual Machine, like with Parallels or VirtualBox, give the Ubuntu Virtual Machine (VM) as much of your computer's resources as possible. For example, I have a 2012 Macbook Pro (240GB SSD, Ivy bridge Intel Core i5 @ 2.5Ghz, 8GB DDR3 RAM @ 1600 Mhz), I gave the Parallels Ubuntu VM 4GB of RAM, 60GB of hard drive space (I'm at 51 GB used and all I did was the minimum to get WebOS on the GalNex) and all of my cores (4) at 100% cap. It took... well, a few hours to build.

- This boots on both the GSM and CDMA Galaxy Nexuses, so toro, toroplus and maguro are all supported, well except for anything related to the radio.. As with anything Galaxy Nexus-related, GSM gets radio stuff working first.

- This procedure boots WebOS tethered, so you can unplug the Galaxy Nexus once WebOS (Luna) is booted, but rebooting gets you back to Android, and you have to do the fastboot boot image thing again to boot into WebOS. So this doesn't touch your Android (or Ubuntu Mobile I guess) setup.

- Ignore the dollar signs ($) and pounds (#) preceding commands, it's just for organization!

- I am not responsible for anything that happens to your phone or any of your property as a result of using this guide... Standard disclaimer.

---------------------------------------------------------------------------------------------------------------

Alright the Layman's Guide to the Galaxy Nexus! (isn't that punny lol)

Preflight Checklist

- Ubuntu 12.10 (probably good with 11.10 or 12.04 as well) 64-bit.

- Java Runtime 6 or 7 (available for download @ Ubuntu Software Center, or if you're a boss with Linux, you can do the Terminal install, you know what you're doing lol)

- Android SDK

- Android Tools installed via the Android SDK Manager (run from Terminal or double click "Android" script, located in sdk/platform-tools (or some other folder in sdk)

- You can access your Galaxy Nexus via ADB on Ubuntu (getting the host to share the Galaxy Nexus with the Ubuntu VM can be a ***** sometimes, make sure ADB finds your Galaxy Nexus via "./adb devices" .

- At least... eh 1-2 GB free on your Galaxy Nexus sdcard0 storage (who out there actually has to check this lol)

- Your Galaxy Nexus' Bootloader is unlocked... At first I didn't think I had to add this, but for the sake of being thorough...

- If # ./adb commands aren't working, like ./adb devices or ./adb reboot-bootloader, and it gives you some error in Terminal, you need to update 'cha libs. Open a fresh Terminal window and enter:

# sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

Go through all that, tell it yes however many times, and when it finishes, ADB commands should work.

---------------------------------------------------

The Main Event

This is actually kind of boring, you have to literally copy and paste like 10 commands into Terminal for the Prerequisites webos-ports.org dictates.

Enter all this into Terminal one at a time as it processes and finishes each line (by giving you the block cursor back), and remember to answer "y"/yes to all questions!

1$ sudo apt-get install build-essential

2$ sudo apt-get install gawk && sudo apt-get install diffstat && sudo apt-get install chrpath

3$ mkdir webos-ports-env && cd webos-ports-env

4$ wget https://raw.github.com/openwebos/build-webos/master/scripts/prerequisites.sh * Ugh, damn, XDA forums sets this as a URL and shortens it, if you copy and paste directly into Terminal, it won't work...just right click and Copy Link URL or whatever, and paste that separately from "wget".. Do the same for the link below.

6$ sudo sh prerequisites.sh (this takes a while, ~10-20 minutes depending on your internet/hardware)

6$ wget https://raw.github.com/webOS-ports/webos-ports-setup/master/Makefile

7$ make setup-webos-ports

Now you can probably build, I know the official guide says differently, but I've done this MANY times, just hear me out!

1$ cd /webos-ports-env/webos-ports

2$ . setup-env

Now the text preceeding whatever you type should be blue and green (how magical!), if it's not.. Well post below and I'll help you out.

So actually building this, commands vary depending on if you want the developer image or the regular image... In fact a bunch of WebOS not working for me (like apps) may be because I opted to build the developer image... Honestly, I'm not sure what the difference between the two is, it's open source, you should be able to develop on either... If I were you I'd go for the non-developer image, but here's both commands, choose ONE:

*Also, on the webos-ports.org website, they offer advice about speeding up the build by editing the number of threads value in a config file, default value is 4 cores and 4 threads, I changed mine to 8 threads, I dunno, really shouldn't matter unless you're rocking an i7 Extreme Edition or a Bulldozer, you know something with more than 4 processor cores (physical and virtual). If you have less than 4 cores, like you have a Phenom II X2 or an Intel Core 2 Duo, maybe even an older i3, you should be fine with the default 4/4 settings.* If you're into changing the settings, the file you edit (with TextEditor or whatever) is located at webos-ports/conf/local.conf . Lookin' for BB_NUMBER_THREADS and the line above it, both should = 4 by default.

Regular Image

(make sure you're in the build environment > Magic green & blue text!)

$ MACHINE=tuna bb webos-image

Developer Image

(again, make sure the magic blue and green text is there)

$ MACHINE=tuna bb webos-dev-image

Now the magic happens, if all goes well, within a couple of minutes (or sooner) you'll see "preparing runqueue"... If you look at System Monitor, you'll see it's downloading (at 100 - 400 kbps, even if you have a 50mbps down internet connection) the build stuffs, which takes 1- 3 hours (don't be afraid to use Netflix haha).

It'll actually go between downloading at a rather slow rate and running tasks (over a thousand of 'em)... All in all, give it, again depending on your hardware and internet, like the night (5 - 12 hours), perhaps even more... It'll finish when it finishes. If you get errors at the end, well that's normal, ignore it, you may not even get errors for the regular image, again I've just used the developer image.

-----------------------------------------------------------

Booting Open WebOS *LIKE A BOSS*

Make your life easier and have a file manager window open to webos-ports-env/webos-ports/tmp-eglibc/deploy/images/tuna. Let's call this directory "Foxtrot" for the sake of simplicity.

Okay this is the part where the official guide at webos-ports.org just... ugh... It says to enter this command from your Android SDK /platform-tools folder:

adb push webos-dev-image-tuna.ext2 /storage/sdcard0/linux/rootfs.ext2

Actually it should be (type this in, don't copy and paste):

./adb push *click and drag the webos-dev-image-tuna.ext2 file to Terminal* /storage/sdcard0/linux/rootfs/.ext2

NOTE: Yes, you can click and drag that .ext2 file and Terminal automatically figures out the path, remember that this file is located in webos-ports-env/webos-ports/tmp-eglibc/deploy/images/tuna . Let's call that directory "Foxtrot" for easy reference.

If all goes well, you see the cursor is gone, it's doing its thing- pushing the WebOS image to Galaxy Nexus sdcard0 in a folder called "linux" (as shown above), if you wish to delete this later. Pushing this file took my Macbook about 6 minutes, allow up to 15 minutes for those slower computers out there.

Now reboot your GalNex to the bootloader (you know how to do that)

./adb reboot-bootloader ...or just power off and hold vol up + vol down + power.

Okay here's where the official guide will really **** you up... The file isn't called what the guide states it's called, at least for me...

Type (don't copy and paste this one either):

sudo fastboot boot *click and drag whatever file is closest to "zImage-tuna.fastboot" in our "Foxtrot" directory. Mine had a bunch of numbers, it was like zImage 8246237860837462387462038756012831982 .fastboot. Make sure the file you drag to Terminal ends in ".fastboot", there's one that ends in ".bin".

So: sudo fastboot boot *that file dragged over*

Now it should do its thing, may see a black screen on the Galaxy Nexus for a minute or two. Eventually you'll see a clock where it would be in WebOS (top-middle) and "First Boot" (something like that, I forget) at the upper-left corner.

Now we have to send a couple of simple commands to this WebOS thing from Ubuntu to get Luna (the UI itself) to boot.

You'll see that there is an Ethernet connection in Ubuntu, mine was Wired Connection 2.... Click on the network icon on the top bar in Ubuntu, click "Edit Connections", click on Wired Connection 2, add an Address. Address is 192.168.7.1, Netmask is 255.255.255.0 (actually you can probably get away with entering the default value), Gateway is 192.168.7.2 . Save that bad boy.

Now in a fresh Terminal window, enter, one at a time of course (remember to omit the dollar signs, just good syntax):

$ ssh root@192.168.7.2

$ stop LunaSysMgr

$ touch /var/luna/preferences/ran-first-use

$ start LunaSysMgr

Congratulations! Give it a few seconds, you should be in Open WebOS! Woo!

Feel free to contact me if you need help, I made an error in the guide, or you want to help make this a realistic alternative to Android!

Remember, to get back to Android, just pull the battery and reboot normally!

Credit goes to the webos-ports team at webos-ports.org for making this happen!

---------------------------------------------------------------------------------------------------------------

Details about the port!

Hardware acceleration appears to be at least partially working, that's probably about it, calling (and possibly SMS) works on GSM versions of the GalNex. For those of us with CDMA (myself included), this port should work, however about all it will do is boot for now. So it's just for fun atm. Furthermore, it's uncertain as to whether the Verizon or Sprint GalNexes will ever get a fully-working port because they're CDMA. That would be a shame, but we'll just have to see, won't we?

EDIT (after I actually got it booting): Not a whole lot to do with it, I'm hoping someone can work with me to make this port better, or at least get the radio portion going, no one will use this if it can't send and receive calls/SMS... I (with my Verizon toro) was unable to get any apps to actually open, but the UI is EXTREMELY smooth, I mean holy damn, and the on-screen nav light/bar from past WebOS devices is slick and really cool! WiFi turns on and eventually picks up networks, but I was unable to actually connect (though it may work for unsecured networks, never prompted me for a password so..). Bluetooth does not work (again, at least for the toro), and I had difficulty with the orientation, like sometimes it would go landscape but I couldn't get it back to portrait...