I was trying to run androidx86-ieee.iso on VM and everything works fine. The VMs (Android) can connect to the internet via bridge mode successfuly, share Bluetooth via my dongle on Windows 7 host (since no error is thrown while activating Bluetooh). But the devices cannot detect each other (or my phone for that matter).
I recall in the previous VMWare version (v7) when there was no support to share Bluetooth device, I could connect to my phone when only 1 of the VM had control over it (Sharing Bluetooth was not permitted). But I required Bluetooth sharing.
My netcfg shows 192.168.1.x address for both devices since they are connected to the internet, but cannot see each other on bluetooth.
Any help is greatly appreciated.
Answering my own question. I googled aplenty and found out the 2.3 Gingerbread android x86 iso I was using is buggy as confirmed by a user here Android-x86 Google Group and had requested him for the ISO he compiled after fixing the Android 2.3 code, which he rightfully obliged.
For anyone viewing this or having the same problem, the fixed ISO is uploaded here.
Related
I am working on developing an app for Android that requires a bluetooth connection. I currently have the most recent version of android x86 installed using virtualbox on my linux mint 18.3 OS. Everything is working fine except one thing, bluetooth.
When I go to turn the bluetooth on, it says it is on temporarily, but then shuts off when I go back to the bluetooth settings.
Image of bluetooth settings turned on
Bluetooth settings after returning to general settings
As you can see, the bluetooth doesn't actually turn on. I have ported my laptop's integrated bluetooth to virtualbox, and my output from hciconfig -a is as shown below:
I really would like bluetooth to work so I can properly test the app, any help is appreciated!
I have the same problem with VirtualBox and androidx86 under windows 10 with a USB stick Cambridge Silicon Radio and
found this page
http://andex.exton.net/?p=726
which states
Bluetooth doesn’t work. (You can enable Bluetooth and see units though).
I would try with a hd install without Virtual Box.
bye
Device : Google Nexus 5 (Un-rooted)
Host Machine : Window 7
I want to Access Android Device as a Modem (using COM or Modem Port) and eventually pass AT Commands using HyperTerminal/Teraterm.
So after connecting the device to a Windows Box, The Device gets detected under Device Manager, but doesn't show any COM Port (other than the default COM0).
On right click and update driver, It shows it cannot find drivers.
I have tried the following options, but no luck with any.
Tried this on a rooted Nexus 5, but doesn't expose which /dev/smdX to use. Tried all combinations, didn't work.
Tried the Google USB Drivers from the Google Android's Website. No changes.
From here. I Installed drivers from LG Electronics, No changes in COM Port.
Universal Naked Driver helped me get to ADB Shell interface, but
thats not what I want.
In all of the Above procedure USB Debugging was enabled (Just saying).
I also heard the phone has to put into Modem mode to fire AT Commands.
If so, How do I do that ?
Or Is this a device driver Issue ?
Conclusion:
I want to access the Modem of the Android Device and fire AT Commands to it.
Could you please tell what am I missing ?
Any help on this would be really appreciated.
It's difficult to give an exact answer to this question, because it depends on how the manufacturer has implemented the device drivers. Unfortunately, there is a lot of information that isn't in the public domain.
It is possible, that the manufacturer has implemented some code to convert the device to a modem. Doing this yourself is device-specific, and proprietary. You might be able to get hold of a converter, for example bundled with the manufacturer's dashboard application for the PC, if such a thing exists.
Some devices don't expose the modem port at all. They may be visible as a network adapter, or as an always-connected LAN connection. If the device is visible as a network adapter, then you can access it via Windows Mobile Broadband API, or via MBIM for some newer devices.
To check if the device is visible as a network adapter, and get information about it, open a cmd box and type
netsh mbn show interfaces
Windows Mobile Broadband API doesn't give as many details as a good AT command set, but performs basically the same functions. MBIM is an industry standard interface with similar functionality, available on the Windows 8+ desktop via the Mobile Broadband DeviceServices API, for devices that support it.
If the device shows as an always-on LAN connection, there is probably a proprietary, high level interface for mobile functionality.
Driver behaviour can differ for different operating systems. If you have the chance to try the device on Windows Vista, 7 and 8, you may see different behaviour.
If I wanted to implement an app for 2 Android devices so I can connect from one to the other via bluetooth, how can I do that via emulator?
HINT: I don't have an Android phone for simulating.
Thanks.
There are few limitations for the Android Emulator. The functional limitations include:
No support for placing or receiving actual phone calls. You can simulate phone calls (placed and received) through the emulator console, however.
No support for USB connections
No support for device-attached headphones
No support for determining network connected state
No support for determining battery charge level and AC charging state
No support for determining SD card insert/eject
No support for Bluetooth
Source Link
I've found the way to debug bt-enabled application on virtual android with real devices. That is not ADK emulator, and it has some flaws, but it definitely works.
Host computer works under Windows 7 64-bit with standard BT stack. Step by step:
Install VMWare Player. It's free for non-commercial usage
Create virtual machine. Set "Other linux 2.6" guest OS type.
Choose reasonable amount of RAM. Remove SCSI disk and printer. Add IDE disk at least 1 GB, keep USB controller, ensure if bluetooth devices are shared with host computer.
Download android installation from android-x86.org. I recommend Android 4.0 RC2 for EEE PC
Point VM's CD to the ISO file.
Start the VM and install android. Unfortunately, it's impossible to add google account there for now.
Switch to android console(Alt-F1 inside virtual machine) and ask for IP address(use netcfg command, look at eth0 network interface), then switch back to GUI(Alt-F7)
On host machine, run adb.exe connect your-vm-ip
Enjoy!
Here is an illustrated tutorial in Russian
You can't use an emulator to test bluetooth apps. The BluetoothAdapter will remain null in emulator. You would need a bluetooth device.
Reference link of accepted no longer exists and I can't seem to find any other pages the mentioned the exact same details. However, it is mentioned in this docs:
What's not supported
The Android Emulator supports most features of a device, but doesn't include virtual hardware for:
WiFi
Bluetooth
NFC
SD card insert/eject
Device-attached headphones
USB
The watch emulator for Android Wear doesn't support the Overview (Recent Apps) button, D-pad, and fingerprint sensor.
While most end users of phones and tablets tend to use earlier API levels, Android Wear and Android TV users tend to use the latest releases. Using recent releases can give you a better experience using the emulator.
In addition to elmot's method (which I have seen on various places on the net and has been reported to work), you may also consider this utility which seems to do exactly what you would need:
https://github.com/cheng81/Android-Bluetooth-Simulator
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.
I'm a newbie to the Android development world but have some experience with embedded systems.
I'd like to use an Android phone (4.x or higher) to control other devices via its USB port. We want to set the Android device as a USB host, so solutions where other devices play the host role (e.g. Android Open Accessory Development Kit's Arduino) will not meet our goal.
We are currently using Eclipse-SDK for Android development and successfully have compiled/run/debug several apps. However, I have a very naive question. I was wondering if there is a way one could use the USB port of the development host PC as an input to the Android Virtual Device emulator.
I realize that an easier way to debug the USB-host apps we are writing would be by having a real device. However, the price of the new Ice Cream Sandwich devices is somehow far away from our reach and not the ideal way for debugging an application at its early stages.
I appreciate any help you can provide me with.
The Android Open Accessory Dev kit has been backported to 2.3.4 see here http://developer.android.com/guide/topics/usb/adk.html
So install CM7 or earlier (http://www.cyanogenmod.com/) on your HTC desire and you should be good to go!
Look at the example projects for the 2.3 SDK should help get you going in the right direction.
Path to SDK Samples for me was C:\Program Files\Android\android-sdk\samples
If your looking for USB Host Support basically control and talk to another usb device such as mouse, keyboard, usb thumb drive etc the following should help.
Nexus One as USB Host: http://sven.killig.de/android/N1/2.2/usb_host/
USB Host: External USB devices to Android phones?
Official Android SKD UsbDevice Class: http://developer.android.com/reference/android/hardware/usb/UsbDevice.html
You should take a look at this project, its a great reference
https://code.google.com/p/mover-bot/