[PX5][Android 8.0+][MD725] Fix for MD725 Type 2 Bluetooth on Oreo - MTCD Software Development

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/an...neral/px5-solution-bluetooth-echo-v2-t3661284
I hope that this fix works for you!

@Malaysk perhaps you can try to incorporate this fix in your rom if tested to work OK?
Sent from my G8141 using Tapatalk

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)

switchboy said:
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)
Click to expand...
Click to collapse
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!

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.

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 ?

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.

switchboy said:
- The process sdsdk is started but crashes soon after being started because it is still missing dependencies
Click to expand...
Click to collapse
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

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 .

Hello Switchboy, i did put the files in the locations as showed in youre zip file.
It does not work on my HU.

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

switchboy said:
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
Click to expand...
Click to collapse
Great detailed summary and investigation into the issue.
Thanks for taking the time and sharing with the forums.
Until these blobs are updated or other software solution is found, we may have found a supplier for genuine GOC-MD-725.

Update
Not deterred, I managed to find a version of sdsdk without text relocations. I actually just took it out of the Android 7 rom for PX3, figuring that support for text relocations in userland was dropped by then. It turns out, I was right. ‘readelf –d sdsdk’ did not show the dreaded ‘0x00000016 (TEXTREL) 0x0’ anymore.
Hooray!
Therefore, after checking the shared library list and not seeing any new libraries I went ahead and overwrote my old version of sdsdk with this one. I rebooted the device and… nothing.
After reviewing, the logcat to find out what went wrong the following error messages repeats a couple of times:
Code:
libc ( 1008): CANNOT LINK EXECUTABLE "/system/bin/sdsdk": cannot locate symbol "_ZN7android10AudioTrackC1E19audio_stream_type_tj14audio_format_tjj20audio_output_flags_tPFviPvS4_ES4_i15audio_session_tNS0_13transfer_typeEPK20audio_offload_info_tiiPK18audio_attributes_tbf" referenced by "/system/bin/sdsdk"...
11-19 14:46:00.787 F/libc ( 1008): Fatal signal 6 (SIGABRT), code -6 in tid 1008 (sdsdk)
11-19 14:46:00.829 F/DEBUG ( 1013): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-19 14:46:00.829 F/DEBUG ( 1013): Build fingerprint: 'Android/px5/px5:8.0.0/OPR5.170623.007/hct08091121:userdebug/test-keys'
11-19 14:46:00.829 F/DEBUG ( 1013): Revision: '0'
11-19 14:46:00.829 F/DEBUG ( 1013): ABI: 'arm'
11-19 14:46:00.829 F/DEBUG ( 1013): pid: 1008, tid: 1008, name: sdsdk >>> /system/bin/sdsdk <<<
11-19 14:46:00.829 F/DEBUG ( 1013): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
11-19 14:46:00.830 F/DEBUG ( 1013): Abort message: 'CANNOT LINK EXECUTABLE "/system/bin/sdsdk": cannot locate symbol "_ZN7android10AudioTrackC1E19audio_stream_type_tj14audio_format_tjj20audio_output_flags_tPFviPvS4_ES4_i15audio_session_tNS0_13transfer_typeEPK20audio_offload_info_tiiPK18audio_attributes_tbf" referenced by "/system/bin/sdsdk"...'
11-19 14:46:00.830 F/DEBUG ( 1013): r0 00000000 r1 000003f0 r2 00000006 r3 00000008
11-19 14:46:00.830 F/DEBUG ( 1013): r4 000003f0 r5 000003f0 r6 ffe4d100 r7 0000010c
11-19 14:46:00.830 F/DEBUG ( 1013): r8 f70b0010 r9 ffe4d3a8 sl f70fcd90 fp ffe4e3b4
11-19 14:46:00.830 F/DEBUG ( 1013): ip 00000000 sp ffe4d0f0 lr f7164bc7 pc f716ede8 cpsr 200f0010
11-19 14:46:00.839 F/DEBUG ( 1013):
11-19 14:46:00.839 F/DEBUG ( 1013): backtrace:
11-19 14:46:00.839 F/DEBUG ( 1013): #00 pc 00066de8 /system/bin/linker (__dl_tgkill+12)
11-19 14:46:00.839 F/DEBUG ( 1013): #01 pc 0005cbc3 /system/bin/linker (__dl_abort+54)
11-19 14:46:00.839 F/DEBUG ( 1013): #02 pc 00018641 /system/bin/linker (__dl___libc_fatal+24)
11-19 14:46:00.839 F/DEBUG ( 1013): #03 pc 0000fcb5 /system/bin/linker (__dl___linker_init+1956)
11-19 14:46:00.839 F/DEBUG ( 1013): #04 pc 00014d50 /system/bin/linker (_start+4)
11-19 14:46:00.858 W/NativeCrashListener( 499): Couldn't find ProcessRecord for pid 1008
Therefore, I assume that one of the libs sdsdk is depended on were updated and now is not quite compatible anymore. I am a bit hesitant to start altering system audio libraries willy-nilly because then I might start to break the audio subsystem of the rom. So unless I can find a version of sdsdk that is compatible with the audio subsystem of android 8 we are stuck at the moment.
Since the MD725 type 2 is a chip used in a lot of BT dongles as well there must be a device out there currently running android Oreo. I cant think of any reason why an sdsdk ripped from such firmware would not work on our Oreo installment. We just have to find it.

I love your persistence!
Did you also copy over the associated libraries? Typically, one can copy over the entire web of libraries required by a specific binary, and use those only for such binary, while leaving the rest of the system libraries alone. However, such solution may make things work, but may break integrations that Android may have had.
If only we had the source code ........
Seems like https://source.android.com/reference/hal/structaudio__policy may references audio_offload_info_t.... I'll take a look. I might as well just scrape all the symbols to get a layout of what's calling what

If only we had the sourcecode of sdsdk I could debug it against current libraries rewrite it a bit and then compile a working version.

@switchboy I am really impressed with the level of debugging and research you went into! Thank you!!
It makes it more confusing that my BlueTooth works for around 30 minutes or so (or until I end a call) before my phone disconnects (but the HU still thinks it is connected).

marchnz said:
Great detailed summary and investigation into the issue.
Until these blobs are updated or other software solution is found, we may have found a supplier for genuine GOC-MD-725.
Click to expand...
Click to collapse
I am very interested in this supplier!

jimimatthews said:
@switchboy I am really impressed with the level of debugging and research you went into! Thank you!!
It makes it more confusing that my BlueTooth works for around 30 minutes or so (or until I end a call) before my phone disconnects (but the HU still thinks it is connected).
Click to expand...
Click to collapse
Could you by any chance upload the sdsdk which is in your bin folder on the hu? To double check if it is the same one from the OP.

jimimatthews said:
I am very interested in this supplier!
Click to expand...
Click to collapse
Check the md725 module 1 and 2 swap thread

I'm getting a similar issue with my Bluetooth.
A2DP, Call History and Contact Sync all work
but Calling does not work properly. People can hear me, but I cannot hear them through my speakers.
I'm using an AVIN PX5
MCU version: MTCE_GS_V2.94_3 Sep 13 2018 11:26:51
I'm wondering if any MCU updates are available to resolve this issue?

Related

[Q] IPSEC on Gen8

Hello,
i'm trying urukdroid 0.5 and i can not use ipsec/l2tp with it
logcat say :
...
E/racoon ( 1972): libipsec failed pfkey open: Operation not permitted
I/racoon ( 1972): initiate new phase 2 negotiation: 192.168.0.200[4500]<=>192.168.0.10[4500]
I/racoon ( 1972): NAT detected -> UDP encapsulation (ENC_MODE 2->4).
I/racoon ( 1972): Adjusting my encmode UDP-Transport->Transport
I/racoon ( 1972): Adjusting peer's encmode UDP-Transport(4)->Transport(2)
E/racoon ( 1972): pfkey UPDATE failed: Function not implemented
E/racoon ( 1972): pfkey ADD failed: Function not implemented
...
is there a way to rebuild the urukdroid kernel with all ipsec function implemented ?

[Q] cyanogenMod 7, need help

It seems that prelink error when compile. How to fixed it? Need prelink-linux-ds.map?
~/dream_sapphire $ adb logcat |grep prelink
- waiting for device -
E/HAL ( 143): Cannot load library: link_image[1962]: 104 could not load needed library 'libgps.so' for 'gps.sapphire.so' (reserve_mem_region[831]: OOPS: 104 prelinked library 'libgps.so' mapped at 0x45fb8000, not at 0xa9700000)
E/QualcommCameraHardware( 105): FATAL ERROR: could not dlopen liboemcamera.so: Cannot load library: reserve_mem_region[831]: OOPS: 105 prelinked library 'liboemcamera.so' mapped at 0x40c0c000, not at 0xa9400000

[msm8939][meizu][camera]dlopen failed: could not load library "libcam.meiyan.so" need

[msm8939][meizu][camera]dlopen failed: could not load library "libcam.meiyan.so" need
Hello,
Could you please help me?
Platform:meizu m1note msm8939
I ported from flyme to miui.
The camera has problem.
I got the error:
dlopen failed: could not load library "libcam.meiyan.so" needed by "camera.msm8916.so";
caused by cannot locate symbol "_ZN11CBeautyShot18SetSkinBrightLevelEl" referenced by "libcam.meiyan.so"...
About symbol "_ZN11CBeautyShot18SetSkinBrightLevelEl",
I found it at:
m463c/rom/update/system $ g CBeautyShot
Binary file ./lib/libarcsoft_beauty_shot.so matches
Binary file ./lib/libcam.meiyan.so matches
And I push them to my phone.
But I still get the error.
Who can help me? Thank you very much.
I have been debugging for several days.
01-02 08:17:52.901 I/libmdmdetect( 351): Found internal modem: modem
01-02 08:17:52.901 E/QC-QMI ( 272): qmi_client [272]: unable to connect to server, errno=[2:No such file or directory], attempt=1
01-02 08:17:52.901 E/QC-QMI ( 351): qmi_client [351]: unable to connect to server, errno=[2:No such file or directory], attempt=1
01-02 08:17:52.901 I/ThermalEngine( 288): Sensor:tsens_tz_sensor3:80000 mC
01-02 08:17:52.941 E/HAL ( 276): load: module=/system/lib/hw/camera.msm8916.so
01-02 08:17:52.941 E/HAL ( 276): dlopen failed: could not load library "libcam.meiyan.so" needed by "camera.msm8916.so"; caused by cannot locate symbol "_ZN11CBeautyShot18SetSkinBrightLevelEl" referenced by "libcam.meiyan.so"...
01-02 08:17:52.941 E/CameraService( 276): Could not load camera HAL module
01-02 08:17:52.941 I/mediaserver( 276): ListenService instantiated
01-02 08:17:52.941 V/ListenService( 276): instantiate entered
01-02 08:17:52.941 V/ListenService( 276): getInstance entered, mNumInstances currently 0
Eismog
my-mail:[email protected]
Is there anyone who can help me?

I can't boot into my ROM, I keep running into dex problems.

I'm making a CM12.1 ROM port. Every time after compilation, I'm just stuck on the boot screen. My logcat logs always look like this:
Code:
D/gps_ril_BRCM( 1390): ril thread received 0 events
D/gps_ril_BRCM( 1390): ril_state_thread, fd < 0, calling timeout_action_add
I/DEBUG ( 1389): tid 15467 does not exist in pid 15467. ignoring debug request
I/ServiceManager( 1385): service 'media.audio_flinger' died
I/ServiceManager( 1385): service 'media.player' died
I/ServiceManager( 1385): service 'media.camera' died
I/ServiceManager( 1385): service 'media.audio_policy' died
D/gps_ril_BRCM( 1390): ril thread received 0 events
D/gps_ril_BRCM( 1390): ril_state_thread, fd < 0, calling timeout_action_add
I/mediaserver(15513): ServiceManager: 0x2a00b448
I/AudioFlinger(15513): Using default 3000 mSec as standby time.
E/MediaPlayerFactory(15513): calling dlopen on FACTORY_LIB
E/MediaPlayerFactory(15513): calling dlsym on pFactoryLib for FACTORY_CREATE_FN
E/MediaPlayerFactory(15513): registering DASH Player factory...
I/CameraService(15513): CameraService started (pid=15513)
I/CameraService(15513): Loaded "BCM21553 Camera HAL" camera module
D/BcmCamera(15513): HAL_get_number_of_cameras: numCameras:1
I/AudioPolicyManagerBase(15513): loadAudioPolicyConfig() loaded /system/etc/audio_policy.conf
I/AudioFlinger(15513): loadHwModule() Loaded primary audio interface from Samsung BCM21553 audio HW HAL (audio) handle 1
I/AudioFlinger(15513): HAL output buffer size 1024 frames, normal mix buffer size 1024 frames
I/AudioMixer(15513): found effect "Multichannel Downmix To Stereo" from The Android Open Source Project
I/AudioFlinger(15513): Using module 1 has the primary audio interface
D/AudioPolicyManagerBase(15513): setOutputDevice() changing device from (2) to (2) force (1) delayMs (0) on Output (2)
I/AudioFlinger(15513): AudioFlinger's thread 0x40f53008 ready to run
W/AudioFlinger(15513): Thread AudioOut_2 cannot connect to the power manager service
D/audio_hw_primary(15513): call=n, earpiece=n hp=n speaker=y sco=n a2dp=n out_device=2
W/AudioFlinger(15513): Thread AudioOut_2 cannot connect to the power manager service
I/audio_a2dp_hw(15513): adev_open: adev_open in A2dp_hw module
I/AudioFlinger(15513): loadHwModule() Loaded a2dp audio interface from A2DP Audio HW HAL (audio) handle 3
I/AudioFlinger(15513): loadHwModule() Loaded usb audio interface from USB audio HW HAL (audio) handle 4
W/AudioFlinger(15513): Thread AudioOut_2 cannot connect to the power manager service
E/AudioFlinger(15513): no wake lock to update!
I/r_submix(15513): adev_open(name=audio_hw_if)
I/r_submix(15513): adev_init_check()
I/AudioFlinger(15513): loadHwModule() Loaded r_submix audio interface from Wifi Display audio HAL (audio) handle 5
I/AudioPolicyService(15513): Loaded audio policy from LEGACY Audio Policy HAL (audio_policy)
D/gps_ril_BRCM( 1390): ril thread received 0 events
D/gps_ril_BRCM( 1390): ril_state_thread, fd < 0, calling timeout_action_add
D/AndroidRuntime(15512):
D/AndroidRuntime(15512): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<<
D/AndroidRuntime(15512): CheckJNI is OFF
D/dalvikvm(15512): Unable to stat classpath element '/system/framework/core.jar'
D/dalvikvm(15512): DexOpt: incorrect opt magic number (0xff ff ff ff)
D/dalvikvm(15512): ODEX file is stale or bad; removing and retrying (/data/dalvik-cache/[email protected]@[email protected])
D/dalvikvm(15512): DexOpt: --- BEGIN 'conscrypt.jar' (bootstrap=1) ---
E/dalvikvm(15640): Fatal error: java/lang/Object
E/dalvikvm(15640): VM aborting
F/libc (15640): Fatal signal 6 (SIGABRT) at 0x00003d18 (code=-6), thread 15640 (dexopt)
I/DEBUG ( 1389): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 1389): Build fingerprint: 'Samsung/cm_totoro/totoro:5.1.1/KTU84Q/20150211:userdebug/release-keys'
I/DEBUG ( 1389): Revision: '0'
I/DEBUG ( 1389): pid: 15640, tid: 15640, name: dexopt >>> /system/bin/dexopt <<<
[A bunch of seemingly random (at least for such a noob like me) numbers]
W/dalvikvm(15512): DexOpt: --- END 'conscrypt.jar' --- status=0x0006, process failed
E/dalvikvm(15512): Unable to extract+optimize DEX from '/system/framework/conscrypt.jar'
D/dalvikvm(15512): Unable to process classpath element '/system/framework/conscrypt.jar'
D/dalvikvm(15512): DexOpt: incorrect opt magic number (0xff ff ff ff)
D/dalvikvm(15512): ODEX file is stale or bad; removing and retrying (/data/dalvik-cache/[email protected]@[email protected])
D/gps_ril_BRCM( 1390): ril thread received 0 events
D/gps_ril_BRCM( 1390): ril_state_thread, fd < 0, calling timeout_action_add
D/dalvikvm(15512): DexOpt: --- BEGIN 'okhttp.jar' (bootstrap=1) ---
E/dalvikvm(15692): Fatal error: java/lang/Object
E/dalvikvm(15692): VM aborting
F/libc (15692): Fatal signal 6 (SIGABRT) at 0x00003d4c (code=-6), thread 15692 (dexopt)
I/DEBUG ( 1389): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 1389): Build fingerprint: 'Samsung/cm_totoro/totoro:5.1.1/KTU84Q/20150211:userdebug/release-keys'
And so on, and so on, until it fails to load everything and starts all over again.
And yes, if you look at the logs, I am porting a ROM to an obsolete device and no, I don't really care that it's "not gonna work". I just want to fix that dex problem.
What I tried so far:
- cleaning up the rom (did nothing)
- changing up a few libraries that had something to do with "dex" (did nothing, but I might have missed something)
- re-unpacked the frameworks (did nothing)
- re-downloaded the rom then re-unpacked the frameworks (also did nothing)
- downloaded another rom and re-unpacked the frameworks (did nothing, what a waste of bandwidth)
- cleared Dalvik cache (did not do anything, I do that every build alongside with a factory wipe in CWM)
- changed the kernel TWICE (did nothing except for making logcat work (it wasn't working for a few builds))
Anyone got any ideas?
knuxfanwin8 said:
I'm making a CM12.1 ROM port. Every time after compilation, I'm just stuck on the boot screen. My logcat logs always look like this:
And so on, and so on, until it fails to load everything and starts all over again.
And yes, if you look at the logs, I am porting a ROM to an obsolete device and no, I don't really care that it's "not gonna work". I just want to fix that dex problem.
What I tried so far:
- cleaning up the rom (did nothing)
- changing up a few libraries that had something to do with "dex" (did nothing, but I might have missed something)
- re-unpacked the frameworks (did nothing)
- re-downloaded the rom then re-unpacked the frameworks (also did nothing)
- downloaded another rom and re-unpacked the frameworks (did nothing, what a waste of bandwidth)
- cleared Dalvik cache (did not do anything, I do that every build alongside with a factory wipe in CWM)
- changed the kernel TWICE (did nothing except for making logcat work (it wasn't working for a few builds))
Anyone got any ideas?
Click to expand...
Click to collapse
Yeah. You need to Deodex both ROM BASE and PORT BEFORE you build. That is the reason you keep getting dex errors. Use ASSAYYED Kitchen or @superR's Kitchen or similar to accomplish this ?

[CLOSED] [ROM - DEV] WearOS 2 for Gear S3

DISCLAIMER
Code:
Your warranty is now void (if you still have one).
Read the steps carefully!
I am not responsible for data loss, bricked devices or devices which will need USB soldering!
If you do not know what you're doing, stop here!
[COLOR=rgb(243, 121, 52)][B]Latest Release:[/B][/COLOR] 22/06/2022 22:58
[B]BATTERY PERCENTAGE FIX FOR 22/06/2022 RELEASE (CURRENT BUILD):[/B]
With latest release (22/06/2022), some people's battery percentage is stucked at the same level and is not updating until reboot. Here is the fix for that. No need to wipe data or do something special. This file contains kernel update only. Just flash directly with netOdin/Odin.
[B][COLOR=rgb(184, 49, 47)]GEAR S3 FRONTIER/CLASSIC ONLY!![/COLOR][/B] Installed and tested on a few SM-R760 Frontier and get succeed. SM-R770 Classic is also confirmed.
[B]BUT [COLOR=rgb(184, 49, 47)]Korean and LTE versions are NOT TESTED. THEY USE DIFFERENT KERNEL CONFIGURATION. IT WILL PROBABLY CAUSE HARD BRICK!! USE YOUR OWN RISK![/COLOR]
[COLOR=rgb(243, 121, 52)]BEFORE INSTALLATION[/COLOR][/B]
[LIST]
[*][COLOR=rgb(184, 49, 47)][B][COLOR=rgb(184, 49, 47)]DISABLE REACTIVATION LOCK[/COLOR][/B][/COLOR]
[*][COLOR=rgb(184, 49, 47)][B]Charge your watch to 100%[/B][/COLOR]
[*]Keep your device charging while installing firmware
[*]Have a stable computer with Wifi
[*]Take note your current Tizen firmware version for going back to Tizen
[*]Backup all your data
[*]Keep your watch close to your wireless adapter
[/LIST]
[B][COLOR=rgb(243, 121, 52)]INSTALLATION [/COLOR][/B][URL='https://mega.nz/file/gFRVxb6K#A0c0dnw2TspeLzo-m9jWnuieG1vTPfh2Mq5vbQzz0a0'][B](View Detailed Document Here)[/B][/URL]
[LIST]
[*]Flashing process is the same as flashing combination or Tizen firmware
[*][COLOR=rgb(184, 49, 47)][B]Wireless flashing takes 15~45 minutes.[/B][/COLOR]
[/LIST]
[LIST=1]
[*]Extract downloaded zip file to get tar file
[*]Enter wireless download mode
[*]Switch to AP mode
[*]Connect to watch from your wireless adapter
[*]Select tar file for AP section
[*]Flash
[/LIST]
[COLOR=rgb(184, 49, 47)][B]DO NOT interrupt flashing process!
DO NOT shutdown your computer or allow your computer to sleep!
DO NOT enter recovery before WearOS boots completely![/B][/COLOR]
[B][COLOR=rgb(65, 168, 95)]WHAT IS WORKING[/COLOR][/B]
[LIST]
[*]WearOS functions (Notifications, Play Store, Google Account, Assistant etc)
[*]Always on display
[*]Wifi
[*]Bluetooth
[*]Vibrator
[*]Bezel (works like crown)
[*]Tap to wake
[*]Palm to suspend
[*]Mic
[*]HRM (Hear Rate Monitor - Sensor)
[*]Sensors (Accelometer, Gyroscope, Light)
[*]Audio
[*]TWRP
[/LIST]
[B][COLOR=rgb(184, 49, 47)]KNOWN BUGS[/COLOR][/B]
[LIST]
[*]Poor Battery Life compared to Tizen (Old device, new operation system)
[*]Audio (Low sound level, bad quality)
[*]HFP calls on watch (Bad noises, distorted sound)
[*]Some menus on Settings belongs to Ticwatch (just ignore them)
[*]Offline charging boots device
[*]GPS is not working
[*]NFC is not working
[*]Step Counter is not working
[*]Some green text above SAMSUNG logo while booting
[*]Same green text on Wireless Download Mode. It prevents debug messages (Switching to AP mode etc) [B]but functionality is not effected.[/B]
[*]If device goes to TWRP, just click Reboot -> System.
[*]Selinux is in Permissive mode
[*]ADB Root is active
[*]KNOX will be tripped!!
[/LIST]
[B][COLOR=rgb(243, 121, 52)]RESETTING WATCH OR CONNECTING NEW DEVICE[/COLOR]
[COLOR=rgb(184, 49, 47)]NEVER use WearOS settings menu to reset watch!!! It is not tested and may be brick your device.[/COLOR][/B]
Option 1: Flash WearOS again
Option 2: Boot to TWRP and Wipe Data [COLOR=rgb(184, 49, 47)][B](IMPORTANT! Be sure “Use rm -rf instead of formatting” is selected on TWRP settings. (TWRP Settings -> General Settings)[/B][/COLOR]
[COLOR=rgb(243, 121, 52)][B]GOING BACK TO TIZEN[/B][/COLOR]
[LIST=1]
[*]Find and download your Tizen firmware from internet. (Remember, you took note your firmware version before installation)
[*]If you can not find your firmware you can try [URL='https://mega.nz/file/JYoQ2AgY#rqw2jZm_eJHjmGkKz4lzVProxyE1DpZA20jYYce-2ow']THIS TIZEN FIRMWARE[/URL]. [COLOR=rgb(184, 49, 47)][B](It may has different CSC. Be careful!)[/B][/COLOR]
[*]Flash
[/LIST]
[B][COLOR=rgb(243, 121, 52)]TELEGRAM GROUP
SOURCES[/COLOR][/B]
[URL='https://github.com/parasetam0l']Github (parasetam0l)[/URL] for kernel, device tree and other SMDK - Samsung related files.
[B][COLOR=rgb(243, 121, 52)]THANKS TO[/COLOR][/B]
[URL='https://github.com/TO21Consortium/SGSWPlatform']TO21Consortium[/URL] for beautiful SMDK source
[URL='https://github.com/YariKartoshe4ka/redline_kernel_samsung_j4lte']YariKartoshe4k[/URL] for Exynos 7570 kernel source
[URL='https://github.com/Biktorgj/android_device_samsung_pontesolo/tree/master/libsensors']Biktorgj[/URL] for Gear S and SSP sensor sources
[URL='https://wear.revtechs.me/en/download']OneOS [/URL]for TicWatch WearOS2 system dump
Many other developers I came across with Google search.
[USER=12140719]@trapecija[/USER] For SM-R770 Classic feedback
DEVELOPER NOTES :
Soldering USB and Odin USB mode: Done
Install Combination firmware (COMBINATION-FT30_R760XXU2CQL1): Done
Root Access (Combination firmware is pre rooted): Done
Build Tizen Kernel: Done
Upstream Tizen Kernel to latest (from 3.18.14 to 3.18.140): Done
Enable Android configs and disable some Samsung stuff on kernel: Done
Kernel cmdline patch for booting from mmc: Done
TWRP device tree: Done
Build TWRP: Done
MM (memory management) and FB (framebuffer) patch for IOMMU error: Done
PMIC patch for enabling USB: Done
Created fstab file: Done
Update Android Binder kernel driver: Done
Android Boots with ADB support: Done
USB Charging: Done
Mali T720 GPU Driver Update: Done
Decon Framebuffer: Done
S6E36W2X01 LCD Panel: Done
Compile AOSP9: Done
WearOS2 Port: Done
Broadcom 43102 Wifi and Bluetooth SDIO: Done
Palm to suspend: Done
Audio: Partially Fixed (Low sound level and quality)
HFP (Handsfree Protocol): Partially Fixed (Mic works, speaker distorted sound)
Brightness: Done
Vibration: Done
LSM6DSL Accelometer and Gyroscope Sensor: Done
TSL2584 Light Sensor: Done
PPS960 Heart Rate Sensor: Done
SSP Sensor Hub: Partially
Tap to Wake: Done
Always on display: Done
Bezel: Done
THINGS TO DO:
GPS
NFC
Offline charging
Step Counter
Power Optimizations (power.exynos5)
Audio and HFP (mixer_paths.xml)
SSP Sensor Hub
...
...
...
WearOS 3
Code:
ls -l /dev/disk/by-partlabel
lrwxrwxrwx 1 root root 15 Jan 20 23:11 boot -> ../../mmcblk0p8
lrwxrwxrwx 1 root root 15 Jan 20 23:11 cm -> ../../mmcblk0p7
lrwxrwxrwx 1 root root 15 Jan 20 23:11 cpnvcore -> ../../mmcblk0p3
lrwxrwxrwx 1 root root 15 Jan 20 23:11 csa -> ../../mmcblk0p2
lrwxrwxrwx 1 root root 16 Jan 20 23:11 csc -> ../../mmcblk0p11
lrwxrwxrwx 1 root root 16 Jan 20 23:11 module -> ../../mmcblk0p10
lrwxrwxrwx 1 root root 15 Jan 20 23:12 param -> ../../mmcblk0p6
lrwxrwxrwx 1 root root 15 Jan 20 23:11 ramdisk1 -> ../../mmcblk0p5
lrwxrwxrwx 1 root root 15 Jan 20 23:11 ramdisk2 -> ../../mmcblk0p4
lrwxrwxrwx 1 root root 15 Jan 20 23:11 recovery -> ../../mmcblk0p9
lrwxrwxrwx 1 root root 16 Jan 20 23:11 rootfs -> ../../mmcblk0p14
lrwxrwxrwx 1 root root 16 Jan 20 23:11 steady -> ../../mmcblk0p15
lrwxrwxrwx 1 root root 16 Jan 20 23:11 system-data -> ../../mmcblk0p12
lrwxrwxrwx 1 root root 15 Jan 20 23:11 tup -> ../../mmcblk0p1
lrwxrwxrwx 1 root root 16 Jan 20 23:11 user -> ../../mmcblk0p13
Code:
(parted) print
print
Model: MMC FJX7AA (sd/mmc)
Disk /dev/block/mmcblk0: 3909MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 4194kB 37.7MB 33.6MB tup
2 37.7MB 46.1MB 8389kB ext4 csa
3 46.1MB 48.2MB 2097kB cpnvcore
4 48.2MB 69.2MB 21.0MB ext2 ramdisk2
5 69.2MB 77.6MB 8389kB ext2 ramdisk1
6 77.6MB 86.0MB 8389kB param
7 86.0MB 89.1MB 3146kB cm
8 89.1MB 106MB 16.8MB boot
9 106MB 123MB 16.8MB recovery
10 123MB 139MB 16.8MB ext4 module
11 139MB 339MB 199MB ext4 csc
12 339MB 504MB 166MB ext4 system-data
13 504MB 2538MB 2033MB ext4 user
14 2538MB 3907MB 1369MB ext4 rootfs
15 3907MB 3907MB 262kB steady
I will use
system-data -> /recovery
csc -> /cache
user -> / (system as root)
rootfs -> /data
UPDATE:
I am using
Code:
SM-R870_samsung-freshbl-freshbl-11-RWD1.210503.001-R870XXU1BUH9-user-release-keys.tar.gz
which is referenced from this post. It is Android 11 based WearOS 3. You can also find this file if you search on the internet. This is not a full firmware. Many files are missing. I think they dumped this from a factory device while it is running or they removed some files intentionally.
but I completed missing files for minimal booting. I also fixed Android's binder driver. Now device is booting to Android with working ADB. I can get logs from logcat. Very good!
Next thing is graphics driver. GW4 firmware does not include a surfaceflinger binary. So I built my own surfaceflinger with some modifications. Solis has Mali T720 MP1. I got this from ADB.
Code:
01-23 02:54:06.980 4377 4377 E mali : file /dev/mali0 is not of a compatible version (user 10.6, kernel 10.2)
01-23 02:54:06.986 4377 4377 E mali : ERROR: The DDK is not compatible with any of the Mali GPUs on the system.
01-23 02:54:06.986 4377 4377 E mali : The DDK was built for 0x720 r1p1 status range [0..15], but none of the GPUs matched:
01-23 02:54:06.989 4377 4377 E mali : file /dev/mali0 is not of a compatible version (user 10.6, kernel 10.2)
01-23 02:54:06.989 4377 4377 W libEGL : eglInitialize(0xf3b010a0) failed (EGL_NOT_INITIALIZED)
01-23 02:54:06.990 4377 4377 E libEGL : call to OpenGL ES API with no current context (logged once per thread)
01-23 02:54:06.990 4377 4377 F RenderEngine: eglQueryStringImplementationANDROID(EGL_VERSION) failed
01-23 02:54:06.991 4377 4377 F libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 4377 (surfaceflinger), pid 4377 (surfaceflinger)
Things to check:
Code:
libGLES_mali.so (This is main driver library with many other files)
Mali T72x Kernel driver
UPDATE:
I fixed USB charging and added ambient capabilities to kernel (which is needed for surfaceflinger and in general android).
So this error is gone:
Code:
capabilities requested but the kernel does not support ambient capabilities
I also updated tizen_arm MALI kernel drivers from r12p0 to arm r29p0. With proper libGLES_mali.so, DDK error is gone.
I tried to use Exynos 7570 hardware composer from several roms. Now I am facing a problem with lcd panel. LCD panel gives this error.
Code:
01-01 00:00:10.094 222 222 E HWComposer: getAttribute: getDisplayAttribute failed for display 0: BadParameter (4)
01-01 00:00:10.094 222 222 E HWComposer: getDisplayConnectionType: getDisplayConnectionType failed for display 0: Unsupported (8)
Because of this problems, I stopped porting WearOS and started building LineageOS from stratch. Before building process, I have to prepare a device tree. This repos are helpful for preparing device tree.
Code:
https://github.com/LineageOS/android_hardware_samsung
https://github.com/LineageOS/android_hardware_samsung_slsi_exynos5
https://github.com/LineageOS/android_hardware_samsung_slsi_exynos
https://github.com/LineageOS/android_hardware_samsung_slsi_exynos7580
https://github.com/LineageOS/android_hardware_samsung_slsi_libbt
https://github.com/LineageOS/android_kernel_samsung_universal7580
https://github.com/LineageOS/android_hardware_samsung_slsi_openmax
https://github.com/TO21Consortium/SGSWPlatform
Nice work, just keep going! Many of us are looking forward to this, perseverance!
I've been following "the other thread" for years. I really like yours and the way you show progress and steps very clearly. I hope you'll succeed!
Great work!
Thank you all for your good wishes. It's been a busy week for me.
UPDATE:
I built hwcomposer and gralloc from stratch. Now android recognizes our display.
Code:
11-14 01:04:46.884 1956 1956 D hwcomposer: using
11-14 01:04:46.884 1956 1956 D hwcomposer: xres = 360 px
11-14 01:04:46.884 1956 1956 D hwcomposer: yres = 360 px
11-14 01:04:46.884 1956 1956 D hwcomposer: width = 33 mm (277.090000 dpi)
11-14 01:04:46.884 1956 1956 D hwcomposer: height = 33 mm (277.090000 dpi)
11-14 01:04:46.884 1956 1956 D hwcomposer: refresh rate = 56 Hz
11-14 01:04:46.884 1956 1956 V DisplayResourceManagerModule: externalMPP type(4), index(0)
11-14 01:04:46.884 1956 1956 I hwcutils: Open /dev/s5p-smem
11-14 01:04:46.885 1956 1956 V DisplayResourceManagerModule: externalMPP type(5), index(0)
11-14 01:04:46.886 1956 1956 I hwcomposer: PSR info devname = /sys/devices/14830000.decon_fb/psr_info
11-14 01:04:46.886 1956 1956 I hwcomposer: PSR mode = 2 (0: video mode, 1: DP PSR mode, 2: MIPI-DSI command mode)
11-14 01:04:46.886 1956 1956 I hwcomposer: Panel type = 0 (0: Legacy, 1: DSC)
11-14 01:04:46.886 1976 1976 I SurfaceFlinger: Using HWComposer service: 'default'
11-14 01:04:46.888 1956 1956 I HWC2On1Adapter: Found support for HWC virtual displays
11-14 01:04:46.889 1976 1976 I SurfaceFlinger: SurfaceFlinger is starting
11-14 01:04:46.889 1956 1956 E HWC2On1Adapter: Setting active config to 0 for HWC1 config 0
Code:
11-14 01:04:54.226 1976 1976 I RenderEngine: OpenGL ES informations:
11-14 01:04:54.226 1976 1976 I RenderEngine: vendor : ARM
11-14 01:04:54.226 1976 1976 I RenderEngine: renderer : Mali-T720
11-14 01:04:54.226 1976 1976 I RenderEngine: version : OpenGL ES 3.1 v1.r29p0-01rel0.###other-sha0123456789ABCDEF0###
11-14 01:04:54.226 1976 1976 I RenderEngine: extensions: GL_EXT_debug_marker GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth24 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_EXT_read_format_bgra GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3 GL_OES_EGL_sync GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_required_internalformat GL_OES_vertex_array_object GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_type_2_10_10_10_REV GL_OES_fbo_render_mipmap GL_OES_element_index_uint GL_EXT_shadow_samplers GL_OES_texture_compression_astc GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_KHR_texture_compression_astc_sliced_3d GL_KHR_debug GL_EXT_occlusion_query_boolean GL_EXT_disjoint_timer_query GL_EXT_blend_minmax GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_OES_texture_3D GL_EXT_texture_storage GL_EXT_multisamp
11-14 01:04:54.226 1976 1976 I RenderEngine: GL_MAX_TEXTURE_SIZE = 8192
11-14 01:04:54.226 1976 1976 I RenderEngine: GL_MAX_VIEWPORT_DIMS = 8192
BUT:
Code:
11-14 01:04:57.239 1976 1976 E HWComposer: loadLayerMetadataSupport: getLayerGenericMetadataKeys failed: UNSUPPORTED (8)
11-14 01:04:57.242 1976 1976 I HWComposer: Switching to legacy multi-display mode
11-14 01:04:57.242 1976 1976 E HWComposer: isConnected failed for display 0: Invalid display
11-14 01:04:57.243 1956 2065 E display : [PrimaryDisplay] unknown display attribute 7
11-14 01:04:57.243 1956 2065 E display : [PrimaryDisplay] unknown display attribute 8
11-14 01:04:57.243 1956 2065 E display : [PrimaryDisplay] unknown display attribute 9
11-14 01:04:57.243 1956 2065 E display : [PrimaryDisplay] unknown display attribute 10
11-14 01:04:57.243 1956 2065 E display : [PrimaryDisplay] unknown display attribute 11
11-14 01:04:57.243 1956 2065 E display : [PrimaryDisplay] unknown display attribute 12
11-14 01:04:57.248 1976 2142 W SurfaceFlinger: Ignoring VSYNC request while display is disconnected
11-14 01:04:57.249 1976 2142 W SurfaceFlinger: Ignoring VSYNC request while display is disconnected
11-14 01:04:57.249 1976 2143 W SurfaceFlinger: Ignoring VSYNC request while display is disconnected
11-14 01:04:57.249 1976 2143 W SurfaceFlinger: Ignoring VSYNC request while display is disconnected
11-14 01:04:57.250 1976 2142 W SurfaceFlinger: Ignoring VSYNC request while display is disconnected
11-14 01:04:57.250 1976 2142 W SurfaceFlinger: Ignoring VSYNC request while display is disconnected
11-14 01:04:57.250 1976 1976 E HWComposer: getDisplayConnectionType: getDisplayConnectionType failed for display 0: Unsupported (8)
11-14 01:04:57.254 1976 1976 I FramebufferSurface: framebuffer size has been limited to [360x360] from [360x360]
11-14 01:04:58.099 1976 1976 D SurfaceFlinger: Setting power mode 2 on display 0
11-14 01:04:58.099 1956 2065 I hwcomposer: exynos_setPowerMode:: disp(0), mode(2)
11-14 01:04:58.100 1976 1976 D SurfaceFlinger: Finished setting power mode 2 on display 0
This means we still have incompatibility between hwcomposer and android system. I am missing something. I will double check framebuffer and display permissions. And I also noticed that surfaceflinger from Exynos7570 device uses this libraries.
Code:
solis:/system_root/system/bin # readelf -d surfaceflingerj4lte | grep NEEDED
0x00000001 (NEEDED) Shared library: [[email protected]]
0x00000001 (NEEDED) Shared library: [android.hardware.configstore-utils.so]
0x00000001 (NEEDED) Shared library: [[email protected]]
0x00000001 (NEEDED) Shared library: [vendor.samsung_slsi.hardware.configstore-utils.so]
0x00000001 (NEEDED) Shared library: [[email protected]]
0x00000001 (NEEDED) Shared library: [[email protected]]
0x00000001 (NEEDED) Shared library: [[email protected]]
0x00000001 (NEEDED) Shared library: [[email protected]]
0x00000001 (NEEDED) Shared library: [libbinder.so]
0x00000001 (NEEDED) Shared library: [libcutils.so]
0x00000001 (NEEDED) Shared library: [libdisplayservicehidl.so]
0x00000001 (NEEDED) Shared library: [libhidlbase.so]
0x00000001 (NEEDED) Shared library: [libhidltransport.so]
0x00000001 (NEEDED) Shared library: [libinput.so]
0x00000001 (NEEDED) Shared library: [liblayers_proto.so]
0x00000001 (NEEDED) Shared library: [liblog.so]
0x00000001 (NEEDED) Shared library: [libprocessgroup.so]
0x00000001 (NEEDED) Shared library: [libsync.so]
0x00000001 (NEEDED) Shared library: [libtimestats_proto.so]
0x00000001 (NEEDED) Shared library: [libutils.so]
0x00000001 (NEEDED) Shared library: [libsurfaceflinger.so]
0x00000001 (NEEDED) Shared library: [libSurfaceFlingerProp.so]
0x00000001 (NEEDED) Shared library: [libc++.so]
0x00000001 (NEEDED) Shared library: [libc.so]
0x00000001 (NEEDED) Shared library: [libm.so]
0x00000001 (NEEDED) Shared library: [libdl.so]
But newly compiled one uses
Code:
solis:/system_root/system/bin # readelf -d surfaceflinger | grep NEEDED
0x00000001 (NEEDED) Shared library: [[email protected]]
0x00000001 (NEEDED) Shared library: [android.hardware.configstore-utils.so]
0x00000001 (NEEDED) Shared library: [[email protected]]
0x00000001 (NEEDED) Shared library: [[email protected]]
0x00000001 (NEEDED) Shared library: [[email protected]]
0x00000001 (NEEDED) Shared library: [libbinder.so]
0x00000001 (NEEDED) Shared library: [libcutils.so]
0x00000001 (NEEDED) Shared library: [libdisplayservicehidl.so]
0x00000001 (NEEDED) Shared library: [libhidlbase.so]
0x00000001 (NEEDED) Shared library: [libinput.so]
0x00000001 (NEEDED) Shared library: [liblayers_proto.so]
0x00000001 (NEEDED) Shared library: [liblog.so]
0x00000001 (NEEDED) Shared library: [libprocessgroup.so]
0x00000001 (NEEDED) Shared library: [libsync.so]
0x00000001 (NEEDED) Shared library: [libutils.so]
0x00000001 (NEEDED) Shared library: [libsurfaceflinger.so]
0x00000001 (NEEDED) Shared library: [libSurfaceFlingerProp.so]
0x00000001 (NEEDED) Shared library: [libc++.so]
0x00000001 (NEEDED) Shared library: [libc.so]
0x00000001 (NEEDED) Shared library: [libm.so]
0x00000001 (NEEDED) Shared library: [libdl.so]
Either there is a misconfiguration on my device tree or some things have changed with Android 11. I see that system boots to setup screen from adb logs but no display. Let's find what causes this. (kernel, hwcomposer,gralloc, exynos libraries or something else)
GOOOD NEWS AND BAD NEWS:
I successfully built a Lineage 18.1 rom. But due to massive HAL changes, framebuffer and hardware composer incompability, display was never worked. So I decided start from earlier Android version that we hope HWC is working. With the big help of this repository, I prepared an AOSP M build environment with custom surfaceflinger, samsung hardware, and solis device tree (with small changes on smdk7270 device tree). I also worked on kernel. Downgraded binder and mali drivers for Android M. Patched decon framebuffer, lcd and backlight. Built AOSP on Ubuntu 14. Time for good news.
GOOD NEWS: Hello Android on Gear S3
BAD NEWS: Nothing is working except display (touchscreen is also working) and USB. We have a lot of work to do. Now it is time to build and upgrade Android version by version.
I noticed that BEZEL is also working! I think it is working like a middle scroll button of a computer mouse. I did not tested too much. When you rotate bezel, A black mouse pointer comes to screen and page scrolls.
Not sure if you allready find something usefull inside AKI Source...
Gear S3 Root and Kernel Source! (Android Wear Port Thread)
Hey guys! Some of you might know me from the LG G5 scene, but I have since moved on from there and am hoping to make some progress with the Gear S3 :) After doing some digging and paying zero attention in class today, I came across the kernel...
forum.xda-developers.com
SEC_Android_Independent_EVT0.0_E7270_BSP_KERNEL.tar.zip
SEC_Android_Independent_EVT0.0_E7270_BSP_u-boot.tar.zip
GitHub - naverlabs/aki: AKI open source repository
AKI open source repository. Contribute to naverlabs/aki development by creating an account on GitHub.
github.com
Only as info...
Best Regards
Hey, good work! I want to thank you @parasetam0l and @adfree for your hard work, just for a smartwatch that has begun to be forgotten.
I have a bit of experience in coding myself and I'll be ready for helping you in whatever testing you need. (After the soldering part is done and all the installation can be done without any -possible- physical damage)
I can't wait to use Wear OS in my watch, I've been reading and waiting for this to happen for sooo long
Is there any significant difference in source code of the SM-R760 and SM-R770?
Only the first one was uploaded by Samsung and I have the second one.
If I'm not mistaken they are the frontier and classic models so they might be identical in firmware.
Hello all,
I am trying to keep this topic as up to date as possible. Due to my job, I haven't been able to have enough time for this project for the last few weeks. But I am doing little things day by day.
adfree said:
Not sure if you allready find something usefull inside AKI Source...
Gear S3 Root and Kernel Source! (Android Wear Port Thread)
Hey guys! Some of you might know me from the LG G5 scene, but I have since moved on from there and am hoping to make some progress with the Gear S3 :) After doing some digging and paying zero attention in class today, I came across the kernel...
forum.xda-developers.com
SEC_Android_Independent_EVT0.0_E7270_BSP_KERNEL.tar.zip
SEC_Android_Independent_EVT0.0_E7270_BSP_u-boot.tar.zip
GitHub - naverlabs/aki: AKI open source repository
AKI open source repository. Contribute to naverlabs/aki development by creating an account on GitHub.
github.com
Only as info...
Best Regards
Click to expand...
Click to collapse
@adfree
I looked at this repository. Only kernel and UBOOT source. It is also based AOSP 7. Nothing for Exynos 7270 specific device files. For now, no work needed for kernel side and we have combination SBOOT which allows booting Android. Thank you for your help.
lavasbey said:
Hey, good work! I want to thank you @parasetam0l and @adfree for your hard work, just for a smartwatch that has begun to be forgotten.
I have a bit of experience in coding myself and I'll be ready for helping you in whatever testing you need. (After the soldering part is done and all the installation can be done without any -possible- physical damage)
I can't wait to use Wear OS in my watch, I've been reading and waiting for this to happen for sooo long
Click to expand...
Click to collapse
@lavasbey
At this time no testing needed because of nothing to test I am heavily editing gpu and lcd drivers. When they are done, it will be impossible to physically damage to watch. With USB we can always flash our device even it is dead. For wireless download mode I can not promise anything If some testing needed, I will contact you. Thank you for your good wishes and wanting to help.
I will try to explain what I am doing and I want to reach.
As we know, WearOS is based on AOSP source, but its framework part is closed source. We can say that WearOS is 80% same as full Android. For porting WearOS, we need a donor device system dump. I have
Asus Zenwatch 2 dump: WearOS2 Android 6 (too old),
Mi Watch dump: WearOS2 H MR2 Android 9 (Chinese)
TicWatch Pro dump: WearOS2 H Android 9
Galaxy Watch 4 dump: WearOS3 Android 11.
To run WearOS on a new device:
Copy all system and ramdisk files from donor device to new device.
Replace device specific files (init, fstab, rc files, hardware libraries, vendor libraries, binaries etc which we got from our AOSP build)
Get screen, USB, ADB working and solve errors from logs.
Solve driver issues.
Porting WearOS gets easier after working AOSP on device. We can build necessary libraries from source and replace donor device's libraries with our compiled ones.
My first goal is make AOSP 9 working for porting WearOS2. Because latest WearOS2 based on Android H MR2. My next goal is make AOSP 11 working for WearOS3. We can not use smdk7270 or exynos7580 source directly on Android 9 or 11. Too much compile errors. So I will try to build AOSP version by version and solve problems step by step. We see that AOSP 6 is working. I also built AOSP 7 and it is also working.
After Android 8, things changed. Google divided hardware management to HALs, libraries and services. First stage mount, system as root, vndk system showed themselves. I am solving problems on device tree and samsung libraries for building newer AOSP. Whenever we run AOSP 8, it will be easier to reach AOSP 11 and WearOS3.
I just need some more time. Stay tuned for good news.
Granat1 said:
Is there any significant difference in source code of the SM-R760 and SM-R770?
Only the first one was uploaded by Samsung and I have the second one.
If I'm not mistaken they are the frontier and classic models so they might be identical in firmware.
Click to expand...
Click to collapse
Hello @Granat1,
As I discovered SM-R760 uses tizen_solis_defconfig, SM-R770 uses tizen_pop_defconfig. So their kernel configurations are different. I am working on SM-R760 for now so I am not 100% sure. But I know it's just like you said. They should have same hardware and firmware.
EDIT: I read from another thread, tizen_pop_defconfig may be using for SM-R600 (Samsung Gear Sport) and tizen_solis_defconfig is for SM-R760 and SM-R770 (Gear S3 frontier-classic). As I said I am not sure. I am using tizen_solis_defconfig for Gear S3 SM-R760.
Finally,
Display drivers made me tired. I successfully ported Exynos7570 framebuffer and Mali gpu drivers. I replaced dummy LCD driver with LCD driver from Tizen kernel and solved compilation errors. I also patched decon for right RGB colors. Now display is working as expected. It still needs some operation for always on display but that's enough work for the screen for now.
I compiled AOSP9. As I said, with a working Android 9 porting WearOS 2 will get easier. Here is the proof
I can not pass setup screen, because bluetooth is not working. Tizen's bluetooth initialization procedure is different than Android. Gear S3 uses Broadcom BCM43012. Now I am searching Android devices which use this chip then I will fix the bluetooth.
parasetam0l said:
Finally,
Display drivers made me tired. I successfully ported Exynos7570 framebuffer and Mali gpu drivers. I replaced dummy LCD driver with LCD driver from Tizen kernel and solved compilation errors. I also patched decon for right RGB colors. Now display is working as expected. It still needs some operation for always on display but that's enough work for the screen for now.
I compiled AOSP9. As I said, with a working Android 9 porting WearOS 2 will get easier. Here is the proof
View attachment 5570925
I can not pass setup screen, because bluetooth is not working. Tizen's bluetooth initialization procedure is different than Android. Gear S3 uses Broadcom BCM43012. Now I am searching Android devices which use this chip then I will fix the bluetooth.
Click to expand...
Click to collapse
dude you're doing a great job. Can't wait to flash WearOs on my device if it will be a thing in the future!
Dude, thanks a lot for your work! Amazing
I have a active 2 don't know about coding but I think it could work in R820 too ??
pedromms86 said:
Dude, thanks a lot for your work! Amazing
I have a active 2 don't know about coding but I think it could work in R820 too ??
Click to expand...
Click to collapse
Hello, thank you!
This work is Gear S3 (SM-R760, SM-R770) only. It will not work on other devices.
I took a quick look at the features of GWA2 (SM-R820). It has Exynos 9110 with Mali T720MP1 (which is the same as Gear S3). GWA2 also has USB connection (with soldering), SBOOT from combination firmware (necessary for booting something other than tizen) and kernel source (for android specific code). So yes, it is possible to port WearOS. Porting system part will be easy. Difficult part is porting drivers for example sensors.
Thanks for the great work!!
I am looking forward to this project and wishing you luck!
I am wondering if I can install this port for my device in the future? I have Gear S3 Frontier (SM-R765K) Korean version. Also do I need to solder the usb to the device? Or can I flash it via wireless connection?
Thanks for the good work and good luck!

Categories

Resources