yashsingh1/xdaforums huggingface dataset:
[AT&T Samsung Galaxy Note II] MonsterBandit:
might help madmack...he'll have to chime in...but i don't think the issue is with the TinyHAL or TinyALSA its with how those two things communicate with the modem audio device

"It's not a tiny alsa issue nor a routing issue.. simply a connection issue between the modem audio device and our functional tinyhal implementation."

Quoted from madmack earlier
[AT&T Samsung Galaxy Note II] codeninja99:
@madmack, I am getting the vendor tree to dissas libaudio-ril.so right now. It would be great if you can get on some sort of chat. I can share a few things with you. that, I cannot on here. Let me know

As promised: Here you go : http://www.mediafire.com/?q724xtcpir4pxne

Let me know if you need others. Or care to contact me ;)
[AT&T Samsung Galaxy Note II] jee'sgalaxy:
Just read entropy's post.

IF you read through this thread, you'll see that the problem has been identified to be the RIL audio interface - audio HAL needs to talk to the RIL and that's not working due to a significantly different RIL interface. (Infineon/Intel XMM6260 modem vs. Qualcomm MDM9615 modem).

There are currently no opensource HALs for MDM9615 + WM1811. However, with a bit of work, madmack should be able to adapt the MDM9615 stuff (csd-client IIRC?) from mako and replace the XMM6260 (secril-client) **** in our HAL.

... what a pain...
[AT&T Samsung Galaxy Note II] MonsterBandit:
here's what madmack said earlier:

according to that he wants/needs to decompile libaudio-ril.so to figure out how it communicates with TinyHAL...if we can gain access to someone with an ARM Decompiler then we can get that file decompiled and madmack can examine it to get the correct routing, etc...

on a side note would haveing a decompiler help in "cracking the exynos code"? Meaning having someone (very dedicated and fully supported by the community aka serious donations) work on work on getting documentation written...seeing as Samsung won't provide the documents?

---------- Post added at 01:20 PM ---------- Previous post was at 01:13 PM ----------

agreed its a pain in the buns...but worth it to get TinyHAL working, it might even shed some light on other exynos devices and help move their development forward....hence why I think if there was an individual or team will to dedicate the time to seriously rip apart these devices with a decompiler to figure out proper routing etc. we might get codeworx (SP?) back, Entropy might think about getting a Note 2 instead of borrowing one (lol)...we might be able to show Samsung that we don't care for their posture on the subject (or lack there of) and shove it in their faces...if i knew more about how to do it, where to start, had a decompiler (or access to one) we could decompile a source dump and write our own documentation and to hell with Samsung

i could be way off here so please point me in the right direction if i am.
[AT&T Samsung Galaxy Note II] mjwhirly:
look two post up someone already decompilied it for us ;)
[AT&T Samsung Galaxy Note II] MonsterBandit:
holy crap how did i miss that lol...thanks code ninja lol and mj for pointing it out
[AT&T Samsung Galaxy Note II] codeninja99:
Click the thank you button from my post where i decompiled it :)
[AT&T Samsung Galaxy Note II] MonsterBandit:
done and done...lol
[AT&T Samsung Galaxy Note II] mjwhirly:
+1 to madmack hopping on the irc chat :) http://xdaforums.com/showthread.php?t=1957207 just to help him in the right direction:silly:
[AT&T Samsung Galaxy Note II] jug6ernaut:
asm...brings back...memories...scary..scary memories...
[AT&T Samsung Galaxy Note II] tino_b:
Awesome!
[AT&T Samsung Galaxy Note II] volcomguyaz:
I just just became a show stoppage :(
[AT&T Samsung Galaxy Note II] jee'sgalaxy:
especially because compiling this **** can harm the crap out of a computer...
[AT&T Samsung Galaxy Note II] madmack:
Not really useful unfortunately. This info is no different than what good old "objdump" can do in Linux.

Not the easiest thing to understand what goes on in assembly, let alone arm instructions. I do know that hexrays is capable of producing pseudocode. If you can get us that, then that would be very useful.

Use the decompiler, not the disassembler.
[AT&T Samsung Galaxy Note II] codeninja99:
I'll try to find someone with it. But, if you put the asm together. You can follow the flow. and each sub is defined. it has symbols.
[AT&T Samsung Galaxy Note II] Dazog:
What file exactly do you need run through hexrays?
[AT&T Samsung Galaxy Note II] MonsterBandit:
libaudio-ril.so
[AT&T Samsung Galaxy Note II] tino_b:
Maybe we should put up a request page to look for someone who has the software and if necessary chip in for a gratification/fee.
[AT&T Samsung Galaxy Note II] farmercyst:
I have access to the software. I will see if I can get what madmack needs...no gratification fee required ;)
[AT&T Samsung Galaxy Note II] jee'sgalaxy:
wow, thanks a lot man! hex ray edit #2 - sorry, i keep getting confused between ida pro and hex ray decompiler.

hex ray i hear is harder to get, i think... to those interested.
[AT&T Samsung Galaxy Note II] farmercyst:
No me directly. Friends in high places. They have no problem exchanging services.
[AT&T Samsung Galaxy Note II] jee'sgalaxy:
hey monster, you think you can upload the file so that farmer doesnt have to find this himself?

edit- anyone who needs to be caught up - http://xdaforums.com/showpost.php?p=35612300&postcount=45
[AT&T Samsung Galaxy Note II] tino_b:
Nice!
[AT&T Samsung Galaxy Note II] MonsterBandit:
I hope this is the right one...i pulled it from CM10 im running now...if this is wrong someone correct me please...its a 7zip package FYI
[AT&T Samsung Galaxy Note II] madmack:
You should fix the in call audio issue as it seems you're pretty comfortable with arm asm.
[AT&T Samsung Galaxy Note II] codeninja99:
I dumped one of the functions in C for you.

function sub_145a {

r6 = r1;

r4 = r2;

r7 = r3;

var_24 = r2;

if (CPU_EFLAGS & FLG_A) goto loc_1480;

loc_1480:

r8 = 0x25 ^ 0xffffffff;

*(r0 + 0x18) = 0x0;

r0 = loc_f5c();

loc_1498:

if (r6 == 0x2) {

asm{ uxtb r0, r4 };

loc_1004();

r0 = (*(*r5 + 0x18))();

}

return r8;

loc_146a:

r8 = 0x0;

r0 = loc_f5c();

goto loc_1498;

}

if you care to tell me which functions from the .arm file which has them all. I'll try to get them all dumped in C format. Like the above.
[AT&T Samsung Galaxy Note II] madmack:
Here: http://xdaforums.com/showpost.php?p=35612300&postcount=45

Decompile all the QmiCsd functions :D

More info on the difference between what you've submitted, and what I need: http://www.hex-rays.com/products/decompiler/compare_arm0.shtml
[AT&T Samsung Galaxy Note II] pokedroid:
Oh man, this is getting juicy! I wish I had any idea what you guys are talking about!
[AT&T Samsung Galaxy Note II] Entropy512:
You probably don't need to decompile.

Just look at hardware/qcom/audio-caf/ALSADevice.cpp for an example of how csdclient is used - it looks FAIRLY similar to secrilclient

Then look for "similar" secrilclient calls and massage the parameters being passed.

Yup. And had all of typical audio wonkiness of what happens when you try to use Samsung blob HALs with AOSP.

It would to some degree... Problem is decompiled code is a ***** to read. HOWEVER it's very useful for proving that Samsung's BABBQ announcement was an utter joke.

We have access to someone with a decompiler - but it's not a magic bullet. The first decompile is usually almost unreadable, but if you say "I think that variable is THIS struct" and feed it back to the decompile, it's a bit more readable. We've gone through two iterations of this with our contact but need many more on hwcomposer. We do know that even their old ICS hwcomposer blobs have major improvements not present in their source code - their source code depends on some REALLY funky hacks to the Mali/EGL blobs that their HWC/gralloc blobs don't depend on - and hence nearly any Mali/EGL setup can't be used with their source. We've mostly cracked gralloc, but the end result is we have a hwcomposer that does nothing but pass vsync through.

As to me coming back for anything more than a loaner - not going to happen unless Samsung makes major changes, which... Isn't going to happen. They claim over and over again they're changing, but they haven't changed a damn bit.

Remember, all of us do this in our spare time... The TL;DR summary is:

I spent hundreds of hours making Samsung's products more attractive to a community of at least 200,000 people (that's the minimum numberon Exynos4 CM installs) and received nothing but lies and deception in return, and Samsung throwing grenades in the community's face by "flipping the switch" to put I9100 at Superbrick risk a month after they said they were "working hard" on a fix. I don't expect any monetary compensation, but if someone is VOLUNTEERING to make your device more attractive to certain users, it would make sense to give them even a small bit of assistance and not have nearly every answer to their question be "no" or an obvious blatant lie. (Like claiming N8013 UEALGB, the firmware PREINSTALLED ON EVERY NOTE 10.1 SOLD IN THE USA, was a leak and hence Samsung didn't have to release kernel source that matched it.)

Meanwhile, Sony on a regular basis provides assistance to community developers.

Why would ANY sane person choose to waste their free time on a Samsung when they can achieve so much more with so much less effort with a Sony?

TBH you guys will be better off in the long run if I don't get a loaner - a challenge like this is very good for developing good maintainer skills. :)

No, that is disassembled, not decompiled.
[AT&T Samsung Galaxy Note II] pickneters:
Disassemble Johnny five! Sorry I had to...I try and set time aside to learn, I just don't have the energy with a full time job, wife and kid. Just have some basic Linux skills other than that I'm of no use, so all you'll get from me is patience and appreciation. I thought about selling my note 2 and getting the nexus 4, my only concern was battery. Please don't piss these guys off..pro tips use search before you ask a question and don't ask for eta's

Tl; dr Thanks devs
[AT&T Samsung Galaxy Note II] madmack:
Yea, I worked on that for a while until I realized that audio-caf's does not use all exported functions in libcsd, samsung's HAL does. Samsung created a library that bridges the function calls that are similar to secril to their stock audio.primary. That library is libaudio-ril.so

When I tried to emulate the source code that you refereed to in audio-caf, csd was printing in logcat some large int numbers (overflow?) when calling functions like "enable_device". I tried changing the input arguments and switching them around but these large int numbers that I was getting in logcat didn't change. Well, it appears that our libcsd-client has some other functions that the audio-caf don't link to like "switch_device" which the stock HAL does call. More importantly, it sets a loopback device via libaudio-ril.so which in turns talks to libssaudio-client and libcsd-client before enabling voice. libssaudio-client then talks to our qril libraries so we definitely need to set that loopback device as well. Unfortunately, these loopback functions aren't used in google's audio-caf repo so I'm really clueless as to what it needs to do and what parameters it expects.

Basically libcsd is not the only library we need to talk to, we also need to set a loopback device via libssaudio-client.so.

Here is a little tree that should help visualize what is happening in GSM non-LTE exynos devices:

audio.primary

--libsecril-client

---rild..

(more?)

in our LTE device:

audio.primary

--libaudio-ril.so

---libcsd-client.so

----rild libraries

---libssaudio-client.so

----rild libraries

The functions that libaudio-ril exports look exactly like the ones that the GSM audio.primary links to at runtime in libsecril so we really need to figure out what each of these QmiCsd functions are doing to be able to replicate its behavior and integrate it into our open source audio.primary. libsecril-client is the "bridge" the samsung created to link their own tinyhal to qualcomm's APIs.

This missing piece (libaudio-ril.so) is pretty small so if someone can give us some pseudocode that shows how exactly is it talking to libss and libcsd, then we have a good chance at fixing it. Replicating google's audio-caf by calling libcsd only won't be enough I'm afraid.

I also tried linking directly to libaudio-ril.so from audio.primary but that was a dead end: the library is written in C++ and these mangled functions segfault when being called. I have no idea what structs or arguments they expect and their function signatures don't exactly match those of secril-client.

Tough one for me. I do still look at it from time to time but I'll be getting busy with work starting Monday so I'm afraid I'll be working on this even less.
[AT&T Samsung Galaxy Note II] codeninja99:
I should be able to get all this dumped by tom. I was reading your writeup about the loop-back device. it seems to very relevant. You can see in this IDA graph how it basically works.

Note sure if my attachment worked but here is the screenshot: http://cl.ly/image/402U0K1T1C2o
[AT&T Samsung Galaxy Note II] Sebastianq28:
Lol. I have no idea what any of this language means but it seems to me that this rom is advancing! Haha cant wait for it to be a daily driver so I can fiddle around with 4.2!
[AT&T Samsung Galaxy Note II] codeninja99:
Well, I got a arm dissembler called hopper. Thankfully i did not pay for this item. Because it made some horrid code :) I'll wait on my friend with IDA to dump tom. But with IDA, You can see the flow in the graphs pretty well
[AT&T Samsung Galaxy Note II] jee'sgalaxy:
well hopefully farmercyst can get access to hexray soon. ida is a diassembler. madmack need his decompiled.

i've been in touch with an someone (who will remain anonymous). hopefully i can get something helpful soon. in the mean time, farmercyst's access to hex-ray is our best bet.
[AT&T Samsung Galaxy Note II] codeninja99:
As promised Here is the decompile of the file in c.

https://docs.google.com/open?id=0B0g-ojj_rL70OFlpTnBwRjE3N3c

I had it private should be ok now
[AT&T Samsung Galaxy Note II] jee'sgalaxy:
@madmack

So my source really didn't help since I believe you did most of these, but it doesn't hurt to look at what he said.

not much saying here? i would look through the git if I had time.. actually i will try later, but in the mean time, looks like codeninja got us the decompiled files. :laugh:
[AT&T Samsung Galaxy Note II] madmack:
Thanks ! Looks like exactly what we need. :fingers-crossed:

We already use these sources in GSM variants. They're useless to us. libsecril interface can be seen in our audio/ folder in our dev tree.
[AT&T Samsung Galaxy Note II] codeninja99:
You're welcome.

Everyone don't forget the thanks button. :)
[AT&T Samsung Galaxy Note II] madmack:
curious, was this obtained with hex-rays? looks like there might be some errors here and there but it's so readable.. impressive.
[AT&T Samsung Galaxy Note II] pokedroid:
Everyone go to post 171 and hit the thanks button!!!!!
[AT&T Samsung Galaxy Note II] codeninja99:
Yes from hex rays. The errors you may see are for you to rename. All it does it translate asm to c. It does its best hence 3k price tag :)

Hopefully this can help fix audio on cm10 also
[AT&T Samsung Galaxy Note II] tino_b:
Done!
[AT&T Samsung Galaxy Note II] codeninja99:
@madmack as for the Data RIL you put together from the radio logs. Which of those files would give you a 100% version? I can get that decompiled for you also.

Id like to see the rom stay on one connection mode and done proper if possible. :)

Let me know the file / functions you would need. Ill get it here :)
[AT&T Samsung Galaxy Note II] madmack:
I don't think we should decompile anything further. It gets messy when you try to replicate every closed source library. We need the single interface that communicates with the entire ril audio system.. that one is what you already supplied :) But damn it man, couldn't you supply that earlier? getting busy with work tomorrow and I'm so not looking forward to it now that we have this c file. lol

on second thought, if decompiling this stuff is easy, it would be cool if you can give us a c file of audio.primary.smdk4x12.so (use the stock one. should be in /system/lib/hw). It should give us a good indication of where each of these QmiCsd functions should go.

to every one else. The job is far from done. this thing can still take a week, two or a few months. We still have a lot to figure from the provided c file. For example, samsung uses a struct and we need to figure out what each variable in that struct is and then recreate it in our open source hal.

dev talk: the course of action I think is to try to call the functions in libaudio-ril now that we see the APIs clearly and know what these functions expect as parameters. We could also rewrite that library but I'll try linking to it first. It's a matter of getting the APIs right. if this doesn't work (I see constants used in the library. Perhaps they're linking to their own tinyHAL values which wouldn't work for us) then we'll have to redo what the c file does and integrate it with our open source hal. Hopefully this won't be necessary though.
[AT&T Samsung Galaxy Note II] erickwok80:
Done!:good:
[AT&T Samsung Galaxy Note II] pokedroid:
Yes, very true. However, this is still a fairly large step. I'm excited just to be watching this unfold. I'm willing to be patient, but it's exciting just to watch these hurdles get cleared.
[AT&T Samsung Galaxy Note II] otisman:
+1

Sent from my SGH-I317 using Xparent Red Tapatalk 2
[AT&T Samsung Galaxy Note II] codeninja99:
Well for starters, No one asked me to decompile anything, and quite frankly its quite hard to work with anyone just over XDA. I asked you far and way back for gtalk or something.

I can get that other file decompiled also. time to put up a donate link :)
[Samsung Captivate Glide] phatryan69:
ok guys i have a problem with my wifes phone... she let the battery die about a week ago and ever since then she cannot get her wifi to work on her phone... idk bout the reg cause we had to "downgrade" for a few months. but was thinkin about gettin data back on them and her phone wont work... cant sync, get on the net, market, nothing! i have rooted installed every rom that i have installed on mine and her net still dont work! any ideas wat could be wrong?
[Samsung Captivate Glide] phatryan69:
oh and the phone was on stock 2.3.6 cause i never got around to updating to 4.0
[Samsung Captivate Glide] phatryan69:
trying to research... any suggestion would be helpful
[Samsung Captivate Glide] phatryan69:
just looked in the hidden info menu nd her phone can't pass the "http client test"... if that helps
[Samsung Captivate Glide] phatryan69:
anyone?
[Samsung Captivate Glide] thescot33:
Why not root it and install cm10 or PACman ROMs...both are still work in progress and like 96% done...they are definitely DD's in my opinion...or upgrade to the ICS?

Have you tries a factory reset? I am pretty sure it will delete everything on the phone but might get the WiFi back up and running?

Sent from my i927 JB PACman
[Samsung Captivate Glide] phatryan69:
I have rooted an installed a custom rom nd nothin works.. i. Cannot connect to the "http client test" and I have the exact same phone wit everythig on it.. custom rom factory reset on everything
[Galaxy Note II General] Lucidmike:
Android 4.1.2 New Features for Samsung Galaxy Note 2

1. Camera feature: Hold Volume to focus, release to take photo

2. Video feature: Press Volume to start recording, press again to toggle flash.

3. 480p Flash Video Works (if you have latest Flash Player 11.1.115.34 Installed)

4. New Samsung Keyboard Feature: Cursor Control, Continuous Input (If you didn't already have it)

5. Customized Notification Toggle Icons

6. New Notification Toggles: AllShare Cast, Smart Stay, S Bean, Driving Mode, Blocking Mode

7. Brightness slider can now be disabled, but who would do this? :)

8. Browser rendering improvements (3 examples, please confirm with 4.1.1)

9. Ink Effect with S Pen on Swipe lockscreen, and customizable ink colors.

10. Some devices may experience maximum brightness boost (Up to 400% of previous level)

Video Review

http://www.youtube.com/watch?v=0qyijcTeHcU
[Galaxy Note II General] Austin3161337:
Still not rooted yet Mike ? :D (Subscriber Daily note II youtube channel :D)

I know thats off topic xD but im upgrading to stock 4.1.2 right now so thanks !
[Galaxy Note II General] Lucidmike:
I am hoping Samsung starts selling higher capacity models, so that people start selling used 16GB for cheap and I'll root that for some research, and game playing. Really, the only feature I kinda want is to to run sixaxis with an untethered PS3 controller.

Can't risk bricking my 64GB. It's like a unicorn.
[Galaxy Note II General] f3w1n:
AFAIK is nearly impossible to brick devices like note 2 (that can flash kernels via recovery)
[Galaxy Note II General] Austin3161337:
i Just got the 4.1.2 update and right off the bat the boot animation has changed. but i heard the status bar goes black mine hasnt changed its a bit lighter grey but no near to black and how do you re arrange the toggles?
[Galaxy Note II General] Lucidmike:
My status bar still isn't pitch black. Not sure if it was any more gray.

As for notification toggles it is in settings -> Display -> notification panel
[Galaxy Note II General] MohJee:
You can easily turn status bar black with xposed framework. You don't even have to flash anything, just have root access.
[Galaxy Note II General] ultra99:
I still didn't get any update. Its restrictive to certain builds?
[Galaxy Note II General] el_roy1985:
Got my Note II today. It did an update, but says it's on 4.1.1. Did I get some older update and for some reason still can't get the current one?

I have an unlocked GT-N7100.
[Galaxy Note II General] zkyevolved:
It depends on the origin of your phone. The 4.1.2 update hasn't been released to everyone yet. Patience. :)
[Galaxy Note II General] el_roy1985:
Guess I'm not sure of the origin of the phone. I'm thinking it is the international version (not sure how to tell), so was hoping that would mean I would be one of the first to get the update. Apparently that is not the case.

I had 4.1.2 flashed on my Infuse 4G, so right now I'm really missing the features 4.1.1 is missing. Hope it drops soon.
[HTC Droid DNA] mpetruzz:
Now I understand that I'm in a DNA forum, but am trying to get some responses from people who have made the switch. I love the amount of Roms and customization that I have with my s3. I can get 4 hours of screen time easy.

I'm just trying to see what in comparison to the S3 I'll be getting. I know the resolution is better and the quad vs. Dual processor etc.

Just trying to see what you all liked better after making the switch.
[HTC Droid DNA] Bigandrewgold:
battery, definitely better on dna. I'm at 65% right now with over 2 hours of screen on time. And this is with full brightness watching yt and playing games.

as you mentioned the screen and processor are better, and this definitely shows. I rarely see a loading screen and games look amazing and can run maxed out no problem

touchwiz vs sense. This is really for you to decide, sense is more polished, professional looking, and customizable on stock, but you loose features of touchwiz

But honestly, it is a decision for you to make. I recommend checking out some comparison videos on youtube
[HTC Droid DNA] mpetruzz:
To be honest the battery was scaring me. I had a rezound and that thing was horrible. I don't use touchwiz cause I'm running aokp. I love flashing new ROMs and am scared there aren't going to be many since HTC likes to lock their phones down. I've never been a big fan of sense. I guess I could just install another launcher.

How about the size comparison. I know the specs are almost the same with the DNA a tad thicker.

sent from my blue police box flying through time!!
[HTC Droid DNA] Bigandrewgold:
although the dna is thicker on paper, it feels thinner because of how it is curved