Enable Bluetooth on Android VM - Android Q&A, Help & Troubleshooting

Hi everybody,
I have installed Android-x86 on a Virtual Box VM. I'm trying now to activate bluetooth capability on it.
I plugged-in my usb bluetooth dongle, I mounted it in my VM. Everything is ok so far.
On Android side, I can detect my dongle through the hciconfig and scan with it with hcitool.
The problem appears when I try to enable it in the graphic interface. It always shows me Bluetooth as off.
When I try to move the button on the right to activate it - nothing happens... It completely ignores my attitude.
It is also not possible to enable it through the applications: when an app asks me for an authorization to allow bluetooth, I authorize it to do so but it doesn't succeed.
The error I observe through the adb logs is as follows:
723338-01-21 11:02:23.948 1378 2327 D BluetoothManagerService: enable(com.android.systemui): mBluetooth =null mBinding = false mState = OFF
723474-01-21 11:02:23.948 1378 2327 D BluetoothManagerService: enable returning
723549-01-21 11:02:23.949 1378 1415 D BluetoothManagerService: MESSAGE_ENABLE(0): mBluetooth = null
723644:01-21 11:02:23.949 1378 1415 E BluetoothManagerService: Fail to bind to: Intent { act=android.bluetooth.IBluetooth }
But it doesn't help me much...
Please, if you have any idea how to solve this issue or progress in locating the problem, it would be great.
Thanks in advance for your time!

Related

HTC Desire Wi-Fi Problem

Had a wi-fi problem on my htc desire for a while now..
One time I went to turn wi-fi on and it just said "Unable to start wi-fi". It had worked totally fine up until that point.
I've tried doing a factory reset, rooted, updated rom but it's still not working.
When the problem happened I had not rooted the phone or changed anything really.. it just happened.
In logcat it says:
flg=0x10200000 cmp=com.android.settings/.wifi.WifiSettings bnds=[124,404][236,531] }
D/SettingsWifiEnabler( 548): Received wifi state changed from Enabling to Unknown
W/SyncAllWidget( 151): activeSynch is null false
I/ActivityManager( 79): Displayed activity com.android.settings/.wifi.WifiSettings: 495 ms (total 495 ms)
I/WifiHW ( 79): wifi_load_driver enter
D/SettingsWifiEnabler( 548): Received wifi state changed from Unknown to Enabling
D/dalvikvm( 1805): GC freed 3806 objects / 257536 bytes in 97ms
D/NetworkLocationProvider( 79): onCellLocationChanged [1363,22890]
I/WifiHW ( 79): wifi_load_driver end error 2
E/WifiService( 79): Failed to load Wi-Fi driver.
D/SettingsWifiEnabler( 548): Received wifi state changed from Enabling to Unknown
Anyone got any ideas on how to fix this?
h2o pete said:
Had a wi-fi problem on my htc desire for a while now..
One time I went to turn wi-fi on and it just said "Unable to start wi-fi". It had worked totally fine up until that point.
I've tried doing a factory reset, rooted, updated rom but it's still not working.
When the problem happened I had not rooted the phone or changed anything really.. it just happened.
In logcat it says:
flg=0x10200000 cmp=com.android.settings/.wifi.WifiSettings bnds=[124,404][236,531] }
D/SettingsWifiEnabler( 548): Received wifi state changed from Enabling to Unknown
W/SyncAllWidget( 151): activeSynch is null false
I/ActivityManager( 79): Displayed activity com.android.settings/.wifi.WifiSettings: 495 ms (total 495 ms)
I/WifiHW ( 79): wifi_load_driver enter
D/SettingsWifiEnabler( 548): Received wifi state changed from Unknown to Enabling
D/dalvikvm( 1805): GC freed 3806 objects / 257536 bytes in 97ms
D/NetworkLocationProvider( 79): onCellLocationChanged [1363,22890]
I/WifiHW ( 79): wifi_load_driver end error 2
E/WifiService( 79): Failed to load Wi-Fi driver.
D/SettingsWifiEnabler( 548): Received wifi state changed from Enabling to Unknown
Anyone got any ideas on how to fix this?
Click to expand...
Click to collapse
I have the same problem on a ROM i have made... That's just for Tattoo not Desire... But it's the same logcat... So can somebody help us??
Yeah I'm pretty stuck on what to do :/.
Added some information about my software to the first post.
i have same problem on my htc dream
BUMP...
-------------------------------------
Sent from my übercharged HTC Tattoo
Fixed it by setting a static IP address.
Wi-Fi > Menu Button > Advanced > Use static IP
i had yesterday the same problem on my desire,
i fixxed this with flash a "older" stock rom and update it with the build-in updater....
same problem with my desire. how to fix it?
It's broke again. Setting a static IP doesn't fix it any more. Any ideas?
got the same problem here
can any one help???
Bump
Sent from my HTC Desire using XDA App
seems like wlan.ko is not available in /system/lib/modules/
I've had similar problems in the past, but was unable to solve them. You can check several things though.
1) wlan.ko in /system/lib.modules <-- has to match up with the kernel that you are using
2) any entries for wifi and/or dhcp in the init.rc and init.devicenamehere.rc files that are in the ramdisk in the boot.img
3) wifi settings in the build.prop
4) files in /system/etc/wifi
5) I'm not sure about this one, but even some of the files in /system/etc/firmware might have something to do with wifi.
6) files in /system/etc/dhcpd
7) any files in /system/bin and/or /system/xbin that are called by *.rc from #2.
Just take a working ROM (stock is usually what I use), and compare the files with the corresponding files in your build. I use either WinMerge or N-way Folder Compare or just plain old 'diff' in Linux.
I had the same issue.
Flashed a new ROM with full wipe etc. Wifi OK.
Flashed a kernel update on top of the ROM. Wifi broken. Turning wifi on it would error and turn off again.
The only way I could fix it was to flash a full ROM and make sure I wiped everything from the recovery.
Any more info you can provide? Current ROM +version +any other mods applied like status bar or OC kernels?
Did anyone fix this?? I am stuck here, G1 Dream
CM 5.0.8 DS
Please help!!!
Are you getting the same error in logcat as others have? If so, I think .mak fixed it, but he never let us know how.
Same Issues...
Ive tried Reverting to CM 5.07, 5.07 and now the beta 6.0 and all have yet to fix the wifi issue. I also tried switching between the radio's and doing a full format/partition and wipe. Any fix to this yet?
That was Lovely Bro...Really Useful...I got my DESIRE today and could connect to WIFI but was unable to browse...This tip helped me...Thx a lot... Keep up the good work..
Trying to replace bcm4329.ko
I did the OTA update for my Desire today, and of course have the wi-fi problem.
However, when I enable wi-fi, I see the following appear at the end of dmesg:
Code:
<3>[ 8197.511535] bcm4329: version magic '2.6.32.15-g6a358a9 preempt mod_unload
ARMv7 ' should be '2.6.32.15-gf9c0527 preempt mod_unload ARMv7 '
The update zip (via thread 778852) contains a bsdiff patch file patch/system/lib/modules/bcm4329.ko.p... and from some examination of that file it appears just to patch the vermagic field of the .ko file.
I tried to use a hex editor to 'fix' bcm4329 and used adb pull/push to replace it, but I get
Code:
failed to copy 'bcm4329.ko.fix' to '/system/lib/modules/bcm4329.ko': Read-only
file system
Can anyone help me with this?
Update: I am a fool. I was using the wrong goldcard! Once I put the right goldcard in, then sdcard:update.zip applied correctly and wi-fi started working again.
@dleonard, could you please make step by step instructions of how to fix this wifi issue?
thanks
Mixu

[Q] Bluetooth Stack AIDL Reflection Methods

I work at a small company that fields autonomous android devices which programmatically connect to bluetooth telemetry devices. These devices require pins, so we need to automatically create a pairing in order to connect to the bluetooth devices. We DO have root access.
Since the new Bluetooth Stack in Android 4.2, I have been unable to use this common AIDL bluetooth reflection method in our private utility app:
Code:
public IBluetooth getIBluetooth() {
IBluetooth ibt = null;
try {
Class c2 = Class.forName("android.os.ServiceManager");
Method m2 = c2.getDeclaredMethod("getService",String.class);
IBinder b = (IBinder) m2.invoke(null, "bluetooth");
Class c3 = Class.forName("android.bluetooth.IBluetooth");
Class[] s2 = c3.getDeclaredClasses();
Class c = s2[0];
Method m = c.getDeclaredMethod("asInterface",IBinder.class);
m.setAccessible(true);
ibt = (IBluetooth) m.invoke(null, b);
} catch (Exception e) {
}
return ibt;
}
The issue about this strategy no longer working is documented here. I previously used the setPin method as well as the createBond method from this Interface, and now I cannot.
Is there anyway to manually create a bluetooth pair profile under Android 4.2? Is there a database file where the profiles are stored that we can use root and sqlite3 to access?
Jelly Bean (Android 4.2) access to hidden methods.
I posted this on Stack Overflow:
http://stackoverflow.com/questions/14705167/how-connect-paired-bluetooth-a2dp-device-on-android-4-2-using-reflection/16003953#16003953
It explains how I got it working. This open source project:
http://code.google.com/p/a2dp-connect2/
Implemented this approach and it works on API 17. Mt project only accesses methods through IBluetoothA2dp and IBluetooth but others should work in a similar fashion.

[Q] Fatal Signal 11 when reading from MTP device

Firstly of all apologises if this is not the best place to ask a DEV question, but I have no access to the developer forum pages for Android.
My App is reading the images from Nikon camera plugged into the USB OTG port on a Samsung S4 phone running Android 4.2.2 (JDQ39.i9505xxubmea).
I am getting an Fatal signal 11 (SIGSEGV) at 0x74564000 (code=1), when trying to call getStorageIds in approx 1 in 10 attempts.
The biggest problem being I can't stop the app from crashing in the most undignified mannner.
In the LogCat I can see messages from the Android MtpDevice class, saying "readResponse failed" and "got response packet instead of data packet", however the mtpDevice open() still gives back a non-null value.
The whole block of code is wrapped up in a try/catch, but it as it appears to be an error in the native library rather than a Java exception, so unsurprisingly it's never thrown.
If can somehow detect that the device wasn't being read properly, then I could abort before calling the getstorageIds method. It has clearly found the device, as it reported the make/model and serial number of the camera.
Any ideas very much appreciated.
Thankyou
Code:
if (!mtpDevice.open(usbDeviceConnection)) {
tvStatus.setText("Open MTP device failed!");
return;
}
Log.d(TAG, "mtpDevice is open! " + mtpDevice.getDeviceName() );
MtpDeviceInfo info = mtpDevice.getDeviceInfo();
if (info == null) {
Log.d(TAG, "info is null!");
usbDeviceConnection.close();
mtpDevice.close();
return;
}
int[] storageIds = mtpDevice.getStorageIds(); // this where it stops![/QUOTE][/QUOTE]

[Q] Want a tool to backup /phone & /sdcard entirely, over wifi

Hi all,
Anyone know of a tool to do this?
I know what Titanium backup is and what it's for, I'm after a simple data copying tool for the ENTIRE contents of the SD Card and the phone itself just to a network drive.
I can do this manually now, by plugging in the phone and dragging and dropping the files. I'd prefer something which does it over wifi to an SMB share.
I'd assume such a tool already exists, scheduling would be nice, options to enforce only when plugged in to power too (since it'll take half the night while it's charging)
Any tips?
Hi
wizzbang3 said:
Hi all,
Anyone know of a tool to do this?
I know what Titanium backup is and what it's for, I'm after a simple data copying tool for the ENTIRE contents of the SD Card and the phone itself just to a network drive.
I can do this manually now, by plugging in the phone and dragging and dropping the files. I'd prefer something which does it over wifi to an SMB share.
I'd assume such a tool already exists, scheduling would be nice, options to enforce only when plugged in to power too (since it'll take half the night while it's charging)
Any tips?
Click to expand...
Click to collapse
Yes I got one. Helium Backup. You can upload your files to your dropbox account, that's over wifi
I don't want to send it "to the cloud" just a local FTP / SMB server. It's near 80gb of data.
I do it the other way around. I use a Samba Server on the phone and run a sync tool on my PC to sync phone to backup directories on my PC.
On the phone I use [APP][2.0.1+][Root] Samba Filesharing Server for Android [Play & Dev builds].
On the PC I use Syncovery – file synchronization and backup.
You may also use GoodSync: File Sync & Backup Software. It has its own server to run on the phone and is somewhat easier to setup.
Sergio Barbosa said:
I do it the other way around. I use a Samba Server on the phone and run a sync tool on my PC to sync phone to backup directories on my PC.
On the phone I use [APP][2.0.1+][Root] Samba Filesharing Server for Android [Play & Dev builds].
On the PC I use Syncovery – file synchronization and backup.
You may also use GoodSync: File Sync & Backup Software. It has its own server to run on the phone and is somewhat easier to setup.
Click to expand...
Click to collapse
Thanks man, I'll give it a shot - it'll be a drain on the phone overnight but as long as it's charging - I'll have a nice regular sync of my data.
If you decide to go with the Syncovery/Samba Filesharing here is my smb.conf file with mappings for internal storage, sdcard, root and data.
The file must be placed in data/data/com.funkyfresh.samba/files.Just change the workgroup, netbios name and remote announce to suit your needs.
You must use the dev-version of Samba - download from the OP. In settings tick the "Don´t rewrite smb.conf".
Code:
#
#
#
[global]
interfaces = wlan0
bind interfaces only = yes
workgroup = WORKGROUP
server string = Samba on Android
netbios name = SERGIO-SGN3T
remote announce = 255.255.255.0
encrypt passwords = yes
security = USER
restrict anonymous = 1
load printers = no
printcap name = /dev/null
disable spoolss = yes
deadtime = 5
delete readonly = yes
nt acl support = no
inherit permissions = yes
socket options = SO_SNDBUF=16384 SO_RCVBUF=16384
unix extensions = no
[IntSD]
vfs objects = fake_perms
path = /storage/sdcard0
force user = root
read only = no
writable = yes
guest ok = no
[ExtSD]
vfs objects = fake_perms
path = /storage/sdcard1
force user = root
read only = no
writable = yes
guest ok = no
[root]
vfs objects = fake_perms
path = /
force user = root
read only = no
writable = yes
guest ok = no
[data]
vfs objects = fake_perms
path = /data/data
force user = root
read only = no
writable = yes
guest ok = no
Actually, it just occurred to me, I am running a linux based NAS (well BSD) so it would be really better if I could just "push to" an SMB or FTP share, since my PC's are often off at night Any ideas?
For anyone curious, I ended up using FolderSync - it's well supported and works perfectly. I back up my phone once every other night with TitaniumBackup, then the every other night FolderSync backs up the ENTIRE phone and the ENTIRE SD card over wifi, if plugged in to power.
Sure it's 80gb of data but I can lose my phone and get everything back, perfectly.

Customize LocalOnlyHotspot on Android Oreo API 26, possible?

Hello guys!
I have an APP that connects with a external device throught wifi. From the beggining I was using wifi hotspot to connect them, but, on android 7.1.1 they disabled the posibility of enable it programatically and then in android 8.0 (API26) cant enable normal hotspot neither configure it.
On API 26 they have enabled "StartLocalOnlyHotspot" that enables a wifi hotspot but without internet connection. For me it's perfecte BUT! I can't find how to configure the name and password of that wifi. I can read it after starting it but in my project I need to set those external devices configured to automatically connect to a specified wifi configuration, so this is not fitting my needs.
So, anyone know if it's posible to customize the name and password of the LocalOnlyHotspot generated from API 26?
Thanks!
anyone has a remote idea please?
no you cant change ssid and password they are auto generated
no, you cant change SSID and password they are auto-generated, but if you want to know how to retrieve the generated password refer to this:
Code:
@Override
public void onStarted(WifiManager.LocalOnlyHotspotReservation reservation) {
super.onStarted(reservation);
hotspotReservation = reservation;
currentConfig = hotspotReservation.getWifiConfiguration();
Log.v("DANG", "THE PASSWORD IS: "
+ currentConfig.preSharedKey
+ " \n SSID is : "
+ currentConfig.SSID);
hotspotDetailsDialog();
}
shareeditdelete

Categories

Resources