FORUMS
Remove All Ads from XDA

[PX5][Android 8.0+][MD725] Fix for MD725 Type 2 Bluetooth on Oreo

28 posts
Thanks Meter: 9
 
Post Reply Email Thread
Hi everyone.

As people are aware, upgrading to Android 8.0 Oreo broke the functionality of Bluetooth for users with the MD725 Type 2 Bluetooth module. I have now found the driver file that will likely repair all lost Bluetooth functionality - the sdsdk file. This should also fix any external USB WiFi/Bluetooth devices that use the MD725 Type 2 module.

I have tested this on my MTCD HA unit running Hal9k's Oreo ROM and can confirm that the following features now work:
- A2DP
- Calling
- Call History
- Contact sync

Note: This fix requires root access.

Installation Instructions:
1. Download the attached sdsdk.zip file.
2. From the sdsdk.zip file, extract the "sdsdk" file.
4. Copy the sdsdk file to a USB drive or SD Card to be plugged into your headunit
5. Install a Root file explorer.
6. Copy the sdsdk file from your external storage device to the location:
Code:
/system/bin
7. Reboot your headunit.

The working sdsdk file is from the MTCD_HA_20170726 ROM provided by @f1x in their "Solution for the bluetooth echo v2":
https://forum.xda-developers.com/and...ho-v2-t3661284

I hope that this fix works for you!
Attached Files
File Type: zip sdsdk.zip - [Click for QR Code] (410.6 KB, 880 views)
The Following 4 Users Say Thank You to jimimatthews For This Useful Post: [ View ] Gift jimimatthews Ad-Free
 
 
11th November 2018, 09:35 AM |#2  
Member
Thanks Meter: 4
 
More
@Malaysk perhaps you can try to incorporate this fix in your rom if tested to work OK?

Sent from my G8141 using Tapatalk
The Following User Says Thank You to glenb83 For This Useful Post: [ View ] Gift glenb83 Ad-Free
11th November 2018, 02:14 PM |#3  
switchboy's Avatar
Junior Member
Thanks Meter: 14
 
More
The command "ps | grep sdsdk" just returns the line(s) containing sdsdk (grep command) from the running processes list (ps command). So I think that that step is not necessary.

Also where did you find a working sdsdk for android 8, substituting the one from android 6 was tried before and did not work.

Regardless I will try to flash my android 6 HU to HALK's Oreo to comfirm this working on a MTCD KGL (v2.83)
The Following User Says Thank You to switchboy For This Useful Post: [ View ] Gift switchboy Ad-Free
11th November 2018, 02:34 PM |#4  
OP Junior Member
Flag Perth
Thanks Meter: 9
 
More
Quote:
Originally Posted by switchboy

The command "ps | grep sdsdk" just returns the line(s) containing sdsdk (grep command) from the running processes list (ps command). So I think that that step is not necessary.

Also where did you find a working sdsdk for android 8, substituting the one from android 6 was tried before and did not work.

Regardless I will try to flash my android 6 HU to HALK's Oreo to comfirm this working on a MTCD KGL (v2.83)

Okay, I've removed that part of the step. I had a feeling it wasn't necessary but left it in.

The working sdsdk is from the MTCD_HA_20170726 ROM, which was collected by @f1x for the "Bluetooth echo solution".

Thanks! Please reply with your results!
11th November 2018, 03:55 PM |#5  
switchboy's Avatar
Junior Member
Thanks Meter: 14
 
More
I am afraid it did not work for me. Added the files to 'system/bin/'
Gave the the file 777 permission just to be sure (read write execute)
Did a reboot, no luck

As you can see sdsdk is not running when I search for it with 'ps | grep sdsdk'

I added photographs of the situation.

This is a fresh upgrade to HALK's Oreo rom from Android 6.0 do i need to select the MD725 as my BT adapter somewhere? Because that might be causing my issues? I will check the factory setting later (although they should not have been touched and BT was working on android 6)
It will have to be another time though. It's getting cold now that it is dark and I don't want to burn petrol while waiting on the HU. Already used a bit too much battery power while waiting on the update process.


Edit:
OP, did you also install the libraries (.lib files) provided by f1x? That might be the reason why it did not work and sdsdk doesn't run on my system right now.
Attached Thumbnails
Click image for larger version

Name:	20181111_164421.jpg
Views:	1216
Size:	252.9 KB
ID:	4640028   Click image for larger version

Name:	20181111_164445.jpg
Views:	1212
Size:	269.2 KB
ID:	4640029   Click image for larger version

Name:	20181111_164530.jpg
Views:	1214
Size:	257.7 KB
ID:	4640030  
13th November 2018, 06:34 AM |#6  
Junior Member
Thanks Meter: 1
 
More
hello . i have mtcd px5 , MX , Bluetooth MD725 type 2 , i am now at malaysk rom 6 v7 , want to ask if this fix will work with me ? till now i didn't try android 8 because of Bluetooth problem ?
13th November 2018, 12:43 PM |#7  
switchboy's Avatar
Junior Member
Thanks Meter: 14
 
More
Have been playing around with this idea some more. First off I checked if for some reason the Bluetooth adapter in the factory settings was changed. So I double checked and it was still set to MD725. So that was not the reason why sdsdk is not running. Secondly I thought maybe sdsdk is missing other files it depends on to run so I went ahead and made sure I copied the .lib files and the .ini file from f1x to the right folders and made sure all of them were executable. After that I did a reboot of my device and nothing. The Bluetooth name and pin are not populated in the settings menu and the process sdsdk is still not in the running processes list. This could either mean:
- The process sdsdk isn't started by the system on boot and we need a way to start it manually
- The process sdsdk is started but crashes soon after being started because it is still missing dependencies
- The implementation of sdsdk is not compatible with android 8 anymore (which would mean the end of the line for this approach)

After these tests I was a bit disappointed and had ran out of time for today. I need some way to check if sdsdk is doing anything and if so what it is actually doing. So on a PC my next logical step will be to try and run the program manually from the command line and see if it spits out an error. If it does I might be able to solve the problem.

Because of digging work by f1x we know that the init.hct.rc script does contain the commands to start sdsdk: (so this makes the first scenario unlikely)

Code:
on property:bt.md725.type=1
    start gocsdk

service gocsdk /system/bin/gocsdk
    class main
    user root
    group root 
    disabled
    seclabel 	u:r:shell:s0

on property:bt.md725.type=2
    start sdsdk

service sdsdk /system/bin/sdsdk
    class main
    user root
    group root 
    disabled
    seclabel 	u:r:shell:s0
I think the second scenario is the most likely scenario and sdsdk is missing the right (versions) of other files the program depends on. So we need to figure out what those files are. Furtermore I think the simple terminal command '/system/bin/sdsdk' probably wont start the service in a way that is useful for the OS, however I am hoping it wil output a usefull error code. So that will be the fist thing I will try next time I got some spare time to play with the HU.



Unfortunately I am a bit of a Windows guy and hobby developer (with limited C++, PHP and Java knowledge) so my Linux knowledge is limited. I would love to be able to decompile sdsdk to see what it actually does that might make fixing this software mess a bit easier. At this point I am not expecting a manufacturer to do it for us. As for now I just making guesses why it doesn't work and I don't like that.
The Following 2 Users Say Thank You to switchboy For This Useful Post: [ View ] Gift switchboy Ad-Free
14th November 2018, 01:22 AM |#8  
Member
Boston, MA
Thanks Meter: 71
 
More
Quote:
Originally Posted by switchboy

- The process sdsdk is started but crashes soon after being started because it is still missing dependencies

You can test this by, first, running '/system/bin/sdsdk' in a terminal. Even if this step works, I would see the missing libraries by running 'ldd /system/bin/sdsdk'. The assumption in the 'ldd' step is that the binary gets libraries dynamically attached to it when it runs, as opposed to coming packaged with the binary.

Feel free to paste the output and I can help interpret it. I would do this myself, but at the rate at which I'm going, I won't get to it until next year

P.S. you may need to find a binary for ldd on Android. Termux has an ability to get such, just type in the command, and if it knows it can download a binary for a missing program, then it will tell you how to do it
The Following 2 Users Say Thank You to ishyesh For This Useful Post: [ View ] Gift ishyesh Ad-Free
14th November 2018, 12:12 PM |#9  
switchboy's Avatar
Junior Member
Thanks Meter: 14
 
More
I dont have acces to my headunit at the moment. The wife has taken the car for a drive. So I did the next best thing and used readelf on a ubuntu vm to try and find dependencies of the sdsdk binairy. Here is the raw output:
Code:
@Butterfly:~/Desktop$ readelf -And sdsdk

Dynamic section at offset 0xbe65c contains 33 entries:
  Tag        Type                         Name/Value
 0x00000003 (PLTGOT)                     0xbfd84
 0x00000002 (PLTRELSZ)                   1248 (bytes)
 0x00000017 (JMPREL)                     0x9bc0
 0x00000014 (PLTREL)                     REL
 0x00000011 (REL)                        0x2cb0
 0x00000012 (RELSZ)                      28432 (bytes)
 0x00000013 (RELENT)                     8 (bytes)
 0x6ffffffa (RELCOUNT)                   3551
 0x00000015 (DEBUG)                      0x0
 0x00000006 (SYMTAB)                     0x148
 0x0000000b (SYMENT)                     16 (bytes)
 0x00000005 (STRTAB)                     0x1258
 0x0000000a (STRSZ)                      4590 (bytes)
 0x00000004 (HASH)                       0x2448
 0x00000001 (NEEDED)                     Shared library: [libtinyalsa.so]
 0x00000001 (NEEDED)                     Shared library: [libmedia.so]
 0x00000001 (NEEDED)                     Shared library: [libutils.so]
 0x00000001 (NEEDED)                     Shared library: [libbinder.so]
 0x00000001 (NEEDED)                     Shared library: [liblog.so]
 0x00000001 (NEEDED)                     Shared library: [libstdc++.so]
 0x00000001 (NEEDED)                     Shared library: [libm.so]
 0x00000001 (NEEDED)                     Shared library: [libc.so]
 0x00000001 (NEEDED)                     Shared library: [libdl.so]
 0x0000001a (FINI_ARRAY)                 0xbc3b8
 0x0000001c (FINI_ARRAYSZ)               8 (bytes)
 0x00000019 (INIT_ARRAY)                 0xbc3c0
 0x0000001b (INIT_ARRAYSZ)               36 (bytes)
 0x00000020 (PREINIT_ARRAY)              0xbc3e4
 0x00000021 (PREINIT_ARRAYSZ)            0x8
 0x00000016 (TEXTREL)                    0x0
 0x0000001e (FLAGS)                      TEXTREL BIND_NOW
 0x6ffffffb (FLAGS_1)                    Flags: NOW
 0x00000000 (NULL)                       0x0

Displaying notes found in: .note.gnu.gold-version
  Owner                 Data size	Description
  GNU                  0x00000009	NT_GNU_GOLD_VERSION (gold version)
    Version: gold 1.11
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "ARM v7"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-2
  Tag_FP_arch: VFPv3
  Tag_Advanced_SIMD_arch: NEONv1
  Tag_ABI_PCS_GOT_use: GOT-indirect
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_enum_size: int
  Tag_ABI_HardFP_use: Deprecated
  Tag_ABI_optimization_goals: Aggressive Speed
  Tag_CPU_unaligned_access: v6
  Tag_ABI_FP_16bit_format: IEEE 754
  Tag_DIV_use: Not allowed
  Tag_Virtualization_use: TrustZone
It would seem that the only libs this file depends on are the following:
Code:
 0x00000001 (NEEDED)                     Shared library: [libtinyalsa.so]
 0x00000001 (NEEDED)                     Shared library: [libmedia.so]
 0x00000001 (NEEDED)                     Shared library: [libutils.so]
 0x00000001 (NEEDED)                     Shared library: [libbinder.so]
 0x00000001 (NEEDED)                     Shared library: [liblog.so]
 0x00000001 (NEEDED)                     Shared library: [libstdc++.so]
 0x00000001 (NEEDED)                     Shared library: [libm.so]
 0x00000001 (NEEDED)                     Shared library: [libc.so]
 0x00000001 (NEEDED)                     Shared library: [libdl.so]
So now we need the right version of these in /system/lib/ and it might work.

EDIT:
I also ran this command on gocsdk:
Code:
 0x00000001 (NEEDED)                     Shared library: [libbinder.so]
 0x00000001 (NEEDED)                     Shared library: [libmedia.so]
 0x00000001 (NEEDED)                     Shared library: [libutils.so]
 0x00000001 (NEEDED)                     Shared library: [liblog.so]
 0x00000001 (NEEDED)                     Shared library: [libstdc++.so]
 0x00000001 (NEEDED)                     Shared library: [libm.so]
 0x00000001 (NEEDED)                     Shared library: [libc.so]
 0x00000001 (NEEDED)                     Shared library: [libdl.so]
So it seems that libtinyalsa.so might be our missing file!

sdsdk needs it and gocsdk doesn't.

Edit 2:
Okay I've extracted the missing files from a recent android 6 ROM which had working BT on my unit. I've created an archive with all the files that I think are missing in android 8 in their respective folders. Copy and paste to the right folders on your unit and set permissions to 777 for each file (you'll need a root browser for this). I've hadn't had time to test it for myself but this will hopefully fix this mess.

Edit 3:
Well it seems that the missing files I gathered up aren't complete yet. I can comfirm that 'sdsdk' is indeed crashing because it is missing dependencies. Executing the file from terminal is generating this error message.

"CANNOT LINK EXECUTABLE 'sdsdk' has text relocations"

Sadly I am currently at a loss getting the name and paths out of 'sdsdk' with readelf.

Edit 4:
After more reading it would seem that google disabled text relocations for applications running in userland. So this error seems logical since I was running the terminal in userland .
Attached Files
File Type: 7z MD725 missing files.7z - [Click for QR Code] (1.94 MB, 152 views)
The Following 2 Users Say Thank You to switchboy For This Useful Post: [ View ] Gift switchboy Ad-Free
17th November 2018, 09:22 AM |#10  
Member
Flag Utrecht
Thanks Meter: 10
 
More
Hello Switchboy, i did put the files in the locations as showed in youre zip file.
It does not work on my HU.
17th November 2018, 01:32 PM |#11  
switchboy's Avatar
Junior Member
Thanks Meter: 14
 
More
The sdsdk executable is currently not working because of text relocations which aren't allowed in Android in userland anymore. So we either need to find a way to run sdsdk outside userland or find an sdsdk executable without text relocations. A version from android 7 might work.

See attached logcat
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20181117-003315_Log Viewer.jpg
Views:	570
Size:	258.0 KB
ID:	4645046  
The Following 2 Users Say Thank You to switchboy For This Useful Post: [ View ] Gift switchboy Ad-Free
Post Reply Subscribe to Thread

Tags
android 8.0 oreo, bluetooth, headunit, md725, mtcd

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes