Desire & Ad-hoc - Desire Q&A, Help & Troubleshooting

Someone has managed to connect to an ad-hoc access point? I tried but I failed, also I have not heard of anyone who has achieved

Try the Connectify application to achieve the same thing.
Sent from my HTC Desire using XDA App

This transforms the pc (with windows) in AP, but i want this feature to connect Android phone to other Android phone, [with Wireless Tether] sharing the connection between two phones (really i dont need, but i like to experiment xD)
Thanks for fast reply an sorry for my english

I am also very much interested in this topic for quite a while and i have collected some information about it:
1. Ad-hoc wifi is not a desire specific issue but it affects all devices running android. There is a ticket asking to add it but its just in the state "reviewed" by now. See http://code.google.com/p/android/issues/detail?id=82
2. Some workarrounds exists but they depend on the device beeing addressed.
3. szym.net (author of barnacle wifi-tether) gives a very good explanation why ad-hoc actualy does not work with stock android:
Unfortunately, the WifiManager in stock Android ignores ad-hoc networks.
Click to expand...
Click to collapse
He offers a patch to hack wpa_supplicant which lets ad-hoc networks look like regular access points and thus make them accessable from the phone. See http://szym.net/android/adhoc-wpa-supp.html
HTH

I try your link says, and i try this other pretty way: racheado.blogspot.com/2009/12/conexion-ad-hoc-en-android-posible.html (is in spanish)
but when go to remount in "-ro" the phone resets and don't save the changes.
Also i try this way: ott.net/knowledge/htc-desire-adhoc/ but when go to execute "iwconfig" the "better terminal" or "adb shell" says "permission denied".
And yes, I have root access

ghiki said:
I try your link says, and i try this other pretty way: racheado.blogspot.com/2009/12/conexion-ad-hoc-en-android-posible.html (is in spanish)
but when go to remount in "-ro" the phone resets and don't save the changes.
Also i try this way: ott.net/knowledge/htc-desire-adhoc/ but when go to execute "iwconfig" the "better terminal" or "adb shell" says "permission denied".
And yes, I have root access
Click to expand...
Click to collapse
You can't gain Read/Write access to /System, Read-Only Access.
You can get access in Recovery Mode though.
Unfortunately the fix does not work after boot anyways, due to the /data/misc/wifi/wpa_supplicant.conf being defaulted to not show AdHoc by the original wpa_supplicant.conf in /system after a visit in WiFiManager. I suggest you modify that one instead to always remember your network and settings. Tricky, but works.

Hello to all,
I have just tried to overwrite the wpa file in data/misc/WiFi with the one patched and I changed the name but nothing works!!!
Please help!
Sent from my HTC Desire using Tapatalk

No Answers?
Help us

Found another solution.
Get hold of the iwconfig / ifconfig binaries.
Shut off WiFi first!
Code:
su
insmod /system/lib/modules/bcm4329.ko
iwconfig eth0 mode ad-hoc
and there you go. A interface you're free to do what you like with.
Got it working with my laptop by following up with
Code:
iwconfig eth0 essid [U]ad-hoc_test2[/U]
If coded, use:
Code:
iwconfig eth0 key [B][U]your passkey here[/U][/B]
Then a bunch of stuff for the IP, SubNet, GW, DNS
Code:
ifconfig eth0 [U]192.168.1.10[/U] netmask [U]255.255.255.0[/U]
route add default gw [U]192.168.1.1[/U] dev eth0
setprop net.eth0.dns1 [U]208.67.222.222[/U]
Adjust underlined with your own config.

I need help with this.
First, I should mention that I am a Noob in this, so please be patient.
I have rooted my HTC Desire with unrevoked 3.1 and do get a popup whenever an application is trying to get superuser permissions.
Also, I downloaded the Android SDK and can connect to my device by
Code:
adb devices
adb shell
su
What does not work for me is the
Code:
adb remount
command in the PC command prompt but I managed to mount the system directory rw with
Code:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
chmod 777 /system/bin
So, when I the try to
Code:
adb push iwconfig /system/bin
I get a
Code:
failed to copy 'iwconfig' to '/system/bin/iwconfig': Out of memory
What is going wrong here?
P.S.: I found also other solutions like http://szym.net/android/adhoc-wpa-supp.html but have no idea how to apply the patch and the linked solution on the same site http://www.olsr.org/?q=olsr_on_android doesn't work either for me, as the used /system/bin/wpa_cli is simply not on my phone.
I am using stock rom Android 2.2 build 2.11.832.2

OMG: why couldn't anyone mention that one needs to boot the phone into recovery to be able to put files into the system directory.
Now it works, I can run iwconfig.

I can see ad hoc networks now but can't connect.

Related

Regaws Root Method???

Is there something additional I need to do to actually gain "root"? I can't install the clear lock screen from smurf, can't wireless tether.... Don't know what's going on, all of this used to work fine on my Hero - what am I missing?
I don't think you have given enough info for people to even know what the problem is that you are having. Maybe you could be a bit more specific. Do you have superuser installed?
Sorry about that.... basically im on stock 2.2 with supposed "root" using regaws method - problem is, I can't use anything though; adb, wireless tether, I can't flash a lock screen (just sits at boot screen).
Download superuser app from the market place or google it if it is not on your phone already. Install it then launch an app that requires root. You will know real fast if you are rooted.
DomSim said:
Download superuser app from the market place or google it if it is not on your phone already. Install it then launch an app that requires root. You will know real fast if you are rooted.
Click to expand...
Click to collapse
I do have SU... that's the thing but when I try ADB Remount it says device not permitted or something like that, can't remember exactly
You could try full wipe / reflash.
Maybe try a diff ROM too.
You need to flash the engineering bootloader (0.76.2000). Go to Toast's method part 2 and follow the steps to unlock nand. You need the engineering bootloader in order to access /system.
Sent from my PC36100 using XDA App
sombdy said:
You need to flash the engineering bootloader (0.76.2000). Go to Toast's method part 2 and follow the steps to unlock nand. You need the engineering bootloader in order to access /system.
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
Nand root... I was looking for more info on this, I thought it was the culprit, thanks - ill post results, hopefully good
Edit: Won't work "Permission denied" .... this is really starting to piss me off grrr
DirtyShroomz said:
Nand root... I was looking for more info on this, I thought it was the culprit, thanks - ill post results, hopefully good
Edit: Won't work "Permission denied" .... this is really starting to piss me off grrr
Click to expand...
Click to collapse
Have you run Unrevoked Forever? This will turn off security permissions and should then allow you to flash anything.
Sent from my PC36100 using XDA App
Ok, the reason
Code:
adb remount
doesn't work is because the boot.img isn't patched to allow that, because I forgot to at the time of posting. You still have root (as long as you actually completed the guide successfully), that's just an all time access root through adb
To acheive the same results, type
Code:
adb shell
type
Code:
su
you will then see #. thats root.
Then remount your /system partition using
Code:
mount -o rw,remount / /system
there you go.
regaw_leinad said:
Ok, the reason
Code:
adb remount
doesn't work is because the boot.img isn't patched to allow that, because I forgot to at the time of posting. You still have root (as long as you actually completed the guide successfully), that's just an all time access root through adb
To acheive the same results, type
Code:
adb shell
type
Code:
su
you will then see #. thats root.
Then remount your /system partition using
Code:
mount -o rw,remount / /system
there you go.
Click to expand...
Click to collapse
When I try to type "su" it says "Permission denied"
DirtyShroomz said:
When I try to type "su" it says "Permission denied"
Click to expand...
Click to collapse
Do you have usb debugging on?
Try the new 1 click root in the dev forum. Unrevoked 3.2. See if that doesn't do the trick.
Sent from my PC36100 using XDA App
My guess is you didn't flash the 2.2-root.zip at the end then.. That's the best I can do w/ the info you've given.
one was already asked once but i had two questions
1. Is USB Debugging turned on or off? Settings > Applications > Development
2. you are using a stock rooted rom. are you trying to use sprint's wireless tether app? Sprint's app wont work you need to download wireless tether from the market.
joebags said:
one was already asked once but i had two questions
1. Is USB Debugging turned on or off? Settings > Applications > Development
2. you are using a stock rooted rom. are you trying to use sprint's wireless tether app? Sprint's app wont work you need to download wireless tether from the market.
Click to expand...
Click to collapse
Running stock 2.2. Regaw I did flash 2.2-root at the end and I am trying to use wireless tether not Sprints hotspot
I do have superuser in my apps list and I was able to install SNeoid, Swype, Setcpu, juicedefender and a few others that may require root but it wont let me do anything via adb or install any themes/mods that come in .zips
DirtyShroomz said:
Running stock 2.2. Regaw I did flash 2.2-root at the end and I am trying to use wireless tether not Sprints hotspot
I do have superuser in my apps list and I was able to install SNeoid, Swype, Setcpu, juicedefender and a few others that may require root but it wont let me do anything via adb or install any themes/mods that come in .zips
Click to expand...
Click to collapse
ok do this in command prompt and paste the results in code tags (to save space)
Code:
adb shell ls /system/bin/
regaw_leinad said:
ok do this in command prompt and paste the results in code tags (to save space)
Code:
adb shell ls /system/bin/
Click to expand...
Click to collapse
Code:
setconsole
dumplayer
svc
e2fsck_recvy
chownto
apph
ps
id
chownThp
notify
dhcpcd
pand
renice
bugreport
snd8k
hciattach
iqfd
top
lsmod
setprop
ionice
ifconfig
iptables
kthp_proxy
logwrapper
getevent
htcipcd
su
start
iqd
wipe
ip
smd
sleep
getWiMAXPropDaemond
newfs_msdos
vdc
sync
udhcpd
pppd
rmmod
fsck_msdos
netstat
route
sound8k
rm
radiooptions
pm
logcat
setWiMAXPropDaemond
resize2fs_recvy
htc_inittest
vmstat
dvz
mmcamera_test
keystore
dmesg
system_server
linker
fbtool
reboot
sdptool
busybox
hd
iftop
insmod
bootcomplete
rild
schedtop
debuggerd
wpa_supplicant
schedtest
bluetoothd
ping
btld
ime
omx_tests
tc
sendevent
racoon
toolbox
date
bma150_usr
bootanimation
wimaxDhcpRenew
log
installd
wimax_uart
applypatch
wimaxAddRoute
dexopt
monkey
ln
getprop
album_hdmiexe
stop
surfaceflinger
uevent
akmd
monitorMTD
wimax_mtd
mv
debug_tool
servicemanager
wimaxDumpKmsg
dumpstate
ipd
DmWrapperTest
nandread
kill
gzip
chmod
rmdir
lsc_camera
dbus-daemon
run-as
netcfg
cat
htclogkernel
sh
mount
printenv
mkdir
bmgr
wimaxDhcpRelease
umount
mke2fs_recvy
dnsmasq
input
df
ioctl
am
wimaxDumpLogcat
app_process
chown
htc_timezonetest
service
netd
ls
netsharing
cam_ins_spmo
mm-venc-omx-test
dalvikvm
ser2net
dmagent
shutdown
ndc
dumpsys
mediaserver
vold
sequansd
awb_camera
dd
keypress
cmp
mscompress
wimaxDumpLastKmsg
mtpd
watchprops
ok, so "su" is in there... you should be able to
Code:
adb shell
su
and it give you a #
try opening SuperUser.apk on your phone, THEN doing the above commands. a pop up should come up on your phone saying to allow root to su
regaw_leinad said:
ok, so "su" is in there... you should be able to
Code:
adb shell
su
and it give you a #
try opening SuperUser.apk on your phone, THEN doing the above commands. a pop up should come up on your phone saying to allow root to su
Click to expand...
Click to collapse
that worked, now to get remount do i have to always use that previous command you wrote?

OpenVPN / tun.ko / Binary Galaxy Tab

Hi,
openvpn is up and running.
Install busybox via busybox-Installer (Market). Then install Openvpn via Openvpn-Installer (Market). I dont know if Openvpn-Installer is needed, as we are replacing the binary with another file - but as it takes care of dependencies just install it
Use tun.ko from there:
xxx.android-hilfe.de/samsung-galaxy-tab-forum/51007-openvpn-tun-ko-unionfs-ko.html
(replace the xxx with www)
Binary from here: (OpenVPN Installer won't work - its not able to recognize push options)
github.com/downloads/fries/android-external-openvpn/openvpn-static-2.1.1.bz2
Finally you have to provide the busybox-ifconfig in /system/xbin/bb/ifconfig and busybox-route in /system/xbin/bb/route (ln -s /system/bin/busybox /system/xbin/bb/ifconfig ...)
cheers
patrick
Can you give any hint how to install the additional binaries? Even with a rooted Tab and a terminal, I dot not get this working.
Sent from my GT-P1000 using Tapatalk
hi
just run openvpn installer from the market
I tried and got the connection established. But in opposite to my Desire, traffic is not routed that way.
Also, there is no /dev/tun
Addendum: Got it running, beside that I am using tap, doing a reinstall after having created the a.m. symlinks for busyboy, adding some push options on the server to force the routing did the trick (they were not required on my Desire).
I used the tun.ko module for the VPN Connections app and got it working great... except when I disable the VPN connection, it doesn't reset the dns servers to the values that where there before.
I don't believe it's the application since the same version on my Nexus One works correctly. If I turn off the data then turn it back on, I get my data back. I believe it to be the tun.ko not being written to reset the dns entries.
I think I could kiss someone, I now have working cisco vpn
How do we make the tun.ko module stay after a reboot? Mine disappeared from /modules/ when I restarted my tab? I copied it with root explorer.
Also if we can get it to stick will I have to run these commands each time?
insmod /modules/tun.ko
ln -s /system/bin/busybox/system/xbins/bb/ route
ln -s /system/bin/busybox/system/xbins/bb/ ifconfig
Hi, i am not getting this to work, is there any thing i am missing? What i did:
1. Rooted device and installed busybox
2. copying the tun.ko from the german site to /modules after remounting to r/w.
3. Running those three commands from previous post in terminal
4. Installing vpnc 0.99 and configuring connection
5. Connect
still get failed to connect.
any tips please?
Sent from my GT-P1000 using XDA App
trondjl said:
Hi, i am not getting this to work, is there any thing i am missing? What i did:
1. Rooted device and installed busybox
2. copying the tun.ko from the german site to /modules after remounting to r/w.
3. Running those three commands from previous post in terminal
4. Installing vpnc 0.99 and configuring connection
5. Connect
still get failed to connect.
any tips please?
Sent from my GT-P1000 using XDA App
Click to expand...
Click to collapse
I believe that's exactly what I did. Were all the commands successful?
works now.
I rebooted and reinstalled vpnc and busybox and recopied and reissued commands. Something must have been hanging from all my testing.
Tanks!
This is so great! Now I'm online with Sip, xmpp and RDP with work!
I know, get a life
Sent from my GT-P1000 using XDA App
I had to copy tun.ko to /system/lib/modules. I did have to create that directory but when I did, it was loaded every time.
You can make sure by using the lsmod command in the terminal emulator.
Yes, it works. Excellent!
Sent from my GT-P1000 using XDA App
sorry for noob question as i dont know that much about open vpn
i know its a virtual private network, and some ppl in my country offering a cheaper internet connection through them
what did this one do exactly?
Cisco vpn ftw
This is great! After reading everything and getting everything done I can connect through our Cisco VPN.
Question
What does this do that the Tabs built in VPN doesnt?
How can I use terminal emulator to run the two ln -s commands? I guess I need some prior commands to enable r/w to system?
I bought Better Terminal Emulator Pro in the Market to do this.
This is how I did it:
1. Install busybox from the Market into /system/bin,
2. Install root-explorer (to get r/w access to /system/xbin),
3. Create /system/xbin/bb,
4. Create symbolic links in /system/xbin/bb to busybox with the names ifconfig and route:
ln -s /system/bin/busybox /system/xbin/bb/route
ln -s /system/bin/busybox /system/xbin/bb/ifconfig
5. Copy tun.ko into /system/xbin with root-explorer,
6. Install OpenVPN from the Market into /system/xbin and set the paths to route/ifconfig to /system/xbin/bb,
7. Install OpenVPN Settings from the Market,
8. Configured to activate the TUN module via Menu / Advanced with insmod in path /system/xbin/tun.ko and to activate "Load tun kernel module"
9. Copied my existing and working OpenVPN-settings to the memory card and finally
10. Set the path to the OpenVPN configuration and to the OpenVPN binary.
After this, the OpenVPN connection could be established the data was rerouted via that connection.
@alias_neo
The internal Android functions do not support OpenVPN which can be quite easily installed on a Linux root server to establish a secure connection to that server. Setting the firewall rules on that server properly, the whole traffic can virtually enter the internet via the server and systems inbetween the Tab and the server cannot see what's going on anymore. So even an open WLAN hotspot can be safely used as well as all monitoring/logging/recording on forwarding systems sees only an encrypted connection.
Also OpenVPN is in my eyes more secure than a simple username/password encrypted connection (as PPTP offers). So, the secret to encrypt the connection is better protected as with PPTP.
If a VPN provider is used to tunnel the traffic into the internet (to hide it from the systems inbetween when there is no own server available), the encryption method of the VPN provider is relevant. For example, SwissVPN only offers PPTP or OpenVPN.
ipaqkiller said:
I had to copy tun.ko to /system/lib/modules. I did have to create that directory but when I did, it was loaded every time.
You can make sure by using the lsmod command in the terminal emulator.
Click to expand...
Click to collapse
I don't know if' I'm missing something, but I can't get the module to automatically load on a reboot. lsmod doesn't show tun.ko in the list. I have to issue insmod /system/lib/modules/tun.ko on each startup.
EDIT: Think I've sussed it, will post my details later for anyone who wishes to get this setup for cisco only without installing the openvpn installer.
ritdaw said:
I don't know if' I'm missing something, but I can't get the module to automatically load on a reboot. lsmod doesn't show tun.ko in the list. I have to issue insmod /system/lib/modules/tun.ko on each startup.
Click to expand...
Click to collapse
That's why I use the OpenVPN Settings app from the Market. It allows to activate the module with insmod when OpenVPN is started as this obviously cannot be done by the system automatically.
ipaqkiller said:
I had to copy tun.ko to /system/lib/modules. I did have to create that directory but when I did, it was loaded every time.
You can make sure by using the lsmod command in the terminal emulator.
Click to expand...
Click to collapse
akxak said:
That's why I use the OpenVPN Settings app from the Market. It allows to activate the module with insmod when OpenVPN is started as this obviously cannot be done by the system automatically.
Click to expand...
Click to collapse
Worked that out in the end, I thought it was only specific to OpenVPN connections.
Nevermind...?

[modules] cifs.ko, md4.ko, nls_utf8.ko, stock [4.2 / 4.2.2] 3.4.5-g4e6298b / gaf9c307

I have managed to get CIFS working on stock Nexus 10.
It's quite a bit more problematic on the Nexus 10 than normal.
There are 2 main issues to deal with. Newer versions of the Linux kernel require a UNC variable to be passed to them and the current version of busybox doesn't do this. There is a patch out. I have extracted the patched busybox binary from craigacomez's AOSP Nexus 10 rom.
(Check it out here: http://forum.xda-developers.com/showthread.php?t=1998585 ). Otherwise it should work on the stock mount command if you specify the unc= mount option with the share.
The other issue is the multiuser stuff. If you execute the mount command from inside Terminal Emulator (or a script program) it looks like it mounts ok and you can 'ls' in the directory but it doesn't work for Android apps, they just see an empty directory but if you do it via a 'adb shell' it works fine in Android apps. My theory is ADB is outside of the multiuser stuff. adb actually ships on the device.
1) Unlock bootloader (fastboot oem unlock)
2) Flash recovery adb flash recovery whatever.img
3) Root device (flash CWM-SuperSU-0.98.zip)
4) Install BusyBox (from the market)
5) Copy md4.ko and cifs.ko to device. The files can go anywhere you like. In this example I will just use the root of the sdcard. Some people like them in /system/modules or /system/lib/modules
6) busybox mount -o rw,remount /
7) adb shell
8) Override /system/bin/busybox with the patched version (maybe move it first so it's backed up).
9) insmod /sdcard/md4.ko
10) insmod /sdcard/cifs.ko
11) busybox mount -t cifs -o username=MYUSER,password=MYPASS,unc=\\\\192.168.1.1\\storage //192.168.1.1/storage /data/media/0/cifs/Storage
You will need to manually preform the last 3 commands each time you reboot the device from a adb shell.
NOTE: You can probably get rid of the -o flags completely. In theory the patched version of busybox makes the UNC bit redundant. Possibly you can use the stock busybox with the UNC flag and avoid using the patched one totally. I have just included it to be sure.
Make sure you type 'busybox mount' not 'mount', by default they are different binaries. Otherwise you can remove the /system/bin/mount command and make a new one linking /system/bin/mount to /system/bin/busybox.
Possibly there is some way to get the mount working in the multiuser environment without requiring busybox. If you figure it out please tell ☺
Some threads on the issue:
http://forum.xda-developers.com/showthread.php?p=34397868#post34397868
http://forum.xda-developers.com/showthread.php?t=733490&page=6
http://www.mail-archive.com/[email protected]/msg17650.html
The modules are for 3.4.5-g4e6298b.
EDIT: I added nls_utf8.ko by request
EDIT2: Since adb comes on the device, it is possible to use it to connect to local host:
1) Install cifs modules to /system/lib/modules
2) Install Script Manager from the play store
3) Copy script to device
4) Start SManager
5) Find your script and open it.
6) Tick the su box
7) Hit save
8) Goto home sccreen
9) Add a 'SMShortcuts' widget to your home screen
10) "Add one script shortcut"
11) Choose your script
12) Optionally use this pretty icon ☺
13) Give it a nice name like "Mount Shares"
Here is a shell script...
Code:
#!/system/bin/sh
# Your settings here
USERNAME="USERNAME"
PASSWORD="PASSWORD"
IPADDRESS="192.168.1.1"
SHARE="storage"
MOUNT_POINT="/data/media/0/cifs/Storage"
# If you need to change the mount command edit this
MOUNT_CMD="\
mount -t cifs \
\
-o \
user=$USERNAME,\
password=$PASSWORD,\
unc=\\\\\\\\\\\\\\\\$IPADDRESS\\\\\\\\$SHARE \
\
//$IPADDRESS/$SHARE \
$MOUNT_POINT"
COMMANDS="\
insmod /system/lib/modules/md4.ko; \
insmod /system/lib/modules/nls_utf8.ko; \
insmod /system/lib/modules/cifs.ko; \
$MOUNT_CMD
"
# Starting ADB...
PORT=`getprop service.adb.tcp.port`
setprop service.adb.tcp.port 5555
adb kill-server
adb start-server
stop adbd
start adbd
adb connect localhost
# Make sure we only use the first device (sometimes there is more than one)
SERIAL=`adb devices | head -n2 | tail -n1 | cut -f1`
if [ "$SERIAL" = "" ] ; then
echo "ERROR: Could not find ADB device.";
fi
echo Mounting share via adb...
adb -s $SERIAL shell su root -c "$COMMANDS"
# If you started adb, then stop it here for security:
adb disconnect localhost
stop adbd
setprop service.adb.tcp.port $PORT
start adbd
RESULT=`mount | grep $MOUNT_POINT`
if [ "$RESULT" = "" ] ; then
echo "Mounting failed..."
else
echo "Mounting sucess!"
fi
echo Done... You may close this script window.
EDIT3: Added usbserial.ko, option.ko and usb_wwan.ko
EDIT4: Some users have reported that the need to modify the script to get it working with their version of SU.
EDIT5: I have uploaded modules for 4.2.2, kernel 3.4.5-gaf9c307 but I haven't actually tested them myself (still on 4.2.1). Apparently the adb loophole has also been patched but it is possible to reenable it by putting a RSA key onto the device. Check out this set of instructions here.
EDIT6: I have updated to 4.2.2 on my Nexus 10 and can confirm the new modules work.
You must setup the adbkey or you will get a "device: offline" message. By default adb when adb first runs it tries to create the keys in the $HOME dir which is /data/.android, but the data directory isn't accessible by the 'shell' user.
I got it working simply by setting the HOME variable to /sdcard and restarting the adb server in the script then Android popped up a query (I have update the script above).
IMPORTANT: The Android Media scanner recursively scans folders for media to add the the database so it shows up in programs like Google Music. On large shares this can be a long process and use heaps of battery life. To prevent this add a blank file with the name ".nomedia" to the root of your mount points (or each individual share if you aren't used 1 folder for all your mounts). This will stop music showing up in programs though.
If you find that the device stops responding (the launcher might work but apps fail to load) or you get reboots (often after the previous bug) this is probably due to a bad wifi connection.
Is it posible to make a CWM flash file?
Great
This is great progress, do you know if there is some way I can use the same to mount my usb OTG with ADB shell so that I can read/write to my pen drives from my android apps/file managers?
I have tried using the busybox mount but that didn't work, do I need the modified mount or will none of this help anyway?
alias_neo said:
This is great progress, do you know if there is some way I can use the same to mount my usb OTG with ADB shell so that I can read/write to my pen drives from my android apps/file managers?
I have tried using the busybox mount but that didn't work, do I need the modified mount or will none of this help anyway?
Click to expand...
Click to collapse
Code:
busybox mount -t FSTYPE /dev/block/sda1 MOUNT_LOCATION
Example:
Code:
busybox mount -t vfat /dev/block/sda1 /storage/sdcard0/usbotg
craigacgomez said:
Code:
busybox mount -t FSTYPE /dev/block/sda1 MOUNT_LOCATION
Example:
Code:
busybox mount -t vfat /dev/block/sda1 /storage/sdcard0/usbotg
Click to expand...
Click to collapse
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Although I don't have nexus 10, I am having the similar mounting issue on my nexus 7 until I saw this post.
Advise about "adb shell" really helps me resolve the multiuser issue.
Thanks for sharing.
Any chance you could post the nls-utf8.ko for utf8 support?
Thanks!
H3g3m0n said:
1) Unlock bootloader (adb oem unlock)
Click to expand...
Click to collapse
Isn't it fastboot that unlocks the bootloader, and not adb? (unless adb can do it too; I've only heard of fastboot though)
momulah said:
Is it posible to make a CWM flash file?
Click to expand...
Click to collapse
Not a high priority right now as currently you need to do the manual adb shell stuff by hand to get things mounted, a little extra setup work isn't a huge difference.
alias_neo said:
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Click to expand...
Click to collapse
Are you mounting in a 'adb shell' or locally in something like terminal emulator? My OTG cable won't be here for a while so I can't really test myself.
weasal said:
Any chance you could post the nls-utf8.ko for utf8 support?
Thanks!
Click to expand...
Click to collapse
Posted, haven't tested it but it seemed to insmod fine.
espionage724 said:
Isn't it fastboot that unlocks the bootloader, and not adb? (unless adb can do it too; I've only heard of fastboot though)
Click to expand...
Click to collapse
Yeh typoed, i'll fix that now.
Currently I'm thinking of ways to hack around the 'adb shell' requirement, as a basic hackish fix would be to make a program that turns on adb wireless, connects to the local device and issues a command. Of course possibly there is a 'proper' way to do mounting. Another lazy way for those with their shares on a Linux system would be a script issue commands to the server via a ssh, getting it to log back into the phone and mount stuff over adb wireless.
alias_neo said:
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Click to expand...
Click to collapse
I've been working on getting OTG support natively in my AOSP based custom ROM and I have had some success... check out my ROM for details
H3g3m0n said:
Currently I'm thinking of ways to hack around the 'adb shell' requirement, as a basic hackish fix would be to make a program that turns on adb wireless, connects to the local device and issues a command. Of course possibly there is a 'proper' way to do mounting. Another lazy way for those with their shares on a Linux system would be a script issue commands to the server via a ssh, getting it to log back into the phone and mount stuff over adb wireless.
Click to expand...
Click to collapse
Just wanted to thank H3g3m0n as I was able to successfully mount over adb. Also came up with a workaround to bypass connecting to a PC, grabbed the arm fastboot binary from this thread and installed it on my nexus 7. Used it to connect wireless adb on the 10 and ran the mount commands on the 7.
H3g3m0n said:
Posted, haven't tested it but it seemed to insmod fine.
Click to expand...
Click to collapse
Thanks, I'll give it a try!
You might find my posts #156 and #162 at http://forum.xda-developers.com/showthread.php?t=1781411&page=17 helpful.
Sorry for the noob ? ...
What are the KO's do?
What is the practical use of then.
Sorry I did a little research on then but I could not find an answer in layman terms
Thank you for allowing me to learn.
Sent from my toroplus using xda premium
spdwiz18 said:
Sorry for the noob ? ...
What are the KO's do?
What is the practical use of then.
Sorry I did a little research on then but I could not find an answer in layman terms
Thank you for allowing me to learn.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
http://en.wikipedia.org/wiki/Loadable_kernel_module
craigacgomez said:
http://en.wikipedia.org/wiki/Loadable_kernel_module
Click to expand...
Click to collapse
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
spdwiz18 said:
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
These modules are needed to enable support for CIFS (Windows share) mounts...
spdwiz18 said:
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
Basically you can setup a shared folder from a remote computer. It allows you to have files on another system accessible as if it was part of the internal storage in the device.
Just found out that Android ships with the adb binary on the device itself (after crosscompiling it myself :/, oh well the experience was useful).
It should be possible to setup a script to start the adb server, connect to the localhost and execute the mount without too much difficulty.
Ok, added a script and instructions to the front page for simple on tablet mounting.

[MOD] Moddifed framework for bluetooth tethering and bypass check UAMDL

Hello everyone.
I have been able to modify the framework-res.apk file to enable bluetooth tethering for UAMDL from T-Mobile
While I was making the changes in there I also removed from it the call to tethering provisioning and changed the csc files needed too.
So this is for stock UAMDL T-Mobile rooted roms.
I have included the files below to install it if you want.
It does go without saying to backup everything first.
Download from Google Drive
Use the following ADB commands to successfully copy over to the framework folder. Does need to be done via ADB.
Copy new framework-res-mod.apk to root of internal sd card.
adb shell stop (this will cause the screen on your phone to go black that is fine)
adb shell mount -o remount,rw /system
adb shell cp /sdcard/framework-res-mod.apk /system/framework/framework-res.apk
adb shell chmod 644 /system/framework/framework-res.apk
adb shell start (screen will come back on and look like phone is booting again)
after that you can use your favorite root file brower to copy and replace the files customer.xml and feature.xml in the system/csc folder.
If after this you are having problems with getting google play to install apps you might need to master reset.
I want to thank elesbb for help with getting this thing to be able to be compiled and also with the adb instructions to get it copied to the phone without needing a custom recovery but just root.
Awesome man. One question though, so wireless tethering works or only bluetooth tethering?
Yes.
Wireless hotspot, bluetooth (my main goal) and wired tether are working.
Ooops I goofed in the customer.xml file with the APN used for tethering.
I used apn epc.tmobile.com when it should be epc.t-mobile.com
For the time being you can adjust that I will upload a fixed copy tomorrow when I can be at my computer again.
Actually was able to edit and reupload from phone.
It is fixed now.
Apk File not shared for download.
Sorry about that.
Should be fixed.
Give it a try again.
this is what I get
c:\windows-sdk\platform-tools>adb shell stop <<<< phone screen doesnt go black
c:\windows-sdk\platform-tools>adb shell mount -o remount,rw /system
mount: Operation not permitted
c:\windows-sdk\platform-tools>adb shell cp /sdcard/framework-res-mod.apk /system
/framework/framework-res.apk
cp: /system/framework/framework-res.apk: Read-only file system
c:\windows-sdk\platform-tools>adb shell chmod 644 /system/framework/framework-re
s.apk
Unable to chmod /system/framework/framework-res.apk: Read-only file system
am i missing something here?
Sounds like the kernel is not running in insecure mode.
Try installing and enabling insecure adbd with this app and try again
http://forum.xda-developers.com/showthread.php?t=1687590
TheArtiszan said:
Sounds like the kernel is not running in insecure mode.
Try installing and enabling insecure adbd with this app and try again
http://forum.xda-developers.com/showthread.php?t=1687590
Click to expand...
Click to collapse
Thanks man we'll give it a shot after I get off work tonight and let you know how it happens
Sent from my SGH-M919 using xda premium
So far I thought I had bluetooth working on this since it shows as a option in the tethering program but when go to pair with something it does not see or be able to use that profile for internet even though it is enabled on the phone.
Wasn't able to test at the time since I had to send in my tablet but have came to find out that this was not working.
I will continue to try and see what I missed or what I can find.
If anyone has a idea that would be helpful thank you.
Is it possible to implement mod on this Framework mate
http://www.mediafire.com/download/z98oy0q9axmcavv/framework-res.apk

[Q] debian kit fails

Did anyone successfully install debian kit on the galaxy note 10.1 (2014) ?
I tried,
sh /storage/emulated/0/debian-kit-1-6.shar
unpacks properly, but then nothing happens. A wizard is supposed to start.
I tried both 1-6.shar from Doviak, and 1-5.shar from sven-ola
I did the following. Start with unrooted device. Accept KK OTA upgrade. Now
I have SM-P600 with Android 4.4.2. Root with CF. This fails.
Flash openrecovery-twrp-2.6.3.3-lt03wifiue.img.tar with Odin. Then boot into TWRP and
install UPDATE-SuperSU-v1.94.zip. Now some apps ask for root access and it seems to be
granted; installed sdfix, and at least one app (aplinequest) that could not write after
the KK upgrade can now write to extsdcard.
Installed Debian Kit app. All green checks, except red Xs for "Kernel modules supported"
and "Valid 'su' command found". But I know su is working. (I think there was a red X by Debian
Kit already unpacked)
Transfer debian-kit-1-6.shar to device. I follow instructions, Install connectbot. Give 'su'.
Run sh /storage/emulated/0/debian-kit-1-6.shar
Get error messages (I didnt record them), such as md5sum not found, and
a couple of other binaries not found. I give echo $PATH and then look for these binaries
in my path. They are not there. So I install BusyBox Free. Run the shar file again. I
get a list of files extracted, but then nothing happens. Now I see that debian kit wants
to use its own busybox and I didnt need to install busybox, but debian kit did not work
in any case.
I try to run /data/local/deb/autorun with sh autorun. Exits with "Unsupported CPU or architecture"
Investigate and find shell var CPU is set correctly to "armel" on first past, but when the script
runs again with exec, CPU is ''. So I hardcode CPU=armel. Then I can get a little further.
And so on and so on, hardcoding CPU in all the scripts. Trying to get the scripts to see the
correct binaries, etc. Now I have a diskimage installed, can't go forward and can't uninstall.
If anyone can shed some light....
update
Deleted everything and started over. Using adb shell. I notice
that the installer says
Included busybox failed.
and tries to use system tar, sed, etc, which it cannot find.
However, If I put #!/system/bin/sh at the top of debian-kit-1-5.shar
And run ./debian-kit-1-5.shar rather than sh ./debian-kit-1-5.shar,
then the script runs for quite a while and extracts a lot of files.
It fails eventually with
ash: id: Permission denied
In fact, from the adb shell I get
126|[email protected]:/data/local # id
uid=0(root) gid=0(root) context=u:r:init:s0
[email protected]:/data/local # ./deb/armel/busybox ash -c "id"
ash: id: Permission denied
126|[email protected]:/data/local # ./deb/armel/busybox ash -c "/system/bin/id"
ash: /system/bin/id: Permission denied
More Update
It seems that in some cases the user 'shell' has permission to do something, but 'root' does not.
One thing stopping the debian kit install process is that root running a shell located under /data cannot run any executables via
passing a string on the command line. They can run commands interactively (maybe because the command
line uses exec ?). But the user 'shell' can run executables this way. E.g. I copied /system/bin/mksh to the /data partition.
[email protected]:/ $ su
[email protected]:/ # /data/local/bin/mksh -c "id"
/data/local/bin/mksh: id: Permission denied
1|[email protected]:/ # /system/bin/mksh -c "id"
uid=0(root) gid=0(root) context=u:r:init_shell:s0
[email protected]:/ # su shell
[email protected]:/ $ /data/local/bin/mksh -c "id"
uid=2000(shell) gid=2000(shell) context=u:r:init:s0
There are a few posts scattered around other forums mentioning the same problem when trying to
install debian kit, but no responses even recognized that there was a problem.
The solution was to install an selinux permissive kernel. Then installation
went normally.
I think I can help.
injola said:
Did anyone successfully install debian kit on the galaxy note 10.1 (2014) ?
I tried,
sh /storage/emulated/0/debian-kit-1-6.shar
unpacks properly, but then nothing happens. A wizard is supposed to start.
I tried both 1-6.shar from Doviak, and 1-5.shar from sven-ola
I did the following. Start with unrooted device. Accept KK OTA upgrade. Now
I have SM-P600 with Android 4.4.2. Root with CF. This fails.
Flash openrecovery-twrp-2.6.3.3-lt03wifiue.img.tar with Odin. Then boot into TWRP and
install UPDATE-SuperSU-v1.94.zip. Now some apps ask for root access and it seems to be
granted; installed sdfix, and at least one app (aplinequest) that could not write after
the KK upgrade can now write to extsdcard.
Installed Debian Kit app. All green checks, except red Xs for "Kernel modules supported"
and "Valid 'su' command found". But I know su is working. (I think there was a red X by Debian
Kit already unpacked)
Transfer debian-kit-1-6.shar to device. I follow instructions, Install connectbot. Give 'su'.
Run sh /storage/emulated/0/debian-kit-1-6.shar
Get error messages (I didnt record them), such as md5sum not found, and
a couple of other binaries not found. I give echo $PATH and then look for these binaries
in my path. They are not there. So I install BusyBox Free. Run the shar file again. I
get a list of files extracted, but then nothing happens. Now I see that debian kit wants
to use its own busybox and I didnt need to install busybox, but debian kit did not work
in any case.
I try to run /data/local/deb/autorun with sh autorun. Exits with "Unsupported CPU or architecture"
Investigate and find shell var CPU is set correctly to "armel" on first past, but when the script
runs again with exec, CPU is ''. So I hardcode CPU=armel. Then I can get a little further.
And so on and so on, hardcoding CPU in all the scripts. Trying to get the scripts to see the
correct binaries, etc. Now I have a diskimage installed, can't go forward and can't uninstall.
If anyone can shed some light....
Click to expand...
Click to collapse
I have the same tablet and I tried to answer you several times but when I give exact instructions they don't let my reply get to the thread for some reason. So I'll have to be less specific, sorry. Anyway. I rooted with an omnirom based setup. 412. Homemade. Once you get the debian-kit-1-6-testing.jpeg and you've unloaded it to you your root directory try:
#sh /data/local/deb/mk-debian -i
Follow the usage correctly and until your done testing leave:
-h
At the end of the script. But be sure to set it to armel and 2047 and wheezy and set the mirror to:
deb. .org/dists/wheezy/ main contrib non-free
Kali
catch all the protools and for the gpg licence use google search my username KeizerPaPa and I'll give you the gpg on my + account. Goodluck. ]
---------- Post added at 06:40 PM ---------- Previous post was at 06:28 PM ----------
KeizerPaPa said:
I have the same tablet and I tried to answer you several times but when I give exact instructions they don't let my reply get to the thread for some reason. So I'll have to be less specific, sorry. Anyway. I rooted with an omnirom based setup. 412. Homemade. Once you get the debian-kit-1-6-testing.jpeg and you've unloaded it to you your root directory try:
#sh /data/local/deb/mk-debian -i
Follow the usage correctly and until your done testing leave:
-h
At the end of the script. But be sure to set it to armel and 2047 and wheezy and set the mirror to:
deb http .org/dists/wheezy/ main contrib non-free
Kali
catch all the protools and for the gpg licence use google search my username KeizerPaPa and I'll give you the gpg on my + account. Goodluck. ]
Click to expand...
Click to collapse
Make sure you piece the above together correctly, they wouldnt let me type it all together. Thats deb http: //http
Then .kali then .org/dists....... have fun. If ya get stuck on the gpg search me and ask. KeizerPaPa
A reason why mine failed at first was because "Debian kit" is set to resolve ip addresses using "only" your Primary DNS Server (DNS 1). When I finally pinged my Primary DNS server, I found it was not functional. My Secondary DNS server (DNS 2) was functional (this also explains why my internet was slower than it should have been while browsing the internet)
I changed my Primary DNS server by
1) going into the WIFI settings
2) long-pressing on the WIFI I was connected to
3) choosing "Mofify..."
4) checking the "Show advanced..." option
5) changing from "DHCP" to "Static"
6) entering a functional DNS server (such as 8.8.4.4) for "DNS 1"
- Hyp

Categories

Resources