FORUMS
Remove All Ads from XDA

[HOWTO] Install Sugar Learning Platform on a low-cost tablet

16 posts
Thanks Meter: 0
 
By badday2, Junior Member on 16th February 2013, 04:48 PM
Post Reply Email Thread
Hi there,

so this is a guide how to install the Sugar Learning Platform ( http://www.sugarlabs.org/ ), which might be known from the OLPC project ( http://one.laptop.org/ ) on a low cost tablet using Android. In this example I used the Zync Z930 ( http://www.zync.in/index.php/our-pro...nc-z930-detail ), but generally spoken it should be possible on every tablet / device running Android.

Software requirements
Complete Linux Installer ( https://play.google.com/store/apps/d...esult&hl=en_GB )
android-vnc-viewer ( https://play.google.com/store/apps/d...esult&hl=en_GB )
Android Terminal Emulator ( https://play.google.com/store/apps/d...esult&hl=en_GB )


All the software above should be free of cost (at least at the time this is written). Technically we will have running a special Fedora-ARM-Image in a chroot environment on the top of Android. But you will need root rights for this, so be aware of warranty conditions and other things as it might harm your device and make it unusable.

To root your device, you must find a method that works for your device. Many devices can be rooted according to that method , for my device I used simply adb commands as described by arunal_123 in this thread: http://forum.xda-developers.com/show....php?t=2093663
I did not use the files he offered as I had my own, but I think this should not change a thing. However, be aware what rooting means and if you do not know it, DO NOT DO IT.

OK, so I expect you to have downloaded the 3 applications I suggested, now that we have a rooted device, let us start the real work!

First, download the Fedora-Image file from here As you can read, this is an ALPHA version, and in fact there are some bugs, however, it should work for us, so do not worry.
Now I expect that you have the image file at /user/home/fedora.img
First you might want to enlarge the image file to allow us to install all the applications we want. You can do that like this. I used method 1. If you face some trouble that the mount-point does not exist, feel free to create it by yourself manually like that as root on terminal (I expect you to run a GNU/Linux on your computer, if you do not have one, just load down an image of for example Ubuntu and put it on your USB drive ( http://www.ubuntu.com/download/help/...re-you-install )):
mkdir /media/fedoranew

OK, now that you have enlarged your image file (maybe to 2GB), let´s proceed.

Open the terminal app and type su. Now there should be a # instead of a $. If this does not work, you have not successfully rooted your device, go back to step one, if you face trouble, make a specific thread for your device, but search on the forum before. Now you can already start up fedora using the following command:
Code:
 sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /mnt/sdcard/fedora/fedora.img
(your image file would be on your sd-card in the folder fedora named fedora.img, on some devices the real extern sdcard might be available under ext_sd instead of sdcard).

Now some errors will popup, let us ignore them right now. So we are in fedora right now, but without graphical view. First, we can update all the stuff by using yum. Just type yum update (that might take some time, take a cup of coffee or realize that you should repaint your wall again)
Alright, so now let us install the programs we need, that is the tightvnc-server and the sugar-desktop, therefore type
Code:
yum install tightvnc-server
yum groupinstall sugar-desktop
yum install sugar-emulator
OK, now we must change the xstartup file of our vnc-server to use our own version. I actually prefer the nano-editor (you can install it with yum install nano, but vi is pre-installed, to use it, type: vi /home/fedora/.vnc/xstartup In the case it does not exist, just recreate the user fedora by deleting it by userdel fedora, also erase all files by rm -r /home/fedora and create it again by adduser fedora, just ignore any warnings. Now you should change the file like that:
Code:
#!/bin/sh
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
dbus-launch --session sugar &
Right now if you would try to start it, you would find various errors in the logfile in /home/fedora/.vnc, that is due to some strange rights for some folders and some missing devices. So here is how to fix this issue:
Code:
chmod 666 /dev/null
chmod 777 /tmp
yum install MAKEDEV
cd /dev
MAKEDEV tty
MAKEDEV pts
So now you should have all devices and sufficient permissions, but you might not have a vnc-user-password for fedora, so change to the user and make a dummy start of the vnc-server
Code:
su - fedora
vncserver
...and choose your favorite password.

Alright, go back to root via exit and shut the hole thing down via exit again.
So start Fedora again by pressing the Vol-Up button and w on the terminal, press enter.

OK, now we should have a more or less graphical interface, so start android-vnc-viewer, use the following settings:
Code:
Port-Number: 5900
Username: fedora
Password: <your_choice>
24bit colours
And connect....

Now you should see some terminal, type
Code:
sugar-emulator
Wait a second and sugar should power up. Now you should be able to start activities and also install new ones.

Enjoy Sugar on your tablet and tell me about your experiences and problems.


I just wrote this hole post out of my memory, so probability is high I forgot something, just tell me about your issues and I will update the guide.



Happy hacking!
 
 
14th May 2013, 02:57 AM |#2  
Junior Member
Flag Durham, NC
Thanks Meter: 0
 
More
Sugar Learning Platform on Inexpensive Chinese Tablet
I was very happy to find a post on this topic. I have a couple of Yeahpad Pillbox7 inexpensive Chinese tablets, which I purchased specifically because they are the only thing I can afford and my 4 year old twin boy and girl need a real learning computer.

I believe this topic is of the highest importance as successful implementation means making the original goal of the $100 Sugar computer a reality to the individual user who doesn't necessarily need the specifications of the XO machine.

I have been as detailed as I can be - perhaps painfully so - because I don't know what I am missing that could make the difference in turning this from a lengthy set of failed directions and notes into a functional demonstration project that proves that it is possible to reach this goal, which has been more than a decade in the making, albeit by taking some shortcuts with the lofty hardware goals and in this case running in a virtual environment which hampers performance and functionality.

If you want to start reading where following your directions starts to go haywire then skip to the dotted line of astrixs "* * * * * * * * *" and the heading in capital letters that says, "YUM UPDATE, INSTALLING TIGHTVNC-SERVER, SUGAR-DESKTOP, & SUGAR EMULATOR - RESULTING UNFOUND FILE DEPENDENCIES NOT AT ANY MIRROR"

The specifications of the Yeahpad Pillbox7 are about identical to the machine you used.

SPECIFICATIONS ON THE YEAHPAD PILLBOX7

Android Ice Cream Sandwich
Allwinner A13 CPU and Mali-400 GPU - which is ARM Cortex-A8 architecture
512 Mb RAM
4 GB internal memory
7" capacitive touch screen
some kind of wifi - supposedly 802.11n

I have a 16GB miniSDHC card I am using with a microSD adapter
I have a USB hub and have connected a mouse and keyboard to make the work easier.


PREVIOUS EXPERIENCE RELEVANT TO THIS ENDEAVOUR

I have been using the Linux On Android / Complete Linux Installer app with Terminal Emulator app and Android VNC Viewer app all from the Play store.I have successfully chroot virtualized a very basic Debian with XFCE, and also Ubuntu 12 with LXDE with these tools.

I also have been spending some time on the Linux on Android IRC channel and have Zac the creator of the app on my FaceBook page. Zac has been helpful and is very curious as to how this project goes.

My device the Yeahpad Pillbox7 is pre-rooted and only requires a "su" at terminal to get the "#" prompt.

Despite any details that indicate otherwise, I am a complete Android noob and my experience in linux is just as a distro-hopping enthusiast with no professional experience and almost no understanding. Nonetheless I try to enjoy what I do with these consumer devices and my emphasis has always been on the lower end economically, saving old machines often when there is not any funds for a new one, and for about 5 years now also getting ahold of consumer devices from China at the lowest price that can be had new and trying to modify the stock "computer" into something useful. This is my third attempt to do so in that category.

This type of chroot linux virtualization has shown the most promise as of late in the absence of driver availabilty for installing linux natively on a category of device where the manufacturers, the components they use, and the architecture has been in constant flux - but at this point in the market they are all aiming for Android v4 and up with Play store access. Since these devices are small, they seem to lend themselves to the application of young children, and also since the largest percentage of very poor users without access are young children, the application of a learning environment that emphasizes classical computer literacy with such allegories as turtle graphics to teach programming at a young age is a worthwhile lofty goal for the community to apply to the flood of inexpensive tablet computers coming our way now.


ALPHA VS BETA VERSION OF FEDORA CORE IMAGE FOR LINUX ON ANDROID

Perhaps this is where I went wrong I am using the BETA version of the Linux on Android Fedora Core image. It wasn't available when you wrote this post. Perhaps I was mistaken in thinking that the BETA would be the better image to start with. I will go back and do it with the ALPHA version next, which is per your instructions, and I will post my results again. Anyhow I took the Fedora Core image for Linux on Android and I unzipped it using 7zip, I verified the md5sum using fileverifier++ and I put on the miniSDHC card under a folder called /fedora/ and the file I named fedora.img. So I put it at /fedora/fedora.img on the miniSDHC card.


CONFIGURING MY PC TO BE ABLE TO DO IMAGE PREPARATION

I downloaded a the alternate version of xubuntu 12.04.b for 64 bit. Did an md5sum check and burned it to a CD-ROM. Then after updating the VirtualBox install on the PC I have access to is an Acer Aspire 5733-6838 which runs Windows 7 Home Premium SP1 on an Intel Core i5 with 4GB of DDR3 RAM - I installed the Xubuntu as a Guest OS on VirtualBox successfully and applied all the latest updates. Then I also installed Guest Additions and made the Drag'n;Drop and Clipboard functions bi-directional because I like being able to copy and paste in and out of my host OS while I do my work. I was able to mount the 16GB miniSDHC card onto the Guest Xubuntu OS using the USB Devices options on the VirtualBox control bar.

I did all that (installing Xubuntu) because the Linux I've been virtualizing and enjoying lately, Mageia2, did not execute the "cp -r fedoraold/* fedoranew" command which I derived from the 'expand the image directions' you referenced without generating a plethora of "cp: cannot create symbolic link" errors!


EXPANDING THE FEDORA IMAGE TO 2GB

Having switched to Xubuntu 12.04b 64bit alternate - I was able to execute the directions derived from
the directions from the linuxonandroid resource you referenced (I am not allowed to post outside links because I am a new xda forum member)
and enlarge the fedora image file to 2GB. I used these commands from terminal:

dd if=/dev/zero of=fedoranew.img bs=1M count=0 seek=2048
mke2fs -F fedoranew.img

so then I created two folders on the miniSDHC card at /fedora/ one called "fedoraold" and one called "fedorabang"
and then mounted the folders from the terminal using these commands

sudo mount -o loop fedora.img fedoraold
sudo mount -o loop fedoranew.img fedorabang

then I did the copy to the larger 2GB image file using this command from the terminal:

sudo cp -r fedoraold/* fedorabang

and finally I unmounted the folders using these terminal commands

sudo umount fedoraold
sudo umount fedorabang[/B]

I then shut down xubuntu and used the remove usb device icon from the Windows 7 taskbar to get a safe to remove the SDCard message.
I removed the miniSDHC card from the microSD adapter and inserted it into the Yeahpad Pillbox7 while powered off.


TRYING TO MODIFY THE FEDORA IMAGE ON THE TABLET TO RUN SUGAR LEARNING PLATFORM USING LINUX ON ANDROID AND ANDROID VNC VIEWER

I already have Linux on Android / Terminal Emulator / and Android VNC Viewer Apps installed on the Android Tablet.

Using File Manager I see that the newly made image is at: mnt/extsd/fedora/fedoranew.img

So after confirming that the bootscript.sh file is where it is supposed to be I use this command from the terminal to launch Linux on Android with the 2GB FedoraCore image

sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /mnt/extsd/fedroa/fedoranew.img

I take the advice to ignore the errors, I've seen them before on LinuxOnAndroid during successful launches of other images.


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
YUM UPDATE, INSTALLING TIGHTVNC-SERVER, SUGAR-DESKTOP, & SUGAR EMULATOR - RESULTING UNFOUND FILE DEPENDENCIES NOT AT ANY MIRROR

So I continue by trying to get all the current updates for fedora using the terminal command:

yum update

At the Transaction summary - I also respond with: "y" and [ENTER].

This is where I ran into my first set of snags - summarizing the errors Yum couldn't find these files:

bind-license-9.9.2-5.P1.fc17.noarch.rpm
dosfstools-3.0.14-1.fc17.armv5tel.rpm
selinux-policy-3.10.0-167.fc17.noarch.rpm
bind-libs-9.9.2-5.P1.fc17.armv5tel.rpm
dnsmasq-2.65-4.fc17.armv5tel.rpm
coreutils-8.15-9.fc17.armv5tel.rpm
libsss_sudo-1.8.6-1.fc17.armv5tel.rpm
iproute-3.3.0-5.fc17.armv5tel.rpm
bind-utils-9.9.2-5.P1.fc17.arm5tel.rpm
bash-4.2.39-2.fc17.arm5tel.rpm
bind-libs-lite-9.9.2-5.P1.fc17.armv5tel.rpm
selinux-policy-targeted-3.10.0-167.fc17.noarch.rpm

at any of these mirror sites:

apparently I can't post these here because I am a new xda forum member

I tried "yum update" more than once and ran into the identical set up errors, so I continued on hoping that substitute files were found, or that none of those files were essential.

So I conintued to try and install the programs your post says that I need, starting with tightvnc-server, so I use the terminal command:

yum install tightvnc-server

At the Transaction summary - I also respond with: "y" and [ENTER].

This is a summary of the files that Yum couldn't find from the errors:

perl-PathTools-3.33-221.fc17.armv5tel.rpm
perl-Pod-simple-3.16-221.fc17.noarch.rpm
perl-macros-5.14.3-221.fc17.armv5tel.rpm
perl-libs-5.14.3-221.fc17.armv5tel.rpm
perl-Pod-Escapes-1.04-221.fc17.noarch.rpm
perl-Module-Pluggable-3.90-221.fc17.noarch.rpm
perl-5.14.3-221.fc17.armv5tel.rpm
gnutls-2.12.20-4.fc17.armv5tel.rpm

I believe that Yum had tried all the mirror sites listed earlier.
As before, I have nothing else to go on, so I hope that either substitute files were found, or that none of those files were essential.

So I continue to try and install the progams your post says that I need, the next one being the sugar-desktop, so I use the terminal command:

yum groupinstall sugar-desktop

At the Transaction summary - I also respond with: "y" and [ENTER].

This is a summary of the files that Yum couldn't find from the errors:

libarchive-3.0.4-2.fc17.armv5tel.rpm
libproxy-0.4.10-1.fc17.armv5tel.rpm
gnutls-2.12.20-4.fc17.armv5tel.rpm (see above - already not found before)

I believe that Yum had tried all the mirror sites listed earlier.
As before, I have nothing else to go on, so I hope that either substitute files were found, or that none of those files were essential.

So I continue to try and install the programs your post says that I need, the next one being the sugar-emulator, so I use the terminal command:

yum install sugar-emulator

At the Transaction summary - I also respond with: "y" and [ENTER].

This is a summary of the files that Yum couldn't find from the errors:

libproxy-0.4.10-1.fc17.armv5tel.rpm (see above - already not found before)
gnutls-2.12.20-4.fc17.armv5tel.rpm (see above - already not found before)

I believe that Yum had tried all the mirror sites listed earlier.
As before, I have nothing else to go on, so I hope that either substitute files were found, or that none of those files were essential.
All in all from I read that there were 22 .rpm files missing that were not found at any of the relevant mirrors between the general yum update (12 missing files) and dependencies from tightvnc-server, sugar-desktop, and sugar-emulator (10 more missing files)


CUSTOMIZING THE XSTARTUP FILE AT /home/fedora/.vnc/xstartup FOR OUR PURPOSES

So I continud on with the instruction in your post, next on the agenda is an xstartup file for vnc-server.
You describe it as changing the xstartup file - I could used the "ls -a" command on the directory /home/fedora/ and could not find a directory called .vnc and could not find an existing file at /home/fedora/.vnc/xstartup

I too don't seem to have the talent for the vi editor so I take your suggestion and install nano using this terminal command:

yum install nano

At the Transaction summary - I also respond with: "y" and [ENTER].

There were some other files starting with "." that I found in the /home/fedora/ directory - I looked at them with the text editor and I didn't see any information that I could figure was specific to this use instance - but I am no expert. So I did the following strictly on your instructions advice.

It said if I could not find the xstartup file in existance to do the following from the terminal command line, ignoring any warnings.

userdel fedora
rm -r /home/fedora
adduser fedora

I tried the least destructive choices it gave me upon the "rm -r /home/fedora command" but it did not result in a .vnc directory or xtartup file that I could detect when completing the instructions to the "adduser fedora" command - so I repeated the commands but answered the resulting question with removal of even the /home/fedora directory. nonetheless all of that failed in creating a .vnc directory that I could detect (using the 'ls -a' command) or of an xstartup file.

So I went ahead and ad libbed the following from the terminal because otherwise anything I were to write in nano for /home/fedora/.vnc/xstartup would not save for lack of a directory for it to go in.

mkdir /home/fedora/.vnc

For some reason even after I execute the make directory command, "ls -a" from the /home/fedora/ directory still doesn't show it, but I can cd into, /home/fedora/.vnc/

From there I simply followed the directions and from the terminal:

nano /home/fedora/.vnc/xstartup

And from there entered the script given and saved it with ctrl-o and/or ctrl-x nano commands:

#!/bin/sh
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
dbus-launch --session sugar &


ADDITIONAL PERMISSIONS AND MISSING DEVICES

So refering to your instructions once again: it says that I need to execute the following to give certain rights and take care of missing devices. So from the terminal:

chmod 666 /dev/null
chmod 777 /tmp
yum install MAKEDEV


At the Transaction summary - I also respond with: "y" and [ENTER].
Terminal responds "Complete!"

cd /dev
MAKEDEV tty


Then I enter according to your instructions

MAKEDEV pts

And the terminal responds:

don't know how to make device "pts"

So I do some research into the "Makedev" command - I can't post this url here because I am a new xda forum member.
Granted the page I find is not from the same flavor of linux but I don't see a "pts" option and it seems perhaps this is a typo.
So I need to guess what you were trying to accomplish. I decide on the following terminal command:

MAKEDEV pty

And at least there are no errors - but was it what you intended - I have no clue? also was there any reason for the Makedev command to be capitalized either when asking yum to install it or in its usage. Again I am a noob so I have no clue.


VNC-USER-PASSWORD AND DUMMY START OF VNC-SERVER AND OTHER FINISHING TOUCHES (unresolved)

From the terminal the next command in your directions gives no problems:

su - fedora

The result is the changed the prompt from [root@localhost dev]# to [fedora@localhost ~]$

but the next command:

vncserver

is unrecognized or any variants I try "vnc-server" "tightvnc-server" and I look for anything promising in the /bin/ and /sbin/ directories but fail to find anything.

So the part about 'choosing my favorite password' which I know I will need to use the Android VNC Viewer app to see the graphical install of the sugar learning platform, is sadly not a reality. This is confusing to me as I know the command must be available somehow as everytime one tries to launch the Linux On Android app it is a question on the user dialog, something like "start the vnc-server (y/n)" or some words along those lines, so I know there is a command to do this available.

So to shut everything down requires from the terminal:

exit

and then also again from the terminal:

exit

I am equally perplexed by the whole set of directions instructing to press "Vol-Up" button and w on the terminal.

I try it. and the Vol-Up button does register some symbol in the terminal, and I follow it with the letter "w" on the terminal and enter.
and also I try to do the two actions in conjunction, but nothing I do with those directions seems to restart Fedora that I can tell.

Can you explain that part of the directions in more detail?

I try various combinations of things I know to try but I Android VNC Viewer is failing to connect even if there is something to connect with for lack of a password

that I have not been able to set or already know. Also even after getting Linux on Android to launch the fedoranew.img that has been modified it the terminal is not

responsive on the command line to:

sugar-emulator (does nothing)


AN INVITATION TO ALL THOSE WHO KNOW BETTER AS TO WHAT I CAN OR SHOULD TRY TO DO TO MAKE THE SUGAR LEARNING PLATFORM WORK WITH LINUX ON ANDROID AND ANDROID VNC VIEWER.

I have not been able to enjoy Sugar on the Yeahpad Pillbox7 tablet,
and I am taking you up on your offer to tell you about my experiences and problems.

I know you said you wrote the post out of memory but if you could do it again taking notes while you do it so that others can try to get the same result, please comment on what you think I am doing right or wrong, or if you can remember more that might be helpful - then the world will owe you a debt as there in is in my humble opinion many many people who don't even know that they need this information yet.
14th May 2013, 05:34 PM |#3  
OP Junior Member
Thanks Meter: 0
 
More
Thumbs up
OK, so what I think is that this image is somehow messed up as these unresolved dependencies indicate - in my opinion - some mis-configured setup.

Maybe the fastest solution might be to try the alpha-Image I used - if you still face trouble, please feel free to describe it as precisely and well as you did this time.



Good luck
16th May 2013, 12:05 AM |#4  
Junior Member
Flag Durham, NC
Thanks Meter: 0
 
More
I am about to repeat the process with the ALPHA image but..
I am about to repeat the process with the ALPHA image. But...it would help if you made comment on more than the dependency problems...

These three areas in your instructions and my comments are areas I am particularly curious about and think your input would be valuable in.

1)

For instance it would be helpful to know about what you think about what you think about my comments with the strange behavior around the /home/fedora/.vnc/xstartup file and the del and add of the fedora user.

Wouldn't it be better just to add the .vnc folder and xtartup file and doesn't the lack of a .vnc folder at all seem to indicate a step that wasn't documented?

2)

Please examine what I wrote about the MAKEDEV command. Was I correct about the typo?

3)

Please enlighten me further about your instructions regarding "Vol-up" and "w" - I can't find any information anywhere that gives me a clue about what you were trying to do there. I wasn't able to reproduce the result you got - maybe if I understood more I will be able to replicate what you were trying to do there and or find another way to do it.


Thanks so much in advance... I appreciate your interest in this topic!
16th May 2013, 01:30 PM |#5  
OP Junior Member
Thanks Meter: 0
 
More
Quote:

For instance it would be helpful to know about what you think about what you think about my comments with the strange behavior around the /home/fedora/.vnc/xstartup file and the del and add of the fedora user.

Wouldn't it be better just to add the .vnc folder and xtartup file and doesn't the lack of a .vnc folder at all seem to indicate a step that wasn't documented?

As I understood you, yum install tightvnc-server fails due to unresolved dependencies. Therefore, no such folder will be created as the program is not installed. That is also why you will not get such a folder after recreating the user.


Quote:

Please examine what I wrote about the MAKEDEV command. Was I correct about the typo?

It might be the case that it was in fact pty, not pts, I am not sure about that anymore. You can check for the success by changing into the /dev directory ( cd /dev ) and then list all entries of pty ( ls pty* ) to see whether the device was created successfully.


Quote:

Please enlighten me further about your instructions regarding "Vol-up" and "w" - I can't find any information anywhere that gives me a clue about what you were trying to do there. I wasn't able to reproduce the result you got - maybe if I understood more I will be able to replicate what you were trying to do there and or find another way to do it.

This is only for convenience so that you do not have to write the hole command again. So when you are in the terminal emulator, by default, you should be able to go up in your bash history by pressing "Vol-up" and "w", similar to the "arrow-up" on your PC.



I hope I could help you, good luck.
16th May 2013, 01:35 PM |#6  
Junior Member
Flag Durham, NC
Thanks Meter: 0
 
More
Thank you.
Thank you, those are some very useful replies!
I will be sure to post the results of my next binge of effort on this project.
Post Reply Subscribe to Thread

Tags
chroot, linux, olpc, sugar

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes