Ping doesn't work on Samsung Devices - android

I wanna use a library from GitHub named "Android Network Tools", but actually I have a complex issue when using that. I tested the ping of this library on different type of devices and Android versions, and it worked correctly and was perfect, but when I tested it on my Samsung Galaxy S8 with android 8 I saw pinging external IP(like google.com) didn't work! at the first, I thought it happens in Android 8 and tried to solve it, but I launched it in Android 8 with the emulator that was ok! after that, I decided to test it on my friend's Samsung J7, you can guess that what happened, it didn't work again!
Right now, I'm really really confused because of I don't know why it happens just on Samsung devices, do you have any idea?

The problem is not with your code , the problem is occurring because of Device manufacturers They change the Os according to there need which causes issue with ping , see
Why does ping works on some devices and not others?

Finally, I found the problem, this was about control running apps in the background! when that feature be enabled some methods and ping doesn't work correctly in real-time.
power saving mode

Yes this is correct. With any power saving mode active, on at least some Android o/s versions, ping will not function. I'm guessing icmp echo reply packets are dropped. A sniffer app would confirm this. It is possible icmp echo (outbound) packets aren't even generated. Crazy in my view. Most ping utilities are very lightweight and I would have thought consume minimal power. I'm running a Samsung J5 / Android v.7.0. Ping started working once I disabled power saving mode

Related

is multicasting enabled on the nexus 5x or 6p?

I am developing a multicasting application and I need to know if multicasting is enabled on the nexus 5x or on the 6p. I currently have the nexus 5 and it is disabled.
Ref: https://code.google.com/p/android/issues/detail?id=51195
Rooting and recompiling the kernel to enable multicasting isn't an option so I will be purchasing a new device to test with. I would like to use a nexus product, however I need to know if it is enabled.
Could someone who owns one please check if "/proc/net/igmp" exists? any file manager application will work. Sorry, I know it's a simple request. I've googled it, called google support, and looked through an emulator's files all without an answer.
Also If they don't support it, could someone please recommend a device that does support multicasting?
Thanks!
I do have a Nexus 5X with Android 6.
ls /proc/net/ig* shows:
igmp6
I also have an old ASUS K010 tablet which have both igmp and igmp6.
I tried multicast using GStreamer in Android. Both work, just make sure you have the right permissions.

Nexus 5 not showing on connected devices

Up until recently I had no problems debugging with my Nexus 5 connected via USB cable to my PC (Windows 10).
Suddenly I cant see my device in the "Connected Devices" list. can anyone help?
Can't see nexus 5
Driver is OK
And I can edit my files through the explorer.
Help?
try to use original nexus cable when connect from device to computer , i have this case and solve it when use this cable
Today I noticed the same behavior on my LG Nexus 5 with Android M.
I also remember two icons that are in status bar when you were connected through USB. One for charging and one for debugging. None of these is showing anymore.
My only guess is that some hardware is damaged. Probably the USB connection port. Yesterday I remember that my cable was causing unstable connection and the 2 icons I mentioned were appearing/disappearing repeatedly in one second(flickering). It looks like it was bad connected due to broken cable until finally it burned some internals.
I've seen other people complaining for the same reason. Nobody has discovered or posted any reasonable answer yet.
After years of programming apps and using n5 for debugging, this is for sure not driver (I'm on Mac OS X), adb, or other typical problem.
The only thing is left to try is restoring to factory.
UPDATE:
Before posting this answer I tried everything, changed a lot of cables, even tried booting into safe mode. And just after posting this answer here, I tried one more time to reconnect all cables from my MacBook and the charging icon appeared again!
My new guess is: there might be some bug probably related to battery.
When started noticing the problem first my phone battery was about 11%. Now that it works again it's on 50%+.
And I say it's a bug because I know for sure that I ran a lot of apps from Android Studio with phone being below 50%.

Android Wifi Direct inter-workability between ICS and JellyBean

I was testing WiFi Direct on my Android Devices. I have a Galaxy Note running 4.0.4, and a Nexus 7 running 4.2.1. I followed exactly from the official API on WiFiDirect.
After the devices found each other, if I try to make them "connect", I'll be able to see an invitation of WifiDirect connection, but after I "accept" this invitation, the status of this device changed to "invited", while on the other device (which sent the invitation initially) got no response. Thus a wifi-direct connection can never be made among the two device.
I then tried the official Wifi-Direct Demo program... but it doesn't seems to work also.
After I rooted my Galaxy Note and upgraded it to 4.1.2, this problem disappeared.
But I wonder if anyone encounter same problem as I did? And if so how did you solved it?
Thanks a lot.
To find the exact reason you have to look at the log report of wpa_supplicant(this can be seen from the log report using android debug bridge(adb) available in adt bundle with eclipse # http://developer.android.com/sdk/index.html ).
I have faced a similiar problem while trying to connect androd 4.0 tablet with ubuntu laptop.The problem was with the dhcp server which was supposed to assign an IP address after the Group negotiation is successful but it wasn't respondig may be due to difference in the versions or some other reason.This wasn't a bug with wifi direct.
I fixed it by assigning a static IP address to the p2p_wlan0 interface on both the devices.

multi-touch support for Android emulator, programmatically

From latest SDK, multi-touch is supported via tethered phone. I'm wondering whether it is supported programmatically. In other words, can we test multi-touch triggered functionalities using automated test suites?
No it's not. but from sdk-r20 you can use multitouch in emulator with a real phone connected to computer. check this out.
I'm working on this same problem. First I'm tested to make sure all tethered signals are going through (I had to modify the SDkController app to even get the connection). Now I'm trying to figure out why, when I click the side of the screen or anywhere, it only shows up on the top right (while the debugger from the emulator is giving the correct thing). The error is explained here.
I did however figure out how to do it wirelessly and through the terminal. If that is what you're asking the procedure is pretty much the same. You need to root your device or do the adb port command (with USB connected) before un-connecting your device, and it'll work wirelessly.

Android - Problems with tcpdump when in ad-hoc mode

Currently I'm working on a project that demands using Android and tcpdump.
A short description of what I do:
I want sniff packets using android. I have built an android application which does this using by "tcpdump".
Basically the application initiate tcpdump, which dumps the captured packet in a file (in the sdcard). Then I process the captured packets just by opening the file.
The problem :
When the wifi is in managed mode, everything works fine. But, when I put the wifi device in "ad-hoc" the wireless device stops working.
I'm using "Samsung Captivated S" (SGH - I897), and in order support "overhearing" (promiscuous mode) and ad-hoc I installed the latest "Cyanogen 7" rom ( cm_galaxysmtd_full-126.zip, from: http://download.cyanogenmod.com/?type=nightly&device=galaxysmtd)
I don't know how to solve this and I would really need your help. I suspect
that "wpa_supplicat" is to blame for that, but most probably I wrong.
Thanks in advance,
Ps: I should also mention that I start an adhoc network using my laptop. Then two android devices join the adhoc network. The android devices (SGH-I897) join the network without a problem. All the devices can ping each other.
only solution for this is described here.
http://www.44actions.com/?p=273

Categories

Resources