Hello guys,
I am trying to send AT commands on Galaxy S (I9000). The problem is that I am not sure which device is the modem. Searching into file /system/build.prop, i get that the device used by rild is /dev/ttyS0 (rild.libargs=-d /dev/ttyS0). But there is no ttyS0 file into /dev directory, and as a result I get an error when trying to send commands to it.
Executing the command cat /proc/tty/drivers I get the following results:
/dev/tty /dev/tty 5 0 system:/dev/tty
/dev/console /dev/console 5 1 system:console
/dev/ptmx /dev/ptmx 5 2 system
/dev/vc/0 /dev/vc/0 4 0 system:vtmaster
rfcomm /dev/rfcomm 216 0-255 serial
g_serial /dev/ttyGS 250 0 serial
ttySAC /dev/s3c2410_serial 204 64-67 serial
pty_slave /dev/pts 136 0-1048575 pty:slave
pty_master /dev/ptm 128 0-1048575 pty:master
unknown /dev/tty 4 1-63 console
From these I guess that the modem is /dev/ttyGS0. So i go on and execute via adb or terminal IDE application:
stop ril-daemon
cat /dev/ttyGS0 &
echo -e 'AT+CGSN\r' > /dev/ttyGS0.
But I get no response. I have also installed busybox and execute
echo "AT+CGSN\r" | busybox microcom -t 500 /dev/ttyGS0
but i get no response either.
Reading this thread http://forum.xda-developers.com/showthread.php?t=1471241 I didn't get much help.
Does anyone know what is going on or what can I do to get response from modem?
Thank you in advance
Related
Im running a userinit file for the cyanogen 3.91 rom and if tried to run it with now success. it just shows 000 on the swap when i run free. and when i try to run cat /proc/ramzswap it says that no such directory exists,
this is the userinit.sh
#!/system/bin/sh
# $Id: userinit.sh,v 1.2 2009/07/17 01:11:25 noah Exp $
# Do not change the #! above and expect that shell to invoke this script at
# boot, because a2sd forcibly calls this with /system/bin/sh.
PATH=/system/xbin/bb:$PATH
# Currently our busybox build uses the "small" modprobe and insmod,
# which don't support parameter arguments. (The usage string lies.)
uname_r=`uname -r`
moddir=`find /system/modules -type d -name $uname_r`
insmod=/system/bin/insmod
if $insmod $moddir/compcache/xvmalloc.ko &&
$insmod $moddir/compcache/ramzswap.ko disksize_kb=32768
then
sysctl -w vm.swappiness=40
mknod /dev/ramzswap0 b 253 0
swapon /dev/ramzswap0
fi
exit;
# eof
yeah dude im getting the same problem. Ive asked everywhere and no one can help. the only difference i notice are the two lines (exit; # eof) at the end of yours.
EDIT:
DUDE, just got it to work, this is what to do:
go here: http://forum.xda-developers.com/showthread.php?t=537236
download the text file.
open the text file delete everything and paste this in:
Code:
#!/system/bin/sh
# $Id: userinit.sh,v 1.2 2009/07/17 01:11:25 noah Exp $
# Do not change the #! above and expect that shell to invoke this script at
# boot, because a2sd forcibly calls this with /system/bin/sh.
PATH=/system/xbin/bb:$PATH
# Currently our busybox build uses the "small" modprobe and insmod,
# which don't support parameter arguments. (The usage string lies.)
uname_r=`uname -r`
moddir=`find /system/modules -type d -name $uname_r`
insmod=/system/bin/insmod
if $insmod $moddir/compcache/xvmalloc.ko &&
$insmod $moddir/compcache/ramzswap.ko disksize_kb=32768
then
sysctl -w vm.swappiness=40
mknod /dev/ramzswap0 b 253 0
swapon /dev/ramzswap0
fi
save it and close it
rename it userinit.sh and type this in adb:
Code:
adb push userinit.sh /system/sd
adb shell chmod 755 /system/sd/userinit.sh (not sure if needed being safe)
adb shell reboot
hope that helps
did you get it to work on 3.91?
ive tried everything and still swap is 0 0 0 0
I'm not an expert in the whole compcache thing I haven't followed it but doesn't "free" in terminal show swap, not compcache? I believe "cat /proc/ramzswap" shows compcache compression..
alritewhadeva said:
I'm not an expert in the whole compcache thing I haven't followed it but doesn't "free" in terminal show swap, not compcache? I believe "cat /proc/ramzswap" shows compcache compression..
Click to expand...
Click to collapse
"free" shows the swap file total, used and free. ramzswap goes more indepth
ubernicholi said:
"free" shows the swap file total, used and free. ramzswap goes more indepth
Click to expand...
Click to collapse
ah ok. Thanks for the clarification.
i tried the cat /proc/ramzswap and it said the file or directory could not be found
Compache DOES NOT WORK ON 3.9.1
I have been trying to get the get-a-robot-vpnc (http://code.google.com/p/get-a-robot-vpnc/) package to work on my HTC Vogue for some time. I am currently running the eclair 2.1 mssmision build.
I have gotten pretty far I think.. but need some help. Here are the steps that I have followed up until now.
1. Compile tun.ko module for Vogue
I followed these instructions to get the vogue kernel locally: http://www.androidonhtc.com/get_involved
After step 5 in that list, make sure to select the "Device Drivers->Network Device Support->Universal TUN/TAP device driver support" (select as M for kernel module)
After step 6, build the kernel modules: "make modules ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-"
2. Put tun.ko onto the vogue permanently
Set the /system partition writable
Code:
adb -d shell
#su
#mount -o remount,rw /system
In a different terminal, push the tun.ko over to the /system/lib/modules dir
Code:
adb -d push ~/android-kernel/kernel/drivers/net/tun.ko /system/lib/modules
Back in the first terminal, set the system volume to read only again.
Code:
#mount -o remount,ro /system
3. Install the latest get-a-robot-vpnc package
Download from website and push to device:
Code:
adb -d install VPN_Connections_v097.apk
It is installed to /data/data/org.codeandroid.vpnc_frontend directory.
I put in the correct settings to connect to my companies vpn. (These same settings work perfectly on my ubuntu machine)
When I run the program I see on logcat:
Code:
D/VPN_Connections( 658): Password is numeric
D/VPN_Connections( 658): password **********
D/VPN_Connections( 658): done interacting with vpnc
D/VPN_Connections( 658): process stderr:
D/VPN_Connections( 658):
D/VPN_Connections( 658): Attempt to read vpnc process id did not return anything
D/VPN_Connections( 658): process had died, return as failed connection
But when i shell into the phone I see the process running:
Code:
/ # ps | grep vpnc
658 10049 107m S org.codeandroid.vpnc_frontend
710 0 1300 S /data/data/org.codeandroid.vpnc_frontend/files/vpnc -
At this point the network is hosed and in order to get it back I have to reboot.
Trying it manually
In order to see what is happening with vpnc, I shell into the phone and run the program manually.
First I need to ensure the tun.ko is loaded:
Code:
#su
#insmod /system/lib/modules/tun.ko
You can see the command string for vpnc in the /data/data/org.codeandroid.vpnc_frontend/files/lastConnection.txt file.
I run this command:
Code:
/data/data/org.codeandroid.vpnc_frontend/files/vpnc --script /data/data/org.codeandroid.vpnc_frontend/files/vpnc-script --no-detach --debug 1
Enter the correct vpn data and see this output: (i cut out my company specific info and ip addresses)
Code:
vpnc version ERSION
IKE SA selected psk+xauth-3des-md5
NAT status: NAT-T VID seen, no NAT device detected
IKE SA selected psk+xauth-3des-md5
NAT status: NAT-T VID seen, no NAT device detected
Enter Username and Password.
Banner: Welcome <cut> Remote Access User.
got address <xxx.xxx.xxx.xxx>
Connect Banner:
| Welcome <cut> Remote Access User.
backing up dns and resolve.conf
vpnc-script ran to completion
IPSEC SA selected aes128-sha1
VPNC started in foreground...
vpnc[582]: can't open pidfile /var/run/vpnc/pid for writing
At this point I seem to be connected.. but can't actually ping anything on my company network, or get to any websites.
I am not very strong with networking.. so I feel that maybe the routes are not being setup properly.. but I don't know:
Here is my routing table after the connection (took out company ip)
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
68.28.145.85 * 255.255.255.255 UH 0 0 0 ppp0
xxx.xxx.xxx.xx 68.28.145.85 255.255.255.255 UGH 0 0 0 ppp0
default * 0.0.0.0 U 0 0 0 tun0
Any help would be appreciated.
Hey - I posted a response in the vpnc thread:
http://forum.xda-developers.com/showpost.php?p=5625056&postcount=109
Also, to amend - if you try it manually again, try this:
/data/data/org.codeandroid.vpnc_frontend/files/vpnc --script /data/data/org.codeandroid.vpnc_frontend/files/vpnc-script --no-detach --natt-mode cisco-udp --debug 1
Hi:
I want make my GTi9305 boot up with adb,
so i modified init.rc in "on boot" trigger like this setprop sys.usb.config adb,
but there is no adb device present when booting, even if i write this:
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18d1
write /sys/class/android_usb/android0/idProduct D002
write /sys/class/android_usb/android0/functions adb
write /sys/class/android_usb/android0/enable 1
start adbd
but it still not work, who can help me?
Hi, everyone!
I have a Samsung Galaxy S (GT-I9000) with Replicant 4.0 0005 installed and "adb push local_file remote_file" isn't working (and I've "adb pushed" files before).
I know this isn't a Replicant forum, but I think the problem must be ADB or Linux configuration related, so I hope you guys can help me.
I can see the phone both in recovery mode and with the phone on and USB Debugging on:
# lsusb
...
Bus 001 Device 005: ID 18d1:4e22 Google Inc. Nexus S (debug)
...
I can see phone with adb as well:
# adb devices
List of devices attached
30337E817E6100EC device
I can boot phone into recovery mode via "adb reboot recovery" so I assume adb recognizes and communicates with the phone.
As Replicant doesn't support proprietary firmwares I must push wifi and bluetooh firmwares into /system/vendor/firmware. First, I create the directory:
# adb shell
~ # df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 189592 48 189544 0% /dev
/dev/block/mtdblock2 256000 208868 47132 82% /system
/dev/block/mtdblock3 17920 2336 15584 13% /cache
~ # mount -o rw,remount -t yaffs2 /dev/block/mtdblock2 /system
~ # mkdir /system/vendor/firmware
Then, I try to push the files:
~ # adb push fw*bin /system/vendor/firmware/
error: device not found
If I leave adb shell and run "adb push fw*bin /system/vendor/firmware/" in Linux command line all I get is the list of the options of adb command but no errors.
Any clues where to look to make adb push work? (I haven't seen any message in /var/log/messages)
Thanks in advance
SOLVED. adb doesn't seem to support wildcards, so I used this script, provided by Paul Kocialkowski, main maintainer of Replicant project:
ls fw* | while read file; do adb push $file /system/vendor/firmware/; done
Dears maybe now I can make double post but I hang on that step from guide from this site.
Phone is after wipe data and I need rescue data from it for that I want to make RAW image to recover data.
What I do until now:
adb forward tcp:5555 tcp:5555
adb shell
su
/system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0
but in results get:
1|ASUS_I001_1:/ # /system/xbin/busybox nc -1 -p 5555 -e /system/xbin/busybox dd
5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0 <
nc: invalid option -- 1
BusyBox v1.32.0-Stericson (2020-07-18 18:33:24 EDT) multi-call binary.
Usage: nc [OPTIONS] HOST PORT - connect
nc [OPTIONS] -l -p PORT [HOST] [PORT] - listen
-e PROG Run PROG after connect (must be last)
-l Listen mode, for inbound connects
-lk With -e, provides persistent server
-p PORT Local port
-s ADDR Local address
-w SEC Timeout for connects and final net reads
-i SEC Delay interval for lines sent
-n Don't do DNS resolution
-u UDP mode
-v Verbose
-o FILE Hex dump traffic
-z Zero-I/O mode (scanning)
1|ASUS_I001_1:/ #
Why I get that this parameter is invalid:
nc: invalid option -- 1
And to the end, if that don't work to me, next step also don't work.
Open another Cygwin terminal and type:
Code:
adb forward tcp:5555 tcp:5555
cd /path/to/store/the/backup ---> this is correct, should I creat some folder on HHD and insert here his name?
nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0.raw --> that means I should have ftp serwer?