Related
I have been booting ubuntu loop devices on my android for a while now and all of the loop devices i try to bind the ubuntu image to are giving me errors (I have only ever used /dev/loop7 but have tried to binf it to loop1, loop6, etc) I am getting the following error when trying to boot the device:
# bootubuntu
bootubuntu
mknod: /dev/loop7: File exists
losetup: /dev/block/loop7
mount: Device or resource busy
mount: No such file or directory
mount: No such file or directory
mount: 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
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexistent
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexistent
Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/ubuntu/etc/hosts: directory nonexistent
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
failed.
failed.
failed.
failed.
losetup: /dev/block/loop7: Device or resource busy
I have tried to delete /dev/loop7 and then boot again but same failure.
second
I have the same problem.
Not sure what else to do. i have used many directions ive found on cyanogen forums, XDA, and androlinux.com. i have partitioned and re-partitioned, copy and pasted so many files back on and off my sdcard. im tired.. the world is upside down.
makemyeyesbleed said:
I have the same problem.
Not sure what else to do. i have used many directions ive found on cyanogen forums, XDA, and androlinux.com. i have partitioned and re-partitioned, copy and pasted so many files back on and off my sdcard. im tired.. the world is upside down.
Click to expand...
Click to collapse
im having the exact same issue as presented too. any ideas?
Which kernel do you use? I got it working with rmk's cyanogen kernel.... You can find this kernel on the virtuous homepage / goodies or something like that
Sent from my HTC Vision using XDA App
hoffmas said:
Which kernel do you use? I got it working with rmk's cyanogen kernel.... You can find this kernel on the virtuous homepage / goodies or something like that
Sent from my HTC Vision using XDA App
Click to expand...
Click to collapse
i tried a kernel from virtuous but not sure if its compatible with 7.1 of cyanogen. which version of cyanogen and what exact kernel were you using?
sry, i don´t remember if the kernel is compatible with cm7 or only made for sense...
it has been a time since installing ubuntu (actually it´s quite useless - so i uninstalled everything after beeing successfull )
anyway, you have to flash the kernel after installing the rom - so make a nandroid backup of your current rom and then flash the kernel.
hoffmas said:
sry, i don´t remember if the kernel is compatible with cm7 or only made for sense...
it has been a time since installing ubuntu (actually it´s quite useless - so i uninstalled everything after beeing successfull )
anyway, you have to flash the kernel after installing the rom - so make a nandroid backup of your current rom and then flash the kernel.
Click to expand...
Click to collapse
i tried with one of the kernels (it said it was an outdated one however) and my desire z got stuck at the htc screen. (thankfull for nandroid about then)
Here is the error i get however.
losetup: /dev/block/loop5: No such file or directory
mount: mounting /dev/block/loop5 on /data/local/ubuntu failed: Invalid argument
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
bootlinux: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexistent
bootlinux: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexistent
Setting localhost on /etc/hosts
bootlinux: cannot create /data/local/ubuntu/etc/hosts: directory nonexistent
Created by KellyLewis3985 and BThomas22x!
Brought to you by Team BrokeDick!
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/loop5: No such device or address
Click to expand...
Click to collapse
looks like the kernel you use doesn`t support loopdevice...
as far as i remember i used this guide to prepar my phone:
http://forum.xda-developers.com/showthread.php?t=926794
one of these kernels:
http://files.virtuousrom.com/vision/kernels/obsolete/cyanogen/
and the ubuntu img from the nexusonehack
EDIT: maybe this guide is usefull too: http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-android/
I didn´t use cm7... I used a sense rom.
hoffmas said:
looks like the kernel you use doesn`t support loopdevice...
as far as i remember i used this guide to prepar my phone:
http://forum.xda-developers.com/showthread.php?t=926794
one of these kernels:
http://files.virtuousrom.com/vision/kernels/obsolete/cyanogen/
and the ubuntu img from the nexusonehack
EDIT: maybe this guide is usefull too: http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-android/
Click to expand...
Click to collapse
i tried the latest version of the mentioned kernel when it froze at htc screen.
and thats the exact tutorial i was following.
you reckon it be a good idea to try the other kernels?
Thanks in advance
probably the kernel doesn`t work with cm7...
i remember a quite complicated guide on the cyanogen homepage to modify the kernel for loopdevice support. (but im not a dev)
i used a sense rom (i think virtuous sense 2.0) to get the kernel working.
hoffmas said:
probably the kernel doesn`t work with cm7...
i remember a quite complicated guide on the cyanogen homepage to modify the kernel for loopdevice support. (but im not a dev)
i used a sense rom (i think virtuous sense 2.0) to get the kernel working.
Click to expand...
Click to collapse
I'll have a look into that. cheers dude
So, for all of you guys down here that are Debian junkies, then you're gonna love this. I managed to get Ubuntu Karmic Koala on my G2 after a bit of messing around with adb. This is my first tutorial on xda-developers, so please tell me how I'm doing. Remember to hit the Thanks button at the bottom if you're satisfied
Code:
#Your warranty has been voided
#I am not the cause of any damage done to your device
#Should you accuse me, I will laugh at you
Reasons why you should follow this tutorial:
- It allows you to make use wide array of applications available in Debian/Ubuntu's repos.
- It doesn't overwrite the current Android operating system.
- It'll allow you to turn your G2, Desire Z, etc. into more than just a sub-par cellphone.
- If you're developing software/applications, this will give you the proper environment for you test them on, if you don't care for Virtualbox or don't have access to a computer at the current moment.
- This tutorial will make the best use of Android and Linux's open-source nature.
Please note that this DOES NOT replace Android nor is it a port of Ubuntu/Debian. Ubuntu/Debian support ARM EABI which is the underlying architecture of Android.
READ EVERYTHING BEFORE DOING ANYTHING. I KNOW IT'S LONG, I WROTE THIS TUTORIAL
For those of you that can't use, can't set it up, or don't care for adb, you can still get Ubuntu to work on your device using a Terminal Emulator app, but you're probably gonna be stuck at the command line. I haven't actually tried setting up the GUI using the Terminal, so I'm not 100% sure. Now, before I start the tutorial, you NEED to be rooted.
NOTE: Whenever you see a $ or a # sign, those are indicators for the next command. Please do not enter them as you're typing in the commands. The same goes for the "[email protected]:/#" sign.
Before we begin we will need the following:
On your phone, have the following installed and/or readily available
-androidVNC application
-Terminal Emulator app (use this to boot into Ubuntu shell)
-Busybox (preferably, the latest one. If you rooted your phone using the method on the xda wiki OR your custom ROM has it pre-installed, then continue)
- At least 2GB space free on your microSD card
- Loopdevice support for your ROM. I think Cyanogen and another kernel should do the trick.
On your computer have the following installed and/or on the desktop:
-Ubuntu Karmic Koala image. If you don't have it, download it from this link ->http://bit.ly/moghJ3
-adb installed and fully functioning on your computer
EDIT 4 June, 2011: For those of you having troubles getting the shell to boot up, I found an alternative bootubuntu file. Extract it and replace the one that comes with the image with this one http://bit.ly/j7zORF
Let's begin, shall we?
Step 1: Connect your phone to your computer. Make sure you have "USB Debugging" checked off in "Settings -> Applications -> Development", then mount your sd card.
Step 2: Transfer the extracted "ubuntu" folder to the root of your sd card [NOT IN ANY FOLDERS, JUST the sd card itself, for those of you who don't know]. It might take a few minutes, so you might wanna make yourself a little snack for the wait.
Step 3: When the file transfer is done, disable the USB connection, so we can make use of adb. This is where USB Debugging is CRUCIAL. Open up a command window/terminal, go to where adb is located and enter the following commands:
Code:
$ adb shell
$ cd /sdcard/ubuntu
# su
# sh ./ubuntu.sh
# bootubuntu
At this point, you've set up the Ubuntu shell, as indicated by the "[email protected]:/#" sign.
However, our shell is still incomplete. We're gonna need a GUI for actual usage. If you're fine with using the command line then stop here. If you want to give yourself a PC-like experience, then please continue. You might wanna connect to WiFi if you're in an area where your mobile data is inconsistent or restricted to an EDGE connection.
Step 4: With the command prompt/terminal window that contains your adb/ubuntu shell, let's continue entering some commands to get our GUI set up.
Code:
[email protected]:/# apt-get update
[email protected]:/# apt-get install tightvncserver
[email protected]:/# apt-get install lxde
[email protected]:/# export USER=root
[email protected]:/# vncserver -geometry 1024x800
After entering the last command, you'll be prompted to enter a password. It'll ask you to set up a second one, just press "n" then continue.
For the second and third commands, press "y" when prompted to then hit ENTER, so you can install the packages. The reason why we set the VNC server's resolution is because even though the G2/Dz's resolution is 800x480, a higher resolution will provide a better viewing experience. If you want it set up to your phone's resolution, then swap it with "800x480" to scale the server's resolution to your phone's screen size.
Step 5: Enter the following commands. After entering the first command, you'll notice there's no user indicator at the left side. DON'T PANIC. Just continue entering the following commands:
Code:
[email protected]:# cat > /root/.vnc/xstartup
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
icewm &
lxsession
Then, press Ctrl+D twice and press enter. You'll be back at "[email protected]:/#" (Conversely, if you're on Mac OS or Linux, just press Ctrl+D once)
Step 6: Go to your phone, and open up the androidVNC app. We're gonna need this to view our desktop. set the nickname to "root" and enter the password you set earlier. Set the port to "5901" and press connect.
Step 7a: And bam! You've got your own cool GNOME desktop! (Though in my experience, it switches over to lxde after a few uses.) Now, we need to get the VNC app to open up every time we boot into our shell. We need to enter a few more commands (yeah I know, it's getting a bit tedious at this point.)
Code:
[email protected]:/# cat > front
export USER=root
cd /
rm -r -f tmp
mkdir tmp
cd /
vncserver -geometry 1024×800
Again, you can replace "1024x800" with any screen resolution you desire.
Step 7b: Enter just a few more commands [trust me, we're almost done ]
Code:
[email protected]:/# cat front /root/.bashrc > temp
[email protected]:/# cp temp /root/.bashrc
Step 8: To check that everything is working, enter the following commands in your command prompt/terminal window that contains our adb/ubuntu shell that I hope you kept open all this time.
Code:
[email protected]:/# exit
# bootubuntu
And you're done! Give yourself a round of applause and a pat on the back, because now you have Ubuntu Linux running alongside Android. Yay!!!!!!
To boot into your shell AFTER you're done, use the Terminal Emulator app to access your shell:
Code:
$ su
# bootubuntu
That's it, you're finished.
Now, I don't know why this happens, but after rebooting your phone, it'll take a few extra seconds for your devices to start up. I think it's because of all the files that are in the phone's internal memory. I'm not sure. Also, the VNC server might not open up after you're done with the tutorial. It's only a minor setback, you can still manually open it yourself which is in itself relatively quick.
When you're done with the tutorial, be sure to type in "exit" in the terminal and press enter for a clean kill of Ubuntu. Otherwise, you're gonna have to redo the entire procedure.
If you have any questions, please email me at [email protected]
FAQ
- I don't have adb, can I still follow this tutorial?
A: Yes you can. However, you're probably going to be stuck at Step 3 with the command line. You can still use the shell, but you won't have a GUI.
- Why does my phone show a black screen after rebooting?
A: It's probably because of all the modding that's a result of the commands we entered.
Don't worry, Your phone will boot up normally. However, if this goes on longer than usual, you might have to install a different ROM. I've tested it on CM7 (Stable and Nightly), Stock G2 ROM, Virtuous 1.0.2, Virtuous G-Lite 1.0.2, and their respective ROM bases with no problems.
- I get an error that won't let me boot into the Ubuntu shell. Help me!!!!!
A: Yeah, you probably either downloaded an incomplete image OR you entered an important command wrong. I suggest deleting the ubuntu image from your sdcard and then copy the image you extracted onto your sdcard. Then what you have to do is redo the entire tutorial.
Interesting...
Sent from my T-Mobile G2 using XDA Premium App
Spastic909 said:
Interesting...
Sent from my T-Mobile G2 using XDA Premium App
Click to expand...
Click to collapse
What's interesting about this?
Edit: can't wait to try this!
Ouch. . .
It's my first tutorial. . .
I just want to know what he found interesting about this tutorial. No need to get so defensive over a comment some other guy made.
Sent from my T-Mobile G2 using XDA Premium App
Didn't mean any offense dude especially if you weren't trying to be rude. You know how the internet doesn't portray emotion very well in text. Just sounded snappy. Back on topic. Can't wait to try this!
Sent from my HTC Vision using XDA Premium App
I'm not much of a software junky, so what exactly would this do? It looks easy enough to accomplish, since most of it is done through terminal, but I kinda wanna know what this DOES xD
Sent from my HTC Vision using XDA Premium App
xsteven77x said:
Didn't mean any offense dude especially if you weren't trying to be rude. You know how the internet doesn't portray emotion very well in text. Just sounded snappy. Back on topic. Can't wait to try this!
Sent from my HTC Vision using XDA Premium App
Click to expand...
Click to collapse
Edit: Remember to hit that thanks button!
ohshootrawr said:
I'm not much of a software junky, so what exactly would this do? It looks easy enough to accomplish, since most of it is done through terminal, but I kinda wanna know what this DOES xD
Sent from my HTC Vision using XDA Premium App
Click to expand...
Click to collapse
Well, Ubuntu is a distribution of the Debian family of Linux.
Essentially, you have access to the plethora of apps that exist in Ubuntu/Debian's repos, and it's also possible to use this shell as a test monkey for applications that you might be developing.
Any idea if this will work with the new Ubuntu 11.04? Though I do hate the new layout
boost3d23 said:
Any idea if this will work with the new Ubuntu 11.04? Though I do hate the new layout
Click to expand...
Click to collapse
in theory, yes if the image has been compiled properly. also, the new layout technically can get overwritten with lxde or whatever desktop environment you installed.
reserved for future use.
im getting some errors in terminal when trying to set this up, im running mexdroid v3 android 2.3.4
C:\push\tools>adb shell
# cd /sdcard/ubuntu
cd /sdcard/ubuntu
# su
su
# sh ./ubuntu.sh
sh ./ubuntu.sh
modprobe: module 'ext2' not found
←[H←[Jmkdir: can't create directory '/data/local/mnt': File exists
←[H←[Jchmod: bootubuntu: Operation not permitted
chmod: fsrw: Operation not permitted
chmod: mountonly: Operation not permitted
chmod: ubuntu.img: Operation not permitted
chmod: ubuntu.sh: Operation not permitted
chmod: unionfs: Operation not permitted
←[H←[J
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!
Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at AndroLinux.com ,G2Hacks.com and NexusOn
eHacks.net
To enter the Ubuntu Linux console just type 'bootubuntu'
# bootubuntu
bootubuntu
mknod: /dev/loop1: File exists
losetup: /dev/block/loop1: No such file or directory
mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: Device or resourc
e busy
mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or dir
ectory
mount: mounting proc on /data/local/ubuntu/proc failed: No such file or director
y
mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or director
y
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/ubuntu/etc/hosts: directory nonexistent
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
# bootubuntu
bootubuntu
mknod: /dev/loop1: File exists
losetup: /dev/block/loop1: No such file or directory
mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: Device or resourc
e busy
mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or dir
ectory
mount: mounting proc on /data/local/ubuntu/proc failed: No such file or director
y
mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or director
y
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/ubuntu/etc/hosts: directory nonexistent
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
#
teh5abiking said:
Well, Ubuntu is a distribution of the Debian family of Linux.
Essentially, you have access to the plethora of apps that exist in Ubuntu/Debian's repos, and it's also possible to use this shell as a test monkey for applications that you might be developing.
Click to expand...
Click to collapse
Seriously? Mmm, okay. I'm gonna try it sometime this week ;D
Sent from my HTC Vision using XDA Premium App
strker45 said:
im getting some errors in terminal when trying to set this up, im running mexdroid v3 android 2.3.4
C:\push\tools>adb shell
# cd /sdcard/ubuntu
cd /sdcard/ubuntu
# su
su
# sh ./ubuntu.sh
sh ./ubuntu.sh
modprobe: module 'ext2' not found
←[H←[Jmkdir: can't create directory '/data/local/mnt': File exists
←[H←[Jchmod: bootubuntu: Operation not permitted
chmod: fsrw: Operation not permitted
chmod: mountonly: Operation not permitted
chmod: ubuntu.img: Operation not permitted
chmod: ubuntu.sh: Operation not permitted
chmod: unionfs: Operation not permitted
←[H←[J
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!
Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at AndroLinux.com ,G2Hacks.com and NexusOn
eHacks.net
To enter the Ubuntu Linux console just type 'bootubuntu'
# bootubuntu
bootubuntu
mknod: /dev/loop1: File exists
losetup: /dev/block/loop1: No such file or directory
mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: Device or resourc
e busy
mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or dir
ectory
mount: mounting proc on /data/local/ubuntu/proc failed: No such file or director
y
mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or director
y
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/ubuntu/etc/hosts: directory nonexistent
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
# bootubuntu
bootubuntu
mknod: /dev/loop1: File exists
losetup: /dev/block/loop1: No such file or directory
mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: Device or resourc
e busy
mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or dir
ectory
mount: mounting proc on /data/local/ubuntu/proc failed: No such file or director
y
mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or director
y
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/ubuntu/etc/hosts: directory nonexistent
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
#
Click to expand...
Click to collapse
I had this issue aswell.
To solve it firts fix your permissions in Rom manager.
Then install busy box.
This should then allow you to install ubuntu. (atleast it did with me)
Hope this is some help to you
teh5abiking said:
What's interesting about this?
Click to expand...
Click to collapse
The post dude.. would you rather I said boring? Settle down
Do u know what interesting means? It means I am interested in this..didn't think you could mistake that but guess I was wrong
Sent from my T-Mobile G2 using XDA Premium App
Spastic909 said:
The post dude.. would you rather I said boring? Settle down
Do u know what interesting means? It means I am interested in this..didn't think you could mistake that but guess I was wrong
Sent from my T-Mobile G2 using XDA Premium App
Click to expand...
Click to collapse
hey man, i just wanna know what you found interesting about the tutorial.
i wasn't trying to be3 a smart aleck.
I really don't know **** about linux except for the few times I've had to run it on a virtual machine for rooting certain phones or to check out a few programs. With linux installed on my phone,
does that mean that I would be able to run any linux based program? For example aircrack or something like it?
Edit: I basically want to know what the purpose of doing this would be. What it would enable me to do
* I'm just sayin......
gazlufc said:
I had this issue aswell.
To solve it firts fix your permissions in Rom manager.
Then install busy box.
This should then allow you to install ubuntu. (atleast it did with me)
Hope this is some help to you
Click to expand...
Click to collapse
installed newest version of busybox 1.19.0 and fixed permissions and still received the same errors :/
strker45 said:
installed newest version of busybox 1.19.0 and fixed permissions and still received the same errors :/
Click to expand...
Click to collapse
.
Create a backup of you current rom using Rom manager.
Then install a new rom from the developer section of the G2/Desire z
First install busybox.
Second fix permissions.
Third is reboot
open adb and now try the process this should now allow you to install ubuntu.
Hello,
I am going to prensent you today how to install ubuntu on your android device. Some of you propably already tried ,and had problems
making it work (or not). I modified the tutorial to make it easier, and corrected things. I also modified some paths in the scripts so that it can work with
cm7, if you are not a cm7 user you can download the other scripts too.
I based myself on this tutorial:
http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-android/
So let's start !
First, download the following cm7-ubuntu.rar file (decompress and copy over the whole ubuntu directory to the exeternal SD card of your Android smartphone/tablet:
Download cm7-ubuntu.rar:
http://www.fileserve.com/file/KQWsbRG
If you are a miui user, download cm7-ubuntu.rar, and replace the scripts by these:
http://www.fileserve.com/file/Tu8WZP5
If you are a not a cm7 neither a miui user, download cm7-ubuntu.rar, and replace the scripts by these:
http://www.fileserve.com/file/tuVMB9h
1) Make sure your phone is rooted and that busybox installed (if you are on cm7 all is ok).
2) Download Terminal Emulator on the market. Open it and type “su” to enter super user mode, then type “cd /emmc” or "cd /sdcard/external_sd" if your are a miui user or "cd /sdcard" if you are not on cm7, and “cd ubuntu” to enter the ubuntu directory in your SD card of your Android device.
3) Next, type “sh ubuntu.sh” to run the script which will basically get your Ubuntu image ready to run on your Android smartphone/tablet.
If you get error messages, don’t worry and keep going.
4) Type “bootubuntu” to enter Ubuntu. (Next time you enter Ubuntu, you just need to type “bootubuntu” from your /emmc/ubuntu directory, no need to run ubuntu.sh again.
If you got “[email protected]” at this point, congratulations! This means your Android OS comes with loop device support and Ubuntu is now running “chrooted” on top of your Android OS!!!
However, if there is an error like : "losetup: /dev/block/loop2: No such file or directory", this propably means that app2sd is conflicting with your sdcard, so to solve that
move all your applications on your internal sdcard and try again. If this doesn't solve your problem, that means that your kernel doesn't support loop
devices in most of the case, try flashing other kernels.
If after that you still have problems post, and I will try to reply when I have time
5) How to Install Programs on your Ubuntu!
Once you’ve got Ubuntu running on your Android device, it’s time to install some Ubuntu packages(or programs).
Type “apt-get update” to update, this is the first thing you will need to do before installing any new programs.
6) How to Install OpenSSH-server on your Android Ubuntu!
Type “apt-get install openssh-server” to install OpenSSH-server. What is OpenSSH-server? If you want to connect to your Android Ubuntu via an IP address (and SSH into it), you will want to do this.
7) How to Install TightVNCServer on your Android Ubuntu!
If you want to access the GUI of your Android Ubuntu, you can install TightVNCServer, which allows you to access the Android Ubuntu via Android VNC app on your Android smartphone/tablet or even access it remotely from your desktop computer.
Type “apt-get install tightvncserver” to install.
8) How to Install LXDE!(optional)
Next, we will install LXDE (Lightweight X11 Desktop Environment). Although we can use Ubuntu’s default GNOME (and trust me I love that), LXDE takes up less memory so our GUI access will be faster.
If you like GNOME, you can skip this step though.
Type “apt-get install lxde”
How to setup xstartup file so that when TightVNCServer is started, the LXDE runs instead of GNOME:
Type:
export USER = root
vncserver
(here he will ask you for a password for vnc, then if you want a view-only password, this mean you connect to vnc and you cannot interact with ubuntu, say n if you don't want and y if you want)
cat > /root/.vnc/xstartup
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
icewm &
lxsession
Then press Volume-down&D togethe.
9) How fix language and start vnc at each boot:
Type:
touch /root/.bashrc
cat > /root/.bashrc
export LANG=en_US.UTF-8
export USER=root
rm /tmp/.X1-lock
rm /tmp/.X11-unix/X1
vncserver -geometry 1024x800 <== Here, you can change the resolution settings 1024×800 to the resolution of your liking. (Do not write that !)
Then again press Volume-down&D together.
10) Now we are going to reboot ubuntu to apply changes:
Reboot your phone, open Terminal Emulator again and type:
su
bootubuntu
Now your TightVNCServer is ready to accept any incoming connections from your phone or computer. Just point to the correct IP address and use port number 5901 to connect.
On your Android smartphone, just download the free app “Android-VNC-Viewer” and set the IP address to “127.0.0.1″ , port number 5901 and insert the password you set before in password.
Then enjoy !
SHUT DOWN UBUNTU: Sorry you have to reboot the phone, if you try to boot other ubuntu your phone will start to lag
Extra:
If you want more space to install programs & stuff, you can extend your user space without loosing your data.
Requirements:
Linux (you can make a live CD) or just an environment like cygwin for windows
Procedure:
1. UnZip Android or your present ubuntu.img file to your Home Folder. Or a folder of your liking (or even on your memory card!), just remember to cd before you do the following:
2. Open Terminal and Copy&Paste (Ctrl+C, Ctrl+Shift+V) this:
Code:
dd if=/dev/zero bs=1M count=XXX >> ubuntu.img
where XXX is the amount, in MB, by which data.img should be increased by.
My filesize started out as 256MB and I wanted a total of 512MB. That would mean I needed a extra 256MB, so I executed this:
Code:
dd if=/dev/zero bs=1M count=256 >> ubuntu.img
3. Run a file system check and file system resizer
Code:
e2fsck -f ubuntu.img
resize2fs ubuntu.img
e2fsck -f ubuntu.img
if prompted, press "y" for "yes"
4. Copy all of the Android files onto your SD card, put it into your phone...
Source: http://forum.xda-developers.com/showthread.php?t=737826
Sorry for my bad english
If you liked this thread, don't forget there is a Thanks button !
I have a problem with miui chamaleon rc2 . after i type bootubuntu i cant get [email protected] . im thinking that talonmtd dont support loopdevice but i have tried also with plapytus with no luck . you know i kernel with loop support for my rom ?
thanks
Do you have adb ?
MIU is based on cm7, you should have loop support...
do you have the error losetup : /dev/block/loop2: No such file or directory ?
im restarting device and i will copy all the commands . one moment
edit : i get this :
# sh ubuntu.sh
sh ubuntu.sh
modprobe: chdir(/lib/modules): No such file or directory
←[H←[Jmkdir: can't create directory '/data/local/mnt': File exists
←[H←[Jcd: can't cd to /emmc/ubuntu
chmod: bootubuntu: Operation not permitted
chmod: fsrw: Operation not permitted
chmod: mountonly: Operation not permitted
chmod: ubuntu.img: Operation not permitted
chmod: ubuntu.sh: Operation not permitted
chmod: unionfs: Operation not permitted
←[H←[J
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!
Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at AndroLinux.com ,G2Hacks.com and Ne
eHacks.net
To enter the Ubuntu Linux console just type 'bootubuntu'
# bootubuntu
bootubuntu
mknod: /dev/loop2: File exists
losetup: /dev/block/loop2: No such file or directory
mount: mounting /dev/block/loop2 on /data/local/ubuntu failed: Invalid argu
mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file o
ectory
mount: mounting proc on /data/local/ubuntu/proc failed: No such file or dir
y
mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or dir
y
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory non
ent
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory non
ent
Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/ubuntu/etc/hosts: directory nonexiste
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/loop2: No such device or address
No, verify you don't have applications on your external sd card, if there is, transfer them to the internal sd card
EDIT: Yes, verify you don't have applications on your sd card
i dont have application on sd card
Okay this is wierd !
2 possibilities :
1. busybox is not installed
2. Your phone do not support loop devices
Can you send me a file in your /proc/ directory named config.gz ? (sorry it is a pain in the ass...)
Oh sorry I forgot how is named your external sdcard ? emmc or sdcard ?
Rename it to *.gz . Xda dont accept gz extension . I looked to sh script and i think the problem is that in cm7 sdcard is /sdcard not /emmc .
my external card is named /sdcard/external_sd and is a 16 gb class 2 so is a bit slower
Okay I think if found, I going to post new scripts for you quickly, I just verify that you have loop support
EDIT: Yes you have loop support, it is scripts
Replace these scripts : http://www.fileserve.com/file/Tu8WZP5
AnonymeLex said:
Okay I think if found, I going to post new scripts for you quickly, I just verify that you have loop support
EDIT: Yes you have loop support, it is scripts
Replace these scripts : http://www.fileserve.com/file/Tu8WZP5
Click to expand...
Click to collapse
Dont worry , but please upload this to xda because i hate fileserve and i have to wait 1200 seconds to download another file . Thanks
Yes, I forgot it's quicker, but does it work finally ?
I think is better that you fix the first post with instruction for miui users
Ok works , thanks a lot
i maked an error .
after this cat > /root/.bashrc i typed :
export LANG=en_US.UTF-8
export USER=root
rm /tmp/.X1-lock
rm /tmp/.X11-unix/X1
vncserver -geometry 800x480
exit
so every time i run bootubuntu this shut down . XD what i have to do to fix that ?
Edit : im recopying all including new script and i will not do same error
I'm using Ubuntu since 2006, it's really nice to see that the interest in Linux is growing so fast!
thunderteaser said:
I'm using Ubuntu since 2006, it's really nice to see that the interest in Linux is growing so fast!
Click to expand...
Click to collapse
im using ubuntu since the first version of android XD . im using it in dual boot . but i have changed 5 pc since 2005 for too use . is in use 24h/7d also with overclock . super pc !!! super android !!
thunderteaser said:
I'm using Ubuntu since 2006, it's really nice to see that the interest in Linux is growing so fast!
Click to expand...
Click to collapse
We can't ignore linux
(
Alberto96 said:
i maked an error .
after this cat > /root/.bashrc i typed :
export LANG=en_US.UTF-8
export USER=root
rm /tmp/.X1-lock
rm /tmp/.X11-unix/X1
vncserver -geometry 800x480
exit
so every time i run bootubuntu this shut down . XD what i have to do to fix that ?
Edit : im recopying all including new script and i will not do same error
Click to expand...
Click to collapse
Oh never thinked we could be in such a situation
The .bashrc is inside ubuntu.img, I don't really see a solution appart redownloading...
Sorry
Wait, exit don't really close ubuntu I think, it juste close terminal you should still able to connect via vnc and modify .bashrc ! To shut it down do Ctrl+D
@android:/ $ export PATH=/data/local/bin:$PATH
@android:/ $ cd mnt/sdcard/ubuntu
@android:/mnt/sdcard/ubuntu $ su
@android:/mnt/sdcard/ubuntu # sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh mnt/sdcard/ubuntu/ubuntu.img
Error: Image file not found!(mnt/sdcard/ubuntu/ubuntu.img)
1|@android:/mnt/sdcard/ubuntu #
this is my error. i've tried many things, any suggestions?
the image file is there, and ive downloaded it again, checked permissions, it is the large image from the complete linux installer app.
now i did some other things, and have gotten the responce:
$ export PATH=/data/local/bin:$PATH
$ cd mnt/sdcard/ubuntu
$ su
Segmentation fault
$ sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh mnt/sdcard/ubuntu/ubuntu.img
sh: can't open /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh
$
i re- rooted my device and am now coming up with the original error message again.
so, i added a \ to before mnt and now it says:
[email protected]:/ $ export PATH=/data/local/bin:$PATH
[email protected]:/ $ cd /mnt/sdcard/Ubuntu
[email protected]:/mnt/sdcard/Ubuntu $ su
[email protected]:/mnt/sdcard/ubuntu # sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /mnt/sdcard/Ubuntu/ubuntu.img
Validating image checksum... /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh: line 74: /data/data/com.zpwebsites.linuxonandroid/files/busybox: Permission denied
FAILED!
Error: Checksum failed! The image is corrupted!
1|[email protected]:/mnt/sdcard/ubuntu #
so im going to download and add the large ubuntu file to the directory
same error: "dirname : not found"
I have the same error, "/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[29]: dirname : not found"
freewalk said:
I have the same error, "/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[29]: dirname : not found"
Click to expand...
Click to collapse
Use root explorer or es file explorer to check if
the folder exists. Also, running sh script should be written like this: sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh
ireakhavok said:
@android:/ $ export PATH=/data/local/bin:$PATH
@android:/ $ cd mnt/sdcard/ubuntu
@android:/mnt/sdcard/ubuntu $ su
@android:/mnt/sdcard/ubuntu # sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh mnt/sdcard/ubuntu/ubuntu.img
Error: Image file not found!(mnt/sdcard/ubuntu/ubuntu.img)
1|@android:/mnt/sdcard/ubuntu #
this is my error. i've tried many things, any suggestions?
the image file is there, and ive downloaded it again, checked permissions, it is the large image from the complete linux installer app.
now i did some other things, and have gotten the responce:
$ export PATH=/data/local/bin:$PATH
$ cd mnt/sdcard/ubuntu
$ su
Segmentation fault
$ sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh mnt/sdcard/ubuntu/ubuntu.img
sh: can't open /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh
$
i re- rooted my device and am now coming up with the original error message again.
so, i added a \ to before mnt and now it says:
[email protected]:/ $ export PATH=/data/local/bin:$PATH
[email protected]:/ $ cd /mnt/sdcard/Ubuntu
[email protected]:/mnt/sdcard/Ubuntu $ su
[email protected]:/mnt/sdcard/ubuntu # sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /mnt/sdcard/Ubuntu/ubuntu.img
Validating image checksum... /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh: line 74: /data/data/com.zpwebsites.linuxonandroid/files/busybox: Permission denied
FAILED!
Error: Checksum failed! The image is corrupted!
1|[email protected]:/mnt/sdcard/ubuntu #
so im going to download and add the large ubuntu file to the directory
Click to expand...
Click to collapse
" $ su
Segmentation fault" This error prevents you from having real superuser. Try to reinstall the ROM without wiping data.
" Error: Image file not found!(mnt/sdcard/ubuntu/ubuntu.img)"
Make sure that the image really is there with root explorer or es file explorer.
" line 74: /data/data/com.zpwebsites.linuxonandroid/files/busybox: Permission denied"
It seems that the script is trying to use its own busybox. That is all I know from this issue.
Sent from my GT-I9100 using xda app-developers app
julle131 said:
Use root explorer or es file explorer to check if
the folder exists. Also, running sh script should be written like this: sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh
Sent from my GT-I9100 using xda app-developers app
Click to expand...
Click to collapse
The folder and the script exist, "…linuxonandroid/files/bootscript.sh". I have installed the app, "Complete Linux Installer", to my Galaxy Tab 10.1 (P7500). I have rooted my Galaxy Tab ("TAB"). The app also confirms that the path contains the target image (i.e. /mnt/sdcard/ubuntu/ubuntu.img).
However, when the app runs the bootscrip, there is an error message "/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[29]: dirname : not found". The code line is at below.
export imgfile=$(dirname $0)/ubuntu.img # Default image file, another can be set by using an argument
Could you please kindly let me know what goes wrong? Thanks in advance.
freewalk said:
The folder and the script exist, "…linuxonandroid/files/bootscript.sh". I have installed the app, "Complete Linux Installer", to my Galaxy Tab 10.1 (P7500). I have rooted my Galaxy Tab ("TAB"). The app also confirms that the path contains the target image (i.e. /mnt/sdcard/ubuntu/ubuntu.img).
However, when the app runs the bootscrip, there is an error message "/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[29]: dirname : not found". The code line is at below.
export imgfile=$(dirname $0)/ubuntu.img # Default image file, another can be set by using an argument
Could you please kindly let me know what goes wrong? Thanks in advance.
Click to expand...
Click to collapse
I can't test it in my tablet, because I'm not home. But when I get there I will test the app myself. You could try using the native Ubuntu from development section. Its kernel can dual boot ICS test 4.0.4.
Edit: worked for me. Here is the log
http://snipurl.com/24sad15
Remember that /mnt/sdcard is externalsd and /sdcard/ is internal memory.
Delete everything you downloaded and the app. Then redo everything, following the guide perfectly.
Sent from my GT-I9100 using xda app-developers app
Thanks and How to try native Ubuntu in Galaxy Tab?
julle131 said:
I can't test it in my tablet, because I'm not home. But when I get there I will test the app myself. You could try using the native Ubuntu from development section. Its kernel can dual boot ICS test 4.0.4.
Edit: worked for me. Here is the log
snipurl.com/24sad15
Remember that /mnt/sdcard is externalsd and /sdcard/ is internal memory.
Delete everything you downloaded and the app. Then redo everything, following the guide perfectly.
Sent from my GT-I9100 using xda app-developers app
Click to expand...
Click to collapse
Thanks a lot. I shall try again.
One more thing. How to try the native Ubuntu?
freewalk said:
Thanks a lot. I shall try again.
One more thing. How to try the native Ubuntu?
Click to expand...
Click to collapse
Its like installing a custom ROM. There is a topic for it in development section. You put archos.ext4 to /data/local (or was it /mnt/storage? Just read from the topic.) Then flash kernel from the same topic. To return just flash stock ROM and reinstall custom ROM. It doesn't affect to sde.
Sent from my GT-I9100 using xda app-developers app
freewalk said:
The folder and the script exist, "…linuxonandroid/files/bootscript.sh". I have installed the app, "Complete Linux Installer", to my Galaxy Tab 10.1 (P7500). I have rooted my Galaxy Tab ("TAB"). The app also confirms that the path contains the target image (i.e. /mnt/sdcard/ubuntu/ubuntu.img).
However, when the app runs the bootscrip, there is an error message "/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[29]: dirname : not found". The code line is at below.
export imgfile=$(dirname $0)/ubuntu.img # Default image file, another can be set by using an argument
Could you please kindly let me know what goes wrong? Thanks in advance.
Click to expand...
Click to collapse
I have the same issue, indeed that the 'dirname' can not be found.
the $PATH show the following 2 dirs '/system/bin:/system/xbin' and none of them contain 'dirname'.
might it be because I have rooted my galaxy note 2 N8000 with the stock image according method 1 on rootgalaxynote.com ?
rootgalaxynote.com galaxy-note-10-1-root/how-to-root-galaxy-note-10-1/
any help would be appreciated....
freewalk said:
"/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[29]: dirname : not found".
export imgfile=$(dirname $0)/ubuntu.img # Default image file, another can be set by using an argument
Click to expand...
Click to collapse
C'mon folks, It's all there for you in the error message!
It breaks down like this ; dirname is a program the tells you the directory name of an executable file location, well in reality it probably just trims the value pass in looking the last / the print everything before that i.e calling
Code:
dirname /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh
will give an out put of
Code:
/data/data/com.zpwebsites.linuxonandroid/files
this is normally part of busybox. Is suspect however that whatever busybox binary it's attempting to use does has not been configured to include dirname or at the very least the symlink hasn't been created so it would need to be called with a busybox prefix , i.e
Code:
export imgfile=$([B]busybox dirname[/B] $0)/ubuntu.img
or just save the f*****g about and hardcore imgfile to the path of the image file, for example
Code:
export imgfile=/mnt/sdcard/ubuntu/ubuntu.img
or wherever you're ubuntu.img is located, should be that simple, If you run into further trouble post the full content of the /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh shell script. I suppose someone could tell the dev to add some sanity checking to his scripts if alot of people are running into this problem!
metacm said:
I have the same issue, indeed that the 'dirname' can not be found.
the $PATH show the following 2 dirs '/system/bin:/system/xbin' and none of them contain 'dirname'.
might it be because I have rooted my galaxy note 2 N8000 with the stock image according method 1 on rootgalaxynote.com ?
rootgalaxynote.com galaxy-note-10-1-root/how-to-root-galaxy-note-10-1/
any help would be appreciated....
Click to expand...
Click to collapse
already found the issue, busybox installation went wrong.... 'Busybox Installer' app didn't worked out, but luckly 'BusyBox free' did the work.
which version of busybox is installed
metacm said:
already found the issue, busybox installation went wrong.... 'Busybox Installer' app didn't worked out, but luckly 'BusyBox free' did the work.
Click to expand...
Click to collapse
can you tell which version of busybox is installed
same error
Hi all,
Sorry for my poor language...
I have same all of you dirname issue, bootscript.sh is in the path (tested with root explorer).
Can somebody tell me what is exactly this error "/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[29]: dirname : not found".
Because we can understand 2 thinks :
1-dirname not found bootscript.
2-Busybox not found dirname.
Thank for your help.
I have had the absolute worst time with getting Linux on Android to work on my Nexus 7. On 4.3 and 4.4, across many different Roms and kernels, the issue has persisted. Not a single other person on earth seems to have had this problem so i am going here as a last resort. For some infuriating reason, I am being denied permission to the mount -t command. The scripts always stop at mounting the image file to the loop device. I manually run the mount command, yes I am running as su, and I get this error: "Cannot execute -t: Permission denied" Why am I being denied permission when I am su? I even chmod 777 all the files associated with this command. There is absolutely no reason for this to happen, yet it does. I even do setenforce 0 to try and stop selinux from doing anything that could interfere.
Thanks if you can help.
What's the full command you;re trying to execute?
su mount -t ext4 /sdcard/kali/kali.img /dev/block/loop255
That's the line (minus su) that was in the bootscript that it was getting stuck on.
TheDoolster said:
su mount -t ext4 /sdcard/kali/kali.img /dev/block/loop255
That's the line (minus su) that was in the bootscript that it was getting stuck on.
Click to expand...
Click to collapse
Try adding -o rw,remount?
i.e. su mount -o rw,remount -t ext4 /sdcard/kali/kali.img /dev/block/loop255
If you're trying to get kali on android to use as a pwnpad, there is a thread here which walks one through it...it's a fully functional kali distro.