Cannot map to a Samba Share, but xp notebook can? - Mogul, XV6800 General

Hello,
Problem: Cannot get my pda (HTC Mogul) to connect to a samba share.
Behavior: Resco File Explorer (V7.03) keeps asking for a password when I try to map to a samba share.
Basic Setup Information:
ROUTER: Dynamic Type Configuration acting as a DHCP Server. The DNS is Automagic from the IP.
LAPTOP (windows xp): 192.168.1.38 / 255.255.255.0
SAMBA_PC (Suse 11) : 192.168.1.36 / 255.255.255.0
PDA (Sprint Mogul, Windows Mobile 6 Pro): 192.168.1.37 / 255.255.255.0
-----Below is my current smb.conf---------------
# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
# samba-doc package is installed.
# Date: 2008-06-07
[global]
workgroup = MCHOME
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \\%L\profiles\.msprofile
logon home = \\%L\%U\.9xprofile
logon drive = P:
usershare allow guests = Yes
use spnego = No
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
[profiles]
comment = Network Profiles Service
path = %H
read only = No
store dos attributes = Yes
create mask = 0600
directory mask = 0700
[users]
comment = All users
path = /home
read only = No
inherit acls = Yes
veto files = /aquota.user/groups/shares/
[groups]
comment = All groups
path = /home/groups
read only = No
inherit acls = Yes
[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775
[linuxpodcasts]
comment = downloaded shows
inherit acls = Yes
path = /home/jason/Podcasts/
read only = No
[lacie]
comment = storage drive
inherit acls = Yes
path = /media/disk/
read only = No
------------------------------------------
PDA TESTING:
1) Ping \\LINUX-PD\lacie
Results: 24.A.B.C
Note: this number is unknown. It is only similar to the Router Configuration in the first number!
2) Ping 192.168.1.36
Results with Reply from 192.168.1.36
3) Ping \\LAPTOP
Results 24.A.B.C
Note: This is the same number as PDA Testing #1
-------------------------------------------
LAPTOP TESTING:
------------------------------------------
1) Ping \\LINUX-PD
Results: 24.A.B.C .Qu1nnLAN
Note: This is the same number as PDA Testing #1 including the name of the wireless lan!
2) Ping 192.168.1.36
Results with reply from 192.168.1.36
3) Ping 192.168.1.37
Results with reply from 192.168.1.37
4) net view \\LINUX-PD
<< shows all of the shares , Not Shown, The Command Completed successfully >>
5) net use g: \\LINUX-PD\lacie
<< asks for username / pass. The Command Completed successfully >>
6) From File MANAGER, I can sucessfully browse the network and view the shares!
From XP > Command Prompt: ipconfig /all
Windows IP config:
Host Name: LAPTOP
Primary DNS Suffix:
Node Type: Unknown
IP Routing Enabled: NO
WINS Proxy Enabled: NO
DNS Suffix Search List: Qu1nnLAN
...
Ethernet adapter wireless Network Connection
Connection Specific DNS Suffix: Qu1nnLAN
...
Connection
DHCP Enabled: Yes
Autoconfig Enabled: Yes
IP Address: 192.168.1.38
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1
DHCP Server: 192.168.1.1
DNS Servers: 24.W.X.Y
24.W.X.Z
------------------------------------------
LINUX-PD TESTING: (Includes steps from Chapter 38 of the Samba Checklist)
------------------------------------------
1)
Ping 192.168.1.37
Results in Reply form 192.168.1.37
2)
linux-pd:~ # smbclient -L LINUX-pd
Enter password:
Domain=[MCHOME] OS=[Unix] Server=[Samba 3.2.0rc1-22.1-1795-SUSE-SL11.0]
Sharename Type Comment
--------- ---- -------
profiles Disk Network Profiles Service
users Disk All users
groups Disk All groups
print$ Disk Printer Drivers
linuxpodcasts Disk downloaded shows
lacie Disk storage drive
IPC$ IPC IPC Service (Samba 3.2.0rc1-22.1-1795-SUSE-SL11.0)
Photosmart_3200 Printer Photosmart 3210
HIDDEN Disk Home Directories
Domain=[MCHOME] OS=[Unix] Server=[Samba 3.2.0rc1-22.1-1795-SUSE-SL11.0]
Server Comment
--------- -------
LAPTOP Pentium M750 1.86GHz, 1GB RAM
LINUX-PD Samba 3.2.0rc1-22.1-1795-SUSE-SL11.0
Workgroup Master
--------- -------
MCHOME LINUX-PD
3)
linux-pd:~ # nmblookup -B LINUX-PD __SAMBA__
querying __SAMBA__ on 127.0.0.2
192.168.1.36 __SAMBA__<00>
4)
linux-pd:~ # nmblookup -d 2 '*'
added interface eth0 ip=fe80::213:20ff:fecb:7cbb%eth0 bcast=fe80::ffff:ffff:ffff:ffff%eth0 netmask=ffff:ffff:ffff:ffff::
added interface eth0 ip=192.168.1.36 bcast=192.168.1.255 netmask=255.255.255.0
querying * on 192.168.1.255
Got a positive name query response from 192.168.1.36 ( 192.168.1.36 )
192.168.1.36 *<00>
5)
linux-pd:~ # smbclient //LINUX-PD/lacie
Enter HIDDEN password:
Domain=[MCHOME] OS=[Unix] Server=[Samba 3.2.0rc1-22.1-1795-SUSE-SL11.0]
smb: \>
6)
linux-pd:~ # nmblookup -M MCHOME
querying MCHOME on 192.168.1.255
192.168.1.36 MCHOME<1d>
-------------------------------------------
Additional Questions:
1) how do you find the machine name on the PDA similar to how the LINUX-PD = 192.168.1.36?
2) why is the wireless router name showing up when I ping?
I am at a loss.
I will be posting to a Resco forum as well.
Any suggestions helping this newb would be great.
Thank you for your time
qu1nn
_______________

same problem here. did u fix it?

I got it working, albeit Resco doesnt remember the password correctly and it has to be entered in every time I start a new session.
make note and read before you read the next thread....
that resco is aware of the issue:
http://resco.net/pocketpc/explorer/faq.asp?faq=network#85
Check out my posting on rescos forums for what I had to do:
http://resco.net/forums/ShowPost.aspx?PostID=17810
I hope this helps
qu1nn

Related

isdn > linux-pbx > SIP > BT-Bridge > XDA2

Hi,
today i received my first ISDN call on my MDA2
- get you ISDN-Card working under Linux
- install asterisk
- install bluez
- install brctr
- BluetoothGPS.cab
- install X-Lite on the XDA2
Code:
/etc/asterisk/modem.conf
[interfaces]
context=remote
driver=i4l
stripmsd=1
dialtype=tone
mode=immediate
msn=YourMSN
device => /dev/ttyI5
/etc/asterisk/sip.conf
[general]
[olli]
type=friend
username=olli
host=dynamic
canreinvite=no
add somthing like:
exten => 500,2,Dial(SIP/olli)
[from-sip]
exten => olli,1,Dial(SIP/olli)
exten => olli,2,Hangup
in the /etc/asterisk/extensions.conf
Give the XDA a static IP and connect to the
Bluez(0) Network Accesspoint.
Than configure the BT-Bridge:
Code:
modprobe usb-uhci
modprobe uhci
modprobe usbcore
mount /proc/bus/usb/
modprobe bluez
modprobe l2cap
modprobe bnep
modprobe sco
modprobe rfcomm
modprobe hci_usb
hcid
sdpd
pand -s -r NAP -M
ifconfig eth0 down
ifconfig eth0 0.0.0.0
ifconfig bnep0 0.0.0.0
brctl addbr pan0
ifconfig pan0 192.168.1.19
brctl addif pan0 eth0
brctl addif pan0 bnep0
route del default
route add default gw 192.168.1.1 dev pan0
brctl showmacs pan0
ping the XDA.
Install X-lite
configure:
user: olli (see sip.conf)
sip-proxy: IP of the astrisk server
mark sent internal IP
Now your can receive IP and PSTN calls.
PSTN by dialing your MSN+500 from any phone.
Has anybody an idea how to configure asterisk
to forward SIP-Calls from the xda to PSTN ?
bye Olli
The XDA a static IP and connect to the
Bluez Network Accesspoint. how is the other?
_________________
Ip pbx

[WinXP Script] Extend Search Companion

Annoyed by the fact that Search Companion doesn't return the text string you specified even though you indicated All Files & Folders?
This handy script allows you to extend the PersistenHandlers to include other extension. In my case, I added: provxml and rgu. Copy and paste the following code into notepad and save as a .VB script (ex: xp_persisthandler.vbs). Execute the script and specifiy the file extension you wish to include in Search Companion.
Code:
'Add files to Search for files containing text
'© Doug Knox - 11/04/2001
'This code may be freely distributed/modified
Option Explicit
On Error Resume Next
Dim WshShell, N, P, P1, P2, ItemType, MyBox, FileType, Title, Prompt, RegKey, X
Set WSHShell = WScript.CreateObject("WScript.Shell")
P = "HKEY_CLASSES_ROOT\."
P1 = "\PersistentHandler\"
N = "{5e941d80-bf96-11cd-b579-08002b30bfeb}"
Prompt = "Enter the file extension for the file you wish to add." & vbCR
Prompt = Prompt & "Examples: txt, adm, inf"
Title = "Enter File Type"
FileType = InputBox(Prompt, Title, "")
If FileType = "" Then
MyBox = MsgBox("You left the box blank.",4096,"Error.")
Set WshShell = Nothing
WScript.Quit
Else
'Check to see if there is already a PersistentHandler default value
RegKey = P & FileType & P1
X = WshShell.RegRead(RegKey)
End If
'MyBox = MsgBox("The PersistentHandler value for ." & FileType & " is: " & X,4096,"Results")
'Set WshShell = Nothing
If X = N Then
MyBox = MsgBox("This value already exists, and is correct." & vbCR & "No Changes were made.", 4096, "No Changes")
Set WshShell = Nothing
WScript.Quit
End If
If X <> N AND X <> "" Then
MyBox = MsgBox("The Persistent Handler value already exists and is different." & vbCR & "No changes were made.", 4096, "No Changes")
Set WshShell = Nothing
WScript.Quit
End If
If Err.Number <> 0 Then
WshShell.RegWrite RegKey, N
MyBox = MsgBox("The Registry has been updated." & vbCR & "Restart your computer.", 4096, "Done")
Set WshShell = Nothing
End If

CM7 MAC Address Fix

I could not post directly in the development thread as I joined simply to share my solution. If anyone can confirm and prepare a better guide please post to CM7 thread by whistelstop.
You will need your factory mac address.
MAC Addresses all being the same is due to the nvs_map.bin file required by the tiwlan driver. dmseg driver will tell you it is looking for it and defaulting mac address.
I am running CM7 mileage will vary in stock rom.
http://www.omappedia.org/wiki/Porting_MCP_WLAN_to_Android#TxBiP_Calibration
I used the calibration instructions in terminal emulator on cm7 Kindle as "su"
#wlan_cu –b
# / w p 1 l 2 f 2
# / t b v 21
# / t b t 1 0 0 0 0 0 0 0
#/ q
New nvs_map.bin file will be ceated in /data/misc/wifi/
#cp /data/misc/wifi/nvs_map.bin to /sdcard/nvs_map.bin
connect to linux/windows host copy file to pc
open with hex editor I used xvi32 for windows.
link to my source for instruction for byte order and editing.
http://processors.wiki.ti.com/index...ce_(CLI)_User's_Guide#Editing_the_MAC_Address
Short instructions:
Editing the MAC Address
After the TX BIP runs, there is a new file called nvs_map.bin in Linux that contains the MAC address and the calibration data. The document SWAA044_NVS_INI_File_Functions_AN.pdf contains the format of the NVS file. If MAC address fields are manually edited with a hex editor, the byte order should be low byte first, followed by the high byte:
MAC address low register (offset 0x01 to 0x02)
MAC address LSB (offset 0x3 to 0x06)
MAC address high register (offset 0x08 to 0x09)
MAC address MSB (offset 0x0A to 0x0D)
The MAC address LSB and MAC address MSB, respectively, are shown in bold in the
following code for 08:00:28:12:34:56:
0000: 01 6d 54 56 34 12 28 01 71 54 00 08
For 11:22:33:44:55:66:
0000: 01 6d 54 66 55 44 33 01 71 54 22 11 00 00
Using a hex editor, you should change the bold numbers to the MAC address you
want to use.
Be careful about byte order and look closely at examples.
Good Luck
Please confirm instructions yourself and use at your own risk
Just tried that and it worked beautifully!
Thanks for that - great find!
TheKid2 said:
I could not post directly in the development thread as I joined simply to share my solution. If anyone can confirm and prepare a better guide please post to CM7 thread by whistelstop.
You will need your factory mac address.
MAC Addresses all being the same is due to the nvs_map.bin file required by the tiwlan driver. dmseg driver will tell you it is looking for it and defaulting mac address.
I am running CM7 mileage will vary in stock rom.
As I can not post links you will need to google my text and find correct link (noob)
maybe a moderator can fix for me.
######.omappedia.org/wiki/Porting_MCP_WLAN_to_Android#TxBiP_Calibration
I used the calibration instructions in terminal as "su"
#wlan_cu –b
# / w p 1 l 2 f 2
# / t b v 21
# / t b t 1 0 0 0 0 0 0 0
#/ q
New nvs_map.bin file will be ceated in /data/misc/wifi/
#cp /data/misc/wifi/nvs_map.bin to /sdcard/nvs_map.bin
connect to linux/windows host copy file to pc
open with hex editor I used xvi32 for windows.
link to my source for instruction for byte order and editing.
##processors.wiki.ti.com/index.php/OMAP35x_Wireless_Connectivity_WL1271_Command_Line_Interface_(CLI)_User%27s_Guide#Editing_the_MAC_Address
Short instructions:
Editing the MAC Address
After the TX BIP runs, there is a new file called nvs_map.bin in Linux that contains the MAC address and the calibration data. The document SWAA044_NVS_INI_File_Functions_AN.pdf contains the format of the NVS file. If MAC address fields are manually edited with a hex editor, the byte order should be low byte first, followed by the high byte:
MAC address low register (offset 0x01 to 0x02)
MAC address LSB (offset 0x3 to 0x06)
MAC address high register (offset 0x08 to 0x09)
MAC address MSB (offset 0x0A to 0x0D)
The MAC address LSB and MAC address MSB, respectively, are shown in bold in the
following code for 08:00:28:12:34:56:
0000: 01 6d 54 56 34 12 28 01 71 54 00 08
For 11:22:33:44:55:66:
0000: 01 6d 54 66 55 44 33 01 71 54 22 11 00 00
Using a hex editor, you should change the bold numbers to the MAC address you
want to use.
Be careful about byte order and look closely at examples.
Good Luck
Please confirm instructions yourself and use at your own risk
Click to expand...
Click to collapse
I'll verify tomorrow. Thanks for taking the time to help run this to ground and get a workaround.
** Deleted **
For new driver only ....
so next cm7 build will get the fix
right?
As it was my first post forum would not allow me to post links I am hoping someone will clean up solution and add to development thread.
whistlestop said:
I'll verify tomorrow. Thanks for taking the time to help run this to ground and get a workaround.
Click to expand...
Click to collapse
love this rom , I have four of these running on my router now with original factory mac addresses, Thank You for your work. I know from personal experience hours and hours can just disappear when you get involved with a project of this type.
Is there a way to get the factory MAC address while still in CM7 or do I have to load the stock ROM to get it and then go back to CM7?
I have not found am method other than loading stock software back on device.
If you only have one kindle on your network you most likely will never have a problem.
If you had more than one running cm7 you could have router issues as they all were reporting same mac address. You will not have any issues unless another cm7 kindle shows up on the same wireless access point as yours.
Unless you have a router log or something with your former mac address, I think you have to reload stock to find it. Thats what I did anyway.
Thanks to the OP for posting this; worked like a charm!
direct editing
could we use a hex editor to change the local file on the kindle?
I spotted one at the market place, and combined with SU privileges it might get the job done.
jfb9301 said:
could we use a hex editor to change the local file on the kindle?
I spotted one at the market place, and combined with SU privileges it might get the job done.
Click to expand...
Click to collapse
any hex editor should work. I am so use to using laptop still adjusting to touch keyboard.
Hopefully better instructions
having just stumbled through to OPs instructions (hats off to the OP for finding this). Successfully I might add, I thought I'd write up a hopefully more clear method of achieving this.
As I have had difficulty with the adb.exe command (connection issues, probably from a dodgy connection if I have too many USB devices plugged in) I chose to use applications local to my Kindle itself for as much as I could.
Apps:
adb.exe (the one that came with Kindle_Fire_Utility worked for me) grab a copy of this useful tool here kindle fire utility thread
Root explorer from the android market android market link
HexEditor android market link
Kindle fire
Computer
Data:
Your original MAC address - this might suck to get, as you will have to get it from your Kindle booted to stock Kindle Fire Firmware. I had installed CM7 using TWRP, so I booted to TWRP did a backup of my current CM7 OS, did a restore to the KF OS, booted to stock(rooted) opened up settings/device and nabbed that pesky MAC address, rebooted to TWRP, restored CM7.
Instructions:
connect KF to computer
open the computers start menu and select run, type CMD in the box
navigate to kindle_fire_utility/tools
type command: adb shell
adb should open and start communication with you Kindle
within the shell you have to type the following (be mindful of the spaces as they are important, ignore the #s as they are to make this post put the spaces in):
#wlan_cu –b
# / w p 1 l 2 f 2
# / t b v 21
# / t b t 1 0 0 0 0 0 0 0
#/ q
now use ctrl-c to end ADB, and command:
exit
to close cmd, you are done with windows.
now the kindle part...
open root explorer
/data/misc/wifi
select nvs_map.bin and copy to the sdcard, I made two copies and named the second nvs_map.bin.bak just in case things got screwed from this point on.
exit root explorer
open HexEditor
open /sdcard/nvs_map.bin and change the digits in the very first line of the file
(example from OPs post)
following code for 08:00:28:12:34:56:
0000: 01 6d 54 56 34 12 28 01 71 54 00 08 00 00
For 11:22:33:44:55:66:
0000: 01 6d 54 66 55 44 33 01 71 54 22 11 00 00
save the file
use root explorer to copy it back to /data/misc/wifi
long press the file and set permissions to RW-RW-RW-
Reboot.....
Done
---------- Post added at 04:09 PM ---------- Previous post was at 03:11 PM ----------
I confimed MAC address using my wifi router (DDWRT) is awesome.
Does anyone know a way to get CM7 to cough up the kindles MAC address?
I'm having some difficulties with these instructions. I've tried with the WiFi setting from CM7 on and off, and also with the full instructions from the omappedia.org site, and it's still not working. A quick Google didn't come up with anything.
This is my output (from an ADB shell, obviously):
Code:
# insmod /system/etc/wifi/tiwlan_drv.ko
# start wlan_loader
# ifconfig tiwlan0 up
# wlan_cu –b
ERROR - IpcWpa_Sockets_Open - can't connect the socket
******************************************************
Connection to supplicant failed
******************************************************
ERROR - IPC_STA_Private_Send - error sending Wext private IOCTL to STA driver (ioctl_cmd = 800003, res = -1, errno = 19)
ERROR - driver is not in RUNNING state!
user_main, start
\> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
/ D S
\> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
.../Driver> Start, sTop, stAtus
ERROR - IPC_STA_Private_Send - error sending Wext private IOCTL to STA driver (ioctl_cmd = 8000001, res = -1, errno = 19)
ERROR - Failed to start driver!
I have tried it with and without the first three lines (going straight to wlan_cu -b), and the / D S line is an unsuccessful attempt to start the driver. An attempt to just push through all the commands gives an error message with every line, and does not create the nvs_map.bin file.
Anyone have any ideas?
I had wifi on, and did not run the first 3 commands. No thoughts beyond that.
For reference, I am on the latest CM7 with the updated video stuff by wistlestop (I think)
csyria6919 & jfb9301,
I can confirm, you'll get the errors csyria6919 gets with WiFi OFF - turn on Wifi on the KF and then the ADB commands work without errors.
VERY NICE Fix - +1 thanks to TheKid2!
~J
csyria6919 said:
I'm having some difficulties with these instructions. I've tried with the WiFi setting from CM7 on and off, and also with the full instructions from the omappedia.org site, and it's still not working. A quick Google didn't come up with anything.
This is my output (from an ADB shell, obviously):
Code:
# insmod /system/etc/wifi/tiwlan_drv.ko
# start wlan_loader
# ifconfig tiwlan0 up
# wlan_cu –b
ERROR - IpcWpa_Sockets_Open - can't connect the socket
******************************************************
Connection to supplicant failed
******************************************************
ERROR - IPC_STA_Private_Send - error sending Wext private IOCTL to STA driver (ioctl_cmd = 800003, res = -1, errno = 19)
ERROR - driver is not in RUNNING state!
user_main, start
\> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
/ D S
\> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
.../Driver> Start, sTop, stAtus
ERROR - IPC_STA_Private_Send - error sending Wext private IOCTL to STA driver (ioctl_cmd = 8000001, res = -1, errno = 19)
ERROR - Failed to start driver!
I have tried it with and without the first three lines (going straight to wlan_cu -b), and the / D S line is an unsuccessful attempt to start the driver. An attempt to just push through all the commands gives an error message with every line, and does not create the nvs_map.bin file.
Anyone have any ideas?
Click to expand...
Click to collapse
Hi,
I only used docs as reference. Wifi should be turned on on Kindle. I issued all command from terminal emulator running on Kindle. Hope you have found solution that works for you. Also there are spaces in between just about every letter in the commands.
Let us know if you were successful.
Hello,
I am hearing about cpu utilization issue in another thread. http://forum.xda-developers.com/showthread.php?t=1411895
Can anyone running cm7 and using nvs_map file check utilization connected to secure network. My installation is not exhibiting cpu behavior stuck at 1008 that is being described. Wondering if using calibration file is actually improving performance.
As a side not same file can be used in the current build of ics they are developing in that thread.
cpu scaling issue does not show up on unsecured net. Need a few people to sound off here to determine if my kindles are the only ones not having scaling issue.
Thanks
Is there somewhere in cm7 to check cpu utilization, I looked everywhere ended up downloading task manager from market. Seems like task manager, and performance monitor should be in there somewhere. I am sure I am overlooking something simple.
Thanks
TheKid2 said:
Is there somewhere in cm7 to check cpu utilization, I looked everywhere ended up downloading task manager from market. Seems like task manager, and performance monitor should be in there somewhere. I am sure I am overlooking something simple.
Thanks
Click to expand...
Click to collapse
I used your guide, got CM7 on my device and will check that once I get home.
To check CPU utilization I'd recommend CPU Spy https://market.android.com/details?id=com.bvalosek.cpuspy

[Guide] Mac Spoofing / Changing

After reading several posts on mac spoofing and having failed to find a working thread.I decided to fill in the gaps with my linux knowledge (however little of that I may have).
So this method seems to solve some issues I've seen (MAC not changing because device wasn't downed) in these threads:
http://forum.xda-developers.com/showthread.php?t=1385577
http://forum.xda-developers.com/showthread.php?t=902354
without editing the nvram.txt
I've tested the ip link method on my recently rooted Samsung Tab 2 7.0"
Changing your mac address:
Prerequisites:
*A rooted device
*Busybox
*Terminal emulator
*Turn wifi on from your device's menu, do not connect to any network.
*Open your terminal emulator, now type:
$su
#ip link
*This should list all networking interfaces, identify your wifi device, take note of the name. now:
#ip link set NAME down
#ip link set NAME address 00:11:22:33:44:55
#ip link set NAME up
I believe that when using ifconfig the procedure is as follows:
$su
#ifconfig
*Take note of the device name
#ifconfig NAME down
#ifconfig NAME hw ether 00:11:22:33:44:55
#ifconfig NAME up
After doing the above you can connect to the desired network normally, using the default / other user interfaces.
NOTE: The mac address will be reset when WIFI is switched off.
I have confirmed the ip link method to be working. i.e. transmitted mac address is the new / changed one!
Actually in my case (SGS) i had to restart wifi first and then (while it's starting) quickly change the MAC using:
Code:
busybox ifconfig wlan0 hw ether 00:11:22:33:44:55
Important: It must be done about 500ms after enabling wifi, otherwise it won't work.
If I change MAC when wifi is off it simply returns to the original during next start.
Worked on i9000 with CM9 / 10
pawci0 said:
Actually in my case (SGS) i had to restart wifi first and then (while it's starting) quickly change the MAC using:
Code:
busybox ifconfig wlan0 hw ether 00:11:22:33:44:55
Important: It must be done about 500ms after enabling wifi, otherwise it won't work.
If I change MAC when wifi is off it simply returns to the original during next start.
Worked on i9000 with CM9 / 10
Click to expand...
Click to collapse
So downing the interface before changing and uping afterwards doesn't work?
i want to learn well the mac spoofing
setoPul Wilcox
this is actually incredibly useful, I got MACblocked off a network near college. thanks!
Doesn't work for me
Code:
# su
# ifconfig tiwlan0 down
# ip link set tiwlan0 address 00:11:22:33:44:55
ip: SIOCSIFHWADDR: Operation not supported on transport endpoint
# ifconfig tiwlan0 hw ether 00:11:22:33:44:55
error: SIOCSIFADDR (Invalid argument)
I guess its a kernel/driver problem... at least I know it works on normal Linux systems.
Itcouldbeyou said:
Doesn't work for me
Code:
# su
# ifconfig tiwlan0 down
# ip link set tiwlan0 address 00:11:22:33:44:55
ip: SIOCSIFHWADDR: Operation not supported on transport endpoint
# ifconfig tiwlan0 hw ether 00:11:22:33:44:55
error: SIOCSIFADDR (Invalid argument)
I guess its a kernel/driver problem... at least I know it works on normal Linux systems.
Click to expand...
Click to collapse
Funny that only some manufacturers disable such features. You could always try editing the nvram file? I haven't tried it though.
Isnt it dangerous ?
Script to apply random mac
I've made a script to create a random ghost mac every time I run it on the terminal emulator with su.
Code:
macaddr="52:54:$(dd if=/dev/urandom count=1 2>/dev/null | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4/')"
ip link set wlan0 down
ip link set wlan0 address $macaddr
ip link set wlan0 up
I've named it as gmac.sh and saved it on /sdcard/, thus by running:
Code:
$ su
# sh /sdcard/gmac.sh
the mac is changed.
Regards :cyclops:
Works differently on HTC Desire
Hello,
This is just to "set in stone" somewhere in the Internet that on some devices, you need *not* to down and up the network interface. Otherwise, the network driver will restore its MAC address from hardware/driver settings.
On a HTC Desire, MAC spoofing works this way:
* turn on the wifi interface using the standard Android interface
* run this script :
Code:
macaddr="52:54:$(dd if=/dev/urandom count=1 2>/dev/null | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4/')"
ip link set wlan0 address $macaddr
Best regards,
On some devices (e.g. HTC Desire among others), the wifi GUI still resets the mac address even with the method described in this thread.
worstenbrood has modified the wifi driver so that the mac address can be configured from a text file. It is described here:
http://forum.xda-developers.com/showthread.php?t=1525230
This is compatible with the wifi GUI and solves the problem of the wifi interface reloading its original mac address.
Anyone interested, I have backported his modifications to the latest state of the kernel developement in CM7.
thanks!
I get a 'operation not supported on transport endpoint' error when running the 'ip link set wlan0 address 00:11:22:33:44:55' and a about the same error with busy box.
Thanks for this! Gonna try this later.
damien.courousse said:
Hello,
This is just to "set in stone" somewhere in the Internet that on some devices, you need *not* to down and up the network interface. Otherwise, the network driver will restore its MAC address from hardware/driver settings.
On a HTC Desire, MAC spoofing works this way:
* turn on the wifi interface using the standard Android interface
* run this script :
Code:
macaddr="52:54:$(dd if=/dev/urandom count=1 2>/dev/null | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4/')"
ip link set wlan0 address $macaddr
Best regards,
Click to expand...
Click to collapse
anyone help me mine Hcl me 2G 2.0 i can't change mac please help me....

getevent inside of application: Permission Denied

Hello,
I am using a Galaxy S4 with an S View Cover. This cover has a magnet in it, which the phone uses to "know" if it is closed or open. It also has a little window in it.
All AOSP Roms except the Google Edition Roms for the Galaxy S4 don't support the S View Cover.
So I thought to myself, I should make something that makes the S View Cover useful on AOSP roms. Preferably an App which can be installed on any AOSP rom. So I poked around and found out that I can find out the state of the cover (i.e. open/closed) by using the getevent command inside of an adb shell.
The exact command that gives me the state of the cover is getevent /dev/input/event18
which gives me the events of the device "gpio_keys".
When I close the cover it returns the following numbers:
0005 0015 00000000
0000 0000 00000000
When I open the cover it returns this:
0005 0015 00000001
0000 0000 00000000
So what I need is the last number of the first line. I tried limiting the output of getevent with grep, but I've never used it before and I wasn't successful.
My programming abilities are very limited, especially when it comes to object oriented stuff like java. At work we use ABAP (a programming language for SAP ERP systems) and most of what we do doesn't require any understanding of objects. I already found some stuff that would allow me to run shell commands, but I can't get it working:
Code:
Log.v("MyApp", "Started");
String myStringArray[]= {"getevent","/dev/input/event18"};
String line;
try {
Process process = Runtime.getRuntime().exec(myStringArray);
InputStreamReader inputstreamreader = new InputStreamReader(process.getInputStream());
BufferedReader bufferedReader = new BufferedReader(inputstreamreader);
bufferedReader.read();
while ((line = bufferedReader.readLine()) != null) {
Log.v("MyApp", line);
}
InputStreamReader errstreamreader = new InputStreamReader(process.getErrorStream());
BufferedReader errReader = new BufferedReader(errstreamreader);
errReader.read();
while ((line = errReader.readLine()) != null) {
Log.v("MyApp", line);
}
} catch(java.io.IOException e){
}
Log.v("MyApp", "Finished");
This code produces an error message:
V/MyApp ( 6090): ould not open /dev/input/event18, Permission denied
When I use getevent in the adb shell it works without super user permissions (root). What permissions do I need to get this working?
I'm a beginner and I don't really understand android permissions.
Hmm.. I guess you'll need super user permissions to do something like that.
Try reading the following link: http://stackoverflow.com/questions/7707889/android-system-permissions-through-root
Hope it gives you some pointers in the right direction
If you need proper root support, use roottools. root in java is a pain in the ass, root tools fixes it
http://code.google.com/p/roottools/downloads/list
and i think there is some sysfs interface for this as well.
this is my output btw
Code:
add device 1: /dev/input/event19
name: "sec_touchkey"
add device 2: /dev/input/event2
name: "max77693-muic"
add device 3: /dev/input/event0
name: "pmic8xxx_pwrkey"
add device 4: /dev/input/event17
name: "apq8064-tabla-snd-card Headset Jack"
add device 5: /dev/input/event16
name: "apq8064-tabla-snd-card Button Jack"
add device 6: /dev/input/event18
name: "gpio-keys"
add device 7: /dev/input/event15
name: "ssp_context"
add device 8: /dev/input/event14
name: "step_cnt_sensor"
add device 9: /dev/input/event13
name: "step_det_sensor"
add device 10: /dev/input/event12
name: "sig_motion_sensor"
add device 11: /dev/input/event11
name: "geomagnetic_sensor"
add device 12: /dev/input/event10
name: "temp_humidity_sensor"
add device 13: /dev/input/event9
name: "proximity_sensor"
add device 14: /dev/input/event8
name: "light_sensor"
add device 15: /dev/input/event7
name: "gesture_sensor"
add device 16: /dev/input/event6
name: "pressure_sensor"
add device 17: /dev/input/event5
name: "gyro_sensor"
add device 18: /dev/input/event4
name: "accelerometer_sensor"
add device 19: /dev/input/event1
name: "sii8240_rcp"
could not get driver version for /dev/input/mice, Not a typewriter
add device 20: /dev/input/event3
name: "sec_touchscreen"
and then 4 and 8 gets spammed.
btw also set permissions to 666 when you want to read a file from an app
Can you guys please explain how to parse and understand what the values from this command returns:
Code:
getevent /dev/input/event0
?
I wish to just get the coordinate of the touch event.
From my understanding, even using "event0" isn't safe, as it could be something else that's the touchscreen. Is there anyway to get the correct one?

Categories

Resources