yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Original Android Development] DooMLoRD:
damn... ok,..

can u just use the terminal emulator program i suggested?

an try this:

which mount

u will probably get something like

/system/bin/mount

now based on that output run this:

ls -l /system/bin/mount
[Galaxy S II Original Android Development] Omegavirus:
output is attached.. used your terminal program ;)
[Galaxy S II Original Android Development] DooMLoRD:
seems u are using prerooted kernel (CF-Root)

and u messed up the commands... it should have been

ls -l /sbin/mount

anyways i am preparing an updated package (scripts + busybox only) will upload it soon... should sort out most busybox related issues
[Galaxy S II Original Android Development] Omegavirus:
that's true ;) i'm using the cf-root kernel..

the output of ls -l /sbin/mount is: "lrwxrwxrwx 1 root root 7 Jun 20 02:00 /sbin/mount -> busybox"

sounds great, thanks :)
[Galaxy S II Original Android Development] NielDK:
Sounds great with bt5 on the GS2. Tell mé, does anyone know if monitor mode and packet injection is working on the GS2 wifi drivers?

That is probably the main purpose, at least for me ;)
[Galaxy S II Original Android Development] DooMLoRD:
@NielDK

dude u got the SGS2?

wht happened to the Play/Arc?

back on topic... yes i hope some devs can get wifi module compiled with monitor mode (if at all its possible)...
[Galaxy S II Original Android Development] NielDK:
;) I have a few phones. GS. GS2. Play. X10 mini. N900 and some Chineese one.
[Galaxy S II Original Android Development] DooMLoRD:
great!

may be u can compile a kernel module to make monitor mode in wifi possible ;)
[Galaxy S II Original Android Development] NielDK:
Didnt do much samsung dev. Yet. So a great challenge. Hehe
[Galaxy S II Original Android Development] Omegavirus:
got it working now.. just installed the new cf root kernel and infusion 1.5 rom :)
[Galaxy S II Original Android Development] DooMLoRD:
great!

i am just finishing the update.zip.... testing it now...

it will resolve most busybox issues & be more verbose with outputs...
[Galaxy S II Original Android Development] SkilletDesire:
Has any one tested this with Cognition?
[Galaxy S II Original Android Development] DooMLoRD:
please wait for few minutes i am uploading a newer version of scripts (small ~800kb package) which should address the busybox related problems and make it fully ROM independent...
[Galaxy S II Original Android Development] DooMLoRD:
Updated with new package (bt5_sgs2_shell_scripts_v2.zip) containing shell scripts, busybox (which gets installed to temporary location) [to be flashed via recovery]

this will resolve most busybox related issues, as a busybox binary is included in the package and will get installed at temporary location, this will not disturb/conflict with busybox of ur ROM/CF-Root kernel...

links at 1st post

those who were having trouble please test out this new package

Enjoy!
[Galaxy S II Original Android Development] Omegavirus:
U forgot the underline before "v2" in the download link :P

will test it now :)
[Galaxy S II Original Android Development] DooMLoRD:
yups... my bad :P

links rectified!
[Galaxy S II Original Android Development] Cuspide:
Nice to see you too have switch to sgs2 Lord ;-)
[Galaxy S II Original Android Development] Hollow.Droid:
Works great thanks, but a good few of the backtrack commands don't work, is that to be expected?
[Galaxy S II Original Android Development] DooMLoRD:
could u post them here?

;)

seems a lot of X10 folks made the switch to SGS2
[Galaxy S II Original Android Development] anantshri:
i don't have a SGS2 to check but someone if possible just check what this guy is saying is possible or not.

if yes we have a winner here.

http://www.backtrack-linux.org/foru...laxy-s-monitor-mode-injection.html#post202778

and then i need to get some money arranged to buy SGS2.:D:D:D:D

from wikipedia

http://en.wikipedia.org/wiki/Samsung_Galaxy_S_II#cite_note-GS2_accessories-37

We need someone to test it. i think we need custom kernel for this.

refer : http://sven.killig.de/android/N1/2.2/usb_host/

this is USB-ON-THE-GO : http://www.usb.org/developers/onthego/
[Galaxy S II Original Android Development] NielDK:
Looks promising. Aircrack suite is not included, so will need some more work for testing monitor mode and packet injection :)

Kismet not included.

Path to /usr/local/bin needs to be added
[Galaxy S II Original Android Development] Major_Sarcasm:
@ anantshri: I have successfully connected various USB devices to my SGS2:

A Genius laser mouse (direct to the OTG cable)

An 8GB micro SD via a USB adaptor (direct to the OTG cable)

A 64GB SSD HDD via a USB y-splitter with mains power

I have heard of someone connecting a drive formatted as NTFS too.
[Galaxy S II Original Android Development] anantshri:
please can anyone try some usb devices like bluetooth or wifi adaptors ... if we get any wifi adaptor working we can then look for monitor mode setup.
[Galaxy S II Original Android Development] anantshri:
path /usr/local/bin /usr/local/sbin both needed @doom will be updating package soon.

packet injection currently will not work nor will the monitor mode and tha'ts why the obvious lack of software installation.
[Galaxy S II Original Android Development] NielDK:
:) figured. Btw. Do any of you guys know which is the wifi chip used by GS2?
[Galaxy S II Original Android Development] DooMLoRD:
thats great! try some networking device...

NTFS support needs kernel modules which add that functionality...

well ifconfig is not showing anything... will try n check kernel sources for details....

found this: http://phandroid.com/2011/07/12/samsung-galaxy-s-ii-gets-official-teardown/ but seems to be useless

yup will do that soon waiting for that runcmd script to be sorted out then will post updated scipts ;)
[Galaxy S II Original Android Development] Micksta:
Hey, I tried flashing the V2 zip file, but it is not signed? Using CF-ROOT4.0 with whatever recovery it comes with.

Also, after starting BT and closing the terminal emulator, is the proper method of getting back into the BT terminal is executing 'bt' again?
[Galaxy S II Original Android Development] tids2k:
If any useful :

Original Samsung Teardown

FixIt Tear Down
[Galaxy S II Original Android Development] anantshri:
exactly `bt` command is having one specific purpose and that is to provide direct access to chroot environment without the other overheads.so that you can close your terminal emulator any time you want.

however keep in mind if some activity is runing in foreground @ terminal it will be lost.

you will have to restart it.
[Galaxy S II Original Android Development] himu007:
Thank you very much for. Working fine on my sgs2 :)
[Galaxy S II Original Android Development] Major_Sarcasm:
I just had a generic wireless Logitech mouse connected and working. USB wifi adaptor, connected to OTG, switch mouse on, result! FYI, the status bar stated 'USB device connected' when I plugged in the wireless adaptor.

Also, I've just connected my Logitech MX1000 wireless laser mouse too by plugging the mouse's wifi dock into the OTG cable. Worked perfectly.

I've just had my Samsung ML-2240 laser printer connected and recognized (see screenshot) but I couldn't send a document to the device unfortunately, it said print failed or similar (I tried a random .pdf file).

I have tried a Logitech webcam, and a generic bluetooth dongle. 'Unknown device' with both.
[Galaxy S II Original Android Development] :
I tried a D-Link DWA-140, which when connected directly was detected as a high power USB device. Via a powered hub it shows as unknown USB device, and I believe the relevant parts from the log were:

D/Usbhost ( 2707): usb_host_run :: new device /dev/bus/usb/002/003
D/UsbServiceJNI( 2707): usb_device_added ::
D/Usbhost ( 2707): usb_device_open :: /dev/bus/usb/002/003
D/Usbhost ( 2707): usb_device_new :: /dev/bus/usb/002/003 fd: 288
D/Usbhost ( 2707): usb_device_new :: read returned 52 errno 4
D/UsbService( 2707): isBlackListed :: deviceName = /dev/bus/usb/002/003
E/UsbService( 2707): isBlackListed :: clazz = 9, subClass = 0, protocol = 0
[Galaxy S II Original Android Development] anantshri:
i think we might have to wait till someone get access to kernel sources and try adding support for OTG devices... hopefully @Doom is trying to do the same...
[Galaxy S II Original Android Development] anantshri:
just a small update.

you can modify bt command as follow

if

busybox chroot $mnt /bin/bash

(generally last line of script file)

is replaced with

if [ $# -eq 0 ]
then
echo "Chrooting"
busybox chroot $mnt /bin/bash
else
echo "Executing The commands"
busybox chroot $mnt "$@"
fi
echo "Exiting"

This effectively allows you to go in and out of chroot environment quickly.

Not sure if someone could use it but i found it useful and thought would share with all..

@doom

Found a work around for runcmd so that we don't need to tamper the image file, if possible update the script file for all...
[Galaxy S II Original Android Development] DooMLoRD:
yups will do it soon :)
[Galaxy S II Original Android Development] Td8f4:
THANKS

Finally someone came out with working files,

i kept getting the gconf sanity check error.

i ended up installing it with lxde and that seemed to work.

Right now I'm working on the drivers to use monitor mode on some usb wifi cards (alfa network, AWUS036H)

i managed to get the usb devices showing up in the chroot properly with lsusb

just some lines to add in the shell script:

#bind usb devices into chroot

#$mnt = the chroot path

mkdir -p $mnt/dev/bus/usb

mount -o bind /dev/bus/usb $mnt/dev/bus/usb
[Galaxy S II Original Android Development] Td8f4:
kernel source

Hey do you know ehere i can fid the kernel source for this distro

i run uname -r and it gives me

2.6.35.7-I9100xwkdd-cl161513

i searched /usr/src/ but it only has up to 2.6.33-500

i'm trying to compile a driver.

and ideas
[Galaxy S II Original Android Development] DooMLoRD:
for SGS2 there are kernel sources posted in "Original Android Development" Section
[Galaxy S II Original Android Development] anantshri:
basically we are using android kernel only so whatever driver you want to compile or modify that goes to android kernel.
[Galaxy S II Original Android Development] gangster429:
Is it posible to reduce bt.img file size?
[Galaxy S II Original Android Development] sterfreak:
Just out of curiosity, for the Samsung Epic, is it preferable to use this or the original distro from anantshri? Past that, how can I get the original Ubuntu repositories back? When I try to apt-get I get errors, while with regular Ubuntu the packages are found every time. I've also tried Synaptic and it didn't work either. Thanks in advance and great work! I'll be looking forward to using this when I get my SGS2.
[Galaxy S II Original Android Development] Phk:
Sorry but.. The scripts zip file is NOT flashable through CWM?!
[Galaxy S II Original Android Development] forgetmyname:
Quick Q:

Nib question, I presume its considered stable to flash BT .zip onto the

Ninphetamine

kernel?

Regards.
[Galaxy S II Original Android Development] Phk:
I tried on the Ninph kernel with CWM... NO GOOD
[Galaxy S II Original Android Development] forgetmyname:
Strange, as I thought it would run well on Ninphetamine. The update zip file does the following,

run_program("/sbin/busybox", "mount", "/data");
package_extract_dir("data", "/data");
set_perm(0, 0, 0777, "/data/local/tmp/bt/busybox");
run_program("/sbin/busybox", "umount", "/data");
run_program("/sbin/busybox", "mount", "/sdcard");
package_extract_dir("sdcard", "/sdcard");
run_program("/sbin/busybox", "umount", "/sdcard");

The data contains these, and these are put into /data/local/tmp/bt :-

data

data/local

data/local/tmp

data/local/tmp/bt

data/local/tmp/bt/busybox

sdcard contains these files, and these are extracted into /sdcard/bt

sdcard/

sdcard/bt

sdcard/bt/bt

sdcard/bt/stopbt

sdcard/bt/installbt.sh

sdcard/bt/startbt

So, it installs a temp busybox, and then copies the bt files onto the /sdcard.

Why this needs to be administered by an update .zip style programme? It could be packed into a tar ball, and just untarred into the /sdcard/bt dir.

Why does the update zip leave the busybix files in /data/local/tmp/bt/busybox? If those are only used during the installation, then why are these not removed afterwards; If these are required for the programmes to run, then these should not be a temp directory. Why install these anyway, when a pre-requesite is a root+bb installed system. Busybox is already there.

Apologies, but I have not downloaded the whole package (I'm a little busy in work today) - Does the bt startup script start a chrooted environment? its installed in stardard busybox, so still does not require the /data/local/tmp/bt/busybox version. Unless there is (probable) something I missed. Also, I realise that this is work-in-progress, so apologies if my comments seem harsh, but these are meant only as questions.

//EDIT Post

# 47

in this thread partially explains why the extra busybox is installed; Question still remains whether it is required post-installation.

F
[Galaxy S II Original Android Development] DooMLoRD:
i have tested the zips to be working fine with CWM in CF-Root kernel..

whts the error exactly?

the BIG 7z files cant be flashed via recovery... only the small scripts zip file is CWM compatible...
[Galaxy S II Original Android Development] DooMLoRD:
an update.zip is the simplest way in which any user can install the files....

busybox has multiple versions... the applet support of each version is different... if u read the first few pages u will know that some users had problem using the bt/other shell scripts used for launching backtrack... a compatible busybox is included which will sort out the issues... also the shell scripts are updated to use the temporary busybox

yes currently BT is started in chrooted env.

if u download and install OR read thru the shell scripts provided u will understand the need for the included busybox...

if there are still any queries feel free to ask..
[Galaxy S II Original Android Development] Phk:
Hey DooM, appart from the questions, it seems the problem here is the difficulty on the flashing :)

I get Error: [0] right on the instant i click the Zip file in CWM.

I'm on Ninph 2.0.5 and CWM 4.0.1.4.

Have you tried on these versions?
[Galaxy S II Original Android Development] DooMLoRD:
hey i dont have my SGS2 right now so cant test it immediately... will see whts the problem exactly...
[Galaxy S II Original Android Development] anantshri:
bt.img could be reduced, i know ways only on linux machine.

create a new bt1.img file using

dd if=/dev/zero of=bt1.img bs=1M count=1000

will give 1000 Mb file

then you need to mount both files in two different files

mkdir BT
mount -o loop bt.img BT
mkdir BT1
mount -o loop bt1.img BT1
cp -R -f BT/* BT1/
umount BT
umount BT1

this creates reduced bt1.img which could be renamed to bt.img and used with scripts.

check both for being sure. there was a specific bug which was appearing in SGS2 which has been removed in this version of img file. also as far as original repo's of ubuntu is considered try enabling them on synaptics repo config menu.

or try adding them manually at /etc/apt/sources.lst
[Galaxy S II Original Android Development] gangster429:
not testes but Backtrack can be run from micro sd

http://www.backtrack-linux.org/foru...lling-bt5-arm-samsung-galaxy-s-captivate.html
[Galaxy S II Original Android Development] DooMLoRD:
if u read thru the first post then u will know that we are already running it from sdcard ;)
[Galaxy S II Original Android Development] gangster429:
Hi DooMLoRD

I read the topic and it's explained how to run Backtrack from internal sdcard.

In the link I gave it's explained how the run it from external micro sdcard.

I don't have 3.3gb free memory on my internal sdcard. so I investigated and found this link.

It's jest another way to run it

Again I have not tested
[Galaxy S II Original Android Development] Phk:
Hey doom, updates? have you tested the scripts with CWM?

cheers, and again, thank you.

Phk
[Galaxy S II Original Android Development] DooMLoRD:
oh ok... sorry i was slightly confused...

even running from external sd card is possible u will just need to edit the shell scripts... if u r willing to test i can post modified/changed scripts to make BT run off external SDcard...

i have tested them to be working fine with CWM from CF-Root kernel...

this can also be done manually... if u want i can explain in detail the steps which need to be taken...
[Galaxy S II Original Android Development] Phk:
No need, i think i got it :) Even so, its really strange why I cant flash it using CWM 4.x from Ninphetamine 2.0.5

Cheers
[Galaxy S II Original Android Development] DooMLoRD:
i really dont know... can u tell me the exact error/problem/issue which happens (in detail)?
[Galaxy S II Original Android Development] Phk:
Let me catch a pic ;)
[Galaxy S II Original Android Development] Phk:
Murphy's law :D

When pointing the camera of another phone, my phone dared to flash the zip correctly and present no errors.

Please add to first post: "Any problems please point a camera at your phone"

...

Problem solved. Thanks DooM
[Galaxy S II Original Android Development] DooMLoRD:
hahahahah

good one

enjoy!
[Galaxy S II Original Android Development] designgears:
Another cool trick for using VNC over USB adb tunnel without wifi :)

Run from your computer:

adb.exe forward tcp:5901 tcp:5901

Then use something like tightvnc viewer, server should be; localhost:5901
[Galaxy S II Original Android Development] gangster429:
oke

I have experimented running backtrack from micro sd

without success for me

Steps I followed:

Here is the way to run backtrack from micro sd

http://www.backtrack-linux.org/foru...lling-bt5-arm-samsung-galaxy-s-captivate.html

I first partition my spare 8gb micro sd following with mini tool partition wizard

info: http://xdaforums.com/showthread.php?t=764491

additional info: http://www.omappedia.org/wiki/Android_SD_Configuration

6gb ext2 for backtrack

1gb fat32 So I can use the micro sd as external storage for my SGS2 ....

480mb linux swap (experimental)

I inserted my micro sd in the phone and typed:

cd /dev/block/vold/
ls

what you see her is the partitions that I made

179:19

179:18

179:17

179:16

179:11

Done the same without the micro sd inserted

I got only

179:11

So I know witch one was my micro sdcard.

I made new map with commands (or you can use root explorer)

su mkdir
mkdir /data/local/sdcard

So far so good.

Now the part I had prolems with.

The mount part

I had to mount the ext2 partition to the map I made

su mount
su
mount -t ext2 /dev/block/vold/179:9 /data/local/sdcard

First I got the permission error fixed that.

Then I got he error that mount was bussy.

I typyed

mount

What I saw was intresting my ext2 (179:19) was already mounted to /mnt/scard/external_sd

It was my fat32 partitons I see it nowhttp://media.xda-developers.com/images/icons/icon10.gif

anyway so it was a mistake

I was getting error "unabel to mount device busy"

I uninstalled dual mount SD -> didn't work

I installed few other program's that can mout and tryied to mount with it no succes

uninstalled them all

umount

Google search find this link

http://ocaoimh.ie/2008/02/13/how-to-umount-when-the-device-is-busy/

run the command :

fuser -m

I had allot of pid's

I I thought oke putty to my phone will be usefull

info: http://xdaforums.com/showthread.php?t=442754&page=9

eventualy i went in dead loop :d

my phone didn't start it jest kept rebooting

flash with odin then back to my costum rom

tryied all day long :) without success

I think I did the mount wrong

connect with putty no success :)

didn't lost my data witch is the good news

Did someone menage to run it from micro sd ?
[Galaxy S II Original Android Development] DooMLoRD:
@gangster429

why are u creating paritions?

u just neeed to move the bt folder from:

/mnt/sdcard/bt/

to

/mnt/sdcard/external_sd/bt

OR

/sdcard/bt/

to

/sdcard/external_sd/bt

and u need to exit the shell scipts to point to new location... that it!
[Galaxy S II Original Android Development] gangster429:
I wanted to give backtrack dedicated ext2 partition and have one fat32 for SGS2 storage but anyway (maybe it will be next project for me)

Can I use the script on the first post bt5_sgs2_shell_scripts_v2.zip

Or does it need to be changed?
[Galaxy S II Original Android Development] DooMLoRD:
if u want to dedicate partition to BT then things get slightly complicated... u might end up losing external_sd access in recovery/OS (its the way the partitions get mounted)..

ya sure u can modify those files... but u will need to change them to point to external_sd...

if u want help i can post some test files to try out...
[Galaxy S II Original Android Development] gangster429:
ok modified the script

V1 gives error

V2 installs

but running the script give's me permission error last screenshot

I manualy created the following folders

/mnt/sdcard/external_sd/data/local/tmp/bt/busybox

/system/bin

/system/bin/bt

/system/bin/startbt

/system/bin/stopbt

/data/local/bt
[Galaxy S II Original Android Development] DooMLoRD:
buddy u have messed it up.. ;)

wait i will upload something for u to test
[Galaxy S II Original Android Development] DooMLoRD:
@gangster429

try this:

bt5_sgs2_shell_scripts_EXTSD_V1.zip

i am not sure if external sd is mounted during recovery... in any case try this...

also u need to place bt.img in /sdcard/external_sd/bt/
[Galaxy S II Original Android Development] kapollo:
What a HDTV with an MHL cable would the resolution change to say 720p actually work that way with a TV?
[Galaxy S II Original Android Development] DavidMc0:
I'd like to try this, but so far can't find the 'ui' file, or figure out how to open it.

Can you please give a full step by step guide on opening this file, so that I can edit and save it to see if I can get the resolution higher than 800x480 for output through HDMI?

Sorry if this is dumb - I know next to nothing about linux!

Edit: I figured it out (used text editor in BT to edit file), and putting the resolution up beyond 800x480 simply increases the size of the desktop and you need to scroll around to view it, so using this method, it does not achieve higher resolution through the MHL HDMI output.
[Galaxy S II Original Android Development] anantshri:
startbt
bt

after you reach the root@localhost prompt

then you can navigate to /root/bin/

there you will find ui script

you just need to edit it and change the resolution.

or if you are not able to find it.

type

which ui

this should give you the location
[Galaxy S II Original Android Development] Julian1984:
Is anyone working on the wifi drivers?
[Galaxy S II Original Android Development] gangster429:
It's working with partition micro sd :):):):):)

without using the script

I will post the tutorial later have to find the correct steps first :)

ps don't give attation to time on the phone too lazy to change at moment will probably do wipe anyway to clean ever tying up and start over :)

I'm happy now :))))
[Galaxy S II Original Android Development] Paladin13:
I also tried using MHL cable to achieve higher res by editing ui. It just increases desktop size not the res. Doesnt make sense though if u play a HD video the res is fullhd! Then it switches back to normal I guess.
[Galaxy S II Original Android Development] anantshri:
ohk do check one thing.... in android vnc viewer there are setttings which defines color level generally its set to 256 colors change it to higher. (if that is what you needed)

also can you put some screenshots or camera shots so that we can understand what exactly you meant.
[Galaxy S II Original Android Development] DavidMc0:
When you play an HD movie, it treats the MHL output as another display with a higher resolution.

However, when running backtrack the MHL is in mirroring mode, which simply displays the output to the phone screen through the MHL cable to whatever HDMI device is plugged in, so it's always WVGA.

If we could figure out how to change the output mode so that backtrack / other linux is not sent to the phone display, but instead to a higher resolution display via the MHL adaptor like with movies, it would be great.