Ubuntu Touch 13.10 Saucy on the HP Touchpad DUAL BOOT ANDROID

Search This thread

jshafer817

Senior Member
Jul 11, 2010
386
483
NRH, TX.
www.onsitedentalsystems.com
Ubuntu Touch 13.10 SAUCY Rom Triple Boot WebOS, Android, Ubuntu Touch (Or Quad if you need to)
09-27-2013 is the RootFS Date with apt-get dist-upgrade to 9-29-2013

Download Links Updated 09-29-2013 5:44 am central time
http://gdurl.com/d6Qn cm-10.1-20130929-UNOFFICIAL-tenderloin.zip (Install First Kernel\Ramdisk\System Partition)
http://gdurl.com/EnW8 saucy-preinstalled-touch-armhf.zip (Install Last Ubuntu Touch RootFS\Data Partition)

PARTITION CREATOR AND UNINSTALLER (From ACMEInstaller3 and ACMEUninstaller) Thanks Green!
http://www.gdriveurl.com/?idl=813809797536&out=2 UbuntuTouch_Partition_Creator
http://www.gdriveurl.com/?idl=613809797926&out=2 UbuntuTouch_UbuntuDesktop_Partition_Creator
http://www.gdriveurl.com/?idl=513809798298&out=2 UbuntuTouch_Uninstaller
http://www.gdriveurl.com/?idl=413809798725&out=2 UbuntuTouch_UbuntuDesktop_Uninstaller

filename.png


HOW TO INSTALL!
You will need a little over 2 GB of space on your sdcard to devote to the new LVM Partiitons! This assumes you HAVE installed CyanogenMod (Android), ClockworkMod Recovery, MoBoot and still have WebOS. WebOS is a prerequisite for Audio. ALSO, you need novaterm. http://www.webos-internals.org/wiki/Accessing_Linux_Using_Novaterm AND it's good to have adb as well.

NOTE! If you have Ubuntu 11.04 - 13.XX Desktop Version
The Ubuntu Desktop LVM needs to be Uninstalled and Recreated. I have provided uImage files and Novacom to do this, or you can change the /etc/fstab file to have the correct device mapper paritition number.

Dealing with a small boot partition! It cannot hold all the uImages for WebOS, Android, Ubuntu Desktop, Ubuntu Touch, andClockworkMod at the same time. What I usually do is move the Ubuntu Touch kernel off of /boot to /sdcard (/media/internal in webos) before installing Ubuntu Touch, then move ClockworkMod to the /sdcard after installing Ubuntu Touch, and of course move the Ubuntu Desktop uImage file back to the /boot partition for Quad-Booting. You should only do this, if you know what you are doing, as having ClockworkMod on boot is handy. Know what you are doing or don't do it. (Which is why I should probably stay away from rom building!, haha) https://github.com/jshafer817/Ubunt...mportant files after compiling/data/etc/fstab

*IF YOU HAVE ALREADY INSTALLED THE ROM THAT WAS NOT DUAL-BOOT CAPABLE, YOU SHOULD REINSTALL ANDROID FIRST SINCE WE WIPED IT OUT


*Since we are dual-booting, we need to create 3 LVM Partitions that will use 2 GB of space from the sdcard*
1. Copy the RootFS.zip and the cm-10.zip file to the sdcard
2. Reboot into WebOS Recovery
3. novacom boot mem:// < UbuntuTouch_Partition_Creator
OR
novacom boot mem:// < UbuntuTouch_UbuntuDesktop_Partition_Creator (Requires 6.2 GB of Space, for Ubuntu Desktop 11.XX - 13.XX)
4. Reboot into ClockWorkMod to install the cm-10-*.zip FIRST and the RootFS zip LAST
5. Reboot and chose uImage.UbuntuTouch

Wait 3 minutes, while the touchpad boots. At some point adb will start to run. Eventually you should see a Unity Session..

If you didn't see a session!
a) reboot!
b) Eventually the backlight on the screen will shut off.. Touch the screen or hit the power button or home button some builds to turn the screen on. Still no session? Can you run android-chroot when you get into adb? When you login to adb it should say root@phablet and not BusyBox? You can also run /system/bin/logcat. Hold down the power button for 2 or 3 seconds and Ubuntu Touch will shutdown.


TO FORMAT UBUNTU TOUCH LVM PARTITIONS (in case your wondering create-partition.sh does this.. but what if you want to format after you install to do a reinstall??
novaterm into webos!
mkfs.ext4 /dev/store/ut-data
mkfs.ext3 /dev/store/ut-system
mkfs.ext3 /dev/store/ut-cache

TO REMOVE UBUNTU TOUCH LVM's AND KERNEL
novacom boot mem:// < UbuntuTouch_Uninstall

TO REMOVE UBUNTU TOUCH AND UBUNTU DESKTOP LVM's AND KERNEL
novacom boot mem:// < UbuntuTouch_UbuntuDesktop_Uninstall



Having problems installing WebOS Applications????

https://developer.palm.com/support/applicationupdate WebOS UpdateManager Certificate Fix
http://xdaforums.com/showthread.php?p=42317438
There is an update to WebOS.. If you wipe your device after July 23rd 2013.. Then you must do this.


Ubuntu Touch Notes!

NOTE! If you have Ubuntu 11.04-13.10 NON-TOUCH installed, you will need to:
novacom boot mem:// < UbuntuTouch_UbuntuDesktop_Uninstall


*Built from Milaq's CM 10.1 Source WITHOUT JCSullins Bluetooth fixes

*Bluetooth and Sound come from the Ubuntu 11.04-13.10 Non touch. Mainly the upstart and executables. WebOS does get mounted for sound to get initialized. udev and pulse were patched.

*First Ubuntu Touch device running Saucy (Flipped Image) but with LVM Partitions. For this to work I had to compile lvm and e2label statically and use them in the ramdisk for Ubuntu.

How Saucy Works!?
Kernel is loaded with an Ubuntu Touch Ramdisk (Like normal Linux). Then the data partition is mounted as root, the system partition is mounted as /system. The LXC containter loads android based off of /system, then Ubuntu Touch Session loads. This is not a chroot like quantal.


What works:
*Camera
*Wifi
*Bluetooth
*Sound
*Accelerometer


Bugs and Beta\Alpha Stuff:
1. PulseAudio\GStreamer\Music App is not tied to the Media Service, so the music does not play with the screen turned off. GStreamer keeps playing, but you cannot hear sound unless powerd has turned the screen on and.. ??? Not worth changing until Ubuntu Touch becomes more.. finalized. Sometimes the music does not come back on after a long sleep?
Workarounds:
sudo service powerd stop (with the backlight turned on)

2. Bluetooth only works in terminal
a) this is because Bluetooth Settings has not been written to Ubuntu Touch

3. Camera App only works one time. Needs to be mirrored.. Again. Long story!

4. Brightness or Backlight settings???
as root!
echo "0-255" > /sys/class/leds/lcd-backlight/brightness

to set the screen brightness. 0-255 is a range of values you should use.
0 will turn off the backlight
255 is full birghtness
and of course.. service powerd stop while the screen is on will stop powerd from turning off the backlight if idle.


5. Touchscreen finger liftoff does not always get detected at boot correctly. Need to talk to ubunu-devel about that.? CM-TEAM?? Hmm.. Reboot and try again!

6. Browser cannot download files. Browser cannot play videos because the latest gstreamer "has not landed yet"..

7. 720P H.264 is choppy? 480p plays fine.. Waiting for more updates.

APPARMOR NOTE: Since 2.6.35 Kernel does not have apparmor, we are using /usr/bin/aa-strip with crontab to run every minute. So if you install a click app and cannot run it, wait a minute! sed -i "s/aa-exec.*-- //g" /home/phablet/.local/share/applications/*.desktop

OPEN-SSH NOTES:
Recently they did something to openssh. Do this to install.
apt-get install --reinstall openssh-server
service ssh start (every boot?)
If powerd turns off the backlight, it suspends your ssh session. There is some code in the wifi modules that I believe is causing it. Work on that later.. or disable powerd and turn the lights off to save battery power or backlight by reading brightness notes above.


MTP-SERVER NOTE
mtp-server has been disabled.. want to enable it? As root!
cd /etc/init
mv ../mtp* .
cd /usr/share/upstart/sessions
mv ../mpt* .
reboot

When you do, don't expect adb to work... In Ubuntu 13.10 Desktop, you see the /home/phablet get Mounted on the filesystem via mtp.. I haven't messed with the Windows Driver.. I messed with the google one and changed the pid and vid, and.. no device was found when I ran adb.. so.. perhaps mtp shuts down adb on the touchpad.. I think that was in the upstart file though.. mtp-server-bootup.conf, etc.



MORE USEFUL NOTES

How to copy files with novaterm?
cat filename | novaterm put file:///put/full/destination/path/filename (push example) tested
novaterm get file:///full/destination/path/filename (pull example) untested
novaterm get file:///full/destination/path/filename > filename (pull example) untested

How do I compile uimage-extract to extract a kernel.img and ramdisk.img from a uImage file (boot.img)?
git clone https://github.com/jcsullins/moboot
cd moboot/tools
gcc -o uimage-extract uimage-extract.c -lz

How do I extract the kernel image and initramfs from a uImage file?
./uimage-extract uImage.filename (from inside moboot tools folder)

How to unpack and repack gzip ramdisk images?
mkdir newramdisk
cd newramdisk
gunzip -c ../your-ramdisk-file | cpio -i
make changes, next command is to pack a new ramdisk.img
find . | cpio -o -H newc | gzip > ../newramdisk.img

How to unpack and repack lzma ramdisk images? (I used lzma)
mkdir newramdisk
cd newramdisk
lzma -dc ../newramdisk.img | cpio -i
make changes, next command is to pack a new ramdisk.img
find . | cpio -o -H newc | lzma > ../your-ramdisk-file

How to create a moboot compatible kernel?
mkimage -A arm -O linux -T kernel -C none -a 0x40208000 -e 0x40208000 -n "Kernel" -d kernel.img uImage
mkimage -A arm -O linux -T ramdisk -C none -a 0x60000000 -e 0x60000000 -n "Image" -d ramdisk.img uRamdisk
mkimage -A arm -O linux -T multi -a 0x40208000 -e 0x40208000 -C none -n "multi image" -d uImage:uRamdisk uImage.CyanogenMod.new

How to connect to an open-wifi network without Unity as root?
adb shell
sudo su
service network-manager stop
iwconfig wlan0 essid "essid-you-want-to-connect-to"
ifconfig wlan0 192.168.X.X netmask 255.255.255.0 up
route add default gw 192.168.X.X
sed -i '$ a nameserver 8.8.8.8' /etc/resolv.conf
you should be on the net.

How can I create my own saucy-preinstalled-touch-arm.tar.gz to go into the .zip? (from a runnng device)
adb shell
cd /data/ubuntu
sudo tar --preserve-permissions -zcvf /sdcard/saucy-preinstalled-touch-armhf.tar.gz *
exit
adb pull /sdcard/saucy-preinstalled-touch-armhf.tar.gz .
now put that file in the .zip.

How do I untar the saucy-preinstalled-touch-armhf.tar.gz file?

place saucy-preinstalled-touch-armhf.tar.gz in the folder you want to be in, and go to that folder in terminal
mkdir rootfs
cd rootfs
sudo tar --preserve-permissions -zxvf ../saucy-preinstalled-touch-armhf.tar.gz
sudo make your changes as root, be mindful of permissions.

How do I swap my kernels to quad-boot? (With webOS)
a)Before you install Ubuntu Touch, move a kernel from /boot to /media/internal
novaterm
mount -o remount,rw /boot
mv /boot/uImage.Ubuntu13 /media/internal (or uImage.Ubuntu)
mount -o remount,rw /boot
b) After you install Ubuntu Touch, move it back, but remove ClockworkMod (know what you are doing are don't do this)
novaterm
mount -o remount,rw /boot
mv /boot/uImage.ClockworkMod /media/internal
mv /media/internal/uImage.Ubuntu13 /boot
sync
mount -o remount,ro /boot

How can I run webOS Doctor after all this and just start all over factory clean?
http://xdaforums.com/showthread.php?t=1564938 3rd post but I would skip the creation of /dev/store/cm-* partitions. Be sure to delete cm-data, cm-system, cm-cache, ut-data, ut-system, ut-cache, and ubuntu-store if you have it. Delete them all! Then recreate the lvm. If you need to recreate Android partitions do that with AcmeInstaller ie the usual way to install Android. You must start with WebOS 3.0.0 and then you can do 3.0.5. Be sure to say thanks on that post.



Thanks to:
Ogra (ubuntu-touch, huge thanks!), castrwilliam (ubuntu desktop rom), CalcProgrammer (ubuntu desktop rom), crimsonredmk (archlinux rom), Flemmard (cm team "resizing the boot partition would be stupid", yep), Mystikal57 (sound fixes in desktop that really helped get it going), JCSullins (moboot, cm team, all sorts of stuff), Dorregray (camera fixes I need to reimplement), w-flo (ubuntu-touch), drmarble (ubuntu-touch, cyanogenmod-touchpad, big thanks to him).. and others from the #ubuntu-touch irc channel and Ubuntu 11.04-13.10 threads, cyanogenmod team, etc... "I stand on the shoulders of giants"


Look at the old Ubuntu Touch thread I started around page 17 for more in depth notes on what I did.
OR
https://github.com/jshafer817/UbuntuTouch

I am NOT a developer!!!!
 
Last edited:

blmvxer

Senior Member
Jan 13, 2012
1,480
607
Will do! :) good luck!! Can't wait to boot this up and get to work! :)

Sent from my LG-LS970 using xda app-developers app
 
  • Like
Reactions: jshafer817

jshafer817

Senior Member
Jul 11, 2010
386
483
NRH, TX.
www.onsitedentalsystems.com
Any update on the camera bug... Get that baby squashed yet:)

Sent from my Galaxy Nexus using Tapatalk 2

Honestly.. a little bit.. Spent all day trying to figure out what file makes the change.. as this has to be done in cm10.1 not ubuntu.
camera.msm8660.so

About 1 try left before giving up.. In the meantime I created a github... Will be very soon. Before I go to sleep again.. Brewing Coffee..

Took a 5 hour nap today though! Sweet!

I found a line for CameraHAL.cpp and I swapped 3/2 to 2/3 and got an ugly green screen. I am trying to swap previewWidth and Height now.. If nothing happens.. I give up and will start to package. FAILED.

The last try will be just telling it to be a front facing camea, as that would explain the mirror, flipping??? New Idea sounds better!

if (read_mode_from_config("preview_mode") == 1) {
info->facing = CAMERA_FACING_BACK;
}

to (remove the if)
info->facing = CAMERA_FACING_BACK; OR?
info->facing = CAMERA_FACING_FRONT;?

Testing both then packaging. dmesg seems to say we are using preview mode 2 so maybe add the 2?

First try:
info->facing = CAMERA_FACING_FRONT; if no change occurs in image (NO CHANG OCCURED), then perhaps Ubuntu Touch thinks the camera IS front facing.. so the next try will be facing back hard coded.. look for a change, if it does.. try adding the 2 with the if statement. Or just keep it this way... as a change would be GREAT.

from dmesg:
msm_camio_set_perf_lvl: S_PREVIEW rc = 0
VFE opertaion mode = 0x2, output mode = 0x5

http://developer.android.com/reference/android/hardware/Camera.html !
 
Last edited:
  • Like
Reactions: blmvxer

jshafer817

Senior Member
Jul 11, 2010
386
483
NRH, TX.
www.onsitedentalsystems.com
android::HAL_getCameraInfo(camera_id, &cameraInfo);
info->facing = cameraInfo.facing;
info->orientation = cameraInfo.orientation;
info->facing = CAMERA_FACING_BACK;
info->orientation = 90;

vs
info->orientation = 180;

Going to try this now.. as the camera WAS being a front camera. Image is no longer mirrored incorrectly. Now we just have to find the right orientation.

:good:
 
Last edited:
  • Like
Reactions: blmvxer

blmvxer

Senior Member
Jan 13, 2012
1,480
607
I will be testing within an hour once I doctor my tablet and resize the partitions.

Sent from my LG-LS970 using xda app-developers app

---------- Post added at 09:40 PM ---------- Previous post was at 09:34 PM ----------

When you compile your next kernel for your ROM, if you do, will you add fstrim?. As I read there is slow graphics. Trimming the partitions should speed up things.

Sent from my LG-LS970 using xda app-developers app
 

jshafer817

Senior Member
Jul 11, 2010
386
483
NRH, TX.
www.onsitedentalsystems.com
Camera App Info!

VideoOutput {
id: viewFinder

property bool shouldBeCentered: device.isLandscape
property real anchoredY: viewFinderGeometry.y * (device.isInverted ? +1 : -1)
property real anchoredX: viewFinderGeometry.x * (device.isInverted ? +1 : -1)

x: viewFinder.shouldBeCentered ? 0 : viewFinder.anchoredX
y: viewFinder.shouldBeCentered || device.naturalOrientation === "landscape" ?
0 : viewFinder.anchoredY
width: parent.width
height: parent.height
source: camera

/* This rotation need to be applied since the camera hardware in the
Galaxy Nexus phone is mounted at an angle inside the device, so the video
feed is rotated too.
FIXME: This should come from a system configuration option so that we
don't have to have a different codebase for each different device we want
to run on */
orientation: device.naturalOrientation === "portrait" ? -90 : 0

/* Convenience item tracking the real position and size of the real video feed.
Having this helps since these values depend on a lot of rules:
- the feed is automatically scaled to fit the viewfinder
- the viewfinder might apply a rotation to the feed, depending on device orientation
- the resolution and aspect ratio of the feed changes depending on the active camera
The item is also separated in a component so it can be unit tested.
*/

Ah HA!!!
 

kicker22004

Senior Member
Mar 28, 2008
425
122
OnePlus 9 Pro
Is a Doctor a must? all i'm getting is a black screen right after CID changes faces. I've let it sit for 10 minutes and still same results, Reformatted system,data,cache and re installed in order...same?
 

Fr3nZy

Senior Member
Feb 23, 2008
122
1
A few questions

Been using Ubuntu on my Laptop and liked it. I'm looking to try it out on my TouchPad now but I have a few questions.
Does this replace Android? Or does this create new partitions for Ubuntu and allows triple boot from moboot?
I've notice a few installation instructions saying this is 'based on CM10'. Is this Ubuntu on top of the Android core or a pure Ubuntu installation?
Thanks for clarifying this for me in advance.
 

chris5s

Senior Member
Been using Ubuntu on my Laptop and liked it. I'm looking to try it out on my TouchPad now but I have a few questions.
Does this replace Android? Or does this create new partitions for Ubuntu and allows triple boot from moboot?
I've notice a few installation instructions saying this is 'based on CM10'. Is this Ubuntu on top of the Android core or a pure Ubuntu installation?
Thanks for clarifying this for me in advance.

This replaces Android. Backup is your friend!

Thanks to the op for continued development of this rom.

---------- Post added at 08:49 AM ---------- Previous post was at 07:53 AM ----------

Is a Doctor a must? all i'm getting is a black screen right after CID changes faces. I've let it sit for 10 minutes and still same results, Reformatted system,data,cache and re installed in order...same?

Same issue here ....


Edit: success! Booted up after a couple of minutes after a reboot.
However, some issues - rotation not working and keyboard is messed up. It comes up in the top left hand corner of the touchpad when in landscape mode, see attached pictures.
Thanks
 

Attachments

  • WP_20130903_002.jpg
    WP_20130903_002.jpg
    253.1 KB · Views: 442
  • WP_20130903_004.jpg
    WP_20130903_004.jpg
    263.2 KB · Views: 392
Last edited:
  • Like
Reactions: kyzerdroid

Top Liked Posts

  • There are no posts matching your filters.
  • 30
    Ubuntu Touch 13.10 SAUCY Rom Triple Boot WebOS, Android, Ubuntu Touch (Or Quad if you need to)
    09-27-2013 is the RootFS Date with apt-get dist-upgrade to 9-29-2013

    Download Links Updated 09-29-2013 5:44 am central time
    http://gdurl.com/d6Qn cm-10.1-20130929-UNOFFICIAL-tenderloin.zip (Install First Kernel\Ramdisk\System Partition)
    http://gdurl.com/EnW8 saucy-preinstalled-touch-armhf.zip (Install Last Ubuntu Touch RootFS\Data Partition)

    PARTITION CREATOR AND UNINSTALLER (From ACMEInstaller3 and ACMEUninstaller) Thanks Green!
    http://www.gdriveurl.com/?idl=813809797536&out=2 UbuntuTouch_Partition_Creator
    http://www.gdriveurl.com/?idl=613809797926&out=2 UbuntuTouch_UbuntuDesktop_Partition_Creator
    http://www.gdriveurl.com/?idl=513809798298&out=2 UbuntuTouch_Uninstaller
    http://www.gdriveurl.com/?idl=413809798725&out=2 UbuntuTouch_UbuntuDesktop_Uninstaller

    filename.png


    HOW TO INSTALL!
    You will need a little over 2 GB of space on your sdcard to devote to the new LVM Partiitons! This assumes you HAVE installed CyanogenMod (Android), ClockworkMod Recovery, MoBoot and still have WebOS. WebOS is a prerequisite for Audio. ALSO, you need novaterm. http://www.webos-internals.org/wiki/Accessing_Linux_Using_Novaterm AND it's good to have adb as well.

    NOTE! If you have Ubuntu 11.04 - 13.XX Desktop Version
    The Ubuntu Desktop LVM needs to be Uninstalled and Recreated. I have provided uImage files and Novacom to do this, or you can change the /etc/fstab file to have the correct device mapper paritition number.

    Dealing with a small boot partition! It cannot hold all the uImages for WebOS, Android, Ubuntu Desktop, Ubuntu Touch, andClockworkMod at the same time. What I usually do is move the Ubuntu Touch kernel off of /boot to /sdcard (/media/internal in webos) before installing Ubuntu Touch, then move ClockworkMod to the /sdcard after installing Ubuntu Touch, and of course move the Ubuntu Desktop uImage file back to the /boot partition for Quad-Booting. You should only do this, if you know what you are doing, as having ClockworkMod on boot is handy. Know what you are doing or don't do it. (Which is why I should probably stay away from rom building!, haha) https://github.com/jshafer817/Ubunt...mportant files after compiling/data/etc/fstab

    *IF YOU HAVE ALREADY INSTALLED THE ROM THAT WAS NOT DUAL-BOOT CAPABLE, YOU SHOULD REINSTALL ANDROID FIRST SINCE WE WIPED IT OUT


    *Since we are dual-booting, we need to create 3 LVM Partitions that will use 2 GB of space from the sdcard*
    1. Copy the RootFS.zip and the cm-10.zip file to the sdcard
    2. Reboot into WebOS Recovery
    3. novacom boot mem:// < UbuntuTouch_Partition_Creator
    OR
    novacom boot mem:// < UbuntuTouch_UbuntuDesktop_Partition_Creator (Requires 6.2 GB of Space, for Ubuntu Desktop 11.XX - 13.XX)
    4. Reboot into ClockWorkMod to install the cm-10-*.zip FIRST and the RootFS zip LAST
    5. Reboot and chose uImage.UbuntuTouch

    Wait 3 minutes, while the touchpad boots. At some point adb will start to run. Eventually you should see a Unity Session..

    If you didn't see a session!
    a) reboot!
    b) Eventually the backlight on the screen will shut off.. Touch the screen or hit the power button or home button some builds to turn the screen on. Still no session? Can you run android-chroot when you get into adb? When you login to adb it should say root@phablet and not BusyBox? You can also run /system/bin/logcat. Hold down the power button for 2 or 3 seconds and Ubuntu Touch will shutdown.


    TO FORMAT UBUNTU TOUCH LVM PARTITIONS (in case your wondering create-partition.sh does this.. but what if you want to format after you install to do a reinstall??
    novaterm into webos!
    mkfs.ext4 /dev/store/ut-data
    mkfs.ext3 /dev/store/ut-system
    mkfs.ext3 /dev/store/ut-cache

    TO REMOVE UBUNTU TOUCH LVM's AND KERNEL
    novacom boot mem:// < UbuntuTouch_Uninstall

    TO REMOVE UBUNTU TOUCH AND UBUNTU DESKTOP LVM's AND KERNEL
    novacom boot mem:// < UbuntuTouch_UbuntuDesktop_Uninstall



    Having problems installing WebOS Applications????

    https://developer.palm.com/support/applicationupdate WebOS UpdateManager Certificate Fix
    http://xdaforums.com/showthread.php?p=42317438
    There is an update to WebOS.. If you wipe your device after July 23rd 2013.. Then you must do this.


    Ubuntu Touch Notes!

    NOTE! If you have Ubuntu 11.04-13.10 NON-TOUCH installed, you will need to:
    novacom boot mem:// < UbuntuTouch_UbuntuDesktop_Uninstall


    *Built from Milaq's CM 10.1 Source WITHOUT JCSullins Bluetooth fixes

    *Bluetooth and Sound come from the Ubuntu 11.04-13.10 Non touch. Mainly the upstart and executables. WebOS does get mounted for sound to get initialized. udev and pulse were patched.

    *First Ubuntu Touch device running Saucy (Flipped Image) but with LVM Partitions. For this to work I had to compile lvm and e2label statically and use them in the ramdisk for Ubuntu.

    How Saucy Works!?
    Kernel is loaded with an Ubuntu Touch Ramdisk (Like normal Linux). Then the data partition is mounted as root, the system partition is mounted as /system. The LXC containter loads android based off of /system, then Ubuntu Touch Session loads. This is not a chroot like quantal.


    What works:
    *Camera
    *Wifi
    *Bluetooth
    *Sound
    *Accelerometer


    Bugs and Beta\Alpha Stuff:
    1. PulseAudio\GStreamer\Music App is not tied to the Media Service, so the music does not play with the screen turned off. GStreamer keeps playing, but you cannot hear sound unless powerd has turned the screen on and.. ??? Not worth changing until Ubuntu Touch becomes more.. finalized. Sometimes the music does not come back on after a long sleep?
    Workarounds:
    sudo service powerd stop (with the backlight turned on)

    2. Bluetooth only works in terminal
    a) this is because Bluetooth Settings has not been written to Ubuntu Touch

    3. Camera App only works one time. Needs to be mirrored.. Again. Long story!

    4. Brightness or Backlight settings???
    as root!
    echo "0-255" > /sys/class/leds/lcd-backlight/brightness

    to set the screen brightness. 0-255 is a range of values you should use.
    0 will turn off the backlight
    255 is full birghtness
    and of course.. service powerd stop while the screen is on will stop powerd from turning off the backlight if idle.


    5. Touchscreen finger liftoff does not always get detected at boot correctly. Need to talk to ubunu-devel about that.? CM-TEAM?? Hmm.. Reboot and try again!

    6. Browser cannot download files. Browser cannot play videos because the latest gstreamer "has not landed yet"..

    7. 720P H.264 is choppy? 480p plays fine.. Waiting for more updates.

    APPARMOR NOTE: Since 2.6.35 Kernel does not have apparmor, we are using /usr/bin/aa-strip with crontab to run every minute. So if you install a click app and cannot run it, wait a minute! sed -i "s/aa-exec.*-- //g" /home/phablet/.local/share/applications/*.desktop

    OPEN-SSH NOTES:
    Recently they did something to openssh. Do this to install.
    apt-get install --reinstall openssh-server
    service ssh start (every boot?)
    If powerd turns off the backlight, it suspends your ssh session. There is some code in the wifi modules that I believe is causing it. Work on that later.. or disable powerd and turn the lights off to save battery power or backlight by reading brightness notes above.


    MTP-SERVER NOTE
    mtp-server has been disabled.. want to enable it? As root!
    cd /etc/init
    mv ../mtp* .
    cd /usr/share/upstart/sessions
    mv ../mpt* .
    reboot

    When you do, don't expect adb to work... In Ubuntu 13.10 Desktop, you see the /home/phablet get Mounted on the filesystem via mtp.. I haven't messed with the Windows Driver.. I messed with the google one and changed the pid and vid, and.. no device was found when I ran adb.. so.. perhaps mtp shuts down adb on the touchpad.. I think that was in the upstart file though.. mtp-server-bootup.conf, etc.



    MORE USEFUL NOTES

    How to copy files with novaterm?
    cat filename | novaterm put file:///put/full/destination/path/filename (push example) tested
    novaterm get file:///full/destination/path/filename (pull example) untested
    novaterm get file:///full/destination/path/filename > filename (pull example) untested

    How do I compile uimage-extract to extract a kernel.img and ramdisk.img from a uImage file (boot.img)?
    git clone https://github.com/jcsullins/moboot
    cd moboot/tools
    gcc -o uimage-extract uimage-extract.c -lz

    How do I extract the kernel image and initramfs from a uImage file?
    ./uimage-extract uImage.filename (from inside moboot tools folder)

    How to unpack and repack gzip ramdisk images?
    mkdir newramdisk
    cd newramdisk
    gunzip -c ../your-ramdisk-file | cpio -i
    make changes, next command is to pack a new ramdisk.img
    find . | cpio -o -H newc | gzip > ../newramdisk.img

    How to unpack and repack lzma ramdisk images? (I used lzma)
    mkdir newramdisk
    cd newramdisk
    lzma -dc ../newramdisk.img | cpio -i
    make changes, next command is to pack a new ramdisk.img
    find . | cpio -o -H newc | lzma > ../your-ramdisk-file

    How to create a moboot compatible kernel?
    mkimage -A arm -O linux -T kernel -C none -a 0x40208000 -e 0x40208000 -n "Kernel" -d kernel.img uImage
    mkimage -A arm -O linux -T ramdisk -C none -a 0x60000000 -e 0x60000000 -n "Image" -d ramdisk.img uRamdisk
    mkimage -A arm -O linux -T multi -a 0x40208000 -e 0x40208000 -C none -n "multi image" -d uImage:uRamdisk uImage.CyanogenMod.new

    How to connect to an open-wifi network without Unity as root?
    adb shell
    sudo su
    service network-manager stop
    iwconfig wlan0 essid "essid-you-want-to-connect-to"
    ifconfig wlan0 192.168.X.X netmask 255.255.255.0 up
    route add default gw 192.168.X.X
    sed -i '$ a nameserver 8.8.8.8' /etc/resolv.conf
    you should be on the net.

    How can I create my own saucy-preinstalled-touch-arm.tar.gz to go into the .zip? (from a runnng device)
    adb shell
    cd /data/ubuntu
    sudo tar --preserve-permissions -zcvf /sdcard/saucy-preinstalled-touch-armhf.tar.gz *
    exit
    adb pull /sdcard/saucy-preinstalled-touch-armhf.tar.gz .
    now put that file in the .zip.

    How do I untar the saucy-preinstalled-touch-armhf.tar.gz file?

    place saucy-preinstalled-touch-armhf.tar.gz in the folder you want to be in, and go to that folder in terminal
    mkdir rootfs
    cd rootfs
    sudo tar --preserve-permissions -zxvf ../saucy-preinstalled-touch-armhf.tar.gz
    sudo make your changes as root, be mindful of permissions.

    How do I swap my kernels to quad-boot? (With webOS)
    a)Before you install Ubuntu Touch, move a kernel from /boot to /media/internal
    novaterm
    mount -o remount,rw /boot
    mv /boot/uImage.Ubuntu13 /media/internal (or uImage.Ubuntu)
    mount -o remount,rw /boot
    b) After you install Ubuntu Touch, move it back, but remove ClockworkMod (know what you are doing are don't do this)
    novaterm
    mount -o remount,rw /boot
    mv /boot/uImage.ClockworkMod /media/internal
    mv /media/internal/uImage.Ubuntu13 /boot
    sync
    mount -o remount,ro /boot

    How can I run webOS Doctor after all this and just start all over factory clean?
    http://xdaforums.com/showthread.php?t=1564938 3rd post but I would skip the creation of /dev/store/cm-* partitions. Be sure to delete cm-data, cm-system, cm-cache, ut-data, ut-system, ut-cache, and ubuntu-store if you have it. Delete them all! Then recreate the lvm. If you need to recreate Android partitions do that with AcmeInstaller ie the usual way to install Android. You must start with WebOS 3.0.0 and then you can do 3.0.5. Be sure to say thanks on that post.



    Thanks to:
    Ogra (ubuntu-touch, huge thanks!), castrwilliam (ubuntu desktop rom), CalcProgrammer (ubuntu desktop rom), crimsonredmk (archlinux rom), Flemmard (cm team "resizing the boot partition would be stupid", yep), Mystikal57 (sound fixes in desktop that really helped get it going), JCSullins (moboot, cm team, all sorts of stuff), Dorregray (camera fixes I need to reimplement), w-flo (ubuntu-touch), drmarble (ubuntu-touch, cyanogenmod-touchpad, big thanks to him).. and others from the #ubuntu-touch irc channel and Ubuntu 11.04-13.10 threads, cyanogenmod team, etc... "I stand on the shoulders of giants"


    Look at the old Ubuntu Touch thread I started around page 17 for more in depth notes on what I did.
    OR
    https://github.com/jshafer817/UbuntuTouch

    I am NOT a developer!!!!
    7
    Well, udev is working very well.. Boots up a lot faster.. Pulse now needs to be recompiled to support ACCEPT instead of ACCEPT4. Doing that now. THEN.. sound will play.. without a process taking up all the cpu power.

    Also... recompiled for /sys/class/backlight.. perhaps.. that will give us brightness control inside of Unity.
    6
    I am giving ubuntu touch a shot.. Started it today. Could take awhile.

    Waiting for another project so I might as well use this time.
    5
    Got the 09-21-2013 Image to stay in Unity8 with LightDM... as UT did this.. more like standard ubuntu.

    Network-Manager problems... and /run permissions... at the moment...

    What else.. recompiled ts_srv to be in debug mode. I played with these settings and it seemed to help, but that was on an older image, 1 out of 10 did not respond to a swipe but instead a double tap. Has to do with Delta_Max, but could be UT... Hasn't happened yet on this newer image..

    Big bug though.. network manager won't allow phablet to make changes..

    Oh yeah..
    service stop network-manager
    iwconfig wlan0 essid "tadaow"
    ifconfig wlan0 192.168.1.99 netmask 255.255.255.0 up
    route add default gw 192.168.1.1
    edit /etc/resolv.conf and add nameserver 8.8.8.8
    apt-get update
    upgrade....
    accountsservice camera-app gir1.2-gudev-1.0 libaccountsservice0 liblxc0
    libpam-systemd libsystemd-daemon-dev libsystemd-daemon0 libsystemd-id128-0
    libsystemd-id128-dev libsystemd-journal-dev libsystemd-journal0
    libsystemd-login-dev libsystemd-login0 libudev-dev libudev1 lxc lxc-dbg
    lxc-dev mediaplayer-app pulseaudio python-systemd python3-lxc
    systemd-services ubuntu-clock-app ubuntu-rssreader-app ubuntu-touch-session
    ubuntu-weather-app udev unity-scope-click

    Yes... See what happens. I will end up downgrading lxc.

    Probably time to recompile systemd and pulse with our patches.

    EDIT: Volume Control Buttons are working.
    5
    Added accept4 to the kernel. No longer have to recompile udev or pulse.

    But.. we have a gstreamer codec issue... Working on this. This is good though. Video.. sort of plays now.