Adding Audio Codecs to AOSP - Galaxy S 4 Developer Discussion [Developers-Only]

Okay, first, this may not belong here. I read the sticky:
This area is currently experimental and was set up by the XDA Administrators for development discussion.
Click to expand...
Click to collapse
I figure it has to do with development, but I'm prepared to get punted if I'm wrong.
I know very basic Linux commands. I say this because I support VMware for a living, but it's fairly locked down and I only use the command line when installing drivers or troubleshooting.
How hard would it be to add an audio codec to an AOSP ROM. I already have the codec pulled out of another, non-AOSP ROM. Pretty sure I have the files necessary. But I'm not sure about how to add it to an AOSP ROM. From my googling, it sounds like it's not as simple as just copying the codec over. I actually have to edit other system files to point to the codec.
Would all this require re-compiling a ROM? How serious is this going to be? I don't know how to build my own ROM's. So I'd have to learn. But I'm really short on personal time and if this is going to be a HUGE deal, I'd rather just forget about it.
What do you guys think?

CZ Eddie said:
Okay, first, this may not belong here. I read the sticky:
I figure it has to do with development, but I'm prepared to get punted if I'm wrong.
I know very basic Linux commands. I say this because I support VMware for a living, but it's fairly locked down and I only use the command line when installing drivers or troubleshooting.
How hard would it be to add an audio codec to an AOSP ROM. I already have the codec pulled out of another, non-AOSP ROM. Pretty sure I have the files necessary. But I'm not sure about how to add it to an AOSP ROM. From my googling, it sounds like it's not as simple as just copying the codec over. I actually have to edit other system files to point to the codec.
Would all this require re-compiling a ROM? How serious is this going to be? I don't know how to build my own ROM's. So I'd have to learn. But I'm really short on personal time and if this is going to be a HUGE deal, I'd rather just forget about it.
What do you guys think?
Click to expand...
Click to collapse
IMO i would rather get a rom that comes with an AROMA installer then you can pick and choose which sounds you'd like from any AOSP you like

I found out that you can add the codecs to an AOSP ROM.
The tricky part is telling the AOSP ROM to point to the codecs you want to use.
There were 2 or 4 files codec files if I remember correct. They were easy to find but I already deleted them.
I received permission from a moderator to start a $$$ [PLEDGE] thread to get a developer to figure out how to do all this. Just haven't had the time to do it yet.

Related

[Q] android kitchen

hello guys just set up dxsidia android kitchen not sure if anyone uses this but i have a few questions and since dxsidia does not support this anymore was hoping someone could answer them for me...
1. is the major obvious one does it work on the photon in the thread it does say unconfirmed for atrix but nothing on photon?
2.after creating the work folder i go into advanced options and start editing? i realize since there is nothing on the photon most of my answers are probably going to be try and see but no harm in asking right...
3.it has a set of pluign scripts labeled sgs2/ sgs these are for samsung galaxy s right so i dont want to use any of them?
4. there is a task killer tweak you can add from it what exactly is this?
5. add data/app functionality??? lets you add or remove apps??? not sure is why im asking
there are more q's but i figured if i can get these answered im doing good
ive read the thread for a few days now and seems simple but confusing at same time seems like its a one click type thing but if you dont know for sure what you are clicking can really screw up and have to start from scratch... anywho trying to do more around here and would appreciate any help anyone has thanks a ton
1) Yes in terms of an apk is an apk. No in terms of the updater script (IIRC)
2) Yes, assuming theres options in the advanced menu you'd like to impliment
3) You don't need the Samsung plugins.
4) Changes minfree settings in the boot image. Be aware the ICS impliments memory handling differently than previous versions.
5) Adds a script and folder for data/app partition so you can include optional apps. Optional apks (things like nascar for example) could be placed in here and would be installed on flash. But because they are in /data, the user has the option to uninstall through manage apps.
Personal Opinion: While the kitchen may be a convienient way to do things, it leaves little (Read: No) room for learning. Assuming you'd like to create a body of work to be publically distributed and not just for personal use, it might be worth the upfront investment in figuring out how to do/script this stuff yourself. That's not me trying to be an elite a-hole, that's me giving solid advice.
Cheers!
Yeah im a trying to learn as much as i can ive been reading and reading and reading have always known about the kitchen just never tried it thanks for the response you didnt come off as elitest is all good i find its easier for me to learn by trying things while reading about it granted i do research in great lengths not just in xda but other forums, blogs, links so on and so on before even downloading these tools but as i said it seems to sink in better when i can go ok i use this option this what it means thats what it did this what its supposed to do/look like
Sent from my MB855 using xda premium
So ive been trying all day to spit out a rom with the kitchen and no matter what i do it doesnt install either get status 7 or 0 says was looking for 4agrs but only found 3 and sometimes says 3args but only found 2 ive tried using a rom i know flashes and just running it through the kitchen and flashing the output... idk what im doing wrong but starting to think it is not photon compatible any insider tips? i know i already asked this but not quite ready to surrender to defeat on this yet and i REALLY dont want to install linux or ubuntu on my computer would have to partition it and just not to keen on doing that to the family computer my kids and wife play on it almost more than i do

[Discussion][4.0, 5.0 US+INTL]Enabling handsfree calling

First of all - sorry for posting it here, i don't mean to be in your face, it's just all discussions about this topic in other threads or posts went nowhere and i also think it didn't get enough attention from the developers. So, i just wanted to start a new thread dedicated to just this feature, since i believe this is one of the most useful features which is somehow got missed in these devices.
I'm talking about the ability to use GP5 to make calls though and answer calls from other devices through bluetooth. I think it's nuts that Samsung didn't implement this feature in these players, since most if not all top range mp3 and media players from this manufacturer in the last 5-6 years have had this feature (my pretty basic 4 year old samsung mp3 player can do this easily). Some people wonder why i care about this, but in my opinion it is a killer feature, which really opens up so many different possibilities to these devices. Tablets with 3g and 4g are reasonably cheap these days, so more and more people buy them. When you have one of them, you naturally think about a possibility of making calls through it. I'm one of such people, i have a 10" 3g tablet and i would like to be able to call through it using my GP5.
I participate in 5-6 different forums dedicated to these devices (mostly european sites) and i see requests and questions from people about this feature almost on daily basis. I think there are hundreds of people out there who would love to have it in their GPs. What i know is that the new GP 3.6 and 4.2 have it and the older ones 4.0 and 5.0 don't. So, i'm begging you, somebody, please make a ROM with this feature! I have no experience in programming for Android, but i think it should be very easy to take code or a library or whatever it is from one device and put it into another, since all these players have pretty much the same hardware (to my knowledge).
Thank you for your attention.
I you can link to a 3.6 or 4.2 rom that I can pull from (can be stock, custom or whatever), I can possibly integrate it into my next release, although I give no promises. Also, as this is development, and this is slightly off topic, I recommend that you change your post tags to [Discussion][4.0, 5.0 US+INTL]Enabling handsfree calling, so that people understand that this is a discussion, not some random person begging for a feature.
Thanks for your reply, i'll have a look for such rom.
Ok, i've changed the tags of this thread. Thanks.
Thanks! I also meant the tags in the thread name, not the actual thread tags. I never use them, so I forgot .
Right, that's what i thought at first, but i see no way to change the name of the thread, unfortunately.
Right, that's what i thought at first, but i see no way to change the name of the thread, unfortunately.
Click to expand...
Click to collapse
Edit the first post and click on the button called go advanced. Its at the top of the page
Sent by my Robot Butler
ok, Mars11_ on this forum pointed me here ->source codes for samsung players, plus he also offered to get any files from his unrooted GP 3.6. Would any of this be of any help?
Supermaster34 said:
Edit the first post and click on the button called go advanced. Its at the top of the page
Sent by my Robot Butler
Click to expand...
Click to collapse
great, thanks for the tip, done.
Thanks for the link! I will try and play around with some of the stuff included and see if I can come up with something. It may be just as simple as installing an apk...
Or maybe swapping bt libs would be all it takes.
Sent using Tapatalk
hanthesolo said:
Thanks for the link! I will try and play around with some of the stuff included and see if I can come up with something. It may be just as simple as installing an apk...
Click to expand...
Click to collapse
oh, sweet, i'm all itching in anticipation! thanks mate!
this means the phone features also needs to be activated because it goes hand in hand im not a dev but im sure its more than installing an apk. i think this will also require some framework changes. also activating the sip calling feature will be very exciting as our SGP can sync contacts as well this can be done in galaxy note by just adb pushing some files to system dir and activating the hands free profile in htc flyer is as simple as editing the build.prop so im sure this is doable but we need to call in the attention of devs :good:
Bad news guys, the uncompiled image didn't help, and I was unable to open the .img that I pulled from a 3.6 rom. Could someone pull their entire /system directory (apply this terminal command: dd if=/dev/block/systemname of=/sdcard/factoryfs.rfs), and then pull it off their sdcard (internal) and upload it here (tar or zip it if you need to). I do not believe root is required for that, and I am able to access .rfs files to edit them. You can find the name of your system partition by punching in "mount" in the terminal and then finding /system in the output, and recording the partition name that follows (eg. my system partition on my 4.0 is /dev/block/stl9).
I was tinkering with my sgp amd found this if this might be of any help
Sent from my YP-G70 using xda app-developers app
Ok, I've just sent an email to Mars11_, who's recently offered his help with extracting files from his SGP 3.6 in this thread: http://forum.xda-developers.com/showthread.php?p=28558588#post28558588
I asked him to come here and follow your instructions. He's our only hope right now.
Got responce from Mars11_ that's what he said: "Okay, so I've run the commands Hanthesolo had, but I didn't have read access to /dev/block/mmcblk0p8 . So I need root, and second, I can't post in the Android Dev yet, as I don't have 10 or more posts. "
Well, hat pretty much means that I can't pull anything together untilthe 3.6 gets root (I guess I could create a guide for that, but I don't have a 3.6, and I cannot exract anything from it's .img images). Sorry about that, but as soon as a /systm dump is uploaded, I will get on it. A last ditch attempt may be to use adb, but I think that you must have root to get su access from it as well. Perhaps you can boot into stock recovery and adb push the superuser binary and apk, that is, if the stock recovery supports adb, as I believe /system is mounted as rw in recovery. Perhaps a signed update.zip that only has superuser? I dunno, just some theories for 3.6 devs.
Mate, you have absolutely nothing to appologise for, you've done everything you could. I'm grateful for you desire to work on this. I guess we'll just have to be patient and wait for the 3.6 to be rooted Thank you.
Well, thanks for giving me a project to work on, because my sumer has just about fizzled out! I look forward to working on this while I wait for my Nexus 7 to arrive, and with it some more time-consuming hobbies .
hanthesolo said:
Well, hat pretty much means that I can't pull anything together untilthe 3.6 gets root (I guess I could create a guide for that, but I don't have a 3.6, and I cannot exract anything from it's .img images). Sorry about that, but as soon as a /systm dump is uploaded, I will get on it. A last ditch attempt may be to use adb, but I think that you must have root to get su access from it as well. Perhaps you can boot into stock recovery and adb push the superuser binary and apk, that is, if the stock recovery supports adb, as I believe /system is mounted as rw in recovery. Perhaps a signed update.zip that only has superuser? I dunno, just some theories for 3.6 devs.
Click to expand...
Click to collapse
You can always try the korean system dump and see what it gives.

[Q] All of the theme and rom building questions

Hey guys, I have a few questions. I looked around a bit before posting this, but I may have missed some stuff so if I need to remove this thread just let me know that I should have looked harder(and kindly provide a link please).
First I would like to know how to get into "Themeing". I want to know how to change the colors mostly. I can usually find the file I need to edit in order to change the icon shape, but If I'm not mistaken, the colors are probably controlled in an xml file. They may all look for a "central file" that contains the colors, or I may need to change each one individually. If there is a central file could someone help me find out what it is.
I have only found how to edit apps, so here's where I get a major case of the noobs. Are the system colors controlled by the launcher or the theme or is there a UI that can be edited what do I need to do. I want to be able to change the number styles, the fonts of the keyboard, and all that jazz. The most important thing, though; is that I need to be able to change the colors. I really don't have an issue with the current fonts and don't have a good idea what to replace them with anyway.
---------------------------------------------------------------------------------------------
Now that the above train wreck is over I have some harder questions.
I also want to get into developing. I will probably start by modifying someone else's. (side question, could I re-release theirs with my changes just so that people could test it provided I ask and give them credit. I know this depends on the person, but is it taboo, or just a no for some people) I already read through and followed shrike1978's. It was possibly the best thing that could have happened to me. It showed me that it was actually possible to do for someone with less android experience. (link)
But after I have built it what do I need to do to get started modifying it? I'm not even sure what all I want to do, but is there any suggestions of a starter project, as well as a how to do it?(maybe changing the launcher, or something like that)
Also I have been using xfce linux mint on a second hard drive of 75 gigs. Will this be an ok setup? Should I switch to ubuntu although I don't really like it as much?
Should I be s-off or on (maybe on so that I know that they will be supported)? Also is there any good vm's that run in linux and will run android?
I probably missed a few questions that I intended to ask, so I will edit them in when needed.
I plan to make a how to thread on my findings(hopefully good enough shrike gives me a :highfive: for doing a good job) so everyone who helps (provided I actually learn how and am capable of making the how to) will be thanked in my future famous thread
Also I apologize for any miss-types. I will do my best to correct them, but my keyboard is pretty broken (it took a tumble when I moved home for winter break)
I figured out the fonts(at least for the few roms I checked). They are easy to change and add. They are controlled in a system_fonts.xml in the "\system\etc" folder of the rom. The files that they represent are in the "\system\fonts" folder of the rom. The xml file has a pretty good explanation of how it is read, so adding your own should be pretty easy.
If anyone here has any suggestions even if you dont know for sure let me know please.;
Here's some threads I had bookmarked that may help:
http://forum.xda-developers.com/showthread.php?p=16459009
http://forum.xda-developers.com/showthread.php?t=916814
I had another one that I can't find the bookmark for.
feralicious said:
Here's some threads I had bookmarked that may help:
http://forum.xda-developers.com/showthread.php?p=16459009
http://forum.xda-developers.com/showthread.php?t=916814
I had another one that I can't find the bookmark for.
Click to expand...
Click to collapse
You are my hero.

[Wip] Hdmi On Non-Moto Based Roms

NOTE: A lot of this info is duplicated from a post i had made on droidrzr a while ago. I'm adding it here because i'm actively looking into getting this working once again and I would love any input/thoughts that other devs have on this topic.
Ok, so i've been poking around trying to get HDMI support working in non moto-based ROMs (basically anything that would be using kexec or an AOSP base like CM). It's not complete but i figure it's better to have more eyes on this than just mine. Apologies ahead of time if this post turns into a big info-dump, but here's what i have so far. Also, this is HDMI only, not webtop related.
Initial research:
My previous phone was a Droid X and there were similar issues relating to HDMI on non-stock roms. So my first inclination was to look into how that was fixed.
Here's the post in question: http://rootzwiki.com...m-audio-solved/
Basically, there are some required framework files that are needed for detecting an HDMI cable, notifying the system that it exists and enabling the output. There were also some permissions files and an APK that needed to be copied as well. The big issue with this is that the APK needed to be signed with a signature that matched the one that the ROM was built with (and since a lot of devs use the default android test/build keys, this wasn't all that difficult).
Now, keep in mind that the HDMI on the droid X wasn't mirror mode and operated VERY differently. However, it gave me a good place to start looking on the razr.
Some digging:
First, after looking through system/app i found this apk: ExtDispService.apk. As with the DX, this file is definitely going to be needed. This was where i started digging. I re-signed it and added it to the CM install zip, and put it on my phone. Now, of course it immediately crashed, but at least i had some logs to help me determine why.
Tools:
As a small note, I was using Virtuous Ten Studio to do a lot of this editing. I can't stress enough how awesome this program is for things like this. I had been doing it all manually at the start and making ONE change to that APK would take me close to 15 minutes. With VTS, i could do it in 5 or less. So from here on out, if you're following along, be sure to have the APK and JAR files mentioned added to a project in VTS and de-compiled so that you can see the smali code.
The roadblocks:
So once i had the logs, i was able to see where the APK was crashing. I knew that I would need to include some items from the framework, but i just wasn't sure what yet.
The first hiccup was in ExtDispService$HandleInitAutoDetectSetting.
Code:
const-string v3, "hdmi_autodetection"
invoke-static {v1, v3}, Lcom/motorola/android/provider/MotorolaSettings;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;)I
So, from looking at this, you can see that it's trying to access a Moto utility that allows programs access to information from the settings menu. In this particular instance, it's the on/off switch for HDMI autodetect. This opened up a whole new can of worms. How would we add these items back to the settings menu? How would we fake the overscan setting?
My first inclination was to look for the MotorolaSettings class and include that into the package. However, this could potentially lead us down a very dark path of dependency hell. Worst case scenario: we have to include a lot of moto's framework to get this working (and isn't the whole point of this to get away from moto's code?!). I attempted to remove the references to the settings menu in the smali code and replace them with hardcoded values. This was EXTREMELY hackey but it was more of a proof of concept at this point anyway. I was able to get the phone to boot and not have ExtDispService crash on me, however there was also no response when I plugged in the HDMI cable (nothing at all in the logs).
List of files needed:
Here are a list of some files that i know are required to get this working:
system/app/ExtDispService.apk
system/framework/framework-ext.jar
system/lib/libextdispjni.so
system/lib/libhdmi.so
system/lib/libhdcp.so
Some final thoughts:
I realize that there isn't too much concrete info here, but I wanted to share what progress I had made so that maybe someone else could either pick up from where i've left off, or make some suggestions on how to proceed.
EDIT: I wasn't sure if this belonged in the Android Development sub-forum or not, but i put it here just to be safe. If a mod sees this and think's thats a better place, please feel free to move it.
HDMI is mostly related to the kernel (for kexec at least). But currently there is a new kernel and a workaround for kexec in development, 3.0.31 / 3.0.88 Kernel. Two of the main goals are Full HD video recoding and HDMI.
The apks only will not work as there are complete different drivers in the kexec kernel. I guess we would have it working already if this could have been fixed by app side.
However, maybe I'm wrong
Hash told me about the current development, you can see it in their repo of course. Maybe we should wait a little more..
Gesendet von meinem XT910 mit Tapatalk 4
Ah, wonderful! I just read through your thread. Thanks for posting here about it. I'll be keeping an eye on the new kernel. If there's anything i can do to help out, be sure to let me know.
djuniah said:
Ah, wonderful! I just read through your thread. Thanks for posting here about it. I'll be keeping an eye on the new kernel. If there's anything i can do to help out, be sure to let me know.
Click to expand...
Click to collapse
Help is always appreciated! Are you familiar with C coding?
Gesendet von meinem XT910 mit Tapatalk 4
Yup, I am quite familiar with C.
djuniah said:
Yup, I am quite familiar with C.
Click to expand...
Click to collapse
Nice! If you would like to join kernel development, let me kow.
This had been one of the first things that never worked with our custom roms. Your reasearch and approach for solving this damned bug make good sense. I hope you can succeed for all of us and solve the DROID RAZR HDMI MYTH. Thank you.

[Q] i want to learn how to mod a Rom up to my device, but i can't

i very like learn to mod the apps or a rom with my device, but i can't know which way is easy, i think i or new member like me will aslo like to do this work. Give me to advice. Thanks all you.
keveinee said:
i very like learn to mod the apps or a rom with my device, but i can't know which way is easy, i think i or new member like me will aslo like to do this work. Give me to advice. Thanks all you.
Click to expand...
Click to collapse
There is no easy way. First you have to learn Linux (ROM building) or learn to decompile the apps and look threw thousands of files. Alot of which are xmls and smali code.
^ true
Also depends which device you have
Mtk or snapdragon
zelendel said:
There is no easy way. First you have to learn Linux (ROM building) or learn to decompile the apps and look threw thousands of files. Alot of which are xmls and smali code.
Click to expand...
Click to collapse
i knew it, but i have one question that im using my device with snapdragon chip, but i don't understand that why some app, when i get from the other devices then some app, i can use, but something some app i can't use to my device? But all app from google play, the alls that can use to setup to my device, all things what is the different?
Ok first your chip has very little to do with what apps will or will not work on your device. Those are concidered by many other factors. Like screen res, ram, and in some very rare cases gpu. Others are OEM dependent. Some are dependent in if your rooted or not.
I would advise putting any development ideas on hold while you go back and do alot of research.
zelendel said:
Ok first your chip has very little to do with what apps will or will not work on your device. Those are concidered by many other factors. Like screen res, ram, and in some very rare cases gpu. Others are OEM dependent. Some are dependent in if your rooted or not.
I would advise putting any development ideas on hold while you go back and do alot of research.
Click to expand...
Click to collapse
thanks about your advice!!! First, my device had been rooted (my device is LG) then i can setup the apps from outside, and i see that when the modders decompile or rebuild a app, they also had added lge-res.apk, lge-res.odex, lge-framework.apk with command ' if ' in apktool like that 'apktool if lge-res.apk.....'
why did they do that?
I already have found very things from google search, but i could not find what things i need, cause be able to my english level is not good. im very exciting to do anything about that.
IF you be modder, professional in the modifier work. Can you help me to do that? Again that i thanks about your advice.
keveinee said:
thanks about your advice!!! First, my device had been rooted (my device is LG) then i can setup the apps from outside, and i see that when the modders decompile or rebuild a app, they also had added lge-res.apk, lge-res.odex, lge-framework.apk with command ' if ' in apktool like that 'apktool if lge-res.apk.....'
why did they do that?
I already have found very things from google search, but i could not find what things i need, cause be able to my english level is not good. im very exciting to do anything about that.
IF you be modder, professional in the modifier work. Can you help me to do that? Again that i thanks about your advice.
Click to expand...
Click to collapse
I am not an expert modder but I can try and point you in the right direction, those files are framework files that are required by the LG framework to function correctly, essentially they are extra resources that are required for the app to work correctly based on the changes LG made. Samsung, HTC, Motorola, etc. all have similar files that are required when working on any of there apk's (For example S Note is a Samsung specific app I would first have to input "if" the touchwiz framework for the app to compile and re-compile successfully in order to make any modifications to it). What other resources where you looking for?
shimp208 said:
I am not an expert modder but I can try and point you in the right direction, those files are framework files that are required by the LG framework to function correctly, essentially they are extra resources that are required for the app to work correctly based on the changes LG made. Samsung, HTC, Motorola, etc. all have similar files that are required when working on any of there apk's (For example S Note is a Samsung specific app I would first have to input "if" the touchwiz framework for the app to compile and re-compile successfully in order to make any modifications to it). What other resources where you looking for?
Click to expand...
Click to collapse
thanks your answer, you're so right. I would to be a really modder, i've just been learnt about electrical technology in my school, but i very exciting be become modder. Sure i will find additional to adding my leaked knowledge. Thank alot.

Categories

Resources