As I am not allowed to post this where it should be, this seems to be the next best place.
Hardware Needed:
* The Motorola Atrix 4G (without this you wont be going very far)
* Atleast a 4 Gb SD card
* a way of transfering data from your computer onto the SD card (The supplied USB cable or an SD adaptor)
Apps Needed:
* SuperUser (If your on this site, you most likely already have this)
* Just about any Terminal Emulator will work (I used Better Terminal Emulator Pro)
* Any VNC Viewing Client (I used androidVNC)
* A Busybox installer (I used Stericson's BusyBox installer)
Software used:
* I used the BackTrack5 version posted by msullivan, found **HERE**:
I used a slightly edited version of the bt file from the bundle
just copy and paste over the original bt file:
Code:
perm=$(id|cut -b 5)
if [ "$perm" != "0" ];then echo "This script requires root! Type: su"; exit; fi
busybox mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/sdcard-ext/BT5
export bin=/system/bin
export mnt=/data/local/bt5
mkdir $mnt
export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export HOME=/root
if [ -b /dev/loop7 ]; then
echo "Loop device exists"
else
busybox mknod /dev/loop7 b 7 0
fi
#mount -o loop,noatime -t ext2 $kit/bt5.img $mnt
losetup /dev/block/loop7 $kit/bt5.img
mount -t ext2 /dev/block/loop7 $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
busybox sysctl -w net.ipv4.ip_forward=1
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost bt5" > $mnt/etc/hosts
echo "Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:"
ifconfig eth0
echo " "
busybox chroot $mnt /bin/bash
echo "Shutting down BackTrack ARM"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
losetup -d /dev/loop7
Installation Steps:
1. Make sure you have enough space to work with (atleast 4Gb).
2. Edit the bt file with the above coding.
3. Copy over the BT5 folder onto your SD card however you see fit, I just used a SD to USB adaptor that I got with my SD card.
4. Disconnect the USB cable if you have it connected.
5. open your Terminal emulator and type:
Code:
su <ENTER>
6. Type:
Code:
cd /sdcard-ext/BT5 <ENTER>
7. Type:
Code:
sh bt <ENTER>
8. The bt file should run, and leave you with a red command prompt.
Hit the home button.
9. Open your VNC Viewer and enter the login information.
Code:
Nickname: BackTrack5
Password: root
Address: 127.0.0.1
Port: 5901
The screen size still needs adjusting however as I believe it is set at 800×480 currently.
Sick. Just sick.
Cant wait to crack some Wifi with this. Anyone test this out and get a successful crack?
I haven't looked too far into it, however I do believe that this is almost useless as a "cracking" distro on ARM hardware. AFAIK many things don't/can't work. for instance injecting is a no go (real turn off for me, but that is what a netbook is for).
Until we get better drivers for the wifi, we don't have injection, or monitor mode. I've also found editing scripts can be a ***** because the on screen keyboard is either in the way, or the enter doesn't work as enter if using nano, running vi really hoses things up. My external bluetooth keyboard helps with this, but a bluetooth mouse while it works, is waaaaaaaaaaaaaaay (no really) too sensitive on the Atrix. Hooked up to an external monitor in webtop mode it works much better, but I've not tried running backtrack from there.
Yeah I did not even consider the ARM architecture. Very good point.
Do they make a Rosetta type app for Linux? Anyone know? That could at least help use get past the Architectural limits.
*edit*
Still not thinking straight, that app is for PPC users.
In the beginning where the script says "sdcard-ext/bt5" could I edit that to say "sdcard/bt5" in order to boot it from my internal phone memory?
Sent from my MB860 using XDA App
BravoMotorola said:
In the beginning where the script says "sdcard-ext/bt5" could I edit that to say "sdcard/bt5" in order to boot it from my internal phone memory?
Sent from my MB860 using XDA App
Click to expand...
Click to collapse
Yep.
stupid 10 character limit...
Exthero said:
As I am not allowed to post this where it should be, this seems to be the next best place.
Hardware Needed:
* The Motorola Atrix 4G (without this you wont be going very far)
* Atleast a 4 Gb SD card
* a way of transfering data from your computer onto the SD card (The supplied USB cable or an SD adaptor)
Apps Needed:
* SuperUser (If your on this site, you most likely already have this)
* Just about any Terminal Emulator will work (I used Better Terminal Emulator Pro)
* Any VNC Viewing Client (I used androidVNC)
* A Busybox installer (I used Stericson's BusyBox installer)
Software used:
* I used the BackTrack5 version posted by msullivan, found **HERE**:
I used a slightly edited version of the bt file from the bundle
just copy and paste over the original bt file:
Code:
perm=$(id|cut -b 5)
if [ "$perm" != "0" ];then echo "This script requires root! Type: su"; exit; fi
busybox mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/sdcard-ext/BT5
export bin=/system/bin
export mnt=/data/local/bt5
mkdir $mnt
export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export HOME=/root
if [ -b /dev/loop7 ]; then
echo "Loop device exists"
else
busybox mknod /dev/loop7 b 7 0
fi
#mount -o loop,noatime -t ext2 $kit/bt5.img $mnt
losetup /dev/block/loop7 $kit/bt5.img
mount -t ext2 /dev/block/loop7 $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
busybox sysctl -w net.ipv4.ip_forward=1
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost bt5" > $mnt/etc/hosts
echo "Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:"
ifconfig eth0
echo " "
busybox chroot $mnt /bin/bash
echo "Shutting down BackTrack ARM"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
losetup -d /dev/loop7
Installation Steps:
1. Make sure you have enough space to work with (atleast 4Gb).
2. Edit the bt file with the above coding.
3. Copy over the BT5 folder onto your SD card however you see fit, I just used a SD to USB adaptor that I got with my SD card.
4. Disconnect the USB cable if you have it connected.
5. open your Terminal emulator and type:
Code:
su <ENTER>
6. Type:
Code:
cd /sdcard-ext/BT5 <ENTER>
7. Type:
Code:
sh bt <ENTER>
8. The bt file should run, and leave you with a red command prompt.
Hit the home button.
9. Open your VNC Viewer and enter the login information.
Code:
Nickname: BackTrack5
Password: root
Address: 127.0.0.1
Port: 5901
The screen size still needs adjusting however as I believe it is set at 800×480 currently.
Click to expand...
Click to collapse
I get an error when doing "sh bt".
I get "bt: 36: Syntax error: end of file unexpected (expecting "then")"
BravoMotorola said:
I get an error when doing "sh bt".
I get "bt: 36: Syntax error: end of file unexpected (expecting "then")"
Click to expand...
Click to collapse
Is your bt folder on your "internal" or external sd card? If it's the sdcard-ext, you'll need to edit the bt script to point to the correct location.
barry99705 said:
Is your bt folder on your "internal" or external sd card? If it's the sdcard-ext, you'll need to edit the bt script to point to the correct location.
Click to expand...
Click to collapse
Hmm, tried a lot of things, ended up going to the OP of the original Backtrack on Android thread and use his original file instead, working now. But now I have a new problem, (lol) how can I change the screen resolution of the BT5 GUI to match the Atrix's screen? I've looked all over for this. I just can't find out how...
BravoMotorola said:
Hmm, tried a lot of things, ended up going to the OP of the original Backtrack on Android thread and use his original file instead, working now. But now I have a new problem, (lol) how can I change the screen resolution of the BT5 GUI to match the Atrix's screen? I've looked all over for this. I just can't find out how...
Click to expand...
Click to collapse
once you start up backtrack, you need to edit /usr/bin/startvnc . Change that last line to
Code:
vncserver -geometry 940x520
barry99705 said:
once you start up backtrack, you need to edit /usr/bin/startvnc . Change that last line to
Code:
vncserver -geometry 940x520
Click to expand...
Click to collapse
Thanks and yes I did see that somewhere, I just had no clue what file to edit. So is it possible to install things like Flash on Firefox on here or is the no package installer for this? Gosh, sorry I'm asking so much...thanks for the help so far
BravoMotorola said:
Thanks and yes I did see that somewhere, I just had no clue what file to edit. So is it possible to install things like Flash on Firefox on here or is the no package installer for this? Gosh, sorry I'm asking so much...thanks for the help so far
Click to expand...
Click to collapse
Firefox is already installed. Not sure if flash is there since it's so insecure.
Laptop dock
After installing BT5 to Atrix 4G, can the laptop dock be used to run BT5?
I just wanted to throw a thanks out there to Exthero (since you only have 2!) for the start up script. Couldn't get it working until i used yours.
I'm having a blast with this
NISVermeer said:
After installing BT5 to Atrix 4G, can the laptop dock be used to run BT5?
Click to expand...
Click to collapse
easiest way is on wifi:
see what your ip is
Code:
$ ifconfig
example:
eth0: 192.168.1.3
use a vnc server on your computer connect to ip address in ifconfig (port 5901 default for this chroot)
anyone know if or where the atrix wireless drivers are for this?
Related
NEW DEBIAN.img
http://www.multiupload.com/FEO9PZLOCP
This image has internet working and very nice and neat.
To use image copy to ext2 partition and mount
You will need an ext2 partition, you can use my rom and follow its install instructoins and these images and my rom work together perfectly!
http://forum.xda-developers.com/showthread.php?p=16969687#post16969687
download the mount.zip it contains linux a terminal command and linuxboot.sh using adb
http://www.multiupload.com/SDOPA3GVSP
This requires either an ext2 partition or, The img file on your sdcard/debain.img. Using ext2 partition is what is recomended.
adb push linux /system/bin/
adb push linuxboot.sh /system/bin/
Click to expand...
Click to collapse
busybox mount -o rw,remount /
mkdir /mnt/linux
mkdir /sdcard/debain
mount -o rw,loop -t ext2 /sdcard/debain.img /sdcard/debain
mount -o rw -t ext2 /dev/block/mmcblk0p2 /mnt/linux
dd if=/sdcard/debain of=/mnt/linux
Click to expand...
Click to collapse
Now just type :
linux
Click to expand...
Click to collapse
in the terminal and you will be connected
On first boot
linux
Click to expand...
Click to collapse
this should put you into a localhost:#
once in local host type:
nano /etc/init.android/rc_enter.shnow add this to the file
There should already be this inside:
if [ 1 -eq 1 ]; then echo nameserver 192.168.1.1 > /etc/resolv.conf; fi
/etc/init.d/hostname.sh start
Click to expand...
Click to collapse
ADD :
vncserver -kill :1
rm -r tmp
mkdir tmp
cd tmp
mkdir .X11-unix
cd ..
vncserver
Click to expand...
Click to collapse
To connect to vncserver use any vncserver app and use the following info:
username: localhost
password: android
host: localhost
port: 5901
Click to expand...
Click to collapse
the new debian.img is roughly 2.5 gigs so I would make enough room on your ext2 partition for 2.5 gigs at least, if you have any problems let me know
OLD
_________________________________________________________________________________________________________________________________________________
OK everyone here it is. Debian and Ubuntu works on ERIS. I have an image that you can download and extract to /sdcard/Ubuntu/ or /sdcard/debian Download One of the .rars below. To use correctly you must have a 2.2 foryo rom, and flash conaps defauctcfs7 loop enabled kernal
Also need a few other files that I have either told you how to or were to download. Follow the instructions and you will be fine.
I am sorry this is not A SELF INSTALLER or an APK BY any means, You must start from scratch and compile your debian, but I have shown the way with Conaps help you can easily install debian from this tutorial.
Debian with vncserver download and extract and push to /sdcard/debian
Ubuntu with vncserver, icewb-UI, and synaptic packagemanager, and firefox, download and extract and push to /sdcard/ubuntu
For Debian
in terminal type:
su
insmod /system/lib/modules/loop.ko
sh /sdcard/debian/installer.sh
chroot debian /bin/bash
For Ubuntu Version
in terminal type:
su
insmod /system/lib/modules/loop.ko
sh /sdcard/ubuntu/mount.sh
chroot ubuntu /bin/bash
to start tightvncserver and connect threw pocket cloud type:
vncserver -geometry 480x320 {-geometry 480x320 is optional}
password:android
repeat:android
open pocket cloud
server: localhost
password:android
port:5901
Special thanks to Conap for creating his new DecafuctCFSv7.zip
Thanks to workshed for a nice keyboard fix
1. download Conap's loop kernal obviously.
2. Recomend downloading and installing conaps CELB (NOT CELEB LOL) ROM, But any 2.2 rom will work
Or Dualrom with loop kernal DualRomLoop
There is a tutorial on how to partitoin your sdcard there, although if you want to run dual rom with debian on second rom I would make my partition sizes as follows:
mkpartfs primary fat32 512B 300MB
mkpartfs primary ext2 300MB 550MB
mkpartfs primary ext2 550MB 900MB
mkpartfs extended 900MB 7948MB
mkpartfs logical ext2 900MB 975MB
mkpartfs logical fat32 975MB 7948
3. Install or flash conaps loop kernal, and conaps celb rom
4. Download this Linux.rar and extract to
/sdcard/debian/*files*here
or
/sdcard/ubuntu/*files*here
Then wait for your phone to boot, and follow the rest of the instructions; I would let the phone idle for a few minutes just to let it settle down
5. Download Swapper from the market, Not Swapper 2. install and create a swap.swp file of 256 megs the most you can, and make sure its running when you continue with the steps so dont exit it, press home instead of the back arrow
DEBIAN
In the terminal type:
su
insmod /system/lib/modules/loop.ko
sh /sdcard/debian/installer.sh
Then an easy chroot:
chroot /debian /bin/bash/
For UBUNTU
In the terminal type:
su
insmod /system/lib/modules/loop.ko
sh /sdcard/ubuntu/mount.sh
Then an easy chroot:
chroot ubuntu /bin/bash/
Or you can Install via gscript by running installer.sh in gscript then an easy chroot by typing in the terminal:
chroot /debian /bin/bash/
MAKE SURE TO SET YOUR PATH IN THE TERMINAL @ localhost:/ export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
first if that doesnt work try export USER=/root
One time install type:
/scripts/onetime.sh
A little clean up:
cd tmp
rm -r .X*
cd ..
gpg --recv-keys 9AA38DCD55BE302B
gpg --export 9AA38DCD55BE302B | apt-key add -
apt-get update
apt-get install tightvncserver
apt-get install lxde
to start tightvncserver and connect threw pocket cloud type:
vncserver -geometry 480x320
password:android
repeat:android
open pocket cloud
server: localhost
password:android
port:5901
Originally Posted by Conap
6. Open up Terminal Emulator and type:
su
insmod system/lib/modules/loop.ko
busybox mount -o remount,rw /
mkdir debian
busybox mknod /dev/loop0 b 7 0
mount -o loop,noatime sdcard/debian/debian.img debian
mount --bind /dev/pts /debian/dev/pts
mount --bind /proc /debian/proc
mount --bind /sys /debian/sys
sysctl -w net.ipv4.ip_forward=1
chroot /debian /bin/bash
export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
cd tmp
rm -r .X*
cd ..
If you have problems make sure that you have succesfully installed Conaps Loop
by puting the loop.ko in your sdcard and by typing:
su
cd /sdcard
insmod loop.ko
If your phone reboots you probably need to make sure swapper is running correctly and you have task killer to kill most tasks
GOOD LUCK!
Sounds cool
This is the same spot I am at although I did it a little different. What I am stuck on is getting a ui running. Any luck with that? also anything i apt-get seems to fail...
screenies?
list of wat is and isn't working?
great job though
My sd card is partitoned for Darktremor with a linux swap. Would I still need Swapper?
Sent from my ERIS using XDA App
Well i did the steps this way instead of using scripts.
1. insmod system/lib/modules/loop.ko
2. busybox mount -o remount,rw /
Forgot to write a step: mkdir image
3. busybox mknod /dev/loop0 b 7 0
4. mount -o loop,noatime sdcard/debian.img image
5 .cp -r image/* sd-ext/
6. mkdir data/local/debian/
7. mount -t ext2 /dev/block/mmcblk0p2 /data/local/debian
8. mount --bind /dev/pts /data/local/debian/dev/pts
9. mount --bind /proc /data/local/debian/proc
10. mount --bind /sys /data/local/debian/sys
11. sysctl -w net.ipv4.ip_forward=1
12. chroot /data/local/debian /bin/bash
Now if you don't want to partition your sd card I beleive you can just chroot into the img itself instead of copying the files so you would skip steps 5-7 and change the paths in the other steps from data/local/debian/ to image/ This image was only 1.4 GB which could be made bigger i believe if you wanted more room. The debian.img just goes on the fat32 portion of your sd card. This was done using celbfroyo but all cm roms mount an ext partition as sd-ext i beleive. If your not using a cm rom you would probably need to mount the ext partition yourself.
Tuckface1 said:
screenies?
list of wat is and isn't working?
great job though
Click to expand...
Click to collapse
no screenies cause at this point we are just at a command prompt of debian with no ui...when we get a ui I will get some screenies for you. I am getting an internet connection.
Conap said:
no screenies cause at this point we are just at a command prompt of debian with no ui...when we get a ui I will get some screenies for you. I am getting an internet connection.
Click to expand...
Click to collapse
ok I am getting ui with xwindows server but for some reason cant see login. I get a grey screen when connected to vnc
but under terminal I have web, and debian shell so its close
mjgdroid said:
ok I am getting ui with xwindows server but for some reason cant see login. I get internet with wget but doesnt let me download kde idk what ui are you going to get?
Click to expand...
Click to collapse
i was attempting to get icewm but would take anything at this point. How do you get the ui with xwindows? i was trying through the androidvnc app. Is there a different app?
Conap said:
i was attempting to get icewm but would take anything at this point. How do you get the ui with xwindows? i was trying through the androidvnc app. Is there a different app?
Click to expand...
Click to collapse
apt-get install tightvncserver (return)
apt-get install lxde (return)
i am using pocket cloud light
OK my phone just rebooted due to low memory I will be right back, but I posted what I did after I installed /ontime/sript.sh
then
apt-get install tightvncserver (return)
apt-get install lxde (return)
at wich point I can connect threw pockect cloud light , now I justneed a xwindows file or something
Any idea on how to get terminal not to shut out of localhost after we close it?
mjgdroid said:
Any idea on how to get terminal not to shut out of localhost after we close it?
Click to expand...
Click to collapse
are you running it on the phone or through adb?....i still get could not connect to server in vnc and cloud ...
phone.... adb seems messy to me, and I want to know it works while I'm doing it : ok stupid stupid me, just realized why u are yousing adb lol omg
eventually i would assume we would want a script to run on phone to start it which should be simple...i did get lxde ui to load
mjgdroid said:
apt-get install tightvncserver (return)
apt-get install lxde (return)
i am using pocket cloud light
Click to expand...
Click to collapse
Conap said:
eventually i would assume we would want a script to run on phone to start it which should be simple...i did get lxde ui to load
Click to expand...
Click to collapse
can you log into debian I get a grey screen on pocket cloud maybe a different vnc?
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Windows\System32>adb devicess
'adb' is not recognized as an internal or external command,
operable program or batch file.
C:\Windows\System32>adb devices
'adb' is not recognized as an internal or external command,
operable program or batch file.
C:\Windows\System32>cd c:\
c:\>cd c:\sdk\tools
c:\sdk\tools>adb devices
List of devices attached
HT9C2HG16524 device
c:\sdk\tools>adb shell
# su
su
su
su
# su
# insmod /sdcard/loop.ko
insmod /sdcard/loop.ko
# su
su
s#su
su
# insmod /sdcard/loop.ko
insmod /sdcard/loop.ko
insmod: init_module '/sdcard/loop.ko' failed (File exists)
# sh /sdcard/debian/bootdeb.sh
sh /sdcard/debian/bootdeb.sh
modprobe: chdir(2.6.29-DecaFuctCFS-dirty-512f5dee): No such file or directory
←[H←[JAndroid Filesytem remounted as read/write
←[H←[Jmount: can't setup loop device: No such file or directory
mount: mounting devpts on /data/local/mnt/dev/pts failed: No such file or direct
ory
mount: mounting proc on /data/local/mnt/proc failed: No such file or directory
mount: mounting sysfs on /data/local/mnt/sys failed: No such file or directory
Custom Linux Pseudo Bootstrapper V1 - by Charan Singh
WEB: http://www.maharajafarms.com
EML: [email protected]
Starting init process
INIT: Debian booting.....
Running Linux Kernel
net.ipv4.ip_forward = 1
AutoMounter started
Type EXIT to end session
Make sure you type EXIT for a clean kill of Debian, Phone will reboot after shut
down!
chroot: can't execute '/bin/bash': No such file or directory
Shutting down Debian
Processes killed......
Loopback device shutdown - success
Debian down
by Charan Singh
http://www.maharajafarms.com
[email protected]
Rebooting device to ensure clean shutdown so debian doesnt eat memory ........
.
c:\sdk\tools>su
'su' is not recognized as an internal or external command,
operable program or batch file.
c:\sdk\tools>cd c:\sdk\tools
c:\sdk\tools>adb shell
# insmod /sdcard/loop.ko
insmod /sdcard/loop.ko
# busybox mount -o remount,rw /
busybox mount -o remount,rw /
# busybox mkno /dev/loop0 b 7 0
busybox mkno /dev/loop0 b 7 0
mkno: applet not found
# busybox mknod /dev/loop0 b 7 0
busybox mknod /dev/loop0 b 7 0
# sh /sdcard/debian/bootdeb.sh
sh /sdcard/debian/bootdeb.sh
modprobe: chdir(2.6.29-DecaFuctCFS-dirty-512f5dee): No such file or directory
←[H←[JAndroid Filesytem remounted as read/write
mknod: /dev/loop2: File exists
←[H←[JCustom Linux Pseudo Bootstrapper V1 - by Charan Singh
WEB: http://www.maharajafarms.com
EML: [email protected]
Starting init process
INIT: Debian booting.....
Running Linux Kernel
net.ipv4.ip_forward = 1
AutoMounter started
Type EXIT to end session
Make sure you type EXIT for a clean kill of Debian, Phone will reboot after shut
down!
xauth: (argv):1: bad display name "localhost:1" in "add" command
New 'X' desktop is localhost:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost:1.log
localhost:/# apt-get update
apt-get update
Hit http://ftp.de.debian.org lenny Release.gpg
Hit http://ftp.de.debian.org lenny Release
Ign http://ftp.de.debian.org lenny/main Packages/DiffIndex
Hit http://ftp.de.debian.org lenny/main Packages
Reading package lists... Done
W: There is no public key available for the following key IDs:
9AA38DCD55BE302B
W: You may want to run apt-get update to correct these problems
localhost:/#
How do I get rid of the error no public key available for the folowing id's says to run apt-get update, but if i do that i get this error again to run apt-get update endless looop
pocket cloud and tightvncserver working
This sounds promising, but what ui do you hope to run in the end?
Sent from my FroyoEris using XDA App
Nevermind. I read the original thread. Good luck to you all.
Sent from my FroyoEris using XDA App
to get rid of the key error i ran
gpg --recv-keys 9AA38DCD55BE302B
gpg --export 9AA38DCD55BE302B | apt-key add -
(Thanks to workshed for figuring that part out)
i still was having trouble running apt-get install whatever though...
i am able to log in through vnc and cloud now....
Not sure why but each time I chroot in I have to go in and remove all the .X files and directories from the tmp/ folder. Also have to run the command:
export HOME=/root
that can be added to bash.rc once i manage to edit it
I then run vncserver and it asks for a password.
then through cloud or androidvnc i use localhost and port 5901 and put in the password i entered above. I can't seem to get a keyboard on androidvnc so i think i'm gonna try cloud again.
This is my first post here, but I figured I'd share this since doesn't appear to have been done yet.
As I'm sure most of you know the locked bootloader introduces challenges to getting your favo(u)rite flavo(u)r of linux on to the Droid 2.
I expect that you have rooted your phone and have busybox installed/working...
Normally when one wants to do this they get a linux image file and mount it as a loop device and then chroot to it's mounted folder. Because one can create a loop device but can't mount it.
My solution has been a "simple" one but may not have been tried:
Extract the contents of the image on a separate system and then push everything to /data/local/mnt.
For instance I set up a loop device on Ubuntu:
losetup /dev/loop0 /home/usernamehere/distributionnamehere.img
mount -t ext2 /dev/loop0 /home/usernamehere/somemountfoldername
Then I remove security stuff:
sudo chmod 777 /home/usernamehere/somemountfoldername
sudo adb shell
chmod 777 /data/local/mnt
exit
sudo adb push /home/usernamehere/somemountfoldername /data/local/mnt
(Wait for the push to happen stop it when you see X11/X11/X11/X11 or remove that symbolic link before pushing. If you stop it you'll have to push the other folders separately)
After it's done the bootubuntu which points to that /data/local/mnt share (or /data/local/ubuntu or /data/local/debian or whatever) should throw a few errors about mounting which is expected because we haven't fixed the fact that loop devices aren't mountable, but since we pushed the files to the 'mount' directory, the script finds it anyways and chroots to the /data/local/mnt and runs /data/local/mnt/bin/bash (or /bin/bash from the chroot point of view.)
This will get you to the root prompt.
I'm still working on getting the bash: groups: message to go away, but I think that is just that I didn't get everything copied initially.
Also I have yet to finish setting up VNC.
Anyway I hope this helps some people out.
I may do a script or more complete instructions later if requested.
Thanks,
Sky Adams
Thanks, I've been stumped by this for awhile. Your method allowed me to push the files but my script still doesn't find it. I'm going to need you to post your bootubuntu script. I have an image from androidclone.com that has vnc setup already, just need to get it to execute.
Confirmed working on rooted Droid X. Used Lakia image from androidclone dot com
1) Partitioned 16GB SD: Shrink to 11.9 GB leaving ~4GB. Then create new ext3 partition in free space
2) mount ext3 partition and create the loop to the image as skrull mentioned above.
3) then just "[email protected]# cp -r pathtoloopiface/* pathto4gbmount/"
4) takes a while but preserves the symlinks to avoid the X11/X11/X11/ issue above. (I think the reason you were having problems with the bash at the end, was an incomplete adb transfer of the /usr folder and probably no /var transfer at all. At least that was the case when I tried.)
5) push and chmod 777 this bootubuntu script to /system/bin:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
mount -t ext3 /dev/block/mmcblk0p2 $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
sysctl -w net.ipv4.ip_forward=1
echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "Setting localhost on /etc/hosts "
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "READY TO ROCK AND ROLL BABY! "
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo " "
echo " "
echo " "
echo "Ubuntu 10.10 - Laika Edition by Androidclone.com "
echo "Website:http : / /www . androidclone . com"
echo "Email:[email protected] . com"
chroot $mnt /bin/bash
#After exit command is executed clear it all up
echo " "
echo "Shutting down Ubuntu"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
# the fuser command below allows us to kill all processes using the mount.
# otherwise umount will fail and the vnc session will still be alive.
# if it fails just run the fuser and umount again manualy.
fuser -k $mnt
umount $mnt
6) make sure there is a path to /data/local/mnt on the device and just run 'bootubuntu' from a root shell. you should get: "[email protected]/#:"
7) read the site on androidclone dot com for details on logging into the already running vnc service for a full LXDE session.
8) happy hacking.
D2G
any idea if this could free up the bootloader for the D2G allowing us to modify radio?
No, this will not circumvent the bootloader to load custom kernels. But who cares. many of the things we want, added features etc., can be loaded up in the form of kernel modules. I am not proficient enough to be able to compile my own modules yet but i'm working on a few things.
Radio
Can a kernal module be used to change the radio?
Good share, thank you very much.
ARGH!
I have probably spent 8 to 10 hours trying to get Ubuntu to boot. It seems that I cannot mount the path it wants to mount.
I can as it would seem to do this in shell it self, but still have some errors.
Do you think if I SBF my Droid X then root it - then follow the directions this would work. I am at an end now...and frustrated
Backtrack5 and OpenOffice3.0
xMemphisx said:
Backtrack (http://www.backtrack-linux.org)
Backtrack-Linux.org, home of the highest rated and acclaimed Linux security distribution to date. BackTrack is a Linux-based penetration testing arsenal that aids security professionals in the ability to perform assessments in a purely native environment dedicated to hacking. Regardless if you’re making BackTrack you Install BackTrack, boot it from a Live DVD or thumbdrive, the penetration distribution has been customized down to every package, kernel configuration, script and patch solely for the purpose of the penetration tester.
Here is a guide to getting ARM Backtrack Running on the Iconia A500 (tested on Wifi Only Version, running 3.0.1)
After much frustration I have gotten the GUI part of the backtrack 5 arm release working with the Motorola Xoom.
This has only been tested to work on the Iconia A500 . But it should work just fine with any other device that supports linux, and should work especially well on anything with a dual-core processor (G2X, Atrix, etc.)
Pre-requisites:
- Rooted Iconia A500
- Busybox installed (Find on market Busybox installer)
- androidVNC from the Android Market
- Terminal Emulator from the Android Market (which you should already have)
- Backtrack 5 for ARM with Gnome downloaded and setup (check the README file, and follow the instructions.)
Link: Backtrack 5 http://www.backtrack-linux.org/downloads/. This tutorial will assume you put Backtrack 5 in the folder /sdcard/BT5 like the README says.
Code:
Extract the zip file to your internal SDCARD folder (/SDCARD/BT5)
Open Terminal emulator and type
su
cd /sdcard/BT5
gunzip bt5.img.gz (take about 7-10mins)
sh bootbt
Code:
cd /sdcard/BT5
su
sh bootbt
BackTrack will start up in shell. You will get a red line that says "[email protected]:". To verify if you type:
Code:
ls pentest
It should echo back the folders in pentest, stuff like 'backdoors','database',etc.
At this point enter the following commands:
Code:
export USER=root
vncpasswd
When you type in 'vncpasswd' this is to the the password for the tightvncserver. Since I only connect locally I just use 'qwerty' for my password, and then confirm the password. [Edit] Apparently you can skip this step, as the default password for vnc is simply, 'toortoor' (root backwards, twice).
When it asks if you want to create a view only password just type 'n' and hit enter. After you have your password setup for vnc start the server up.
Code:
[COLOR="Red"]startvnc 1280x800[/COLOR]
When this happens you will get a message confirming that "New 'X' Desktop is localhost:1" and a bunch of other random stuff below it (it isn't important unless there are errors listed).
At this point, press the "HOME" button and then open the application "androidVNC".
-In the "Nickname" box, you can name it whatever you like.
-In the "password" entry, use your password (mine is 'qwerty').
-In the "Address" box you can type in localhost (or leave it blank).
****Change the port from 5900 to 5901.
I also recommend setting the color-depth to 24-bit. After that press the "connect" button, and bam! You're rocking Backtrack 5 on your Iconia A500!!
Code:
In order to exit:
- Go back to Terminal
- Type [B]stopvnc[/B]
- Type [B]exit[/B]
you are back to android terminal environment and ur androidvncviewer will get disconnected.
Click to expand...
Click to collapse
p-ille said:
I tested openoffice 3 and it works like a charm. It is not present in the original backtrack repository, so I had to add another source. I used the Debian repository. From the backtrack terminal I typed:
Code:
add-apt-repository deb *repository address* stable main contrib non-free
apt-get update
apt-get install openoffice.org
You can find the debian mirror for your country at
Code:
debian.org/mirror/list
Click to expand...
Click to collapse
For those who want to access SDCard/USBDrive from within BB5, please follow this:
p-ille said:
I did it!
To mount sdcard, external sd and usb storage in backtrack, you have to modify the bootbt script like this (changes in red):
Code:
perm=$(id|cut -b 5)
if [ "$perm" != "0" ];then echo "This Script Needs Root! Type : su";exit;fi
mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/sdcard/BT5
export bin=/system/bin
export mnt=/data/local/mnt
[B][COLOR="Red"]export stor=$mnt/root/storage
export sdcard=$stor/sdcard
export extsd=$stor/external_sd
export usb=$stor/usb_storage[/COLOR][/B]
mkdir -p $mnt
export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export HOME=/root[I]
[COLOR="Blue"]export USER=root[/COLOR][/I]
if [ -b /dev/loop2 ]; then
echo "Loop device exists"
else
busybox mknod /dev/loop2 b 7 0
fi
mount -o loop,rw,noatime -t ext2 $kit/bt5.img $mnt[B][COLOR="Red"]
echo "mounting storage devices in $stor..."
mkdir -p $sdcard
mkdir -p $extsd
mkdir -p $usb
busybox mount --bind /mnt/sdcard $sdcard
busybox mount --bind /mnt/external_sd $extsd
busybox mount --bind /mnt/usb_storage $usb[/COLOR][/B]
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
busybox sysctl -w net.ipv4.ip_forward=1
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "127.0.0.1 localhost bt5" > $mnt/etc/hosts
busybox chroot $mnt /bin/bash
echo "Shutting down BackTrack ARM for Iconia A500"
[B][COLOR="Red"]umount $sdcard
umount $extsd
umount $usb[/COLOR][/B]
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
Click to expand...
Click to collapse
Very nice indeed, will try it out very soon.............
Awesome, just what I have been looking for. I will try this when I get home tonight!
Thanks
lpachuong said:
Here is a guide to getting ARM Backtrack Running on the Iconia A500 (tested on Wifi Only Version, running 3.1)
Click to expand...
Click to collapse
3.1? maybe you means 3.0.1?
After
export USER=root
Click to expand...
Click to collapse
You/can type
startvnc
Click to expand...
Click to collapse
without the need to -geometry 1280x800, and afterward after your session type
stopvnc
Click to expand...
Click to collapse
for a clean disconnect.
Just a faster easier way.
I got I/O errors while mounting devpts and sysfs (bootbt script)
peyotll said:
I got I/O errors while mounting devpts and sysfs (bootbt script)
Click to expand...
Click to collapse
I had the same errors when i had ubuntu installed/and was trying to do this along side.. what I had to do was factory reset (I did so to get rid of ubuntu, there's probably an easier way) then tried backtrack again with no problem
Agosh13 said:
3.1? maybe you means 3.0.1?
Click to expand...
Click to collapse
Hahahaha...I wish =)
Btw, please let me know if you have any special script/suggestion about this topic. I will update the original one so that everyone can get updated.
I'm trying to get OpenOffice running...sadly the ARM version is not that stable. Anyone has any resource on it?
Works perfectly! Thanks for this!
Thanks very much for this guide!
I'm having a strange issue though, hopefully someone can help. When I press the "m" key, rather than type the letter "m", it opens up the mail icon in the tool bar. Every other letter works fine, and I can't seem to find a way to edit this keyboard shortcut.
Anyone else have this issue, or now how to correct this?
thanks a lot - it will work for me without any error or something else
i use the latest update from acer (A500_1.141.01_EMEA_CUS7)
hmm, is there any trick to log off an turn off the system ? when i exit everthing an try to start again i will only see the backtrack wallpaper...
also i got an error in term-emu when i type in "exit".
I added the OP for how to exit.
Thanks for the guide, I have been waiting for something like this!
koprofile said:
Thanks very much for this guide!
I'm having a strange issue though, hopefully someone can help. When I press the "m" key, rather than type the letter "m", it opens up the mail icon in the tool bar. Every other letter works fine, and I can't seem to find a way to edit this keyboard shortcut.
Anyone else have this issue, or now how to correct this?
Click to expand...
Click to collapse
doble-tap (right click) the mail icon in the tool bar and choose to remove it from panel. It should remove the keyboard shortcut also.
lpachuong said:
Hahahaha...I wish =)
I'm trying to get OpenOffice running...sadly the ARM version is not that stable. Anyone has any resource on it?
Click to expand...
Click to collapse
I tested openoffice 3 and it works like a charm. It is not present in the original backtrack repository, so I had to add another source. I used the Debian repository. From the backtrack terminal I typed:
Code:
add-apt-repository deb *repository address* stable main contrib non-free
apt-get update
apt-get install openoffice.org
You can find the debian mirror for your country at
Code:
debian.org/mirror/list
Thank you very much for this guide.
It works like a charm.
Just one question.
I suppose you use a bluetooth keyboard, because the virtual one doesn't seem to work with Backtrack. But is it possible to use a mouse ? Because my big fingers don't match the tiny icons and menu choices !!!
Thanks again.
p-ille said:
Code:
add-apt-repository deb *repository address* stable main contrib non-free
apt-get update
apt-get install openoffice.org
You can find the debian mirror for your country at
Code:
debian.org/mirror/list
Click to expand...
Click to collapse
Thank you for ur script. I haven't had time to play with it due to exams.Anyway, I added them to the original post so that everyone can find it easier.
Regarding to the keyboard...i tried with usb keyboard and it worked fine. I have a BT keyboard but haven't tried it yet. I don't think the mouse will work bcz it is restricted by the VNCViewer
Hi
Tanks for tour tutorial, but i'm having some issue running backtrack:
Code:
# sh bootbt
Loop device exists
ioctl LOOP_SET_FD failed: Bad file number
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
net.ipv4.ip_forward = 1
bootbt: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
bootbt: cannot create /data/local/mnt/etc/hosts: directory nonexistent
chroot: can't execute '/bin/bash': No such file or directory
Shutting down BackTrack ARM For Xoom
failed.
failed.
failed.
failed.
#
I did check the md5sum of the archive,ok. Busybox ok.
Tanks for your help.
When it asks if you want to create a view only password just type 'n' and hit enter. After you have your password setup for vnc start the server up.
Code:
Code:
startvnc 1280x800
When this happens you will get a message confirming that "New 'X' Desktop is localhost:1" and a bunch of other random stuff below it (it isn't important unless there are errors listed).
Click to expand...
Click to collapse
is it possible to use a different resolution? I tried to use 1280x768 (WXGA read on Wikipedia) but it didn't work.
Hi, Alberto
edit:
Now it works fine! thank you!
Sorry for my first post.
I just realize that I had confused the downloaded archive (.7 z, wich contain all stuff) and the compressed image (. gz), so I did not unpack image before running bootbt.
Unfortunately, the extraction of master archive did not work due to the soft used to extract .7z.
As i mentionned before I've checked the whole archive md5sum but did not check the extracted files.
bt5.img.gz was only 12.59 MB, extracted with androzip. (don't use it, at least for .7z!!)
interesting....
is the wifi adapter working in monitor mode???
hey guys, im trying to get chrooted ubuntu running on my vegacomb update 3 vega and am having problems.
Im following the guide here:
http://androlinux.com/android-ubuntu-development/how-to-install-busybox-on-your-android/
and keep getting the following errors:
/mnt/sdcard/ubuntu # bootubuntu
losetup: /dev/block/loop1
mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: Device or resource busy
mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or directory
mount: mounting proc on /data/local/ubuntu/proc failed: No such file or directory
mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or directory
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
/system/bin/bootubuntu: line 22: can't create /data/local/ubuntu/etc/resolv.conf: nonexistent directory
/system/bin/bootubuntu: line 23: can't create /data/local/ubuntu/etc/resolv.conf: nonexistent directory
Setting localhost on /etc/hosts
/system/bin/bootubuntu: line 25: can't create /data/local/ubuntu/etc/hosts: nonexistent directory
READY TO ROCK AND ROLL BABY!
Brought to you by NexusOneHacks.net and the open source community!
chroot: can't execute '/bin/bash': No such file or directory
Shutting down Ubuntu
umount: can't umount /data/local/ubuntu/dev/pts: No such file or directory
umount: can't umount /data/local/ubuntu/proc: No such file or directory
umount: can't umount /data/local/ubuntu/sys: No such file or directory
umount: can't umount /data/local/ubuntu: Invalid argument
losetup: /dev/block/loop1: Device or resource busy
Is it that vegacomb doesnt support loop devices:? Or am i missing something else? Ive checked and i have busybox installed and working correctly, but that doesnt seem to have changed anything?
Thoughts?
The vega does support loop devices, infact I have that setup running on my vega on vegacomb right now!
In order to get it working download the new scripts from the ubuntu on xoom section of the androlinux site, that worked for me fine!
Bear in mind, the version of ubuntu supplied in the image file is something like 9.10 which is very old, and the image is only 2gb which doesn't leave enough space for updating. Consider following their guide for building your own image.
Anyway, best of luck, I had to get over a few problems when installing it myself, but that may have been related to my setup, so if you have any problems I will keep an eye on this thread!
Happy Ubuntuing
Thanks for the reply, I will try the xoom scripts and see how I get on. I saw the section about building my own but wanted to try and easy 9.10 install first before building my own xubuntu 11.10. Il let you knw how I get on
Could you post your bootubuntu script up please?
I have tried lots of different loop device numbers but am getting no where!
I haven't altered my bootubuntu script at all from the default xoom one, I will post it at the bottom!
There are a few things worth checking for that may help your problems, check that the ubuntu folder on your sd card with the .img file in uses a lower case U, that caught me out the first time as my vega keyboard auto-capitalises.
Also did your ubuntu.sh script run without errors? It worked fine on mine with the old ubuntu.sh and the new bootubuntu script but you may want to try running the xoom shell script.
Hope this helps!
Code:
mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
busybox mknod /dev/loop2 b 7 0
mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
busybox sysctl -w net.ipv4.ip_forward=1
echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "Setting localhost on /etc/hosts "
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo " "
echo "VERSION 0.9.5 BUGFIX April 2nd 2011"
echo "Brought to you for the Motorola Xoom by Thomas Sohmers, and Ubuntu by Canonical and the open source community!"
echo "This version is for people experiencing errors around step 7 of my Ubuntu install. Hope this fixes everything! If not, feel free to contact me. Sorry for the delay."
echo " "
echo "Ubuntu is now loaded and you should see a '[email protected]' terminal entry below thisÔøΩ if you do not, than Ubuntu has not successfully loaded. Have fun!"
echo " "
busybox chroot $mnt /bin/bash
#After exit command is executed clear it all up
echo " "
echo "Shutting down Ubuntu"
vncserver -kill :1
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
Right i must be missing something, i cant find the xoom section on the website so have tried your bootubuntu script in my folder but it still fails.
Can you post me a link to the xoom section of the site please so i can start over in case i missed something earlier in the process?
Thanks
right im missing something, even tried this setup here;
http://trsohmers.com/2011/03/06/how-to-run-ubuntu-on-the-motorola-xoom/
and still no luck. I have a rooted device but its almost as if the scripts are not running as root, i get permission denied messages when chmod 4777 and that shouldnt happen as root.
Im running 1.17 of busybox, not that it should matter. I am getting sick of this not working, no idea why, thinking i might have to bin vegacomb to at least work out where root might work (ie a simpler rom).
I can't remember the exact process, but I do remember getting this. I think I was missing the root login. Are you running these command as root? I think you have to use
su
Click to expand...
Click to collapse
. I haven't done this for quite some time so can't be 100% certain.
Heya, sorry it's been a while since I've been on the forums, it seems like something has more than likely gone wrong when you ran the ubuntu.sh shell script, can you post the output?
Sent from my X10 using XDA App
If we can install full Linux OS on note 10.1 2014, then it will become the truly laptop replacement.
It seems that Linux deploy is very promising, but it require a truly working root
Someone used Linux deploy to install full Linux OS on note 10.1 2012 and turned note into a full Linux laptop when needed.
https://play.google.com/store/apps/details?id=ru.meefik.linuxdeploy
Can someone savvy give it a try?
I've played around with a few installers and in the terminal by hand for a few hours. I am not able to grant permission to chroot. Even with root. I will look into this in the future.
dasmoover said:
I've played around with a few installers and in the terminal by hand for a few hours. I am not able to grant permission to chroot. Even with root. I will look into this in the future.
Click to expand...
Click to collapse
someone managed to install Linux on note3
https://github.com/meefik/linuxdeploy/issues/77
Since note 10.1 2014 is essentially an enlarged note3, above information maybe helpful for you
Got Linux deploy (linuxonandroid) app working with work
Hello, Sorry meant to say Complete Linux Installer in the topic, not Linux Deploy!
I tried the Linux Deploy project with no luck. The post that was in this thread got me to the point that you need to apply a patch in the source code ShellEnv.java and then recompile. It sets it up so it prefaces all commands in the script with su when run. I was not able to recompile the code nor anyone that could give it to me. So I moved on to the Complete Linux Installer linuxonandroid app http://linuxonandroid.org/ I ran into the same problems but I was able to get around it because the script that is used to starts the Linux distribution is editable it is bootscript.sh placed in /data/data/com/zpwebsites.linuxonandroid/files this script is automatically created when you walk through the setup/install process while you are downloading an image file going through the setup process you can edit this file as it will be created at that point, where ever you see "$bbox and a xxxxx" in the script you change it to "su $bbox and xxxxxxx" so basically you have to preface all these points which there are a lot of with su. This is part of the situation. Second part is that you will need to setup the mount point for the loop directory by hand and you can see this in the script, then you will need to mount the loop directory and then create each directory inside to what is specified in the script.Then unmount the loop directory, or reboot and then you can finish the setup and launch the distribution.
You may run into errors along the way and you will need to correct them as needed. This is no easy task to setup unless you are familiar with linux and what the script is doing. Sorry I have no easy way but I was able to get it running with the Ubuntu small images to even include the display, still having so issues getting the xwindow to display correctly in the other large images which are close to a full distribution.
All my work was done with a terminal emulator, root explorer, a text editor, Complete Linux Installer(linuxonandroid from ZPWebSites), and a VNC client. Oh and using the spen and Bluetooth keyboard helps as it takes more time with just the touch interface and keyboard for what needs to be done.
It is possible to get running but you have to work at it, took me 3 hours to work through all the issues and I am familiar with Linux and its tools.
Hope this gets you in the direction you need because it was important to me to get this working for what I do. I have sent updates to the developer to hope he can automate this in the future. With Samsung's Android implementation with multiple user config it messes with the security context of scripts because each command can be run through an interactive terminal session. But the script needs to pass SU with the commands to get it to work.
I have a Samsung Galaxy Note 10.1 2014 WIFI P600 and should work with the other models too because not specific to a model. Seems this work with a Galaxy S4 as well since they are setup the same in the OS from what I have found.
quser1 said:
Hello, Sorry meant to say Complete Linux Installer in the topic, not Linux Deploy!
I tried the Linux Deploy project with no luck. The post that was in this thread got me to the point that you need to apply a patch in the source code ShellEnv.java and then recompile. It sets it up so it prefaces all commands in the script with su when run. I was not able to recompile the code nor anyone that could give it to me. So I moved on to the Complete Linux Installer linuxonandroid app http://linuxonandroid.org/ I ran into the same problems but I was able to get around it because the script that is used to starts the Linux distribution is editable it is bootscript.sh placed in /data/data/com/zpwebsites.linuxonandroid/files this script is automatically created when you walk through the setup/install process while you are downloading an image file going through the setup process you can edit this file as it will be created at that point, where ever you see "$bbox and a xxxxx" in the script you change it to "su $bbox and xxxxxxx" so basically you have to preface all these points which there are a lot of with su. This is part of the situation. Second part is that you will need to setup the mount point for the loop directory by hand and you can see this in the script, then you will need to mount the loop directory and then create each directory inside to what is specified in the script.Then unmount the loop directory, or reboot and then you can finish the setup and launch the distribution.
You may run into errors along the way and you will need to correct them as needed. This is no easy task to setup unless you are familiar with linux and what the script is doing. Sorry I have no easy way but I was able to get it running with the Ubuntu small images to even include the display, still having so issues getting the xwindow to display correctly in the other large images which are close to a full distribution.
All my work was done with a terminal emulator, root explorer, a text editor, Complete Linux Installer(linuxonandroid from ZPWebSites), and a VNC client. Oh and using the spen and Bluetooth keyboard helps as it takes more time with just the touch interface and keyboard for what needs to be done.
It is possible to get running but you have to work at it, took me 3 hours to work through all the issues and I am familiar with Linux and its tools.
Hope this gets you in the direction you need because it was important to me to get this working for what I do. I have sent updates to the developer to hope he can automate this in the future. With Samsung's Android implementation with multiple user config it messes with the security context of scripts because each command can be run through an interactive terminal session. But the script needs to pass SU with the commands to get it to work.
I have a Samsung Galaxy Note 10.1 2014 WIFI P600 and should work with the other models too because not specific to a model. Seems this work with a Galaxy S4 as well since they are setup the same in the OS from what I have found.
Click to expand...
Click to collapse
Can you upload the edited script?
dasmoover said:
Can you upload the edited script?
Click to expand...
Click to collapse
Yes, I will try. One thing is that the script is producing errors when you try to Exit the running distro with syntax errors on a couple of commands and I have not been able to fix them, they looks like script issues from the generated script, still need investigation and I have contacted the developer. Only way I have been able to get the system to unmount the loop device after an exit is to restart the tablet because of the script errors. Also you will need to create all the file system in the loop directory as the script is not doing it automatically.
---------- Post added at 09:43 AM ---------- Previous post was at 09:26 AM ----------
Tried to attach file so keep getting error so pasting the script here. Just so you know this is an auto created script on setup so not sure if it is different for each install.
###########################################
# Linux boot script V8 for Android v4.3 #
# Built by Zachary Powell (zacthespack) #
# and Martin Møller (Tuxling) #
# Thanks to: #
# Johan Vromans #
# Marshall Levin #
# Vaykadji #
# and to everyone at XDA! #
# Feel free to edit/use this script as you#
# like but credit Linuxonandroid.org #
###########################################
# $ver: V8 #
###########################################
###########################################
# This is a function we use to stop the #
# script in case of errors #
###########################################
error_exit() {
echo "Error: $1"
exit 1
}
###########################################
# Set up variables #
###########################################
if [ -f /data/data/com.zpwebsites.linuxonandroid/files/busybox ]; then
export bbox=/data/data/com.zpwebsites.linuxonandroid/files/busybox
elif [ -f /data/data/com.zpwebsites.linuxonandroid.opensource/files/busybox ]; then
export bbox=/data/data/com.zpwebsites.linuxonandroid.opensource/files/busybox
else
export bbox=/system/xbin/busybox
fi
export usermounts=android # Base folder all user mounts are done in, should be moved to app later
export imgfile=$(dirname $0)/ubuntu.img # Default image file, another can be set by using an argument
export bin=/system/bin
export mnt=/data/local/mnt
export USER=root
if [[ ! -d $mnt ]]; then mkdir $mnt; fi
export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export HOME=/root
###########################################
# Handle arguments if present #
###########################################
if [ $# -ne 0 ]; then
if [ -f $1 ]; then # Is full path present?
imgfile=$1
elif [ -f $(dirname $0)/$1 ]; then # Is only a filename present?
imgfile=$(dirname $0)/$1
else
error_exit "Image file not found!($1)"
fi
fi
###########################################
# If a md5 file is found we check it here #
###########################################
if [ -f $imgfile.md5 ]; then
echo "MD5 file found, use to check .img file? (y/n)"
read answer
if [ $answer == y ]; then
echo -n "Validating image checksum... "
$bbox md5sum -c -s $imgfile.md5
if [ $? -ne 0 ];then
echo "FAILED!"
error_exit "Checksum failed! The image is corrupted!"
else
echo "OK"
rm $imgfile.md5
fi
fi
fi
################################
# Find and read config file #
# or use defaults if not found #
################################
use_swap=no
cfgfile=$imgfile.config # Default config file if not specified
if [ -f $imgfile.config ]; then
source $imgfile.config
fi
###########################################
# Set Swap up if wanted #
# #
###########################################
if [ $use_swap == yes ]; then
if [ -f $imgfile.swap ]; then
echo "Swap file found, using file"
echo "Turning on swap (if it errors here you do not have swap support"
swapon $imgfile.swap
else
echo "Creating Swap file"
dd if=/dev/zero of=$imgfile.swap bs=1048576 count=1024
mkswap $imgfile.swap
echo "Turning on swap (if it errors here you do not have swap support"
swapon $imgfile.swap
fi
fi
###########################################
# Set up loop device and mount image #
###########################################
echo -n "Checking loop device... "
if [ -b /dev/block/loop255 ]; then
echo "FOUND"
else
echo "MISSING"
# Loop device not found so we create it and verify it was actually created
echo -n "Creating loop device... "
su $bbox mknod /dev/block/loop255 b 7 255
if [ -b /dev/block/loop255 ]; then
echo "OK"
else
echo "FAILED"
error_exit "Unable to create loop device!"
fi
fi
su $bbox losetup /dev/block/loop255 $imgfile
if [ $? -ne 0 ];then error_exit "Unable to attach image to loop device! (Image = $imgfile)"; fi
su $bbox mount -t ext4 /dev/block/loop255 $mnt
if [ $? -ne 0 ];then error_exit "Unable to mount the loop device!"; fi
###########################################
# Mount all required partitions #
###########################################
su $bbox mount -t devpts devpts $mnt/dev/pts
if [ $? -ne 0 ];then error_exit "Unable to mount $mnt/dev/pts!"; fi
su $bbox mount -t proc proc $mnt/proc
if [ $? -ne 0 ];then error_exit "Unable to mount $mnt/proc!"; fi
su $bbox mount -t sysfs sysfs $mnt/sys
if [ $? -ne 0 ];then error_exit "Unable to mount $mnt/sys!"; fi
su $bbox mount -o bind /sdcard $mnt/sdcard
if [ $? -ne 0 ];then error_exit "Unable to bind $mnt/sdcard!"; fi
if [[ ! -d $mnt/root/cfg ]]; then mkdir $mnt/root/cfg; fi
su $bbox mount -o bind $(dirname $imgfile) $mnt/root/cfg
su $bbox mount -o bind /sys/fs/selinux $mnt/selinux
###########################################
# Checks if you have a external sdcard #
# and mounts it if you do #
###########################################
if [ -d /sdcard/external_sd ]; then
su $bbox mount -o bind /sdcard/external_sd $mnt/external_sd
fi
if [ -d /Removable/MicroSD ]; then
su $bbox mount -o bind /Removable/MicroSD $mnt/external_sd
fi
# This is for the HD version of the Archos 70 internet tablet, may be the same for the SD card edition but i dont know.
if [ -d /storage ]; then
su $bbox mount -o bind /storage $mnt/external_sd
fi
###########################################
# Mount all user defined mounts if any #
###########################################
if [ -f $imgfile.mounts ]; then
olddir=$(pwd)
echo "Mounting user mounts"
cd $mnt
if [[ ! -d $mnt/$usermounts ]]; then su $bbox mkdir -p $usermounts; fi
echo "# Script to unmount user defined mounts, do not delete or edit!" > $imgfile.shutdown
echo "cd $mnt/$usermounts" > $imgfile.shutdown
cd $mnt/$usermounts
for entry in $(cat "$imgfile.mounts"); do
ANDROID=${entry%;*}
LINUX=${entry#*;}
if [[ -d $ANDROID ]]; then
echo -n "Mounting $ANDROID to $usermounts/$LINUX... "
if [[ ! -d $mnt/$usermounts/$LINUX ]]; then su $bbox mkdir -p $LINUX; fi
su $bbox mount -o bind $ANDROID $mnt/$usermounts/$LINUX &> /dev/null
if [ $? -ne 0 ];then
echo FAIL
if [[ -d $mnt/$usermounts/$LINUX ]]; then su $bbox rmdir -p $LINUX; fi
else
echo OK
echo "su $bbox umount $mnt/$usermounts/$LINUX" >> $imgfile.shutdown
echo "su $bbox rmdir -p $LINUX" >> $imgfile.shutdown
fi
else
echo "Android folder not found: $ANDROID"
fi
done
echo "cd $mnt" >> $imgfile.shutdown
echo "su $bbox rmdir -p $usermounts" >> $imgfile.shutdown
cd $olddir
else
echo "No user defined mount points"
fi
###########################################
# Sets up network forwarding #
###########################################
su $bbox sysctl -w net.ipv4.ip_forward=1
if [ $? -ne 0 ];then error_exit "Unable to forward network!"; fi
# If NOT $mnt/root/DONOTDELETE.txt exists we setup hosts and resolv.conf now
if [ ! -f $mnt/root/DONOTDELETE.txt ]; then
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
if [ $? -ne 0 ];then error_exit "Unable to write resolv.conf file!"; fi
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost" > $mnt/etc/hosts
if [ $? -ne 0 ];then error_exit "Unable to write hosts file!"; fi
fi
###########################################
# Chroot into ubuntu #
###########################################
su $bbox chroot $mnt /root/init.sh $(basename $imgfile)
###########################################
# Shut down ubuntu #
###########################################
echo "Shutting down Linux ARM"
#for pid in `lsof | grep $mnt | sed -e's/ / /g' | cut -d' ' -f2`; do kill -9 $pid >/dev/null 2>&1; done
for pid in `su $bbox lsof | su $bbox grep $mnt | su $bbox sed -e's/ / /g' | su $bbox cut -d' ' -f2`; do su $bbox kill -9 $pid >/dev/null 2>&1; done
sleep 5
###########################################
# Unmount all user defined mounts if any #
###########################################
if [ -f $imgfile.shutdown ]; then
echo "Unmounting user defined mounts"
sh $imgfile.shutdown
rm $imgfile.shutdown
fi
su $bbox umount $mnt/root/cfg
su $bbox umount $mnt/sdcard
su $bbox umount $mnt/external_sd
su $bbox umount $mnt/dev/pts
su $bbox umount $mnt/dev
su $bbox umount $mnt/proc
su $bbox umount $mnt/sys
su $bbox umount $mnt/selinux
su $bbox umount $mnt
su $bbox losetup -d /dev/block/loop255 &> /dev/null
for those brave enough ,try SELinux Permissive Kernel,maybe all problems will be solved.
http://forum.xda-developers.com/showthread.php?t=2590311
robertchow said:
for those brave enough ,try SELinux Permissive Kernel,maybe all problems will be solved.
http://forum.xda-developers.com/showthread.php?t=2590311
Click to expand...
Click to collapse
Yes the kernel in the thread you posted allows for Linux function in Complete Linux Installer. After the kernel is installed either use Wanam Xposed and disabling SELinux to set as always Permissive, or using "setenforce 0" in terminal(this is only for the session and once the system reboots will go back to Enforcing or if "setenforce 1")
At that point if you use getenforce at a terminal will show as Permissive and Linux will boot normally with full function.
My hat goes off to the developer of the kernel because now I have everything on the tablet I need.
FYI on my Ubuntu large installs I am running into a new SELinux issue, even with it in Permissive doing an apt-get upgrade, causes issues with an error related to invalid security context selinux, cant remember the full error. I am not seeing this with the Fedora large image. When this happens with the Ubuntu ones it breaks the KDE GUI and the Application menu ends up blank. The error occurs when install packages try to address the Ubuntu Group security, packages like colord is just an example which do a security group change. Still plowing through how to fix. Till then using Fedora which I haven't used in years
Hi,
I tried with the large Ubuntu image and get an error as well with apt-get update...not being too conversant on Linux on Android, I would like to find out if you had a fix or a resolution from the developers? Might have to stay with the Xperia Z Tablet for Linux in the meantime...
Fedora 19 via Complete Linux Installer. Have Selinux Permissive Kernel, Selinux Mode Changer, and root of course. Otherwise FW is stock MJ6.
Just a few remarks:
The Fedora image is a bit small for a full blown Linux desktop. I copied the contents to a larger 8 GB image. Had to reformat the SD card with exFAT in order to store the image there. Copying was done on a desktop computer because MTP connection just stops at 4 GB.
Changes to scripts include changing the mount command for external_sd to /storage/extSdCard in boot script. Once Linux is up and running, change /root/init.sh, find the line that starts vncserver and append -dpi 300, otherwise fonts in Linux are barely readable. Wigdets are still kind of small but at least the fonts are readable now.
If you get a connection refused in AndroidVNC, you may have to set a password on the Linux terminal for user, that is su - fedora, then vncpasswd.
Todo: find out why second start of Linux fails on loop mount busy and why shutdown complains about umount of dev.
So, my note happily runs KDE desktop, LibreOffice, and kile for LaTeX. The latter was the main reason for putting Linux on the note.
caferick said:
Fedora 19 via Complete Linux Installer. Have Selinux Permissive Kernel, Selinux Mode Changer, and root of course. Otherwise FW is stock MJ6.
Just a few remarks:
The Fedora image is a bit small for a full blown Linux desktop. I copied the contents to a larger 8 GB image. Had to reformat the SD card with exFAT in order to store the image there. Copying was done on a desktop computer because MTP connection just stops at 4 GB.
Changes to scripts include changing the mount command for external_sd to /storage/extSdCard in boot script. Once Linux is up and running, change /root/init.sh, find the line that starts vncserver and append -dpi 300, otherwise fonts in Linux are barely readable. Wigdets are still kind of small but at least the fonts are readable now.
If you get a connection refused in AndroidVNC, you may have to set a password on the Linux terminal for user, that is su - fedora, then vncpasswd.
Todo: find out why second start of Linux fails on loop mount busy and why shutdown complains about umount of dev.
So, my note happily runs KDE desktop, LibreOffice, and kile for LaTeX. The latter was the main reason for putting Linux on the note.
Click to expand...
Click to collapse
Thanks for the post. I played around with linux on my note 2 and have been waiting to get it running on my 2014. How well does it handle linux?
Sent from my SM-P600 using XDA Premium 4 mobile app
Duly.noted said:
How well does it handle linux?
Click to expand...
Click to collapse
It runs reasonably well. I guess the limiting factor is disk I/O, or SD I/O in this case. I run KDE 4 in desktop mode with graphical desktop effects disabled and most of the KDE services like indexing disabled. It takes about 15-20 seconds from finished boot to desktop. Once the desktop is up and running, opening apps like LibreOffice is fast enough. Feels like with the first generation Atom netbooks. KDE is a resource hog, it would probably make sense to go for something that is lighter on resources but I chose KDE for girlfriend compatibility. She only knows KDE and I won't force her to learn the XFCE way or something even more obscure like Gnome3 http://forum.xda-developers.com/images/smilies/tongue.gif .
Vncserver runs at native full screen, ie 2560x1600 at 300 dpi. There was a noticable screen redraw lag when closing windows. That was easily fixed by disabling the desktop background image. I have not yet done any high load tasks. Only opened LibreOffice and kile for a quick check.
I have a cheapo foldable bluetooth keyboard. Need to get a small bluetooth mouse. Any recommendations? Or a small keyboard/touchpad combo I can take with me when traveling.
To Caferick - Fedora 19 step by step
Hi can you explain step by step how u got the Fedora 19 to wor pleasek? where i can find the bootscript?
Amadyl said:
Hi can you explain step by step how u got the Fedora 19 to wor pleasek? where i can find the bootscript?
Click to expand...
Click to collapse
Hum, a step by step guide would be rather longish. To answer the question: Complete Linux Installer scripts are located in /data/data/com.zpwebsites.linuxonandroid/files. There is the bootscript.sh. However, editing it is not strictly necessary. It should work as is. Alright, let's see
Preliminaries:
* need root on your device along with the usual suspects like busybox and terminal emulator (both on Google Play)
* need selinux set to permissive -> flash selinux permissive kernel (to be found in xda forums) and install something like SELinuxModeChanger (Play) set to always change SELinux mode to permissive, check by rebooting and then Configuration > General > Device Info, it should say Permissive
* useful apps include a decent file manager (I like TotalCommander), ZIP extractor (ZArchiver), text editor (Jota), these make things somewhat easier
* required app: AndroidVNC (Play)
1. Install Complete Linux Installer from Play
* start the app and open the menu by touching the < sign at the top left
* choose installation guides (or the like, my interface is not English)
* choose Fedora 19, there are four tabs, work through them in sequence, second tab presents a download button, if you have not yet installed Terminal and AndroidVNC you can use the two other buttons to do it now
* third tab asks you to unzip the downloaded image, the ZIP will probably be in /storage/emulated/0/download, move it to the root of your external SD card, unzip with Zarchiver
* there should now be a new folder fedoraXXXXX with two files in it, the fedora-*.img and an md5 file, you can safely delete the md5 file and maybe rename the image to something like fedora.img, likewise for the enclosing folder
* read the rest of tab 3 and 4
2. Start Linux
* go back to CompLinInstaller menu and push the second entry labeled Start
* a page will open and probably say Ubuntu in the drop down combo box above the Start button, change it to Fedora and type in the path to the image, like /storage/extSdCard/fedora/fedora.img
* push the Start button
* a terminal will open and a few lines will fly by. If everything goes well, you will be asked to set passwords two times, just use a trivial one like 12345678, you can change it later if you are paranoid about passwords
* you will be asked to set the resolution for VNC, type 2560x1600 which is the native resolution of the tab
* you will be asked whether you want to autostart VNC, type y
* you will be asked whether you want to start SSH server, type n
* your choice will be saved right beside the image file, in my case the file is called fedora.img.config, you can change it with any text editor
3. In the chroot terminal
* still in the terminal, the prompt should now say [email protected]
* while you are there, type su - fedora , the prompt should change to [email protected]
* type vncpasswd to set a password for VNC access, just use the same password as above, then type exit
* you are back at [email protected] If you have a keyboard (bluetooth or USB), you can edit the file init.sh with vi and append -dpi 300 to vncserver startup line. This setting will take effect at next start because vncserver. If you do not have a keyboard or do not know vi editor, you can skip this for now.
4. VNC
* start AndroidVNC, Nick: fedora, Password: 12345678, Address: localhost, Port: 5900, Color Format: 24-bit color (4bpp), Connect
* you should now see a linux desktop with tiny fonts
* hit the tabs config button to bring up AndroidVNC options, change input mode to touchpad
* you can now move the linux pointer with your finger on the display
5. Shutdown
* in VNC Linux logout just as you would log out of any other Linux desktop
* terminate VNC session by choosing Disconnect from AndroidVNC config menu
* switch to the still running terminal and type exit
* Linux now stops, wait a few seconds and close the terminal
There are still some minor problems with shutdown which I am trying to trace. A subsequent start of Linux will not work because of busy devices. So best reboot the tab and try again.
That's it for the base setup. Uh, the text is long indeed. Has it worked for you so far? Next comes customization
Corrections welcome, I typed this down from memory...
script
So we need to create script ourselves, when i've done it, i was set resolution to my tablet's resolution, then all is poor to see, that words and windows is too small to work, so it's horrible at the moment, but else works good enough. Is anyone know how to get normal UI on that big resolution? Sorry for my bad english.
Hey guys is there a walk through on how to increase the IMG size for fedora in a windowc pc ? i al ready have the SD partitioned just need to encrease the size to 10 GB
sits at boot up
My device is rooted, chroot installed, vnc installed, and busybox installed.
I install SELinux Permissive and systems sits at bootup screen. never boots to OS at any point. Just sits and the Samsung screen.
I have the Galaxy Note 10.1 SM-P600 (2014 Edition).
How long does it sit at the Samsung Boot screen before finally booting the rest of the way?
I installed using Odin 3.09.
I have running Ubuntu (xfce) on my Note 3 with Linux Deploy. VNC is not the way, it is slow. You should use framebuffer mode and you will be astonished how nice its running. Also, I modified xorg.conf for the phone to only react to stylus input and the stylus button to be right click. This setup is also working on my Note 10.1 old edition.
mdalacu said:
I have running Ubuntu (xfce) on my Note 3 with Linux Deploy. VNC is not the way, it is slow. You should use framebuffer mode and you will be astonished how nice its running. Also, I modified xorg.conf for the phone to only react to stylus input and the stylus button to be right click. This setup is also working on my Note 10.1 old edition.
Click to expand...
Click to collapse
Can we use it without linux deploy, because it doesn't work on sm-p605? Can you point us to some guide or documentation? Thanks.