PengDroid: a healthy fusion of Debian and Android - Nook Color Android Development

Notice: Now that PengDroid has been rolled into BotBrew, this installation method is now deprecated. You'd get all this, and a package manager GUI, by installing BotBrew "basil".
Click to expand...
Click to collapse
I love Debian, and I think it's nice to have a chroot environment full of useful tools. However, there's always a barrier keeping Android and Linux from talking to each other. This is why BotBrew is designed to not rely on a chroot system.
PengDroid is an experimental chimera of Android and Linux that gives you access to a chrooted Linux userland while preserving access to the Android system.
If this sounds dangerous, let me explain why this is safe. Have a look at the root directory of a Linux system and the root directory of an Android system; notice how they don't overlap much. This means that we could safely map some of the most useful Android directories into the Linux namespace; there's no need to modify the Android side. Let's see the code.
I made a prebuilt archive to demonstrate this method. In exchange for trying, you get a nice Debian chroot. What's not to love?!
download pengdroid.tgz to your Android device
unpack it to /data (or /sd-ext): tar zxvf path/to/pengdroid.tgz -C /data
run it: /data/pengdroid/init
For a quick sanity check, run: getprop ro.product.model (whoa, Android inside Linux)
Then, for some more fun: apt-get
By default, no repositories are enabled.
Note: Before we start installing packages from Debian, we should actually install Debian. Wait, what? Right, PengDroid is so small because it packs just enough for us to use dpkg/apt; but many Debian packages assume that we have a complete setup. To bootstrap a minimal Debian installation, run /debian.sh (which makes the final installed size a whopping 58mb). If that's too much, keep reading.
Advanced Usage
Installing a minimal Debian gives us a fairly complete, but still small, *nix system. If we wanted to go even lighter, but still have a reasonably robust setup, we could run the alternative installer: /debian.sh apt -- which installs a complete dpkg/apt system.
It's a hassle to run /data/pengdroid/init all the time, but we could fix that by making a shortcut:
Code:
busybox mount -o remount,rw /system
echo '/data/pengdroid/init -- "[email protected]"' > /system/bin/pengdroid
chmod 0755 /system/bin/pengdroid
Now, we could just prefix everything with pengdroid, like so: pengdroid python
Or, if we just want a shell: pengdroid

Awesome! Although you can probably do better on the name assignment, this is another great step transforming Android into a real Unix Distribution

Yeah, the name's awkward. But I figured I'd roll this into BotBrew some day, when we slim it down enough. It's already pretty tiny for a Linux distro, but it could be even smaller if all we want is a package manager.

PengDroid is now on a diet. It installs to some 7.7mb, with a 3.5mb download size. This is good enough to support package management, and we're one command away from a minimally-functional Debian setup (instructions in OP).
/edit:
I just fixed a potential privilege escalation vulnerability in init.c, and added some new PATH-handling code. Instead of overriding the PATH, it now prepends to it. In addition, if PATH contains a double-colon ( :: ), it inserts its additions between the colons instead of prepending. To install the new init executable without reinstalling, do (outside of PengDroid):
Code:
wget http://dl.inportb.com/pengdroid.init
cp pengdroid.init /data/pengdroid/init
umount /data/pengdroid
rm pengdroid.init
/edit:
It seems that Debian Squeeze is a bit too old for our needs. Specifically, for reliable package management across many types of Android devices, we need multiarch support. So now, I'm tracking Debian Sid.

Excited to see the debian runit scripts and how they operate. I am too noob to know the difference between the Debian distros, but I have learned to trust you in such decisions.
How about adding the pengdroid symlinks to bbsh when it makes it to +1?
I'm sure it or something like it is already firmly in the testing phase. Sounds like SOP now that I write it. I just always forget and try to get a pengdroid shell between flashes.
Watch, he's gonna tell me an easier way I should know already...

Sweet, Finally, Debian & Android rolled up together in a neat little package. Il test this out later,
& do you hail from West or South London by any Chance, where i come from "Peng" is a slang term for "Sexy"

Oh snap, I lost track of this thread
You might have noticed a pengdroid.zip archive in my files. That's a self-extracting package for those who don't have a working tar utility. You could extract it using unzip, or just run the file like a program:
Code:
chmod 0755 pengdroid.zip
./pengdroid.zip
mateorod said:
Excited to see the debian runit scripts and how they operate. I am too noob to know the difference between the Debian distros, but I have learned to trust you in such decisions.
How about adding the pengdroid symlinks to bbsh when it makes it to +1?
I'm sure it or something like it is already firmly in the testing phase. Sounds like SOP now that I write it. I just always forget and try to get a pengdroid shell between flashes.
Watch, he's gonna tell me an easier way I should know already...
Click to expand...
Click to collapse
We'll essentially be killing the existing sysvinit system and offering additional packages containing runit scripts. sysvinit is pretty good, but not enough to keep track of services.
I'd like to have [almost] perfect compatibility with the current BotBrew. BotBrew works by attaching its own filesystem (which conveniently lives under /botbrew) to the existing Android tree. Pengdroid turns this relationship on its head: it attaches crucial parts of the Android filesystem to the Debian tree, and then chroots into Debian. Technically, the chroot/reversal is not required, but it simplifies cleanup.
In BotBrew+1, /botbrew lives within the Debian filesystem tree already. After chrooting into Debian, we have automatic access to /botbrew as before. But what about direct access without chrooting? That's easy... just selectively attach the debian/botbrew directory the same way we've always been doing. So we'll need a couple of changes:
bbsh needs to detect if it's called from within the chroot and handle that special case
the init program (for starting the chroot) should add /botbrew/bin to the PATH
Multiarch is another fun thing to play with. Debian recently (officially) gained the ability to install libraries for multiple architectures at the same time. For example, this lets you have both i386 and amd64 software installed on your 64-bit system. In BotBrew, we'll take advantage of this to install both Debian packages and Android-native packages.
Why are we still planning to distribute the old stuff (repacked from Opkg) if we could get all of that and more from Debian? Simply put, these Android-native packages tend to be more efficient in terms of execution speed and space usage. But during the testing phase, I'd like to use Debian software primarily because we get those for free
Der_Panzerfaust said:
Sweet, Finally, Debian & Android rolled up together in a neat little package. Il test this out later,
& do you hail from West or South London by any Chance, where i come from "Peng" is a slang term for "Sexy"
Click to expand...
Click to collapse
Just a coincidence, I assure you, since I'm on the other side of the great pond I thought this might be an appropriate name for a penguin cyborg, that's all.

Roger that
Sent from my E15 using xda premium

Related

How to compile native android code

Hi everyone,
There has been a few questions on how to compile native android code (for exploits and such). Easy enough.
Go to http://source.android.com/download. You will need to be running Linux. Ubuntu is easiest. Follow the directions to get the source code for android downloaded and compiled.
Run this command
export PATH=/path/to/android/source/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin
Run arm-aebi-gcc or arm-aebi-g++ (depending on the language, c or c++) followed by
-o (OUTPUT) (INPUT)
So, for example, test.c would be:
arm-aebi-gcc -o test test.c
And test.cpp would be
arm-aebi-g++ -o test test.cpp
Just a note, this will make STATICALLY linked files. Meaning any headers will be included INSIDE the executable. Simply put, this means the files will be HUGE for large projects. There is a program, named agcc, which fixes this and can be found here:
http://plausible.org/andy/agcc
Put it in /bin by:
Code:
cd /bin
sudo wget http://plausible.org/andy/agcc
chmod 755 agcc
chmod +x agcc
Run agcc -o (OUTFILE) (INPUT) to compile. Be warned though, if a header is in the file that isn't in bionic (android's smaller libc) it won't compile.
Hope this helps!
+1
Awesome
............(stuipid mistake >>was<< here)..............
Thanks man...
now i can break out my bootable 50 meg linux disc and play around.
love that thing used to use it to crack windows passwords
should see the guys face when you crack his 20 char password in 5 mins without ever needing to use it.
well not really cracking but changing it. used to work at the pentagon. this one guys who used to be support for one dept. thought it would be funny to change all the admin passwords in his office. so when one of the pc's was beyond his repair. i showed up and he was like give me 10 min and i'll log you in. well 5 mins later i was fixing the machine while he was screwing off. boy was he pissed.
how big's gcc? cause i'll need to compile it for my linux.
rigamrts said:
how big's gcc? cause i'll need to compile it for my linux.
Click to expand...
Click to collapse
Massive. You're definitely better off using the prebuilt toolchain found in the Android (N|S)DK.
I would like to add something to this.
libc is essentially derived from the kernel. So, if you take agcc, and make changes to use the libc directory (I don't remember it atm) and NOT bionic, the app won't compile. Simple enough, libc is based of the kernel, so bionic is based of the android kernel. Things missing in bionic that are in libc WON"T work simply because certain kernel calls in glibc DON'T exist on the Android platform.
My exploit relied on the fact that I would be able to compile exploits using glibc, instead of using bionic. So it failed. Thats what I've figured out so far anyways.
zifnab06 said:
My exploit relied on the fact that I would be able to compile exploits using glibc, instead of using bionic. So it failed. Thats what I've figured out so far anyways.
Click to expand...
Click to collapse
Would you be willing to share the code for that exploit, even if it doesn't work? (sorry if you already have, I didn't see it anywhere)
I may be able to help.
Look up anything in our old thread, especially when we were talking about "sys/personality.h". The one I was working with exploited a hole that was patched (min_map_addr).
This blog post
honeypod.blogspot.com/2007/12/dynamically-linked-hello-world-for.html
(Sorry, my account isn't allowed to post links yet.)
gives a minimalist approach to using dynamically linked executables. (In particular, see steps #2 and #3 for the sources for hello.c and start.c) I gave it a try, and it seemed to work without agcc, e.g. with a makefile like the following (and with the arm-eabi- executables in the PATH of the user invoking the make) :
Code:
AR = arm-eabi-ar
AS = arm-eabi-as
CC = arm-eabi-gcc
CXX = arm-eabi-c++
LD = arm-eabi-ld
NDK_KIT = /opt/android/android-ndk-1.5_r1
PLATF_KIT = build/platforms/android-1.5
ARM_INC = $(NDK_KIT)/$(PLATF_KIT)/arch-arm/usr/include
ARM_LIB = $(NDK_KIT)/$(PLATF_KIT)/arch-arm/usr/lib
PLATF_INC = $(NDK_KIT)/$(PLATF_KIT)/common/include
OBJS = hello.o start.o
EXES = hello
hello: hello.o start.o
$(LD) \
--entry=_start \
--dynamic-linker /system/bin/linker -nostdlib \
-rpath /system/lib -rpath $(ARM_LIB) \
-L $(ARM_LIB) -lc -o hello hello.o start.o
hello.o: hello.c
$(CC) -I $(ARM_INC) -I $(PLATF_INC) -c hello.c
start.o: start.c
$(CC) -I $(ARM_INC) -I $(PLATF_INC) -c start.c
clean:
rm -f $(OBJS) $(EXES)
HTH
bftb0
Just curious, but I'm trying to get some native code that I've compiled to run on the Incredible. I've followed the instructions to download the the arm gcc, compiled my C code, and adb push'ed the executable over to /sdcard but I get a "permission denied" error when I try running it from my phone and adb shell. Does the phone have to be rooted in order to run native C compiled executables?
Thanks!
zebdor44 said:
Just curious, but I'm trying to get some native code that I've compiled to run on the Incredible. I've followed the instructions to download the the arm gcc, compiled my C code, and adb push'ed the executable over to /sdcard but I get a "permission denied" error when I try running it from my phone and adb shell. Does the phone have to be rooted in order to run native C compiled executables?
Thanks!
Click to expand...
Click to collapse
On an unrooted phone, push your code to /system/local or another place that you can write to and chmod it to be executable. By default the sdcard is mounted no execute. You will either need to add the directory you put it in to the path or execute it implicitly by specifying it is in the local directory.
for example ./myprogram
I hope that helps. I re-read it and it doesn't make much sense unless you have a firm grasp of the things that happen between the lines.
best of luck.
Thanks. Good stuff.
rigamrts said:
now i can break out my bootable 50 meg linux disc and play around.
love that thing used to use it to crack windows passwords
should see the guys face when you crack his 20 char password in 5 mins without ever needing to use it.
well not really cracking but changing it. used to work at the pentagon. this one guys who used to be support for one dept. thought it would be funny to change all the admin passwords in his office. so when one of the pc's was beyond his repair. i showed up and he was like give me 10 min and i'll log you in. well 5 mins later i was fixing the machine while he was screwing off. boy was he pissed.
how big's gcc? cause i'll need to compile it for my linux.
Click to expand...
Click to collapse
This is one of the most unbelievable stories ive read in a while. The fact that the pentagon had an administration department without policies or security in place to prevent such a widely known method, is comical.
btw, such a linux cd is no secret. Its called pnordahl.
Useful information
I'm surprised to see that many of you don't use the Forum's search function and simply start new topics over and over again. What funny is that the info you put here is old and useless.
I've posted an article on how to compile native C code for Android months ago, with several examples and tools:
http://forum.xda-developers.com/showthread.php?t=514803
or direct link herE:
http://www.pocketmagic.net/?p=682
However this technique is now too old.
The best approach is to simply use the NDK and build a custom Makefile for Cygwin's make under windows or easier under linux, see:
http://betelco.blogspot.com/2010/01/buildingdebugging-android-native-c.html
radhoo said:
I'm surprised to see that many of you don't use the Forum's search function and simply start new topics over and over again. What funny is that the info you put here is old and useless.
I've posted an article on how to compile native C code for Android months ago, with several examples and tools:
http://forum.xda-developers.com/showthread.php?t=514803
or direct link herE:
http://www.pocketmagic.net/?p=682
However this technique is now too old.
The best approach is to simply use the NDK and build a custom Makefile for Cygwin's make under windows or easier under linux, see:
http://betelco.blogspot.com/2010/01/buildingdebugging-android-native-c.html
Click to expand...
Click to collapse
Thank you for your very informative links. I'll take a look tonight, since I find this very interesting and would love to compile a few things for Android.
"What funny is that the info you put here is old and useless." - This was posted almost 10 months ago. That's a long time in smart phone years. By the same token, if it were January 2010 and I was looking for this info, I would assume that a post from May 2009 would be dated too.
"I'm surprised to see that many of you don't use the Forum's search function and simply start new topics over and over again." - Maybe zifnab did search and find your post and deemed your technique too old for Jan. 2010, so he created a new post with newer information. Or maybe he wanted to show a different way to do the same thing. Or maybe he figured that many users only have/take the time to look in their phone-specific forum. No one knows other than zifnab.
Personally, I welcome multiple posts by different people on the same topic. Everyone is different and often have different takes on the same thing. I find it easier to understand many techniques/topics if I get multiple perspectives.
Again, thank you for your contribution.
I need to compile the library with some modifications. how to do it as simple as possible? what will it take?
vlad072 said:
I need to compile the <library> with some modifications. how to do it as simple as possible? what will it take?
Click to expand...
Click to collapse
Did you get any thing in this regard ? Even i want to compile a part for library for the Android 5.1.1 device but not able to find any resource. Help will be appreciated.

Optware for Android released by Novaports

Optware was originally developed as a distribution mechanism for software for the Open Source Linux project for the Linksys NSLU2 (a small low cost network storage device). That consumer storage device ran on Linux, and the community opened it up, but they needed a lightweight distribution mechanism for their lightweight devices.
Since 2004 Optware has been adopted by a variety of Linux communities and device developers including the webOS community working on the Palm Pre and Pixi, and developers for devices as diverse as Asus WL-500g,WL-HDD, WL-500gx, WL-500gP routers, the Synology DS-101 and DS-101g+ NAS devices.
At its core, Optware is a package manager to allow you to easly install and uninstall cross-compiled linux applications on your device over the internet. At this time, optware supports the automatic download and installation of over 1500 programs. (See the list at the end of the wiki article.)
Why should I use Optware?
Like the original slug, android devices lack a distribution mechanism to install Linux/command line tools programs and utilities. Many in the Android community who want or need to do command line processing on their device use a chroot of some sort (Debian seems popular) to get their distribution and package management tools. With Optware, it becomes possible to simply run whatever utility or program you want on the native underlying Linux.
Additionally, Optware For Android installs openSSH making it possible to access your Nook from any PC with SSH capability, and sets up an unprivileged username/password login system for the device at the command line. All in all then, since it can be installed with a single script, since it's lightweight, and since it's designed for small and embedded devices, Optware is a perfect fit for the Android community.
Optware for Nook is the first Optware for Android release by the Novaports team and is their gift to the Android community members who have helped them so much with information on Android devices.
What does it do?
The Optware bootstrap installed the IPKG package manager. It installs the optware Busybox. It installs openSSH and makes the ssh demon persistent. It creates an unprivileged user with a username and password you choose.
See Installation instructions and details at the Optware for Android page at Nookdevs.com
For completeness of licensing compliance, the source code for all optware package can be found at the following locations:
1) build scripts at svn.nslu2-linux.org in the /svnroot/optware/ area
2) tarballs at sources.nslu2-linux.org in the /sources area (this is a *large* directory)
To contribute code to Optware, see www . nslu2-linux . org in the /wiki/Optware/AddAPackageToOptware area
-- Rod Whitby
-- Original NSLU2-Linux Project Lead and Optware Architect
This works beautifully! Thank you!
Gonna try this and see if i can get samba to work.. a SMB mount over wifi would be awsome...
Many thanks!
I don't suppose there's a quick and easy way to completely remove optware?... not looking forward to culling through scripts and manually un-doing it all.....
adduser: not found
When it gets to the part in the install script to add the username of the unprivileged user, I enter a name, then it says: adduser: not found.
If it helps, I am using Rooted Stock 1.1.
Anyone get Optware to install on CM7 (newer nightly)
I am running CM7 #103 and would love to have optware installed.
But I get Fail if I try to use the method from Nookdevs
Tonight when I have more time I will look at the errors and see if I can tell what is up.
It looked like partially due to missing dir's for one (/tmp)
madrascafe said:
Gonna try this and see if i can get samba to work.. a SMB mount over wifi would be awsome...
Click to expand...
Click to collapse
The market has your answer and it's free:
https://market.android.com/details?id=com.funkyfresh.samba&feature=search_result
Am I the only one that wants Optware on CM7?
It goes fine on a manualnootered 1.2.0 NC But I prefer CM7 (And use the nightlies)
I would love to get this going on my NC as well. Running CM7 N121 w/ 6/30/2011 OC kernel. Was able to manually work past the tmp directory problem you mentioned, but I can't seem to execute the ipkg binary or installed. I've verified it indeed exists in the path I'm trying to execute it from, it has +x perms for user/ group/ other, but it always gives the error below:
/data/opt/bin/ipkg: not found
I've tried messing with bin directory and ipkg binary ownership, but no dice. If anything it should at least find it even if permissions aren't correct.
Looks like the contents of the binary reference ELF libraries which sounds like an issue attempting to execute in an Android environment. Going to see if I can chroot an environment that will work for it.
Sent from my NookColor using Tapatalk
This is happening because it's looking for /lib/ld-linux.so.3, and not finding it. I worked around by
ln -s /data/opt/lib/ld-linux.so.3 /lib/ld-linux.so.3
I also had to make these links:
ln -s /data/opt /opt
ln -s /data/tmp /tmp
And then set this:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/lib
export PATH=$PATH:/opt/bin/:/opt/sbin
in my bash profile to get things to start working.
One problem is my symlinks seem to get erased every reboot. I worked around by re-creating them in my bash profile, but I wish I knew how to make them permanent. This may be a ROM specific thing - this was written for a rooted stock nook, and I'm on an Epic running SFR.
I do not have a ld-linux.so.3 file on my NC w/ CM7 125
I have many other errors that show up:
Downloading the latest ipkg-opt package from the Optware package feed:
Connecting to ipkg.nslu2-linux.org (140.211.169.161:80)
wget: can't open 'ipkg-opt_0.99.163-10_arm.ipk': File exists
(NOTE the above file 'ipkg-opt_0.99.163-10_arm.ipk' does not exist
(on my NC - from a find / -name ipkg-opt_0.99.163-10_arm.ipk)
Updating the Optware package database:
ERROR: Failed to update the local Optware package database
Updating the Optware package database:
/data/optware-bootstrap-0.0.1.shar: ipkg-opt: not found
ERROR: Failed to update the local Optware package database
Any ideas?
The actual file it needs is /data/opt/lib/ld-linux.so.3 - you need to create a symlink in /lib in order to see it. But I think that file comes from the optware installer - if the installer is failing, you won't have it there either. It sounds like you may have bits of a previous install that failed, and it's preventing the install from running properly. Try looking at the log in /data/tmp for more info. After that, try rm -rf /data/tmp/* to clean up the old install and trying again.
Thank You for any pointers.
I deleted everything in /data/tmp first last attempt - like you suggested.
Same result
I have it down to only this error now when I run it (optware-bootstrap-0.0.1.shar):
Updating the Optware package database:
optware-bootstrap-0.0.1.shar: ipkg-opt: not found
ERROR: Failed to update the local Optware package database
ipkg-opt should be in /data/opt/bin. Check to see if it's there... if not, something went wrong in one of the previous steps - probably somewhere around "Downloading the latest ipkg-opt package from the Optware package feed". See if wget is actually downloading anything, where it's putting it, and what it's doing with it afterwards.
If it is there, try running it manually. If you see /data/opt/bin/ipkg or /data/opt/bin/ipkg-opt but it claims it's not there when you run it, it may be a library linking error. Mine was looking for /lib/ld-linux.so.3 but it was actually installed at /data/opt/lib/ld-linux.so.3. mount -o remount,rw followed by ln -s /data/opt/lib/ld-linux.so.3 /lib/ld-linux.so.3 fixed that. I also had to run
ln -s /data/opt /opt
ln -s /data/tmp /tmp
before things started working.
By the way:
ntfsprogs - NTFS filesystem libraries and utilities
Could that be of any use? At the moment, it's not possible to mount NTFS storage on the NC
i would love to know how you guys get to this point even. When i try to install the very fist line of the script is an error and then nothing at all happens .... something about not finding busybox or something of that nature.
So you guys are getting WAY farther than I've been able to.
Tkx Tonygoes.
It is there in /data/opt/bin but it reports /data/opt/bin/ipkg: not found
I cannot find a ld-linux.so.3 on my NC at all.
I did the other links et al fro your comments also
obsid:
Try post 12 above:
and I had some other suggestions from someone:
might try thses FIRST the script seems to do it but may not actually get it done.
mount -o remount,rw / /
mount -o remount,rw /dev/block/mmcblk0p5 /system
you should also if tried before do this: rm -rf /data/tmp/
then do the items in post #12 above
NOTE for me the ln -s to ld-linux.so.3 does not work as I do not have that file on my system

Create your Linux environment to build YOUR Android

Hello all,
if you are like me, you love to do things by yourself and see how it works. In this thread I'll show you how to create your Linux environment in order to create and compile your own roms - any version (1.5, 2.3, etc etc). I had soooooo many problems to make it work, so here is THE thread
BE CAREFUL : this thread is ONLY to set up the OS. The Android you will compile will not be compatible with your x10 as it needs to be "edited" for our phones. It basically shows you how to get ready
Note : parts 1 and 2 explain how to set up Ubuntu into a virtual machine in Virtualbox. If you don't virtualize Linux, if your Ubuntu is already installed, etc etc you can directly go to 3. It's just here to explain how to install Ubuntu.
This tutorial works of course for any "hard installation" of Ubuntu (I mean not in a Virtual machine) and in any virtualizing software (Virtualbox, VMWare, etc etc). I've dropped the Virtualbox tutorial because the software is free
1. Requirements
2. Set up Ubuntu 64 bit (Virtualbox)
3. Set up Android Source dependencies
4. Set up Android Source
5. Regular use
1. Requirements
A working computer, capable of virtualization (if you don't want to wipe your Windows or your MacOS X !) and with Internet connection
Few Gb on your hard drive (10Gb minimum ! Recomended : 15-30Gb)
As much RAM as possible (Minimum 1024Mb), and as powerful CPU as possible (Core2Solo, Core2Duo, ...)
A bit a time
2. Set up Ubuntu 64 bit
Download and install the latest Oracle VM Virtualbox for Windows
Download latest 64-bit Ubuntu Linux (as .iso package) - you can store the file wherever you want.
(Optional) Download the VirtualBox v4 extension, this will allow you to support improvements like USB2.0... Install : once VirtualBox will be installed, File>Preferences>Extensions>Add... If you get an error (Error 1), try to put the file in a "very simple" location (like C:\) and reinstall.
Once you've set up Virtualbox, run it. Click on "New", then follow the wizard.
Make sure you set the following :
Operating System : Linux
Version : Ubuntu (64 bit)
RAM : 512Mb (you can adjust more, but avoid use lower than 512Mb - I use 2Gb)
Create a new hard drive : set it variable size or fixed sized, but you'll need at last 15Gb to get all the files. To feel confortable, I use 30Gb (variable)
The computer is created, now run it. It will say there's no OS. Click on Devices > CD/DVD > More CD/DVD... Here is you virtual player. Click on Add, and select the Ubuntu .ISO file you downloaded. Then, choose it in the list, and click Choose. Now, you can restart the virtual machine by clicking Machine > Restart.
The computer should restart from the virtual CD, so install it to your virtual hard drive - regular install, same as if you were installing it on a physical HDD.
Once it's installed, do not forget to kick the .iso file from the virtual player for you not to start always on the CD
3. Set up Android Source dependencies
In Ubuntu, do right-click on the upper bar (where are Applications, Shortcuts...), and click Edit Menus. Then, go to System > Administration and tick Software Sources. We need to do this because Sun is highly restrictive on access to Java setup files...
Close that, then click on System > Administration > Software Sources.
Enable all sources, then on the second tab, tick the two Canonical sources (the most important ones, as these sources allow to install Java !)
Close the window and allow to refresh the sources (if you don't, next steps won't work).
Go and read the official Android Source page. That's what we're going to do.
Run a terminal, and copy/paste this : (this is a corrected setup, it should work like a charm -- please tell if it's not)
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl sun-java6-jdk zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
After setup complete, make sure Java works, by typing
Code:
java
and
Code:
javac
This should return help on both commands. If one of these doesn't work (ie. "command not found"), your environment is not configured properly.
4. Set up Android Source
Create a dir called "bin" in your user dir.
Code:
cd ~
mkdir bin
echo $PATH
Then, type this :
Code:
curl http://android.git.kernel.org/repo >~/bin/repo
chmod a+x ~/bin/repo
Next step is to create a folder where we'll store Android sources we work on. You can place it and name it as you wish, let's call it "android" and place it on the user folder.
Code:
mkdir android
cd android
Then, run this command :
Code:
repo init -u git://android.git.kernel.org/platform/manifest.git
If it returns "command not found", restart Ubuntu !
Enter username and email, although I'm not sure it's useful for our use -custom roms-.
Now, let's get the files ! Type
Code:
repo sync
and wait... Wait... Wait... Lots of commands, of "Resolving deltas", "Receiving", etc etc. It can be very long (depends of your Internet speed), just wait...
Finally, let's register the public key and finalize setup process. Type
Code:
gpg --import
And the cursor will down a line and nothing will appear. Stuck ? Broken ? Woooops ? Not at all ! Program is waiting for you to type the key, which is sooooooo big. So, copy and paste all this :
Code:
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV
lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7
8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu5hOF9KXwCgkxMD
u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEaUA6U90sEoVks0Z
wNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDyaTrkANjdYY7p2cq
/HMdOY7LJlHaqtXmZxXjjtw5Uc2QG8UY8aziU3IE9nTjSwCXeJnuyvoizl9/I1S5
jU5SA/9WwIps4SC84ielIXiGWEqq6i6/sk4I9q1YemZF2XVVKnmI1F4iCMtNKsR4
MGSa1gA8s4iQbsKNWPgp7M3a51JCVCu6l/8zTpA+uUGapw4tWCp4o0dpIvDPBEa9
b/aF/ygcR8mh5hgUfpF9IpXdknOsbKCvM9lSSfRciETykZc4wrRCVGhlIEFuZHJv
aWQgT3BlbiBTb3VyY2UgUHJvamVjdCA8aW5pdGlhbC1jb250cmlidXRpb25AYW5k
cm9pZC5jb20+iGAEExECACAFAknnWD4CGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIX
gAAKCRDorT+BmrEOeNr+AJ42Xy6tEW7r3KzrJxnRX8mij9z8tgCdFfQYiHpYngkI
2t09Ed+9Bm4gmEO5Ag0ESedYRBAIAKVW1JcMBWvV/0Bo9WiByJ9WJ5swMN36/vAl
QN4mWRhfzDOk/Rosdb0csAO/l8Kz0gKQPOfObtyYjvI8JMC3rmi+LIvSUT9806Up
hisyEmmHv6U8gUb/xHLIanXGxwhYzjgeuAXVCsv+EvoPIHbY4L/KvP5x+oCJIDbk
C2b1TvVk9PryzmE4BPIQL/NtgR1oLWm/uWR9zRUFtBnE411aMAN3qnAHBBMZzKMX
LWBGWE0znfRrnczI5p49i2YZJAjyX1P2WzmScK49CV82dzLo71MnrF6fj+Udtb5+
OgTg7Cow+8PRaTkJEW5Y2JIZpnRUq0CYxAmHYX79EMKHDSThf/8AAwUIAJPWsB/M
pK+KMs/s3r6nJrnYLTfdZhtmQXimpoDMJg1zxmL8UfNUKiQZ6esoAWtDgpqt7Y7s
KZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c/KsjADtAuKW9/d8phb
N8bTyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior6b8LrZrAhkqDjA
vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmUtkBszwo
G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ
hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+BmrEOeCUOAJ9qmR0l
EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KLM=
=Wi5D
-----END PGP PUBLIC KEY BLOCK-----
Once pasted, hit CTRL+D, this will make the program to register the key, and will display the key has processed.
Everything is now done, you have all the sources and you are ready to create your own roms. You can edit files simply by double-click, or use any software you want.
If you want to compile, simply run a terminal, go to your folder (remember it is cd android (MS-DOS-like command), where android is the folder you defined above) then type
Code:
make
. After a long time (depends on how much RAM you assigned to the machine, 512Mbits is slow), you will generate IMG files.
5. Regular use
If you want to get the latest source files (ie you have 2.1 files and want 2.2.1 files), simply run a terminal, go to your working folder and type
Code:
repo sync
. This should do the trick (correct me if I'm wrong)
Compiling sources takes hours to process, and you may want to kill the compile or pause it. You can then abuse of these keyboard shortcuts (common to Ubuntu OS) :
Code:
CTRL+C
will kill the process. Use it carefully, as it instantly kills it with no prompt.
Code:
RIGHT CTRL+P
is a Virtualbox command. Il will pause the whole Ubuntu (and also your process), and makes the screen ugly/gray (it just stuck the screen on Virtualbox v4.x). This is helpful when you run a Virtual machine, as you can pause the OS and make your computer to sleep/hibernate (or save an image - do NOT turn off your computer, as it will turn off the Virtual machine also !). Out of sleep, you can type again RIGHT CTRL+P to make the process to continue.
** Please note it might be risky to flash your phone with the stock rom you compiled (I mean with no modification), as this is not intended to work on X10
** Please note this install is for AOSP and NOT for Android SDK (you can install it with ease).
What's the difference ?
Android Open Source Project (AOSP) allows you to get the source code of the Android Operating System, in order to improve/change it, and create your personalized Android operating system
Android SDK allow you only to create and edit apps for Android Operating System.
Please note that compiling takes hours to process ! (3 hours or more)
** For any question, deeper info : please FIRST read official documentation. Easy to use, you'll get all info ! **​
man...did you ever stop?!
THANKS FOR INFO. If you can explain how to make system images for our X10 then we can use the dual boot option to make gingerbread or froyo roms for dual boot using Zhidu chargemon file.
I am not clear on making and android system image for the x10. can we extract a system image from a running rom? that way I could make a system image of black freedom and we can all dualboot it instead of installing it.
rendeiro2005 said:
man...did you ever stop?!
Click to expand...
Click to collapse
Lol I can't stop
@SuperUserMovado : I'd love to know, unfortunately I am like you - I don't know how to do this. I'm gonna get several info there and there and try to do some stuff
Regarding Zd's Dual, please note it is not compatible with his xRecovery, which makes things a bit boring when you want to easily install a custom rom AND benefit of Dual Boot.
Dual boot by the way is an excellent idea, but it has limitations (of course), like no SD card mount and few other things because it run from SD card and not from NAND.
EDIT : here is a good start : http://source.android.com/porting/index.html
I have just started playing with this and have compiled one aosp rom from source. I think it can be extracted from a running rom but I'm not sure how yet. On the other hand it looks like the source is available on the se dev website. I'm having trouble downloading it... not sure yet if its on my end or theirs.
Here's the error if someone could help me out: (Ubuntu 64bit)
Archive: /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip
[/tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
zipinfo: cannot find zipfile directory in one of /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip or
/tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip.zip, and cannot find /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip.ZIP, period.
Check this site out as well. The whole site is really helpful. I'm in the process of compiling a captivate rom with some slight changes and i hope it works.
Edit: Btw if you get the error repo not found, type this into the command line
code:
echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
then close the terminal, reopen another one and it should work
@superusermovado
I'm pretty sure you use unyaffs for the system.img and split_bootimg.ph for the boot.img.
That's how to decompile an update.zip.
From there you recompile as usual. I'm not going to post the instructions because they are all over the net.
Hint: Andy rubins tweet lol
gavriel18 said:
I have just started playing with this and have compiled one aosp rom from source. I think it can be extracted from a running rom but I'm not sure how yet. On the other hand it looks like the source is available on the se dev website. I'm having trouble downloading it... not sure yet if its on my end or theirs.
Here's the error if someone could help me out: (Ubuntu 64bit)
Archive: /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip
[/tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
zipinfo: cannot find zipfile directory in one of /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip or
/tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip.zip, and cannot find /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip.ZIP, period.
Check this site out as well. The whole site is really helpful. I'm in the process of compiling a captivate rom with some slight changes and i hope it works.
Edit: Btw if you get the error repo not found, type this into the command line
code:
echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
then close the terminal, reopen another one and it should work
Click to expand...
Click to collapse
Thanks for info
About this package, what's the content ?? The easiest way is to download from XDA the generic global rom, it's the same -- with no bug
Perceval from Hyrule said:
Thanks for info
About this package, what's the content ?? The easiest way is to download from XDA the generic global rom, it's the same -- with no bug
Click to expand...
Click to collapse
Huh? The generic ROM is compiled. The one we are talking about here is source-code. I thought you should know since you started this topic on how to setup a build environment. Im not intirely sure what the download from from SE is but it looks like the source-code from all the changes and additions SE made to the bare system. So there's the kernel source and some other stuff that I don't know the purpose of.
Sent from my SNES using Mario Paint
LouNGeRR said:
Huh? The generic ROM is compiled. The one we are talking about here is source-code. I thought you should know since you started this topic on how to setup a build environment. Im not intirely sure what the download from from SE is but it looks like the source-code from all the changes and additions SE made to the bare system. So there's the kernel source and some other stuff that I don't know the purpose of.
Sent from my SNES using Mario Paint
Click to expand...
Click to collapse
A compiled rom is not a problem
I was asking what was the content within the rom, and as you said - i supposed too - it is the original + all SE garbage.
Very interesting to get some apps back on AOSP (some like the *Scape, i do like predictive input from SE, gains a lot of time)
To answer then, the SE kit should contain everything of what SE adds : RachaelUI, all their apps (the *Scape), modules (keyboard, apis...), etc etc and all files to link these components to the kernel. And make our phones as fast as a monster truck. Not as fast as AOSP (Formula 1 !!!!!)
Don't forget the most important part, the package contains the SE kernel.
Sent from my SNES using Mario Paint
After using, struggling more like with Ubuntu and VMware, the main issue being I couldn't figure out getting VMware tools running so copy and pasting was hit and miss, I tried the Cygwin method instead which works much better for me on Windows 7 Ultimate x64.
XperiaX10iUser said:
After using, struggling more like with Ubuntu and VMware, the main issue being I couldn't figure out getting VMware tools running so copy and pasting was hit and miss, I tried the Cygwin method instead which works much better for me on Windows 7 Ultimate x64.
Click to expand...
Click to collapse
VMWare is much more difficult to run than VirtualBox. But course you can try and compile Android from Windows
But I definitely can't tell you if the kitchen method will work for XPERIA.
Perceval from Hyrule said:
VMWare is much more difficult to run than VirtualBox. But course you can try and compile Android from Windows
Click to expand...
Click to collapse
I've put VB on too, but thought I'd try the Cygwin method, which as I've said works for me, and is better imo, at least for what I need.
Perceval from Hyrule said:
But I definitely can't tell you if the kitchen method will work for XPERIA.
Click to expand...
Click to collapse
I can, and it does.
XperiaX10iUser said:
I've put VB on too, but thought I'd try the Cygwin method, which as I've said works for me, and is better imo, at least for what I need.
I can, and it does.
Click to expand...
Click to collapse
Thanks for info then
Hey guys, did someone do the same install as me ? (Windows 7 x64 host // Ubuntu 10.10 x64 guest).
I've never been able to make USB to work, kinda weird... Because when you compile Android, you'd like to send it to your phone *warning !*
Perceval from Hyrule said:
Hey guys, did someone do the same install as me ? (Windows 7 x64 host // Ubuntu 10.10 x64 guest).
I've never been able to make USB to work, kinda weird... Because when you compile Android, you'd like to send it to your phone *warning !*
Click to expand...
Click to collapse
That's why I went the Cygwin route, much less hassle imo.
XperiaX10iUser said:
That's why I went the Cygwin route, much less hassle imo.
Click to expand...
Click to collapse
I would say it depends. Linux environment is much cooler to work with source files (no boring "NOOO Windows can't find how to open this weird non-Windows file. What to do ? 1.Delete 2.Crash Windows 3.Phone Ballmer to make a tender offer)
Is compiling long with Cyg ? From AOSP, it takes me up to 3 hours with my (well RAM-ed, well CPU-ed) Virtual Machine.

[ROM][WIP] Fedora for Nook Color

Just saw some interest for Fedora install on Nook in another thread to my surprise. I thought I am the only pervert interested.
Anyway this is pretty raw at the moment. You need to know your way around Linux and have a Linux box (naturally).
Just not to disappoint you later on, here's what not working:
Only based on Fedora13 from upstream (F14 work is ongoing by Fedora-Arm team and I am just tracking them).
Wifi (still did not get to look into it)
BT (same)
accelerated graphics
Don't know of any touch-friendly WM, so defaults to Gnome.
Multitouch (disabled in driver at the moment since no userspace support anyway).
backlight control does not work, need to rewrite the kernel driver
Xorg does not know what to do with accelerometer input.
Probably tons of other things I forgot about.
You must be out of your mind if you want to try it on a tablet at this stage. Or just super curious.
You will need a microSD (at least 2G) card that you can dedicate to this.
Instructions:
Get "base" fedora sdcard image: http://nook.handhelds.ru/fedora/fedora-sdcard-v0.1.img.gz
Get base Fedora 13 beta3 rootfs: http://lists.fedoraproject.org/pipermail/arm/2011-May/001271.html
Get kernel modules for the kernel: http://nook.handhelds.ru/fedora/modules-2.6.32.9-fc13.tar.bz2
Unzip the base sdcard image and write it to your sdcard with dd.
run fdisk on the sdcard and add another partition covering the rest of sdcard in addition to the one already there. Write changes
do mkfs.ext4 /dev/yoursdcard2 (basically format the second partition you just created as ext4)
mount the /dev/yoursdcard2 somewhere as root (/mnt/somewhere later on)
untar the F13-beta3 rootfs to the /mnt/somewhere
Now you are almost ready, just need to fill some configs.
Edit /mnt/somewhere/etc/sysconfig/network-scripts/ifcfg-usb0 and add this there:
Code:
DEVICE=usb0
#BOOTPROTO=dhcp
BROADCAST=192.168.2.255
IPADDR=192.168.2.2
NETMASK=192.168.2.0
NETWORK=192.168.2.0
GATEWAY=192.168.2.1
ONBOOT=yes
Edit /mnt/somewhere/etc/resolv.conf and change "nameserver" there to 8.8.8.8
Add multitouch config in /mnt/somewhere/etc/X11/xorg.conf.d/touchscreen.conf
Code:
Section "InputClass"
Identifier "touchscreen"
MatchIsTouchScreen "on"
MatchProduct "cyttsp-i2c"
Driver "mtev"
Option "SendCoreEvents" "On"
Option "SwapAxes" "true"
Option "InvertY" "true"
EndSection
cd /mnt/somewhere/lib/modules and untar the modules file there.
umount /mnt/somewhere
Ok, now you are ready to do some stuff on the nook.
Insert your sdcard into the nook and boot it. You'll see Fedora text console. The installation is pretty basic.
Plug the nook into your Linux PC usb port. It should see a new network device
On the linux PC as root execute: ifconfig usb0 192.168.2.1 netmask 255.255.255.0
Enable ip forwarding on your host if you have it disabled (typically in /etc/sysctl.conf, the setting is ...ip_forward, make it =1. Run sysctl -p for the changes to make effect.
Enable internet access to internet for your nook via IP masquerading: iptables -t nat -I POSTROUTING -s 192.168.2.2 -j MASQUERADE ; iptables -I FORWARD -s 192.168.2.2 -j ACCEPT ; iptables -I FORWARD -d 192.168.2.2 -j ACCEPT
Now use ssh to login to your Nook: slogin [email protected] the root password is "fedoraarm" (no quotes)
Once logged into the nook, time to install some packages.
rpm -Uvh http://hongkong.proximity.on.ca/yum/base/12/arm/fake-kernel-provides-1.0.0-0.fc12.armv5tel.rpm
update the system: yum update ; yum install tar openssh-clients
Install the gnome environment: yum groupinstall 'GNOME Desktop Environment' --skip-broken
The gnome installation will take a while and will download everything from the net.
Now install the multitouch Xorg driver, get it at http://nook.handhelds.ru./fedora/xf86-input-mtev-0.1.12-1.armv5tel.rpm
Ok. Now you are ready to go. Run "startx &" and the Gnome will start on the nook. You can play with it a bit, use your finger as the mouse pointer.
You can add startx & at the end of e.g. /etc/init.d/rc.local to make it start on system startup or you can do it in a more pretty way.
There are some virtual keyboards in the repo. I tried gko and it sucks.
the "onboard" seems to be the one working best for me. "xvkbd" is a bit hard to operate.
The best one of them all is fvkbd, but it needs libfakekey missing from the repo, grab it at http://arm.koji.fedoraproject.org/p...3/armv5tel/libfakekey-0.1-6.fc13.armv5tel.rpm
Enjoy.
Fedora-arm homepage: http://fedoraproject.org/wiki/Architectures/ARM
I intend to include all the missing pieces into the fedora repo so that you don't need to install all those extra things. Also eventually I plan to add more hardware support and then hopefully migrate to a much newer kernel.
Ha, cool. Glad to see that not everyone thinks that only Ubootoo should be thrown on devices. I'll give this a twiddle for fun.
13 had Moblin, I wonder if that's any better for touch input..
Now i don't feel near as silly for working on my gentoo install for the nook!
Nice, I am still waiting on OpenSuSe
Why not try using Gnome 3? I just poked around in Fedora 15 today and saw the new UI, and I loved it. Bigger buttons, launcher dock, etc. Give it a look!
pts69666 said:
Why not try using Gnome 3? I just poked around in Fedora 15 today and saw the new UI, and I loved it. Bigger buttons, launcher dock, etc. Give it a look!
Click to expand...
Click to collapse
Fedora15 is not available for arm arch yet. But there is some work in that direction. So sure, once it's available I'd give it a try.
Great stuff here. I knows its early development, but fun none the less to see what our nooks can do.
And thanks verygreen for all your developments lately
Sent from my NookColor using Tapatalk
verygreen said:
Fedora15 is not available for arm arch yet. But there is some work in that direction. So sure, once it's available I'd give it a try.
Click to expand...
Click to collapse
in fedora 13,
Code:
su
yum install gnome-shell
...
============================================================================================================
Package Arch Version Repository Size
============================================================================================================
Installing:
gnome-shell i686 2.28.0-3.fc12 fedora 301 k
Installing for dependencies:
gjs i686 0.4-1.fc12 fedora 126 k
mutter i686 2.28.0-2.fc12 fedora 1.2 M
Transaction Summary
============================================================================================================
Install 3 Package(s)
Upgrade 0 Package(s)
...
gnome-shell -replace
I haven't tested it myself; however, it is something I found. My linux hard drive had hard drive failure. So, I am on windows in the meantime. Will report back later after testing it myself.
pts69666 said:
in fedora 13,
Code:
su
yum install gnome-shell
...
============================================================================================================
Package Arch Version Repository Size
============================================================================================================
Installing:
gnome-shell i686 2.28.0-3.fc12 fedora 301 k
Installing for dependencies:
gjs i686 0.4-1.fc12 fedora 126 k
mutter i686 2.28.0-2.fc12 fedora 1.2 M
Transaction Summary
============================================================================================================
Install 3 Package(s)
Upgrade 0 Package(s)
...
gnome-shell -replace
I haven't tested it myself; however, it is something I found. My linux hard drive had hard drive failure. So, I am on windows in the meantime. Will report back later after testing it myself.
Click to expand...
Click to collapse
No "gnome-shell" package in Fedora-arm repo at this moment,
Quite excited to see some work in bringing Fedora to the Nook Color! I <3 Fedora.
I just wish ARM had the same support as the full Fedora. Or that they would skip releases for Fedora ARM and go yearly... aka, skip to 15 next, then 17.
Could this be used to help port Ubuntu Touch?
moocow1452 said:
Could this be used to help port Ubuntu Touch?
Click to expand...
Click to collapse
No, Ubuntu Touch is based on CM and has very little in common with a full Linux port.

[TOOL] OSConnect ~ Run Arch and Ubuntu alongside eachother

Hey XDA!
For those of us that use Arch linux, compiling Android projects can be a little more challenging than on Ubuntu due to the fact the Arch is a rolling release distro. To solve this, I made a tool that allows YOU to choose whether you want to run Arch or Ubuntu in the command line without dual booting. This isn't anything new, just a simplified implementation of an existing method.
What it does:
When you open a terminal, you will be prompted with "Would you like to connect to Arch linux or Ubuntu?". You can enter A for Arch or U for Ubuntu. If you choose Arch, you will be put into your stock environment, but your bash prompt will look like
Code:
[[COLOR="red"]user[/COLOR]@[COLOR="cyan"]Arch[/COLOR] ~]:
If you choose Ubuntu, you will be entered into your Ubuntu chroot, and your bash prompt will look like
Code:
[[COLOR="red"]user[/COLOR]@[COLOR="magenta"]Ubuntu[/COLOR] ~]:
DISCLAIMER
Because Arch linux is aimed at enthusiast and experienced linux users, replies about simple or lack-of-experience issues will not be given priority. Use the following with caution.
How to setup an Ubuntu chroot:
1. Install schroot and debootstrap
2. Follow the steps given here https://bbs.archlinux.org/viewtopic.php?id=100039, or run create-chroot.sh in the OSConnect git repo.
How to install OSConnect:
1. Clone https://github.com/frap129/OSConnect
2. Run the given install.sh
3. If you use terminal mostly locally, respond "Local" to the prompt. If you mostly connect via ssh, respond "SSH" to the prompt.
4. If you connect via SSH, connect as root from now on, not your user. OSConnect will switch to your user for you.
Done! Restart to use.
XDA:DevDB Information
OSConnect, Tool/Utility for the Chef Central
Contributors
frap129
Source Code: https://github.com/frap129/OSConnect
Version Information
Status: Stable
Created 2016-05-15
Last Updated 2016-05-15
How it works:
Ubuntu chroot:
This work by downloading the Ubuntu system files to /var/chroot/ubuntu. The schroot tool then executes bash from ubuntu, and tricks the system into believing that /var/chroot/ubuntu is actually the system root directory.
OSConnect:
OSConnect is contained in its own file, .osconnectrc. This file is executed when shell is reached via your .bashrc. The .osconnectrc is a bash script that asks what operating system you would like to use, then either dumps you into normal shell, or starts the Ubuntu chroot. It also modifies the PS1 (bash prompt) to look cleaner and better distinguish between Arch and Ubuntu.
What is the difference between local and ssh?
The only difference between the local and ssh versions is whether or not youre prompted for your password (when chroot is started) because schroot must be run as root. On the local version, you are simply prompted for your password when necessary. On the ssh version, you are expected to connect as root, and therefore will not be prompted for your password.
HALP I CANT LOG IN AS ROOT
If you are having trouble connecting via SSH as root, follow https://askubuntu.com/questions/511833/cant-ssh-in-as-root
Resource wise is this lighter than running ubuntu as a docker image?
HaoZeke said:
Resource wise is this lighter than running ubuntu as a docker image?
Click to expand...
Click to collapse
I'm way to late for this to matter, but yes, its much lighter than running at as a docker image
frap129 said:
I'm way to late for this to matter, but yes, its much lighter than running at as a docker image
Click to expand...
Click to collapse
Better late than never! ? neat stuff ?

Categories

Resources