FORUMS
Remove All Ads from XDA

[14.08.2012] [GIT|I NEED YOU!] Andrinux - Bringing GNU/Linux to your Phone!

429 posts
Thanks Meter: 197
 
By Ditti4, Senior Member on 11th December 2011, 09:12 PM
Post Reply Email Thread
The Andrinux-Project - bringing GNU/Linuxux to your phone

I've put the whole thing onto github because it's too much for me alone. I need your help: http://forum.xda-developers.com/show...php?p=30207959



At first big thanks to dudumomo for hosting the project! I can't thank you enough!

Then big thanks to TylerDurben for the awesome picture work!

Please: Learn to read the whole opening post!
I won't help in cases like this anymore! All informations are given!
Thanks!


Note: it doesn't boot a phony-Linux! This Linux runs on top of Android!

"Hey Nerds!" would Sassibo(o)b say.

But I'll say:

Hey dudes!

Welcome to the Andrinux-Project.

What the heck is Andrinux?!

Andrinux is a project (inspired by LeeDroid) to bring GNU/Linux to your phone!

Started in summer 2011 I now got the first running build for you.

Why should I use Andrinux?

Why are you thinking I can answer this question for you?!

It's your decision!

I use it for things like git and office apps.

Quote:
Originally Posted by trh1341

Just want to prove that this is awesome...the ics rom by me and Jcmaddox...most of that was done using this because my computer has a broken screen

Sent from my HTC Inspire "4G" using Ice Cream Sandwich

Why are you posting it here and not in the general Android development?

Because I only tested it on the Desire HD and on no other device. But maybe later.

Why aren't you coming to the interesting thing - the download?

Ok, ok. I'm gonna hurry.

Disclaimer:
If something goes wrong or if something gets broken I'm not responsible for this!
Pay for it on your own!

What you'll need:

-phone
-PC or Mac
-unpacker for 7z-archives
-root
-S-OFF
-system read/write enabled (with newest update not needed anymore. If the script fails your should use this app)
-busybox
-SD-Card
-3 GB of free space on the SD-Card
-kernel with loop-support
-time

How to:

Let's get to the real thing.

First download the desired distribution.

Unpack the whole thing to your SD-Card and put it in your phone.

When you got there open a terminal emulator and switch to root mode.

Then you could follow the README-file but I made a little mistake while saving.

Please make sure to mount the system read/write!

So here the instructions:
Type in:

Code:
cd /mnt/sdcard/andrinux/???
sh prepare.sh
boot-???
Codes for the ???:

cd-codes:
debian
fedora
slack
ubuntu

boot-codes
sque- Debian Squeeze- available
whe- Debian Wheezy- not available
fed13- Fedora 13- not available
fed14- Fedora 14- not available
slack- Slackware- not available
nat- Ubuntu Natty- not available
one- Ubuntu Oneiric- available

What you'll get:

The distribution, in most cases with xfce 4 and VNC server.

What you should do after entering GNU/Linux:

Update your distribution and install wanted software like a browser.
I suggest Midori, which you can see in the pictures.
It's pretty fast on a phone.

What you shouldn't do:

rm -r /

Tips:

More than 255 apps on SD aren't possible on our phone in combination with Andrinux, sorry.

If you want an other resolution you can edit the xstart-file in your andrinux/debian-folder.
Then run sh prepare.sh again.

I already added the locate-command and updated the database. So you can simply use it.

For more details see the tutorial in the next post.

Please, don't use the xterm.
Use the terminal emulator which you're running in the background instead. xterm is full of errors on the phone cause it uses the wrong scripts/files/programs.

You don't need to put "sudo" in front of a command. You are always logged in as root.

The browser I use can be installed with
Code:
apt-get install midori
You may use Iceweasel, the Debian-Firefox (better compatibility). Install it with
Code:
apt-get install iceweasel
Use your volume keys to scroll faster on GUI with Android VNC.

You're an Andrinux-User?
Show it to others!

Take this link:
https://img.xda-cdn.com/t5HxDp4wFeeAu1qoRLicSt8WBhI=/http%3A%2F%2Fandrinux.freelydifferent.com%2Fimg%2Fuser.png

Want the official Andrinux wallpaper?
Look here!

How it works:

First, it sets the img-file located in the folder andrinux/??? on your SD-Card as a device.
Then it mounts the device.
After that we enter the environment of your distribution.
As this happens, we also switch to the distribution-bash and viola - we got GNU/Linux.

Cause every change is made like in a virtual machine, everything will be saved to your img-file on your SD-Card and your ROM files won't get touched.

The thanks-button is often overlooked.
Please use it if you like Andrinux.
Thanks.


Download section

Please no mirrors! I want to see how many downloads which one gets and want to earn a little amount of money! Thank you!

Everythings right now, have fun.

Debian Squeeze - 12.12.2011:
http://andrinux.freelydifferent.com/...an/deb-sque.7z - size: 456,7 MB
Mirror (Multiupload):
http://www.multiupload.com/K244AYLM7Q

Debian Squeeze update - 09.02.2012:
http://andrinux.freelydifferent.com/...date090212.zip


Ubuntu Oneiric - 02.01.2012:
http://andrinux.freelydifferent.com/...ntu/ubu-one.7z - size: 540,2 MB
Mirror (Multiupload):
http://www.multiupload.com/TEH2Q1JHRH

Ubuntu Oneiric update - 09.02.2012:
http://andrinux.freelydifferent.com/...date090212.zip


Changelog section

Debian Squeeze:

14.12.2011:
-got it working with App2SD up to 99 apps
-SD-Card bind in Linux environment
-no more fail-mounts (mounting / instead of the image)
-tutorial added
-changed resolution for VNC to 800x480

15.12.2011:
-little ad-remove-correction
-added shortcut for SD-Card to Desktop
-corrected nameserver-problem ("couldn't resolve ...) - thx to Floep

24.12.2011:
-new script created from scratch
-up to 255 apps on SD-Card possible

01.01.2012:
-better script structure
-fixed a big which shouldn't appear

04.01.2012:
-more customizable xstart-script (run "xstart 800x600 for example to get this resolution)
-some tests whether mounting was successful

08.01.12:
-corrected the if-conditions
-added /system read-write to script, no app needed anymore

09.02.12
-added ICS-support - thanks to craigkal
-added some things to make it easier for me to edit the script
-added something which should help to get this working on every device (inspired by adwinp)
-added a hidden feature - to find it, you have to use an option.


Ubuntu Oneiric:

24.12.2011:
-initial release
-added Firefox, Midori and Nautilus as Christmas-special
-new method to install the system: when you run the prepare.sh it'll create the image for you and unpack the system - less to upload, less to download.

29.12.2011:
-biggest problem (creation of image failed) fixed
-script is now more friendly for the ones who want to adjust it.
-big security hole (filing your /data partition when the image isn't mounted) got fixed

02.01.2012:
-new release (should now really work for everyone )

04.01.2012:
-more customizable xstart-script (run "xstart 800x600 for example to get this resolution)
-some tests whether mounting was successful

08.01.2012
-corrected the if-conditions
-added /system read-write to script, no app needed anymore

09.02.12
-added ICS-support - thanks to craigkal
-added some things to make it easier for me to edit the script
-added something which should help to get this working on every device (inspired by adwinp)
-added a hidden feature - to find it, you have to use an option.
-new script for Ubuntu by adwinp. Take this for it. https://www.box.net/shared/ncrs2o8i5lc6vj7pgpxy


Credits:
Code:
echo "I: New script from scratch. So only credits to me. :P"
echo "I: Already ad-cleaned by the Andrinux-Project. ;)"
Troubleshooting:
http://forum.xda-developers.com/show...&postcount=107
Any more questions?
Post them here.

If you want the latest updates you can follow me on Twitter!
http://twitter.com/Ditti4

If you have problems and need help:
Gtalk - ricod1996@googlemail.com
Please tell me your XDA-username so I can identify you.
The Following 61 Users Say Thank You to Ditti4 For This Useful Post: [ View ] Gift Ditti4 Ad-Free
 
 
11th December 2011, 09:15 PM |#2  
Ditti4's Avatar
OP Senior Member
Flag Rochlitz
Thanks Meter: 197
 
Donate to Me
More
Step-by-step guides
Video tutorials:

Debian Squeeze


(Thanks, Peat. )


Written tutorials:

Debian Squeeze:
1. Step:
Download the two files from the download section and unpack them.

2. Step:
You'll see a folder named andrinux and four new files (xstart,xexit, prepare.sh and boot-sque).
Put these four files into the debian-folder in the andrinux-folder by replacing the existing ones.

3. Step:
Put the andrinux-folder to the root of your SD-Card.
To do so: plug in your phone and switch to Mass-Storage-Mode.
Then copy and paste it to the SD-Card.

4. Step:
Let's switch to the phone.
Got busybox installed? If not, look into the requirements.
Got a terminal emulator installed? If not install one from the Market.

5. Step:
Open terminal emulator and type in
Code:
su
to switch to root mode.
Now type in
Code:
cd /mnt/sdcard/andrinux/debian
to change to the Debian directory.
Then type
Code:
sh prepare.sh
to prepare your system.
Got this? Perfect!

6. Step:
Type in
Code:
boot-sque
to power Debian up.
You'll see
Code:
root@localhost
at the beginning of the line.

7. Step:
Wanna see something graphical?
Install "Android VNC" from the Market.
Then go back to terminal and type in
Code:
xstart
and now launch Android VNC.
Now the connect settings:
Code:
Server: localhost
Port: 5901
Password: andrinux
Now the desktop should appear.

Tip:
Want a web browser?
Code:
apt-get install midori
for a lightweight one and
Code:
apt-get install iceweasel
for something Firefox-like (Ubuntu installs the original Firefox with this command).

8. Step:
Want to end your season?
Choose the disconnect-option in Android VNC and switch back to the terminal.
Now type in
Code:
xexit
to stop the desktop and then
Code:
exit
to shut down Debian.

Ubuntu Oneiric:
1. Step:
Download the file from the download section and unpack it.

2. Step:
You'll see a folder named andrinux and four new files (xstart,xexit, prepare.sh and boot-one).
Put these four files into the ubuntu-folder in the andrinux-folder by replacing the existing ones.

3. Step:
Put the andrinux-folder to the root of your SD-Card.
To do so: plug in your phone and switch to Mass-Storage-Mode.
Then copy and paste it to the SD-Card.

4. Step:
Let's switch to the phone.
Got busybox installed? If not, look into the requirements.
Got a terminal emulator installed? If not install one from the Market.

5. Step:
Open terminal emulator and type in
Code:
su
to switch to root mode.
Now type in
Code:
cd /mnt/sdcard/andrinux/ubuntu
to change to the Ubuntu directory.
Then type
Code:
sh prepare.sh
to prepare your system.

6. Step:
Type in
Code:
boot-one
to power Ubuntu up.
You'll see
Code:
root@localhost
at the beginning of the line.

7. Step:
Wanna see something graphical?
Install "Android VNC" from the Market.
Then go back to terminal and type in
Code:
xstart
and now launch Android VNC.
Now the connect settings:
Code:
Server: localhost
Port: 5901
Password: andrinux
Now the desktop should appear.

Tip:
Want a web browser?
Code:
apt-get install midori
for a lightweight one and
Code:
apt-get install iceweasel
for Firefox.

8. Step:
Want to end your season?
Choose the disconnect-option in Android VNC and switch back to the terminal.
Now type in
Code:
xexit
to stop the desktop and then
Code:
exit
to shut down Ubuntu.

Any problems?
Ask me!
The Following 11 Users Say Thank You to Ditti4 For This Useful Post: [ View ] Gift Ditti4 Ad-Free
11th December 2011, 09:17 PM |#3  
Member
Flag Singapore
Thanks Meter: 5
 
More
Dayummmmmmmmmmmmmmmm, neat stuff. I might try it when i have the time to
11th December 2011, 09:35 PM |#4  
Senior Member
Flag bangkok
Thanks Meter: 872
 
Donate to Me
More
great job,just in time,i am bored ,what distribution do u prefer ?
11th December 2011, 09:38 PM |#5  
Ditti4's Avatar
OP Senior Member
Flag Rochlitz
Thanks Meter: 197
 
Donate to Me
More
Quote:
Originally Posted by evanbigfan

what distribution do u prefer ?

Cause I'm addicted to Ubuntu/Debian and the Ubuntu-arm-port isn't the best I'm using Debian.

But that's totally personal.

And what you see above is the Debian build.

Sent from my loved HTC Desire HD @MIUI Germany <3
11th December 2011, 10:09 PM |#6  
Senior Member
Flag bangkok
Thanks Meter: 872
 
Donate to Me
More
Quote:
Originally Posted by Ditti4

Cause I'm addicted to Ubuntu/Debian and the Ubuntu-arm-port isn't the best I'm using Debian.

But that's totally personal.

And what you see above is the Debian build.

Sent from my loved HTC Desire HD @MIUI Germany <3

thanks,it will be the first then,another thing,when i reboot the device i'll went back to my rom right,and any changes i made to the linux will go or remain ?
11th December 2011, 10:13 PM |#7  
Ditti4's Avatar
OP Senior Member
Flag Rochlitz
Thanks Meter: 197
 
Donate to Me
More
Quote:
Originally Posted by evanbigfan

thanks,it will be the first then,another thing,when i reboot the device i'll went back to my rom right,and any changes i made to the linux will go or remain ?

The Linux is on a external virtual partition on your SD-Card. So any change will remain until you delete the .img-file.
And yes, you'll went back to your ROM. Gonna add some more info to the opening post.

Sent from my loved HTC Desire HD @MIUI Germany <3
11th December 2011, 10:28 PM |#8  
homerino85's Avatar
Senior Member
Bergamo - Italy
Thanks Meter: 5
 
More
Great job, I'm waiting for test it.
one question: all part of device ( camera wifi blue 3g) work's or booting only?
11th December 2011, 10:28 PM |#9  
Senior Member
Thanks Meter: 17
 
More
Doesn't this open opportunities for other OS's like WP7?
Correct me if I am wrong.

BTW: Amazing job man
11th December 2011, 10:30 PM |#10  
Ditti4's Avatar
OP Senior Member
Flag Rochlitz
Thanks Meter: 197
 
Donate to Me
More
Quote:
Originally Posted by homerino85

Great job, I'm waiting for test it.
one question: all part of device ( camera wifi blue 3g) work's or booting only?

I think you misunderstood me.
It's running on top of Android.
You'll get a fully working Android and on top of it a nearly fully working GNU/Linux.

Quote:
Originally Posted by H-Streety

Doesn't this open opportunities for other OS's like WP7?
Correct me if I am wrong.

BTW: Amazing job man

Nope, cause it runs on top of Android.
Added a note to the top to avoid questions like this.
But as the time goes by and we'll get a Windows 8 ARM version, we can maybe run this on our phones.

But since Windows Phone 7 isn't open source, we'll never be able to run it on an Android phone...

Sent from my loved HTC Desire HD @MIUI Germany
The Following User Says Thank You to Ditti4 For This Useful Post: [ View ] Gift Ditti4 Ad-Free
11th December 2011, 11:20 PM |#11  
Senior Member
Flag bangkok
Thanks Meter: 872
 
Donate to Me
More
Quote:
Originally Posted by Ditti4

The Linux is on a external virtual partition on your SD-Card. So any change will remain until you delete the .img-file.
And yes, you'll went back to your ROM. Gonna add some more info to the opening post.

Sent from my loved HTC Desire HD @MIUI Germany <3

that what i thought ,thanks
Post Reply Subscribe to Thread

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

Advanced Search
Display Modes