Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AptX Adaptive support #2 #8

Open
leleobhz opened this issue Jul 25, 2022 · 12 comments
Open

AptX Adaptive support #2 #8

leleobhz opened this issue Jul 25, 2022 · 12 comments

Comments

@leleobhz
Copy link

Following up #1 to track aptX Adaptive support.

@leleobhz
Copy link
Author

@arkq do you already know the .so and binary files that do aptX Adaptive in a phone?

@arkq
Copy link
Owner

arkq commented Jul 25, 2022

The only library that I've got is this one: https://github.com/Arkq/openaptx/blob/master/archive/qdsp6/capi_v2_aptX_CLHDAD_Encoder.so Unfortunately, it's for QDSP6 platform which is rater nor suitable (for me) for reverse engineering.

@anonymix007
Copy link

@arkq you'll probably won't find ARM or X86 versions of aptX Adaptive library. However, QDSP6 (aka Hexagon DSP) is kinda supported in Ghidra and in Binary Ninja.
Here are newer V2.2 and V3 QDSP6 encoder libraries. Looks like V2.2 is the latest aptX Adaptive version, and V3 is called aptX Lossless.
As for decoder libraries, it's worse. I do have object files for their Kalimba architecture 4 (used in QCC Bluetooth SoCs), but some of them may be stripped. There exists disassembler for this architecture (well, actually full GNU binutils build is also available as well as compiler).

@arkq
Copy link
Owner

arkq commented Aug 18, 2022

The problem with QDSP6 is that the algorithm in there is not as straightforward as in x86/ARM code. I've been checking it in IDA but I was not able to get anything useful (in a timeframe I can invest in that).

@anonymix007
Copy link

anonymix007 commented Aug 18, 2022

Can you also take a look at Kalimba versions? I added few examples of object files as well as objdump binary.
Maybe it will be easier to add support of Kalimba to i.e. Ghidra and only after that try to reverse it.

UPD: There also exists QEMU for Hexagon. Wonder if it would be possible to just use library as-is instead of reverse engineering it.
UPD2: There's also Kalimba simulator software (linux binary also exists), maybe it could be used as well

@arkq
Copy link
Owner

arkq commented Aug 19, 2022

Can you also take a look at Kalimba versions?

Yes, these binaries might be reversible at least based on symbols in them. Anyway Kalimba is not a general purpose CPU, so the assembler code might not be easy to read.

@anonymix007
Copy link

anonymix007 commented Dec 17, 2022

@arkq I think I found x86 executables for decoding aptX Adaptive (looks like this includes aptX Lossless as well, which seems to be v2.2 of aptX Adaptive) and aptX Voice (so maybe finally better quality for calls). Would you be interested in taking a look into them?

@arkq
Copy link
Owner

arkq commented Dec 17, 2022

Yes, I can take a look at it. You can send it on my email or submit PR for this repo with lib added to archives directory. I'm not sure whether I will be able to reverse it to C code in a reasonable time period (I've got lots of other things on my head currently), but at leas I will check how much effort will be required :)

@anonymix007
Copy link

@arkq PR was submitted. It will probably be a lot of effort, maybe even more than kalimba ones (they at least have the debug information)

@Carbon-Axion
Copy link

Do we have progress on this?

@anonymix007
Copy link

Nope. Maybe if there was Ghidra for Kalimba, it wouldn't be hard to reverse engineer.
Using those executables directly (inside of the emulator) might be easier until someone will add it to Ghidra or IDA (ISA docs are not public tho I have them).

@DrMirage
Copy link

is there any new progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants