Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,769,519 Members 42,369 Now Online
XDA Developers Android and Mobile Development Forum

[development] Ubuntu as an app on Nook Tablet

Tip us?
 
AdamOutler
Old
(Last edited by AdamOutler; 17th December 2011 at 03:58 PM.)
#1  
AdamOutler's Avatar
Recognized Developer - OP
Thanks Meter 9593
Posts: 5,189
Join Date: Feb 2011
Location: Louisiana

 
DONATE TO ME
Default [development] Ubuntu as an app on Nook Tablet

This is a development thread. Do not post "good job", or "great idea", or "cool, i'm trying this now".. I want feedback.

Introduction
This is a precursor to a possible way of running a custom kernel and ROM on the Nook Tablet in a chroot environment. I've been working on an Android app and almost have a usable installer for my AndBuntu project. If we are sucessful, this installer can be converted to a Un-Nook-er app "AndNook" which may be used to install custom kernels and ROMs with additional work.

So, with that said, lets get to it.

You will need:
This is all the software you will need to run this script. If you don't have a Debian Linux based computer, you can dual boot, install Ubuntu within Windows, or run it from a memory stick.
Getting started
The basic process will go like this.. Generate an image in Ubuntu, put that on your /sdcard/Ubuntu folder and then execute a script
  1. On the Linux computer execute the following code block
    Code:
    cd ~/Desktop
    sudo apt-get install rootstock
    sudo rootstock --dist maverick --seed lxde,tightvncserver,openoffice.org,gimp,ssh --fqdn localhost --login ubuntu --password ubuntu --imagesize 3800M --notarball --fullname "Ubuntu for Android" --kbmodel pc104  --locale en_US.UTF-8 --serial ttyS0  --doswap --swapsize 256M
    This will take a while, and it will generate a image file with a bunch of charactors like ***************.img.
  2. rename this file "ubuntu.img" without the quotes
  3. create a folder on the Nook Tablet called "/sdcard/ubuntu". (that's internal storage folder "/ubuntu/")
  4. copy the "ubuntu.img" file to the folder
  5. copy THIS SCRIPT to your sdcard/ubuntu/ folder and name it "uboot".
  6. launch the terminal emulator and execute the following code block
    Code:
    su
    sh /sdcard/ubuntu/uboot
  7. Paste the output of that command here. If it failed stop. If it worked, keep going
  8. in the Ubuntu environment execute the following code block
    Code:
    /firstRun
    tightvncserver
    tightvncserver may ask you for a password
  9. Launch your VNC Viewer app
  10. Specify 127.0.0.1 as the connection address. Use your password which you selected in previous code block.

Please note, the script is designed for a Samsung Android device. There is a line in the SH script
Code:
export UbuntuLoopFS=/sdcard/ubuntu/ubuntu.img
This line may require modification.

I'm looking for feedback. If you cannot understand what's going on, please don't post. This is not user friendly.


I take no responsibility or liability for anything which may happen to your device. This may force your device into a boot loop 8 times and your device will be factory restored. If it does, please let me know and I will make changes accordingly.
Flash with Odin on Windows, Linux and Mac. Use JOdin3, Available in a web browser or offline
Check out my developer pages. Add me to your circles on Google Plus.
Wanna see the longest Linux BASH script ever made? click here.
The Following 5 Users Say Thank You to AdamOutler For This Useful Post: [ Click to Expand ]
 
little8020
Old
#2  
Senior Member
Thanks Meter 14
Posts: 127
Join Date: Aug 2010
Location: Attalla, AL
I am interested in trying this but
How much data will need to be downloaded, I currently only have "borrowed" WiFi and cell phone
And does this give you a fully usable ubuntu with desktop and ability to install linux apps
thanks for info
Att Galaxy S3 CM11, Nook tablet CM11

Get a free 2GB dropbox account, we both get an extra 250MB
http://db.tt/nE62sqB
How to get all of life's answers, http://tinyurl.com/62jdt3a
 
AdamOutler
Old
#3  
AdamOutler's Avatar
Recognized Developer - OP
Thanks Meter 9593
Posts: 5,189
Join Date: Feb 2011
Location: Louisiana

 
DONATE TO ME
Quote:
Originally Posted by little8020 View Post
I am interested in trying this but
How much data will need to be downloaded, I currently only have "borrowed" WiFi and cell phone
And does this give you a fully usable ubuntu with desktop and ability to install linux apps
thanks for info
about 2-400 megs
Flash with Odin on Windows, Linux and Mac. Use JOdin3, Available in a web browser or offline
Check out my developer pages. Add me to your circles on Google Plus.
Wanna see the longest Linux BASH script ever made? click here.
 
liquidzoo
Old
#4  
liquidzoo's Avatar
Senior Member
Thanks Meter 189
Posts: 910
Join Date: Mar 2010
Location: Florence, AZ
Not sure if it makes a difference, but the NT mounts the sdcard at /mnt/sdcard

Any way, though, I have a Linux Mint (based on Ubuntu) distro installed through VirtualBox, and I'll throw together an Ubuntu installation as well right now. I'm more than willing to help out.
 
LouZiffer
Old
(Last edited by LouZiffer; 16th December 2011 at 03:33 PM.)
#5  
Senior Member
Thanks Meter 37
Posts: 113
Join Date: Mar 2010
(misinterpreted the meaning of 'feedback'. Apologies.)

EDIT 2: Turning this into a useful post. Hopefully this is the kind of bull**** you want. If not, I'll try again!

Tried the image build on a system running Oneiric. Receive segfaults when attempting to add CA certs to java.

Code:
Setting up ca-certificates-java (20100412) ...
creating /etc/ssl/certs/java/cacerts...
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
/var/lib/dpkg/info/ca-certificates-java.postinst: line 40: 16110 Segmentation fault      LANG=C LC_ALL=C keytool -importcert -trustcacerts -keystore $KEYSTORE -noprompt -storepass "$storepass" -alias "$alias" -file "$cacertdir/$pem" > $log 2>&1
/var/lib/dpkg/info/ca-certificates-java.postinst: line 40: 16113 Segmentation fault      LANG=C LC_ALL=C keytool -importcert 
trustcacerts -keystore $KEYSTORE -providerClass sun.security.pkcs11.SunPKCS11 -providerArg '${java.home}/lib/security/nss.cfg' -noprompt -storepass "$storepass" -alias "$alias" -file "$cacertdir/$pem" > $log 2>&1
error adding brasil.gov.br/brasil.gov.br.crt
Many segfaults follow. One for each cert it tried to install. Image build abends shortly after with an error code 1 in sub-process /usr/bin/dpkg.

At first I thought this might be due to my use of OpenJDK. I removed OpenJDK, installed Sun/Oracle JDK and experienced same. This may be Oneiric-specific. For giggles I'm trying oneiric as the dist in a follow-up build on this machine, and also moving to a second Ubuntu box that's running Maverick for another try at the original instructions. Will edit this post with future updates.
 
jeph36
Old
#6  
Member
Thanks Meter 3
Posts: 43
Join Date: May 2009
Location: Cedar Falls, IA
Quote:
Originally Posted by AdamOutler View Post
[*]On the Linux computer execute the following code block
Code:
cd ~/Desktop
sudo apt-get install rootstock
sudo rootstock --dist maverick --seed lxde,tightvncserver,openoffice.org,gimp,ssh, -fqdn localhost --login ubuntu --password ubuntu --imagesize 3800M --notarball --fullname "Ubuntu for Android" --kbmodel pc104  --locale en_US.UTF-8 --serial ttyS0  --doswap --swapsize 256M
This will take a while, and it will generate a image file with a bunch of charactors like ***************.img.
Arg, I let this go for ~an hour on my netbook and got a long way through the process before I got:
Code:
/usr/bin/stat: cannot read file system information for `/home/UserUser': No such file or directory
Segmentation fault
Can this be done on a 64-bit installation of ubuntu? I have that on the more powerful desktop downstairs.
 
dragon_76
Old
#7  
dragon_76's Avatar
Senior Member
Thanks Meter 92
Posts: 574
Join Date: Apr 2007
Location: Chicago, IL
You know that this is already in the market... Ubuntu install guide. An image of 10.10 for Arm is linked in the app along with the script to start it. I have it installed and running. Only issue I have is that the resolution is lower than Blaze as the image is designed for phones.


Sent from my BNTV250 using xda premium
 
AdamOutler
Old
#8  
AdamOutler's Avatar
Recognized Developer - OP
Thanks Meter 9593
Posts: 5,189
Join Date: Feb 2011
Location: Louisiana

 
DONATE TO ME
Quote:
Originally Posted by liquidzoo View Post
Not sure if it makes a difference, but the NT mounts the sdcard at /mnt/sdcard

Any way, though, I have a Linux Mint (based on Ubuntu) distro installed through VirtualBox, and I'll throw together an Ubuntu installation as well right now. I'm more than willing to help out.
mint will work.


Quote:
Originally Posted by LouZiffer View Post
Personally I'd like the option of a slimmed down version that doesn't include the overhead of X/VNC, though I can understand the advantages of a GUI from a usability standpoint. That's a simple matter of generating an image without those options, but you might want to consider it if you're offering pre-generated images or scripts for download at some point.

Sent from my HTC Evo Design 4G using XDA Premium
This is the kind of bull**** I don't want in this thread. Congratulations on wasting a post.
Quote:
Originally Posted by jeph36 View Post
Arg, I let this go for ~an hour on my netbook and got a long way through the process before I got:
Code:
/usr/bin/stat: cannot read file system information for `/home/UserUser': No such file or directory
Segmentation fault
Can this be done on a 64-bit installation of ubuntu? I have that on the more powerful desktop downstairs.
you need to log in as a full user. UserUser is not a valid user. Useruser does not have a home folder.
Flash with Odin on Windows, Linux and Mac. Use JOdin3, Available in a web browser or offline
Check out my developer pages. Add me to your circles on Google Plus.
Wanna see the longest Linux BASH script ever made? click here.
 
jeph36
Old
(Last edited by jeph36; 16th December 2011 at 05:01 AM.)
#9  
Member
Thanks Meter 3
Posts: 43
Join Date: May 2009
Location: Cedar Falls, IA
Quote:
Originally Posted by AdamOutler View Post
you need to log in as a full user. UserUser is not a valid user. Useruser does not have a home folder.
It actually was "/home/jeph36/" where 'jeph36' is my normal ubuntu login. When I posted I thought maybe I should change it for some privacy reason, only to later realize that it is my xda user name anyway. I assume by "full user" you just mean the user that I use to login.

Edit: I tried again on the same computer with the same result. I am not sure what is missing. Unfortunately I can not stay up later to try on a different computer or with a new install (new 3-day old baby, work tomorrow, etc). Hopefully someone else has this working by tomorrow afternoon/evening, but if not I will get on it then.
 
Montisaquadeis
Old
(Last edited by Montisaquadeis; 16th December 2011 at 10:26 AM.)
#10  
Montisaquadeis's Avatar
Senior Member
Thanks Meter 23
Posts: 238
Join Date: Nov 2011
Quote:
Originally Posted by AdamOutler View Post
This is a development thread. Do not post "good job", or "great idea", or "cool, i'm trying this now".. I want feedback.

<QUOTE SNIP>

.
Saw a few mistakes such as "sh /sdcard/uboot" Shouldnt it be "sh /sdcard/ubunbtu/uboot"? I am currently n the proccess of getting ubuntu up and running in virtualbox and will be trying this out once i get this up and running for you.

Edit: The rootstock command did not work for me on ubuntu 10.04 it just spits out the command usage spill. IT installed rootstock just fine tho. so I am lost at the moment until I get some feedback of my own here. do I need to iunstall anything ontop of my fresh ubuntu install to get this working?

Edit got the command working but its still flawed big time as it keeps kicking out errors at me. You are going to want to take a good look at it and fix it.

Ed ok I managed to create the image file and here is the command i used to do it

Code:
sudo rootstock --dist maverick --seed lxde,tightvncserver,openoffice.org,gimp,ssh, -f localhost --l ubuntu --p ubuntu --imagesize 3800M --notarball --fullname "Ubuntu for Android" --kbmodel pc104  --locale en_US.UTF-8 --serial ttyS0
Not sure if it will work correctly or not but I am going to find out soon.

Edit: Ok got it transfered over and ran the "sh /sdcard/ubuntu/uboot" Command and this is the output from it

Code:
: permission denied
"
"
"
"
"
"
"
"
"
The command executed failed. please search for this command on Google. IF that fails, try www.ubuntuforums.org.
: permission denied
"
"
"
Setting up environmental variables
test: permission denied
Environmental is:
/sdcard/ubuntu/uboot: 96: Syntax error: "else" unexpected (expecting "then")

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Google Glass XE20.1 Update Brings Improved Contacts, Head Nudge, New Cards and Commands

Ever since Google unveiled Android Wear earlier this … more

Remote Control Your Android Device with Monitordroid

The Android OS showsgreat potential in many areas. One of most interesting things that … more

Intel Partners with Unity to Support Android on Intel-Based Devices

Intel, largely known for their long-standing reputation as the king of … more

Device Review: Samsung Gear Live

Recently, Google announced Android Wear to the world. Android Wear is the Android-based initiative from … more