Is it actually possible to use Firefox mobile remote debuging? - android

Mozzila decided they don't need error console in their mobile browser, so they instead invented "Remote debugging", something that would probably be cool if it ever worked. I tried it few times before just for fun, but never got it to connect. Now I really needed and I was also expecting the feature improved over time. Not at all.
Enable on Mobile
To enable remote debugging, you're first supposed to allow USB debugging and then remote debugging in Firefox Mobile. These are just two buttons, so it's no problem. My Firefox Mobile version is 39.0.
Enable in browser
In browser, as I understand it, WebIDE is used, which is a special Firefox debugger and virtualiser. Can be launched using Shift+F8. The connected USB device is supposed to appear in menu:
I was wondering why I see Install ADB Helper in menu when it's already installed. It's probably because this:
I guess Firefox hates me.
The question
Since Mozzila obviously disabled their only means of debugging mobile Firefox, I came here to ask for some workaround. With all those mobile web pages I expect lot of you guys know how to debug them. Possible solutions I'm looking for:
Debug over IP instead of USB. I am much more comfortable with using WiFi than USB.
Force Firefox to enable ADB Helper even though it's incompatible.

To get ADB Helper working, update your Firefox desktop version. It looks like you're on 37, which is unsupported, insecure, and ~6 months out of date.
Wi-Fi Debugging landed in Firefox 42: https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/Debugging_Firefox_for_Android_over_Wifi

Related

Testing Network Throttling using chrome dev-tools for an android app does not work

Goal: Test android app on a physical device with various network connectivity issues (Offline, Slow 3G etc). Android Emulator is not an option for my use case.
Steps I have tried: (Remote Debugging)
Connect my phone to my computer and open the app on my phone.
In chrome "Remote devices" I select my phone and click on inspect for the app opened on my phone. Once the Developer Tools window opens I can play with my app from chrome.
In the network tab I can see the throttling options but when I try the offline option or any other option to slow down the network it does not seem to work.
The offline/slow 3G option works for a normal website but not when using remote devices. I wanted to see if anyone has tried this option before and if it worked for them and I would appreciate suggestions for better alternatives to test an android app with various network settings other than using chrome remote devices?
Other options I have come across are installing a proxy app on PC/Mac and configure networking throttling in the app and then create a wifi hotspot and connect my phone with it. This is possible but it would be tricky with the tools we use so I was looking for a more elegant solution.
The "remote devices" of chrome won't affect your native app. It will not even affect another opened tab other than the one you are "inspecting" and throttling. If you really need to throttle your device's network connection you should use a proxy. A good and easy to handle proxy is Charles web debugging. The free version will cover your needs if you are willing to reconnect every 30 mins. But for sure I recommend you purchase a license since this tool will be always helpful and developers also need to make a living ;)
Here is an example of setting up Charles as a proxy for an android device.
It's a little unclear from your question, but I'm assuming that you're using Remote Debugging to run a webpage on an Android device, and you want to profile the webpage from a laptop/desktop connected to the Android.
One workaround is to use https://www.webpagetest.org/easy. This actually runs your webpage on a real Motorola G device in Virginia with a Slow 3G connection. It gives you a detailed report on your loading performance, just like the DevTools Performance panel.
One of the DevTools team members said that Remote Debugging + Network Throttling should work, but neither of us has tried it recently.

Chrome reports 2 different SSL padlock states for same site from different computers, possible infection?

This is a doozy. Will try and make it short and sweet.
Hitting the same web URL, my desktop computer reports SSL errors for many sites. HTTPS with a red line strike through and red padlocks in descriptions.
My mobile phone does not, on wifi or mobile network. My remote computer in a remote location does not. Green padlocks for all.
Chrome browser is up to date and latest (Version 47.0.2526.106 m) across all browsers. Extensions are identical across local and remote desktop.
I cannot for the life of me figure out what is loading up on my desktop at home that isn't loading up on my remote desktop at my moms. Both machines are on Win7 64 bit. Both chrome browsers are same version, same extensions running. Recently 'reset' chrome on my home desktop to try and fix. Worked first time, but problem came back. Second time it didn't do anything. Very random. Somedays i'll get green padlocks, somedays i get red ones. The intermittent nature of this has me dumbfounded. Also, all of the browsers actually state the info about an obsolete cipher, but only my desktop deems it to be redlock worthy. It also claims there are other insecure resources on the page, but my remote desktop and mobile device don't see them. wth?!?!
Should i completely remove chrome and reinstall it from scratch? Since i already used the 'Restore settings to their original defaults.' button in the settings.. this doesn't seem like it would cure it.
One other aspect i haven't been able to determine is whether my computer being hardwired into a TL-WPA4220 WiFi Powerline Extender is the culprit. Does the fact the extender/repeater not a direct connection to my router have anything to do with this? Altho my mobile phone is connected to that wifi access point and it shows a green padlock on the same sites so....
I am currently running a virus scan as we speak.
Any guesses? Thanks in advance.
Attached pics.
home desktop | remote desktop
if you look at the dialog at the home desktop closely you will see
connection is not private because the site loaded an insecure script
Since you don't see the message at the remote desktop it is very likely that a locally installed browser extension causes this problem. Thus check your extension, disable them and retry.
I figured it out after thinking long and hard about the differences between computers. Ultimately i realized that all the working browsers were either fresh installs, or browsers that didn't have my user account connected and synced through it.
I ultimately went to Settings > Sign In / Disconnect your Google Account... and made sure all cookies/data for the local device were removed. Then i did a full browser 'Reset'.
Once i had the default standard page asking me to sign it, i tested the offending page. It showed up with a green padlock. I tested other offending bank sites as well. All green.
From there i closed the browser and restarted it, and when presented with the page to log into my google account, it resynced all my bookmarks/toolbars/extensions.
And still all green padlocks. Hopefully this is a permanent fix but for now it's all holding well. I also got slightly more updated to Chrome Version 47.0.2526.111 m.
My assumption here is that somewhere between the time i first synced my chrome to my google account years ago on this computer, whatever version it was then (42,45,who knows) that one of the updates to chrome didn't take well on my desktop and was creating conflicts only on this computer under this local profile. No amount of clearing cookies or resetting the browser could fix it. Fully disconnecting my account and re-syncing my chrome to my google account is what fixed the HTTPS / SSL padlock problems.
Not sure if this will help anyone, seems i was the only one on the internet with this problem. :P

Debugging a site issue specific to a phone

I have a website which I hot on WinHost.com. In the past few weeks, I have found that 80% of the time, a page stalls while loading. That is, it never loads. It just sits there trying to load.
This issue never happens on my PC.
It does however, happen on my wife's phone too (Same network provider).
We both use Chrome, but it happens on all browsers.
I found a 'Phone Emulator' site, and have no such problems. It seems to load the mobile version fine. It only happens on my, and my wife's phone. The site is in development, so we're the only users.
Is there a way I can debug what is happening, on my phone? Like in the Desktop version of Chrome, I can F12 and see what's happening?
The site runs Asp.Net MVC4, with a Twitter Bootstrap UI.
Sure you can do it by using the latest version of Chrome.
https://developer.chrome.com/devtools/docs/remote-debugging
After connecting, just open the Inspector tool, and select Network tab in PC, reload the page to see what happen.
I found the easiest way was to share my phones internet connection, tether my laptop to it, and run Chrome, pressing F12 to get the network traffic.

Cannot debug Android from Eclipse

I have a problem debugging apps on my Samsung Galaxy S3, (GTI9300, I believe this is also known as the international version) from Eclipse.
The thing is, debugging actually worked for a time and then it just stopped working. I've tried quite a few things to make it work again. I'll describe my whole experience briefly, to keep you from suggesting things I've already tried, and save us all some time.
When I first got my phone, debugging didn't work. When I plugged in my phone, the system detected it, and I could use it almost like a storage drive (using Media Transfer Protocol or some such thing) But when I started Eclipse and tried to debug, the debugger didn't see the phone.
I googled some, learned that I had to install some specific driver. I honestly don't remember which driver it was, but I believe it was an official one (from Samsung's website). Once I installed this driver, Windows would no longer detect my phone as a storage device. But the debugger did see it, and I was able to debug a few simple apps that I'd made. I could easily live with this tradeoff.
Then I got busy with other stuff and set Android development aside. I came back to it this weekend - after 2 or 3 months - only to find that it no longer works. No matter what I do, the debugger does not detect my phone (Windows still won't detect it either).
I tried all the first aid solutions like restarting Eclipse, rebooting my computer and rebooting the phone. Just for the sake of completeness, I do have usb debugging enabled on my phone.
The only major change of the whole setup that I can think of is that my phone's OS has recently updated. I don't know the exact version it was before, right now it's Android version 4.1.2 (Kernel version 3.0.31-1160235, if this is useful to anyone). I tried plugging the phone into other computers, it gets recognized as a media/storage phone. I can't install the Android development tools and try debugging on any of these computers - I'm stuck with the one I've got.
I've tried reinstalling the usb drivers for my phone. It didn't help. In desperation (and against my better judgement) I tried installing Samsung's software, first AllShare Control, and eventually Kies. None of it helped. When I run Kies, it gives me the option of connecting through USB or via WiFi. However it won't detect my phone when I plug it in. When I click "Troubleshoot connection" (or some such thing, unfortunately Kies decided to use my native language instead of English) it starts reinstalling the USB driver. This process takes quite a while, and fixes nothing.
I'm basically out of ideas, I don't know what to try next. Any help would be appreciated.

how to run wifi peer to peer application in android emulator..?

I am trying to develop an wifi peer to peer application in android(4.+).
The problem here is how to test it.
I tried to run that application in android emulator. there was no option to configure wifi in the settings menu, i also tired to enable wifi using the dev tools application form the emulator but it didn't work, And through all my googling over 3 days and i found that Android emulator is not supported the Wifi.
So i opted for androidx86 4.0eeepc using virtual box and tired to add devices both wifi and bluetooth (my app uses both bluetooth and wifi) but only bluetooth device got added and it did not work. But my virtual box detected the wifi and bluetooth devices. I just couldnt get them work with the virtual machine.
I tried everything like manually adding the addresses using terminal emulator app in androidx86 and used netcfg through the android commandline but neither of them worked.
Please suggest and guide me on the correct path to run these kind of applications that use wifi and bluetooth in android.
Thanks in advance.
First, be sure you enabled WiFi Direct in the Android settings for the two virtualbox instances:
Settings --> Wireless & Networks --> More... --> Wi-Fi direct
It has been stated as working once that hurdle was overcome, and I'm sure many have experienced the same...just be sure to enable wifi direct
I would have tried exactly what you've already tried by naturally moving from the emulator to the androidx86 project. Although unreliable, I'd recommend looking at and finagling this, if you haven't yet seen it: Android: Simulate WiFi in the emulator? and How to disable/enable network, switch to Wifi in Android emulator? most likely wouldn't have full out success but may be enough to let you know that it works or would work.
As far as testing WiFi-Direct/WiFiP2P without you yourself having a device/s, I would recommend:
Trying out some of the fiddling as mentioned above. And read through tons of logs.
You could always crowd source it to friends, or release an apk on a forum for a small group of testers.
Of course, both of those options are not ideal, seamless, or fast. So, I'd definitely hope you get VirtualBox VMs of AndroidX86 4.0 running as it should once you check that setting and pair up the WiFi APs :-)
A near future solution:
This might be something to look into in near future.
Real devices are hosted by Samsung and screens are streamed to your PC.
http://developer.samsung.com/remoteTestLab.do
According to an email responded by samsung, which I sent to them earlier.
They only have 2 devices (Galaxy Nexus) running on Android v4.0 at the moment.
Unfortunately they are not physically close to each other. (One in Korea, One in Poland)
But they are planning to upgrade existing Galaxy S2 to v4.0.
Because recently Samsung have released v4.0 upgrade for S2.
Once they done that, there will be plenty of v4.0 phones.
And you can ask them which 2 phones are physically close so you can test Wifi Direct.
--------------------------- EDIT ---------------------------------
There are plenty of ICS devices there now, which you can test P2P.
Check with them which 2 are physically near to each other.
Per the docs:
Each instance of the emulator runs behind a virtual router/firewall
service that isolates it from your development machine's network
interfaces and settings and from the internet.
You have to use Network Redirection, as described in the Developer Docs. In essence, you forward specific ports using ADB. Therefore you cannot test certain things like broadcast messages.
I have tried doing what you are trying to do, and-- while I won't say it is impossible (anything is possible in computing with enough time, money, and persistence)-- I wasted a lot of time on it. You cannot treat the Android emulator as a normal network peer-to-peer device. As far as I have been able to find, it is a fork of QEMU, and that is just how the QEMU emulator is implemented.
QEMU itself does support TUN/TAP bridging, but I was never able to get it working with the Android emulator. If you want to go that route, you may want to investigate running Android in the QEMU emulator, rather than in the SDK's emulator (I see you are already trying a similar approach with VirtualBox).
Unfortunately the best way to test a peer-to-peer networking program in Android is with physical devices at this time-- unless your app can suffice with the port forwarding method.
See Also: Issue 26:Emulated Androids should be able to communicate via TCP, and Google
(Repeating here my answer elsewhere.)
In theory, linux (the kernel underlying android) has mac80211_hwsim driver, which simulates WiFi. It can be used to set up several WiFi devices (an acces point, and another WiFi device, and so on), which would make up a WiFi network.
It's useful for testing WiFi programs under linux. Possibly, even under user-mode linux or other isolated virtual "boxes" with linux.
In theory, this driver could be used for tests in the android systems where you don't have a real WiFi device (or don't want to use it), and also in some kind of android emulators. Perhaps, one can manage to use this driver in android-x86, or--for testing--in android-x86 run in VirtualBox.

Categories

Resources