Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

AntHalService 3.1.1 APK or Help to cook ANT+ support for AOSP/GE/Custom Roms on Galaxy S4

Rank

Total Posts: 4

Joined 2013-11-24

PM

If I could get a compiled and signed 3.1.1 AntHalService.apk , as my debug signed compile won't run as a system app and got me stuck, I'd be REALLY thankful

I just started this thread on XDA regarding this, and will replicate the initial content here in the hope I find some help:
http://forum.xda-developers.com/showthread.php?p=47837990

Background:
Ant+ and Health/Sport accessories are not very widespread among smartphone users, but it was one of the major reasons a which I moved from the Nexus 4 to Galaxy S4.

While S4 on 4.3 works great with my Garmin Heart Rate Monitor(HRM), I'm not satisfied with Touchwiz and Knox.
My S4 feels laggy, slow and I want to use stock android, or even any of those KitKat releases.

Many Xperia devices have Ant+ support, and it seems that they manage to cook it into custom roms successfuly.

Target:
Assemble a flashable zip which would allow anyone with an S4 already flashed to 4.3 to use the Ant+ receiver.

Research:
I've spent some time embeddint the Ant+ files (com.dsi.ant.antradio_library.jar and .xml, and the AntHalService.apl) on MakTail's 4.3 GE but ran into an issue that blocked further investigation:

The AntHalService tries to enable bluetooth, can't find the method and reboots the device.
The version is 3.0.0 which is supplied on Stock ROM, and there is already a 3.1.1 available from Ant Alliance which removes the requirement for enabling bluetooth.
I got the source code and compiled the apk, but I can't run it as a System App, so I got stuck. Spent some time trying to workaround it, but no success.

I guess that even when I get hold of a working 3.1.1, there will be new issues, and I'm a complete newbie on ROM cooking.

So I would like help from others, maybe suggesting next steps or getting hands on with me on this project.
     

File Attachments

Avatar
RankRankRankRank

Total Posts: 129

Joined 2010-11-30

PM

Hi Adrien,

As no other third-party developers have joined in this thread, I will at least give you a response. We spend a lot of time working with handset vendors so they will turn ANT on in their devices. I cannot provide you any direct support for creating a custom rom.

As a system service, the ANT HAL Service must be signed with the same platform key used for the rest of the system.

Regards,
-Rohan      
Rank

Total Posts: 4

Joined 2013-11-24

PM

rohan - 27 November 2013 03:00 PM
Hi Adrien,

As no other third-party developers have joined in this thread, I will at least give you a response. We spend a lot of time working with handset vendors so they will turn ANT on in their devices. I cannot provide you any direct support for creating a custom rom.

As a system service, the ANT HAL Service must be signed with the same platform key used for the rest of the system.

Regards,
-Rohan


Thanks for the reply Rohan.
I managed to go around that... but found out that the HAL on github is quite different from the one used by Samsung, referencing a libantradio.so and throwing me on a bootloop.

I understand that the AntHal used to try to enable bluetooth on Qualcomm devices until 3.1.0, and the Bluetooth libraries are not the same on Android AOSP.
My hope was that using the 3.1.1 it'd bypass this by already having bluetooth enabled, but as it looks for the .so module, it crashes.
Now I'm back to analyzing the decompiled .smalis and source for AntHalService.apk to understand how deep is the dependency on bluetooth HW by Ant+.

Would you be able to answer me or direct me to understand that?
I'm thinking about bypassing the bluetooth methods or changing them to what AOSP uses, but I'm just afraid to spend a lot of time on this to find out that I'd need to bring over the bluetooth modules/classes as well, and that for me would be endgame as I'm not willing to change the OS so deep.

Just a bit frustrated as ANT+ was one of the major reasons I got the S4, and coming from Nexus 4, I hated Touchwiz so bad to the point I'm spending quite some time trying to workaround this just to use pure android.
2 years and a half without coding, and now I'm here, dwelling over java, smali, and playing with the guts of android. That's how bad Touchwiz is. haha