yashsingh1/xdaforums huggingface dataset:
[AT&T Samsung Galaxy S 4 General] xjesus:
This is a list with better alternatives to "onboard" keyboard on Ubuntu:

http://florence.sourceforge.net/english/alternatives.html

Hope this helps.

I'd really prefer to use XFCE rather than LXDE because it's almost as light but it's fully customizable and adaptable to whatever you need. You can optimize panels to work the way you want, and use plugins and indicators from Gnome, Unity, etc.

http://www.renewablepcs.com/about-linux/kde-gnome-or-xfce

http://www.phoronix.com/scan.php?page=article&item=linux_desktop_vitals&num=1

http://www.phoronix.com/scan.php?page=article&item=ubuntu_raring_desktops1&num=1

Hope you success reverse-engineering the "Android emulator" from Ubuntu Touch.
[AT&T Samsung Galaxy S 4 General] Aou:
Soon after figuring out how to append the bootloader's commandline from within the kernel, I managed to bork my desktop with the Saucy (13.10) update last night. The worst part is, this is the computer that I've been using to build my kernel, so it's got the source, building tools and everything on it. >_< Hopefully I'll get it up and running again tonight so that I can resume working on this project ASAP.

Thanks, [MENTION=260416]xjesus[/MENTION] - I ended up using Florence. It complains about no alpha support (my guess is that Mesa isn't working yet - haven't tested 3d yet, so that's likely), but otherwise seems to be a decent replacement for onboard for the time being. I'll have to check out XFCE soon, too.

Part of the reason why I can't get things to work properly inside the chroot is because init is already running (thanks to Android booting first). There's no way to re-run init within the chroot, so a lot of the upstart jobs can't run. This completely screws up dbus, udev, and a few other things required by Unity, Lubuntu, and even LightDM.

At this time, I'm thinking that running Ubuntu within a chroot will always be limited by this. I'll still work on perfecting it, and I will still release my documentation on how to get it running. This way, perhaps others can take it a step further and get more out of it.

I currently have things arranged such that I can attempt to boot into Ubuntu directly from the bootloader (which fails, currently), and also load up the same Ubuntu in a chroot after booting Android. This means I can now start attacking it from two angles at once. To switch between the methods, I have to change out the boot.img, but this is really easy with flashable .zips.

It's looking more and more like I need to focus my attention on getting Ubuntu (or even Ubuntu Touch if needed) to boot first, and then load Android after-the-fact in some sort of emulator or LXC container. Maybe even a chroot? hehe

For today though, I must work on re-building my desktop...
[AT&T Samsung Galaxy S 4 General] duduhayo:
Thanks i will check this up

I will be awsome
[AT&T Samsung Galaxy S 4 General] Aou:
Got my desktop back up and running last night. Had to re-build it from scratch, reformatting and re-installing everything. But thanks to excellent backups I keep, I'm already back to exactly where I was before it took a dump, as if nothing has changed (except I'm now on 13.10 instead of 13.04). Back to business!

I have indeed successfully amended the commandline, so this should give me a lot more flexibility with trying to boot to Ubuntu directly. Ubuntu Touch gets stuck at a few places during init, such as gps, ureadahead, ofono... so I've temporarily removed those. It had a ton of seg faults at first, but providing lxc-android-config with a proper .rules file, it shut up pretty quickly. I'll probably be fix this permanently by amending the kernel commandline later.

I'm currently stuck on trying to get anything to display on-screen. It just sticks at the Samsung/Custom logo. Plymouth tries to load, but crashes on startup - still trying to find a log besides what gets written into the kernel log file:

init: plymouth-upstart-bridge main process (455) terminated with status 1

But even trying to start plymouth manually to show a splash screen, it pretends to... but doesn't actually show anything. Aggravating. Same story with trying to start lightdm - it acts like it's working, it acts like it's showing the greeter on the screen, but nothing.

Same results when I run the command:

# cat /dev/urandom > /dev/fb0

. The result should be a ton of garbage shown on the screen. I can do this easily from within Android or within a chroot within android. My guess is that I need to tweak the kernel even more.

Another thing I'd like to get working is showing the console on the framebuffer. However, whenever I enable "Framebuffer Console support" in the kernel (CONFIG_FRAMEBUFFER_CONSOLE), the device will bootloop. If anyone has experience enabling this on an android device, please let me know. ;)

I'll keep crackin' at it as time allows.
[AT&T Samsung Galaxy S 4 General] Aou:
Exciting news (for me, at least) ... see attached pic.

My Samsung Galaxy S4 currently boots into Ubuntu Core 13.10, with a console in the framebuffer and keyboard input. Additionally, I can now also write anything I want to the framebuffer directly, which is a huge step that magically came along with this progression.

Unfortunately, the refresh rate is terribly slow. Terribly, terribly, slow. The system is running just as fast as it should, but it seems to struggle greatly writing anything to the framebuffer... even that cat /dev/urandom trick is slow (but at least it works now!).

So, huge progress this weekend. More to come, hopefully. ;)

EDIT:

It appears the whole thing is just running terribly slow whenever I have the framebuffer console running. Odd. I'll have to dive into this before continuing, because it makes the whole thing practically unusable. :P
[AT&T Samsung Galaxy S 4 General] 06chaynes:
I get the following error when following these instructions

When i followed these instructions I ran into the following error (when running from either the internal or external SD card).

Uploaded with ImageShack.us

When I run the ubuntu.sh script it returns the following:

root@android:/storage/extSdCard/ubuntu # sh ubuntu.sh

Making mount points and mounting to them...

mount: mounting ./ubuntu/ubuntu.img on /data/local/ubmnt failed: No such file or directory

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

ubuntu.sh[19]: can't create /data/local/ubmnt/etc/resolv.conf: No such file or directory

ubuntu.sh[20]: can't create /data/local/ubmnt/etc/resolv.conf: No such file or directory

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:

wlan0: No such device

(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.

root@android:/storage/extSdCard/ubuntu #
[AT&T Samsung Galaxy S 4 General] Aou:
Move the ubuntu.sh to the root of your storage device, or at least one directory up from the ubuntu directory. The script is looking for the ubuntu.img file in a subdirectory called ubuntu.

If for some reason you need to have ubuntu.sh in the same directory as ubuntu.img, you can edit the script and remove the "ubuntu/" part from the line that mounts the image.
[AT&T Samsung Galaxy S 4 General] 06chaynes:
I moved the script but still I receive errors:

Uploaded with ImageShack.us

I do have the dir ubuntu and the ubuntu.img in that dir so Im not sure why it can't find it
[AT&T Samsung Galaxy S 4 General] Aou:
Odd. It might be because you're changing directories into the same directory as the script. Typically, I execute the script by doing:

$ su
# sh /storage/extSdCard/ubuntu.sh

Try it that way real fast (instead of using the two CD commands). If that doesn't work, try editing this line in the script:

Old:

busybox mount -o loop,noatime -t ext2 $DIR/ubuntu/ubuntu.img $mnt

New:

busybox mount -o loop,noatime -t ext2 /storage/extSdCard/ubuntu/ubuntu.img $mnt

That just takes out the whole $DIR variable and skips that autodetection thing.

PS: Going forward, I've somewhat dropped the idea of having a single .img file for the ubuntu installation. It's sort of a headache to deal with mounting/unmounting it properly, so I'm just dealing with the data partition somewhat-directly and using space there. Unfortunately, this means one can't simply download a .img file that's pre-built, but I'll be providing scripts on how to download/build your own "image".
[AT&T Samsung Galaxy S 4 General] mascondante:
Can someone update the script for the image sitting in the external SD same path? I don't wanna muck something up. Plz & ty
[AT&T Samsung Galaxy S 4 General] Aou:
So, you have ubuntu.img and ubuntu.sh both sitting on the root of your external SD card? If that is the case, you should be able to just edit one line

busybox mount -o loop,noatime -t ext2 /storage/extSdCard/ubuntu.img $mnt

As an update for progress, I've managed to follow various instructions (some in Chinese - thank you Google translate!) enough to replace initctl and start-stop-daemon (recompiled from source) with ones that seem to work in this project. This means I might be able to get everything going properly within the chroot. I've drastically updated ubuntu.sh and a new launch.sh, with decent documentation contained within each. Currently these two new scripts are designed to walk you through downloading Ubuntu Core from scratch, compiling Freedreno, patching various files, and otherwise get Ubuntu working properly within the chroot.

I'm putting the final touches on these scripts now - but I'm stuck at a weird place:

I can launch lightdm and get the greeter to show. It works pretty well, but it appears florence doesn't show up here at this stage (I have it launching with the session, which is sort of a problem...). I can login as a guest "just fine" without a keyboard, though.

I can also launch xfce or lxde using startx. These both work pretty well. Florence runs with the session, the panel shows, and they work as expected (mostly). Unfortunately, startx more-or-less has to be launched as root, and this creates some problems within at least lxde and probably xfce (haven't played with it much).

The problem I've got right now is to get both lightdm and xfce to work. After logging in on the greeter, I'm taken to a blank screen. Florence runs, because the session has started. However, I don't get a panel. At all. I did managed to get some combination of xubuntu with lightdm and lxde (if I select it from the menu at the top), and it does manage to load LXDE properly, but it's a bit frankenstein.

Further, I now need to know which services (and in which order) I need to start to get Ubuntu to be "normal." Remember, I don't have the luxury of init, so this will be fun.
[AT&T Samsung Galaxy S 4 General] Aou:
Exciting news...

My phone boots directly into xubuntu-desktop. Greeter, login, panel, everything. Even udev is working, so plugging in an OTG cable with keyboard/mouse works on-the-fly. Haven't even looked into 3D graphics, sound, or network connectivity... or really much of anything beyond the excitement of "holy crap, it boots!"

FWIW, the modifications I mentioned to initctl might not be compatible with the native-boot option, so I'll look into finding a workaround that will allow native-booting or chrooting into the same Ubuntu image without manually copying files around.

Lastly before I log off for the night, I leave you with this:

To get any of this to work, you will definitely need a custom kernel. If you can't install a custom kernel for whatever reason, you won't be able to participate. If you can still use "Loki", then you'll be fine. Once I work out all the bugs and finish my documentation, rest assured I will be posting my kernel with a list of modifications needed to build it.

I'm gonna go to bed happy, now. G'night.
[AT&T Samsung Galaxy S 4 General] xjesus:
Very exciting!!! Can't wait to see xubuntu on my S4 9505i, which I suppose is exactly the same as the i337 except for the modem. But the kernel should be 100% compatible hopefully.

Do you have the "smart dock" to connect the S4 to a monitor and USB OTG in the same time? Does the HDMI output work with freedreno?

Next things to try could be WiFi, Bluetooth for external keyboard/mouse.

Once Xubuntu works stable on the S4 I'll just buy a huge battery and get rid of my heavy ultrabook ;)

By the way, I suppose you saw this before for the S3:

http://xdaforums.com/showthread.php?t=2364048

Very good luck with your project
[AT&T Samsung Galaxy S 4 General] Aou:
It's possible, but be prepared for it to just boot-loop. If any hardware is different in your device, then the drivers included in my kernel will probably go bonkers. The native boot method probably has a higher chance of working as-is.

Not yet - I'm still waiting for them to come down in price, or for a generic/knock-off to be created. I don't want to pay $80. Anything connected via Bluetooth in Android before opening the chroot should remain connected, but they don't seem to show up in /dev/input/event*. Otherwise, I'd just hard-code them into the xorg.conf like I did with the OTG keyboard/mouse. Further, I haven't played much with HDMI out. I recently got my old MHLv1 adapter to work with this neat 11pin-to-5pin adapter I found for $5 at Fry's Electronics. It might take some re-writing of xorg.conf to tell it to output to the MHL framebuffer instead.

Yeah, but a 5-inch screen might get difficult to read. You can mess with the DPI settings, but.... yeah..... HDMI might be better. ;)

Indeed, I did see that thread once while researching. It's too bad the author dumped the project, because he/she got really far with it. I might look into kexec, because on my HP Touchpad, it's really handy to switch between Android and Ubuntu.

Thanks! I'm almost done posting it. I'll continue to revise it and simplify it the best I can. At this point, I feel that I have something stable enough to release into the public, which I'm *hoping* will bring this project into the light so that other talented people can help me out with taking this further.

EDIT: Upon reading that thread again, it's sorta funny. It appears I went through some of the exact same issues that [MENTION=2300635]gTan64[/MENTION] did... too funny. I wonder what I could learn here...
[AT&T Samsung Galaxy S 4 General] Aou:
I'll be out of town most of the weekend, so I probably won't be working on this project all that much until sometime next week. Currently, I'm working on porting Ubuntu Touch over to the Galaxy S4, and with my recent success in booting to Xubuntu, I was able to make some good progress on Touch. Previously, I was nearly exclusively working with pieces of the project compiled for other devices, but I've been able to now compile almost everything I need, specifically for our device.

I currently have:

- A proper Ubuntu Touch rootfs (pretty easy, it's the same for all devices)

- A custom CyanogenMod kernel build specifically for Ubuntu Touch on this device

- The proper android-ramdisk.img for the lxc container

- A custom-built cm10.1 ROM built for mako, and seems to mostly-satisfy Ubuntu Touch's needs

- The official cm10.1.3 ROM for jflteatt, but not customized for Ubuntu Touch

What I need:

- A custom-built cm10.1 ROM built for jflteatt that fully meets Ubuntu Touch's needs

My problem is currently that I cannot get cm10.1 to finish building. I'm getting errors with libOmxQcelp13Enc and a few other libs related to OMX/stagefright. Mostly with just missing files. I'm starting to wonder if I somehow screwed it up and I'm getting pieces of 10.2 mixed-in or something.

Because I don't have the proper ROM installed, I'm several upstart jobs are crashing badly, and the phone boots to a black screen. Unity8 doesn't seem to be working right, but I believe it's because a few components are not starting right. Again, I think if I had the proper ROM installed, I'd be golden.
[AT&T Samsung Galaxy S 4 General] xjesus:
I bougth this smart dock for only 32$ and it works perfectly:

http://www.aliexpress.com/snapshot/273242939.html

The great advantage is that you can use at the same time the USB OTG for keyboard/mouse, HDMI output and power the phone.
[AT&T Samsung Galaxy S 4 General] Aou:
Flashable .zip added with v4

For those that don't want to build everything themselves or go through the hour-long install process, I have now uploaded a flashable .zip (for TWRP/CWM recovery) that will install the Ubuntu rootfs onto your data partition. This can be used for the "Freedreno Chroot Method" and also for the "Native Boot Method". This is version 4, which includes some important bug fixes, like getting onboard and sudo working. Enjoy!
[AT&T Samsung Galaxy S 4 General] UnixNerd:
Galaxy S4 Sprint

I am rooted (I can run root-requiring apps and execute su, yet `whoami` returns unknown uid 0). When I run sh /sdcard/ubuntu.sh it is able to make the mountpoint /data/local/ubmnt, yet can't mount the image (permission denied (are you root?)). However, if I execute `busybox mount -o loop,noatime -t ext2 /sdcard/ubuntu/ubuntu.img /data/local/ubmnt` it doesn't return anything, then `busybox mount | grep ubmnt` returns '/dev/loop6 on /data/local/ubmnt type ext2 (rw,seclabel,noatime,errors=continue,user_xattr)' and `ls /data/local/ubmnt` returns a directory listing that makes sense, yet a root file browser app ES File Explorer doesn't show anything in /data/local/ubmnt and `ls /data/local/ubmnt/bin` hangs and never returns.

If I run the Launch script in the Complete Linux Installer app, `busybox mknod /dev/block/loop255 b 7 255` returns 'mknod: /dev/block/loop255: Operation not premitted'.

I am running busybox version 1.21.1-Stericson (2013-09-26 14:33:26 BST) multi-call binary.
[AT&T Samsung Galaxy S 4 General] Aou:
First, if you are running Android 4.3, you might run into additional root-related issues thanks to the security enhancements included with SELinux, etc. - I'll assume you're not running 4.3.

Indeed, the "mknod" method that the the app used caused problems for me also, which is one of the main reasons I switched to the "mount -o loop" method.

If you're able to see a rootfs within /data/local/ubmnt after the image has been mounted, then you should be able to proceed. Strange. You might try one of the following:

- Edit the script to remove the $DIR variable and replace it with /sdcard instead. Some have had issues with this variable not working right.

- Try loading the image onto an external SDCard and manually enter /mnt/extSdCard instead (or wherever...)

- After manually mounting the image like you mentioned, have you tried proceeding with the rest of the script?

- I'm wondering if something might be wrong with the image file itself?

- You might try to unpack the image file into the /data/local/ubmnt directory manually. I was able to do this by mounting it at a different/temporary location and then recursively copying (with maintaining permissions) to the /data/local/ubmnt directory, and then editing the script to remove the mount/unmount of the $mnt directory.
[AT&T Samsung Galaxy S 4 General] UnixNerd:
4.3

I am running 4.3 with SELinux status: "Enforcing SEPF_SPH-L720_4.3_0010", Kernel version: "3.4.0-1927016 se.infra@R0504-16#1" Baseband MJA. And I did replace $DIR with /sdcard and the image file passes the md5sum in the zip. What/are there any drawbacks to manually unpacking the img and chrooting into the extracted dir (and not using the img at all)?
[AT&T Samsung Galaxy S 4 General] Aou:
Ick, I'm scared of 4.3 for the sake of root restrictions, so I've been avoiding it completely for now - might look into at another time when more is known about Android's implementation of SELinux, etc.

As for unpacking it and manually using it, there aren't really any major drawbacks. The biggest inconvenience is that the whole rootfs isn't easily portable - such as if you wanted to temporarily free up some space on your /data partition (which includes the internal sdcard), you can't very easily just dump the .img file elsewhere. You'll have to manually poke around the script file to adjust for this method, but it sounds like you're 110% capable of doing so. You can take a look at the u.sh included in the "companions" file in the "Freedreno method". The mount commands are slightly different due to the devtmpfs being enabled plus a few other things, but it's a good reference because the Freedreno method uses /data/ubuntu as a rootfs directory (and no .img files are ever loaded).

Please be extra careful if/when you ever delete your rootfs from your /data partition. If you ever mount your sdcard within the rootfs of Ubuntu, you can easily accidentally wipe your sdcard by recursively deleting your rootfs (if it is still mounted, that is).
[AT&T Samsung Galaxy S 4 General] UnixNerd:
extract

How would I go about extracting the image? I ran the mount command and can ls the mount point and see what looks like a distro, but when I cp $mnt/* /some/other/dir it hangs, I think it can't access anything past the root of the mounted image... I could extract it with my ubuntu desktop, but IDK how I'd copy if over (no USB mass storage option, and I haven't gotten adb working with my new phone (I switched to the S4 from the HTC Evo 3D)...
[AT&T Samsung Galaxy S 4 General] Joeyxc:
your an amazing dev, do you think its possible to get ubuntu touch working for the s4?
[AT&T Samsung Galaxy S 4 General] DeadlySin9:
He has actually been working on it, and some others in the Development Only section have been getting at it also for the international version, though once that makes progress getting it to ours will be easier at the least.
[AT&T Samsung Galaxy S 4 General] Aou:
I'll have to look into it more to see how the rootfs is packaged in the .img file - there might be an app or utility that Android can use to extract it. Otherwise, if you can find a way to get the data from your PC to the phone, I would recommend using some tar commands to make it easier to transport (and to ensure you maintain file integrity), such as:

(first extract files to /data/local/ubmnt)

tar -czf ~/rootfs.tar.gz /data/local/ubmnt

and then on the device...

cd /

tar -xzf /path-to-tarball/rootfs.tar.gz

I wonder if Kies Air supports copying files... never tried. Worst case scenario, you could upload the tarball and download it again on the device (ick).

Thanks! ^_^

Indeed, I have been working on getting Ubuntu Touch to work. I had gotten to the point where unity8 should load, but crashes and fails miserably. Mostly I got stuck at building a proper CM10.1 android ROM (that's designed for Ubuntu), and I haven't picked up back up in a while. Maybe I'll take another crack at it again here soon...

Yeah, that would be much easier to work with, rather than trying to work with code intended for the Nexus4. >_<
[AT&T Samsung Galaxy S 4 General] xjesus:
Eventually some port for i9505

Hope you can share some good ideas working together:

http://xdaforums.com/showthread.php?t=2564187
[AT&T Samsung Galaxy S 4 General] MemoryController:
REALLY interesting project, how are you on touch?