yashsingh1/xdaforums huggingface dataset:
[Samsung Epic 4G Touch] lems111:
just to confirm manual steps, based on the "how to" in wiki, am placing directories in debdroid folder in system folder, correct? I don't need to create a debdroid folder in system directory, correct?
[Samsung Epic 4G Touch] jasmith86:
If I try using the debdroid app, it does nothing. When trying "su" then "sh debdroid", terminal responds "sh: can't open 'debdroid''.

I have the linux.img in the correct directory and have flashed the zip file.
[Samsung Epic 4G Touch] dasmoover:
chmod a+x /system/bin/debdroid && sh /system/bin/debdroid
[Samsung Epic 4G Touch] jasmith86:
Awesome! Thanks!

That seems to have fixed the issue I was having before. How do I get into XFCE gui? I tried 'startvnc' and using android-vnc-viewer to connect to localhost:5900, but was unsuccessful.

BTW, thanks for your amazing quick responses!!!
[Samsung Epic 4G Touch] ssconceptz:
So this would basically be running Ubuntu from the SD card?
[Samsung Epic 4G Touch] lems111:
I pasted the debdroid directory from sdcard to system/bin using es file explorer with root access;fyi, the linux.img file failed to copy. Also, I tried the chmod command in terminal emulator and said bad mode.

Any ideas?
[Samsung Epic 4G Touch] jasmith86:
For chmod, you will have to remount system as rw.
[Samsung Epic 4G Touch] lems111:
I ran the following commands with terminal emulator:

app_37@android:/ # mount -o rw,remount /system

app_37@android:/ # mount | grep system

/dev/block/mmcblk0p9 /system ext4 rw,relatime,barrier=1,data=ordered 0 0

app_37@android:/ # chmod a+x /system/bin/debdroid

Bad mode

No cigar
[Samsung Epic 4G Touch] squshy 7:
Hmm, looks like some confusion in here?

DL the flashable zip, extract. bin contents go in /system/bin, and etc contents go in /system/etc.

The .img (renamed to Linux.img) goes in /sdcard/debdroid, and shouldn't tried to be copied to anywhere in /system.

Now, I installed the manual way, and I didn't have to chmod anything..

Just from a terminal, cd /system/bin , then sh debdroid

It ran just fine, but of course some extra work needs to be done to get a GUI. Once terminal was at root@debdroid I had to:

apt-get update

apt-get install lxde

Vnc looked to already be installed, but as the previous user said, vnc viewer couldn't connect to anything. Figured out I had to echo a bunch of commands from another website:

echo ‘#!/bin/sh’ >> /root/.vnc/xstartup

echo ‘xrdb $HOME/.Xresources’ >> /root/.vnc/xstartup

echo ‘xsetroot -solid grey’ >> /root/.vnc/xstartup

echo ‘icewm &’ >> /root/.vnc/xstartup

echo ‘lxsession’ >> /root/.vnc/xstartup

From this sitehttp://yanzicjustnubie.wordpress.co...-easy-way-to-install-debianubuntu-on-android/

Apparently, this let's vncserver have access to xfce

Then, use

vncpasswd

And set your password (for use in vnc viewer)

Now the next part was weird...I was trying to set vncserver geometry with the command

vncserver -geometry 800x480

However, the command "vncserver" with any dependency kept giving me an error that the desktop was locked due to a file, and it was now creating a new desktop...the desktops were numbered and kept increasing sequentially as new desktops were created and locked

Sooo...what I suggest is, after using all the echo commands, then just type

Vncserver

It will probably give you an error that the debdroid:1 is locked due to blah blah blah, creating debdroid:2

That's your hint right there. Go back to your vnc viewer, then connect @ 127.0.0.1 port 5902

Remember, yes vnc uses port 5900, but you need to change the last number to reflect the desktop number...so for example, I kept using the "vncserver -geometry" like an idiot even though it gave me errors; when I stopped, the last error message stated the desktop was now at debdroid:4, so in vnc viewer my port had to be 5904. Wala, I now have a GUI.

I'm admittedly terrible with linux stuff, so please somebody explain what I could have done differently; otherwise, these terrible steps will at least get you into a GUI
[Samsung Epic 4G Touch] dasmoover:
In the custom BT image is a script titled startvnc or startvncserver simply do vncpasswd before hand.
[Samsung Epic 4G Touch] lems111:
@squshy 7, your instructions got me squared away for the file structure setup; then, I tried to run the "sh debdroid" command and got this error :-(

app_37@android:/ $ su

app_37@android:/ # sh /system/bin/debdroid

Initializing chroot filesystem

mkdir failed for $/mnt/mnt/android, No such file or directory

mount: Invalid argument

Mounting proc, sysfs, dev, devpts

mount: No such file or directory

mount: No such file or directory

mount: No such file or directory

mount: No such file or directory

/sdcard/debdroid/share/ mounted to /mnt/share

Native Filesystem mounted to /mnt/android

Setting up DNS and Networking

/system/bin/debdroid[70]: cannot create /data/local/debdroid/etc/resolv.conf: No such file or directory

/system/bin/debdroid[70]: cannot create /data/local/debdroid/etc/resolv.conf: No such file or directory

/system/bin/debdroid[70]: cannot create /data/local/debdroid/etc/hosts: No such file or directory

/system/bin/debdroid[70]: cannot create /data/local/debdroid/etc/hostname: No such file or directory

Debdroid deployed succesfully, opening chroot.

mount: No such file or directory

chroot: can't execute 'bash': No such file or directory

chroot: can't execute '/bin/bash': No such file or directory

failed: No such file or directory

failed: No such file or directory

failed: No such file or directory

failed: No such file or directory

failed: No such file or directory

failed: No such file or directory

failed: Invalid argument

Exiting chroot

Filesystem unmounted

app_37@android:/ #

thx for clearing up some things though :-)
[Samsung Epic 4G Touch] squshy 7:
Ahh ok thanks for clearing that up..does this only resolve the initialization of vncserver, or does it also mean I don't have to enter the echo commands to tie FXCE to vnc?

This right here is where your errors start that I don't have (I do get the initial error of /mnt/mnt/android)

What setup are you running? Kernel/rom?

Also, did you rename the .img file to linux.img?
[Samsung Epic 4G Touch] lems111:
Yes, I looked at the debdroid script and noticed that it was looking for linux.img rather than Linux.img; so, I renamed the file accordingly.

I have darch's CM9 alpha1 ROM. Idk which kernel that rom came with; I will check

Edit: fc22 kernel

What do you think?
[Samsung Epic 4G Touch] linuxpir8:
doesnt look you have the files correctly in any of the required debdroid directories. check the script and make sure that any sub directories that arent supposed to be there arent.

ie : if the script looks for /system/bin/bash make sure when you copied the files over you didnt add an extra directory, causing /system/bin/bin/bash. you would then get a bunch of errors because the script doesnt know where to look and its not symlinked.

edit: guess i should try downloading this again. i had errors downloading before, the op says file is ie: 750 but i only would get 80 and when bzipped id get 70mb of it. will try from my laptop instead.
[Samsung Epic 4G Touch] dasmoover:
@Squishy:

It starts up a xfce4 session.

@linuxpir8:

Direct link: http://gitbrew.org/~dasmoover/debdroid/bt5.img.gz
[Samsung Epic 4G Touch] HaiKaiDo:
Would something like http://www.bodhilinux.com run on this? That would would be awesome.
[Samsung Epic 4G Touch] dasmoover:
If you can get a compiled ARM image then yes.
[Samsung Epic 4G Touch] linuxpir8:
got it working easily using custom backtrack img file. my vnc viewer keeps crashing though. other than that, it was up and running using vncpasswd and startvnc commands. no extra work.

edit: crash was caused by junk vnc viewer i wasted ten bucks on, since it said ics support. using a better one that was free and all is good.
[Samsung Epic 4G Touch] lems111:
Fyi, I have the bash file in /system/xbin directory; not in /system/bin. Is that why I was getting the errors above? Should I edit the script to look in xbin?
[Samsung Epic 4G Touch] linuxpir8:
that was just an example. i dont even have bash installed. im using busybox and looking at the script it uses busybox too. its weird you are getting those errors though. i looked through all the scripts the only thing i can think of is you forget to get superuser/root permissions and youre in as user trying to execute commands. make sure you type su in terminal when you cd to the scripts folder.
[Samsung Epic 4G Touch] vinhdizzo:
I have a rooted HTC Evo 3D CDMA with stock rom. It is rooted and busybox is installed. I flashed the zip file and placed the custom img file moved it to /sdcard/debdroid/linux.img. When I open up the Terminal Emulator, type "su", and "bash debdroid" or "sh debdroid", I get the message "bash not found" and "sh: Can'topen debdroid". If I execute "debdroid", I get

source: not found

Initializing chroot filesystem

mkdir failed for $/mnt/mnt/android, No such file or directory

losetup: /dev/block/loop: No such file or directory

mount: no such file or directory

....

What steps am I missing?
[Samsung Epic 4G Touch] linuxpir8:
this following image should help you. i first executed what you did to replicate why you got those errors. then i showed you how to get it fixed and running.
[Samsung Epic 4G Touch] vinhdizzo:
Thanks, but this didn't fix it. I am ABLE to execute debdroid (think I changed permissions before, probably through ES Explorer). My error is the "no source found" and "mount" issue, as I've pasted before. The problem still holds.
[Samsung Epic 4G Touch] linuxpir8:
where is the script located? i would check the script and see how it compares to your folder structure. id also check permissions. last resort would be to start over and try to flash the script or do it manually so you can visually see any errors in terminal and correct from there.

edit: are you missing the debdroid.conf file from /etc/ ? i just did a quick look again at debdroid and source points to /etc/debdroid.conf which points to linux.img
[Samsung Epic 4G Touch] vinhdizzo:
scripts are located in /system/bin. I just made sure all the deb* scripts were executable.

To debug, I think the first issue is the "source: not found" error. I guess I don't have the "source" command. Where can I get it? Is there a pre-req app I need to install? I have busybox, but I guess it doesn't come with the source command.
[Samsung Epic 4G Touch] linuxpir8:
i believe source is asking for the debdroid.conf file, which should be in the /system/etc/ folder. because without that file, debdroid itself, cant locate the linux.img to follow through with the rest of the commands.
[Samsung Epic 4G Touch] vinhdizzo:
Yes, I know source is looking for the file /etc/debdroid.conf. The issue is not having access to source, the binary file, the command.
[Samsung Epic 4G Touch] leond:
will injection work on wireless driver?
[Samsung Epic 4G Touch] dasmoover:
Source is part of bash/busybox.
[Samsung Epic 4G Touch] linuxpir8:
hopefully op can chime in. i cant find a source file on mine, but i know what youre talking about.

edit : looks like it was chimed in, lol.
[Samsung Epic 4G Touch] vinhdizzo:
bash wasn't a part of my busybox. Installed it per this post. The error I now get with "bash debdroid" now is:

Initializing chroot filesystem

mkdir failed for $/mnt/mnt/android, No such file or directory

...

Debdriod deployed successfully, opening chroot.

mount: No such file or directory.

Question: Do I need to modify my debdroid script somehow? Looks like the issue is "$/mnt/mnt/android". Suggestions? Thanks.
[Samsung Epic 4G Touch] linuxpir8:
the few of us in this thread that have got it to run all have that same error message. ive looked into the scripts but dont know whether i want to make the directory as i didnt see what it would be used for. ie another partition or share folder or what. otherwise it works just fine. my only guess is that its a redundant directory for other android phones or for the debian app that deploys debdroid.
[Samsung Epic 4G Touch] vinhdizzo:
I see.

So, now what after executing debdroid "successfully"? How do I get to the GUI front end of Linux? Thanks.
[Samsung Epic 4G Touch] linuxpir8:
i used the custom backtrack img. so all i did was vncpasswd and type my password, then i did startvnc. i then downloaded vnc viewing program and logged right into x/gui.

the custom backtrack came with vnc working out the box for xfce via startvnc.
[Samsung Epic 4G Touch] vinhdizzo:
Vnc viewing program on android device or computer? If the former what app do u recommended d?
[Samsung Epic 4G Touch] Moghie:
No, injection isnt supported by our chipset :( However our phones do support usb otg, maybe its possible to plug in a wifi dongle that does?
[Samsung Epic 4G Touch] linuxpir8:
on android. i used pocketcloud free version, works great. theres another one thats supposed to be good too jump desktop again free version. i used vnc viewer by realvnc and it kept crashing. i liked how vnx viewer would scroll with my finger whereas pocketcloud is a bit trickier. im going to try jump next, by description it looks like it will be the ticket though.
[Samsung Epic 4G Touch] dasmoover:
The failed directory is simply an error not commented out in the debug mode. It's looking for a folder on the linux.img in /mnt/android to mount /system to. $mnt refers to /data/local/debdroid (chroot)
[Samsung Epic 4G Touch] lems111:
deleted...
[Samsung Epic 4G Touch] k_t_b:
Thank you! Thank you! Thank you!

This is awesome. I have the custom BT img running like a champ through a Jump Desktop VNC connection on my GT-P6210.

I did run into an issue. After receiving some of the same errors others in this thread have posted, I checked the linux.img file size and realized that the img never fully extracted. I made a few failed attempts at extraction on my device, then just settled for extracting on my desktop and transferring over on a micro SD card.

After that, everything went smoothly. Zero issues.

Thanks again for sharing this with all of us and taking the time to help troubleshoot.
[Samsung Epic 4G Touch] skyungjae:
Does sound work?
[Samsung Epic 4G Touch] dasmoover:
Not over VNC, I don't think.
[Samsung Epic 4G Touch] linuxpir8:
over rdp it should work.
[Samsung Epic 4G Touch] iAMsalm:
Best thing I've seen yet! Great job guys! Keep it up.
[Samsung Epic 4G Touch] skyungjae:
Any particular RDP app?
[Samsung Epic 4G Touch] screamworks:
Any chance of seeing this work for the Galaxy S II International (I9100)? There was a similar project to get BackTrack working via chroot, which worked quite nicely, but as far as I know there's been no progress since about July last year. Moreover, BackTrack was the only available distro. Sorry for the OT.

screamworks.
[Samsung Epic 4G Touch] Kevin001111:
Does this work with any Android device?
[Samsung Epic 4G Touch] dasmoover:
Will work on ANY device with root and loopback support. SG2 should work!
[Samsung Epic 4G Touch] linuxpir8:
so far in this thread an evo 3d and a galaxy have got it to run besides those listed in op. but like op title says its

multi device =)
[Samsung Epic 4G Touch] screamworks:
Fantastic! Thanks for your work.

screamworks.
[Samsung Epic 4G Touch] contactwajeeh:
on the website it says almost any linux build will work out of the box. How about slax. You can find it here.
[Samsung Epic 4G Touch] vinhdizzo:
On bt5, can you guys install apps via apt? I'm trying to install r-base but the dependencies won't install as they are broken somehow. Can anyone confirm or help me debug? Thanks.
[Samsung Epic 4G Touch] linuxpir8:
one of the posts near the beginning of this thread shows they were able to. i however, could not because dependencies were broken. old symlinks or not using new source urls and also because it told me i was out of space. it was only a 10mb file i was trying to grab and i have a ton of space. im guessing its the way vram is shared and allocated? thus i was going to grab the smaller footprinted img and try with that, but i forgot until now.
[Samsung Epic 4G Touch] RainMotorsports:
Out of curiosity what is gitbrew hosted on? The IP comes back to Verizon and the speeds with that suggest that its off a Business or Home Line. That or your getting absolutely slammed with hundreds of simultaneous downloads.

Since you offer hosting to developers I sure hope it is out of a data center and your just getting slammed. 50 Mbit or so fiber is pretty slow for hosting files. I was going to say I dont mind mirroring this but you host alot more than this of course.

Cant wait to try this out.
[Samsung Epic 4G Touch] vinhdizzo:
I think it has to do with the sources list (/etc/apt/sources.list). Doesn't appear there:

# dpkg -l r-base

No packages found matching r-base.
[Samsung Epic 4G Touch] almyz125:
Should i test on my SGS Vibrant?
[Samsung Epic 4G Touch] dasmoover:
An updated IMG will be coming soon with apt-get fixes, more tools, etc.

We are hosted on a business line and are getting slammed with downloads.
[Samsung Epic 4G Touch] k_t_b:
Sweet!

That is very much appreciated. Thank you for splurging your bandwidth on us.
[Samsung Epic 4G Touch] linuxpir8:
awesome =) sounds good, cant wait to check it out.
[Samsung Epic 4G Touch] k_t_b:
Hey dasmoover,

I've experienced one problem with the debshell script. I was receiving an error regarding the init function. I checked the script and saw that parentheses were missing where the init function is defined.

source /etc/debdroid.conf

init {

#required for mount -o to function

(continued...)

I changed it to:

source /etc/debdroid.conf

init() {

#required for mount -o to function

(continued...)

The script seems to work fine now. Does this make sense?

FYI - I still haven't gotten the APK to successfully deploy BT, but manually starting debdroid works well for me.
[Samsung Epic 4G Touch] linuxpir8:
same here, but i figured its because i didnt make a script to auto start vnc on boot.
[Samsung Epic 4G Touch] ioos:
The title says Arch, but I don't see any images listed. Am I missing something?
[Samsung Epic 4G Touch] dasmoover:
You must use an Arch ARM img. http://archlinuxarm.org/
[Samsung Epic 4G Touch] Psywar28:
Wondering if someone could give me a hand.

I have Terminal, BusyBox, AndroidVNC, and debdroid.

I flashed debdroid. I checked to make sure that debdroidconfig was in system/etc.

I also placed it on sdcard/debdroid

Also in that folder is my linux.img file.

I cannot get it to run. Here is a Screenshot of my Terminal.

http://t.co/2G8JDhvQ

What am I doing wrong? What is the step by step run down to get this thing to work.

Also will I be able to use aircrack on my phone?
[Samsung Epic 4G Touch] k_t_b:
Do you have the scripts -

debdroid

debkill

debshell

in /system/bin ?

If I remember correctly, all I did was something like...

su

bash

cd /system/bin

sh debdroid

vncpasswd

startvnc
[Samsung Epic 4G Touch] Psywar28:
Alright that helped some. I got farther on the setup. Now I got a bunch of errors.

http://t.co/pRfckqm0
[Samsung Epic 4G Touch] dasmoover:
It cannot find debdroid.conf in /system/etc/ or debdroid.conf references a file that is not there. (check your linux.img path)
[Samsung Epic 4G Touch] Psywar28:
everything looks right. is the linux.img case sensitive?
[Samsung Epic 4G Touch] dasmoover:
http://gititbit.ch/ddba3

Make sure you are using the latest version and it should be /sdcard/debdroid/linux.img
[Samsung Epic 4G Touch] Psywar28:
I am going to redownload the BT IMG file. I am using the IMG file from another ARM BT build. I wonder if that is whats wrong.

I'll post back later tomorrow or tonight with the results.
[Samsung Epic 4G Touch] k_t_b:
Check to see if the folder - /sdcard/debdroid/share - exists (if not create it)

(that may help, may not, I can't remember)

The img filename should be all lowercase unless you change it in the conf file - /sdcard/debdroid/linux.img.

One of the biggest issues I had was getting the image file to finish extracting completely on my tablet. I didn't realize it at first that the img was incomplete even after a couple attempts at extraction. So, check that the size of the img file is appropriate (I think it read 3.26GB in root explorer). I think I found it easiest to extract the img on my PC and copy it over with a microSD card. Maybe my extracting issues were app related, who knows..

Hope this helps. Good luck.
[Samsung Epic 4G Touch] Psywar28:
Thank you for the reply. I mounted the SDCard and checked everything.

I do have everything and it is all where it needs to be.

What I did notice and you mentioned it in your post is that dang IMG file. It only extracted 1.5gb of it.

So I am extracting it manually on my PC right now and I am going to transfer it over to my SDCard manually. Taking freaking forever to transfer it though.
[Samsung Epic 4G Touch] linuxpir8:
nope. i had.to do the same and i used different apps.

Sent from my SPH-D710 using FD10
[Samsung Epic 4G Touch] Psywar28:
Ok I have gotten a bit farther, but still no dice.

I included a screenshot.

I notice it cannot find "bash".

I am running Cyanogen7 on my HTC Evo and I noticed that the bash file is located in system/xbin instead of /system/bin

I think this might be one of my issues? I have tried to install busy box to the system/bin location with no luck.

Here is my screenshot.

http://t.co/DSwfAIfD

Any ideas on where to go from here?
[Samsung Epic 4G Touch] snakefreak:
Have trouble with mounting the script doesnt mount anything after startup /mnt is emty. no android folder the folder share the same
[Samsung Epic 4G Touch] k_t_b:
I noticed I have a copy of debdroid.conf in /etc (as well as in /system/etc - one of these copies is likely left over from trying different things to get it working for myself)

Try copying debdroid.conf to /etc if it isn't there already.

(source /etc/debdroid.conf)
[Samsung Epic 4G Touch] phildis:
Hey guys. I've made a password for vnc, but when I use the command "startvnc" I get the following error:

xauth: (argv):1: bad display name "debdroid: 1" in "add" command

new 'X' desktop is debdroid:1

Starting applications specified in /root/ .vnc/xstartup

Log file is /root/.vnc/debdroid:1.log

Anyone know why this is happening? I'm new to this, but I was expecting the "startvnc" command to pull up the gui.

Thanks in advance.
[Samsung Epic 4G Touch] linuxpir8:
just ignore it. it started the vnc server, now you need a vnc viewing program to login to desktop
[Samsung Epic 4G Touch] phildis:
Oh, cool. That is a relief. At least I am on the right track.

I just installed jump vnc, and I am stuck again. It wants me to enter a network address, and im not sure how to find that with the information given. Also what Vnc viewer do you recommend?

EDIT: I used android-vnc-viewer and was able to log in to the desktop. very cool
[Samsung Epic 4G Touch] k_t_b:
For Jump, the Host Address would be something like:

localhost:5901 (for - 'new 'X' desktop is debdroid:1' - or)

localhost:5902 (for - 'new 'X' desktop is debdroid:2' - or)

localhost:5903 (for - 'new 'X' desktop is debdroid:3')
[Samsung Epic 4G Touch] HaiKaiDo:
So I took a stab at this today and download the Backtrack images "Original" and "Customized". Im currently running the customized version with no problems. However I am curious about 2 things. First thing is, when i startup debdroid and then type the command the start the vnc server, everytime i do this the desktop number increases. how can i make it so that im using the same one everytime. And the other thing is, If i want to play with Gnome instead of XFCE, or switch back and fourth between the two, Is there an easy way to do such a thing?

Also the last thing i was wondering. Is there just a plain old straightup version of Ubuntu with gnome for ARM out there?
[Samsung Epic 4G Touch] phildis:
I am a noob, but it sounds to me like there are multiple virtual devices open if the number is increasing. Instead of starting debdroid and vnc through the terminal everytime just go to your vnc viewing program and go back to where you were.
[Samsung Epic 4G Touch] linuxpir8:
you are correct, you dont need to continue the script each time unless you rebooted.
[Samsung Epic 4G Touch] phildis:
can someone school me on pentest?

So far I have xfce up through the vnc viewer, but I dont know where to progress from there.