yashsingh1/xdaforums huggingface dataset:
[Galaxy S 4 i9506 Android Development] juzza87:
Quick question,

Is there a way to fix the sound output so the sound isn't completely distorted?

Every notification, every tap, every time OK Google says something it hurts my ears. With TouchWiz the sound is fantastic, loud and clear.

I've noticed this with other phones running CM and AOSP based ROMs.

Is there a setting, hack or app that can make it clear or is it impossible without the manufacturers blessing?
[Galaxy S 4 i9506 Android Development] davidl1983:
I noticed that too

Got the same problem when I flashed the rom, try to keep the volume at half. Still plenty loud.
[Galaxy S 4 i9506 Android Development] solk2:
Which version you are running?

I don't remeber when I was changing volumes in ROM. So try to replace /system/etc/mixer_paths.xml with this one.
[Galaxy S 4 i9506 Android Development] juzza87:
cm-11-SNAPSHOT-M10-user-ks01lte.zip clean install today with gapps-kk-20140606-signed.zip

Thanks solk I'll report back with the results, and I'll also test a few things (have a Sony SW2 and other BT accessories I can test)

---------- Post added at 11:37 AM ---------- Previous post was at 11:17 AM ----------

I'm having a hard time rooting the user ROM, is the userdebug ROM the same as user only with root? I may need to reinstall lol
[Galaxy S 4 i9506 Android Development] solk2:
Thanks.

User build odexed. Userdebug deodexed and rooted.
[Galaxy S 4 i9506 Android Development] juzza87:
I tried the user debug ROM and root works but the sound was distorted. I replaced the file in system\etc and now there was no sound at all. I realized I'm an idiot and didn't set the right permissions and now it works and it does seem much clearer than it was (still a bit of distortion but not as much).

Thanks OP!
[Galaxy S 4 i9506 Android Development] DualJoe:
I don't get any sound output here with that. Permissions are correct. Rebooted twice.

I'm using ViPER4Android as DSP to lower master gain since audio output is too loud for my needs. Its not perfect though. Its a known problem that it gets kicked sometimes and needs to be restarted manually so if anybody knows a solution to lower volume by system configs please let me know.

Edit: Found it in 'mixer_paths.xml':

Change "84" to whatever you like and reboot. Its decibel (db) i guess.

<path name="speaker">
<path name="spk" />
<ctl name="RX7 Digital Volume" value="84" />
<ctl name="SPK DRV Volume" value="7" />
<ctl name="COMP0 Switch" value="1" />
</path>
[Galaxy S 4 i9506 Android Development] faffaz:
Is it possible to flash 4.3 Bootloader only? otherways i am guessing on would have to flash stock 4.3 rom.
[Galaxy S 4 i9506 Android Development] solk2:
To fix 4.2.2 bootloader I need dmesg and logcats. I can't say what causing systemui to crash.

And to fix security settings too.

About menu button I'll install TB and see whats the problem. But maybe it just TBs bug. Coz everywhere else it works fine.

Frequency is problem in mpdecision or in CM itself. I'll look into it.
[Galaxy S 4 i9506 Android Development] tomogo:
Hi, I have installed Stock ROM again, but I've try it during the week.
[Galaxy S 4 i9506 Android Development] faffaz:
Here you go!

Hope this is enough!:good:
[Galaxy S 4 i9506 Android Development] faffaz:
Just reflashed cm11 to get these logs for you! Oh, took logs directely after boot and then one more time after system.ui FC.
[Galaxy S 4 i9506 Android Development] solk2:
Error::Cannot open the file /vendor/firmware/keymaster/keymaster.mdt - thats why security settings crashes. Coz this is root certificates. Flash apnhlos partition from stock 4.3 version and this is most likely fix your problem.
[Galaxy S 4 i9506 Android Development] faffaz:
How

That was fast.

A Guide would be awsome though. Plus for future reference.

Thanks
[Galaxy S 4 i9506 Android Development] ruben46_:
Thanks for your good work. Will try asap
[Galaxy S 4 i9506 Android Development] SoRiNuS:
If the min cpu freq is 1.7 ghz, that means that the battery draines faster?
[Galaxy S 4 i9506 Android Development] solk2:
1. Download your 4.3 stock ROM.

2. Unpack it.

3. Pack modem, bootloader and firmware files in odin tar archive (tar -Hustar -cf boot-modem-keys.tar aboot.mbn rpm.mbn sbl1.mbn sdi.mbn tz.mbn modem.bin NON-HLOS.bin).

4. md5sum boot-modem-keys.tar >> boot-modem-keys.tar

5. rename boot-modem-keys.tar to boot-modem-keys.tar.md5

6. Flash this file with ODIN.
[Galaxy S 4 i9506 Android Development] solk2:
Yes. Looks like min_frequency got reset after mpdecision puts on and off cpus. And it always sets min_frequency to 1.7 while charging. Trying to workaround this now.
[Galaxy S 4 i9506 Android Development] you5urf:
so where do I send my donations to help you along friend!! I have been waiting too long and this is working great so far.
[Galaxy S 4 i9506 Android Development] solk2:
Added PayPal link in first post.
[Galaxy S 4 i9506 Android Development] faffaz:
Flash this file as....?

Sorry to bother you again [MENTION=5291759]solk2[/MENTION] but i am unsure if the forementioned file should be flashed as bootloader, pda or else in Odin ( BL/AP in odin 3)? Too dangerous to guess!
[Galaxy S 4 i9506 Android Development] solk2:
It sholud be flashed as pda.

Thats the same when you flash full ROM. It always dangerous. But like this you wont flash system and data image. Most dangerous is flashing aboot. But there are safty mechanizms that transfers image to phone and only then flashes it. Just dont ever flash aboot from different model. Everything else is non critical to boot the phone in odin mode.
[Galaxy S 4 i9506 Android Development] faffaz:
Did not solv the problem.

I flashed as you said "as PDA in odin 1.87" then reflashed your cm11 build. But the problems persist. I did manage to take logs though.
[Galaxy S 4 i9506 Android Development] solk2:
Try changing max frequencies or governor. Look if mpdecision is runnnig.

mpdecision is perversion. It doing cpufreq governor work. Monitoring load and starting and stoping cores. Thats needs to be done in kernel. So I'll try to add msm_dcvs and intelli_plug governors to my kernel to get rid of it.
[Galaxy S 4 i9506 Android Development] solk2:
Strange. What version did you take to flash them? It looks like that they don't have files needed for keymanager which I've taken from my stock ROM to start. What files do you have in /firmware/image/ ?

Try to download and put them in /firmware/image

keymaste.mdt

keymaste.b00

keymaste.b01

keymaste.b02

keymaste.b03
[Galaxy S 4 i9506 Android Development] faffaz:
Going to try tomorrow. I cant get adb to push the files to /firmware/image because settings is fc:ing the whole time. And cant do that localy with root-file-browser neither because settings is fc:ing.. will try to find a solution tomorrow. Good night.

Edit: managed to copy files att last. No More Fc. Will test and report back.

Solk2 you are the man!
[Galaxy S 4 i9506 Android Development] solk2:
Thats good. Please tell what version of stock firmware you used?
[Galaxy S 4 i9506 Android Development] solk2:
If you using nighlty. Then you don't need to replace mixer_paths.xml. It is from nightlies.
[Galaxy S 4 i9506 Android Development] DerRomtester:
I am not using folder mount xposed or any other mods. Only flashed latest nightly + gapps.

A data and system wipe did not help. Path seems to be correct. Any other ideas ?
[Galaxy S 4 i9506 Android Development] DualJoe:
Check logcat. Maybe you have wrong gapps or other malicious software (like antivirus and such). Also, make sure you format /system properly (not just re-installing the rom) and omit gapps (install later).

And just to make sure... never format /data (always just wipe) unless you want to format your internal sdcard as well.
[Galaxy S 4 i9506 Android Development] juzza87:
I've used the phone all day so I'll write up a quick review.

I started off by disabling some of the CM apps and replacing them with their Google counterparts (Music, Email, Keyboard, Camera, Launcher) to get a more "Play Edition" feel (I'm not too fond of the CM apps). That went well and the phone is very responsive and smooth, this is one of the smoothest versions of CM I've ever seen. I did the sound fix from above and the sound has been acceptable throughout (I did a call on loudspeaker and it was fine, sounds and Google sound OK). I tried out the phone with my Sony SmartWatch 2 which worked flawlessly with TouchWiz. I'm happy to report that after a bit of fiddling with the setup (repairing) it has remained connected all day and notifications get pushed to it as they should.

Things I love compared to TouchWiz (with Wanam Xposed) are being able to have lock screen security with the camera widget and the battery is just a fraction lower than the stock ROM (I did underclock to 1.2GHz so I can't comment on if it was the underclock or the ROM).

OP (solk) has done a good job bringing CM to the i9506!
[Galaxy S 4 i9506 Android Development] DualJoe:
CPU clock seems somewhat buggy. Sometimes it hangs here on a specific clock rate. It also doesn't honor min/max frequency properly. If you set to 652MHz max it nevertheless jumps to 1497MHz. Governor doesn't matter.
[Galaxy S 4 i9506 Android Development] solk2:
That's what mpdecision do. I can't fix it. Frquency controlled by this proprietary app. If yours frequency is stuck at 652 then some process is active. I was testing this a lot and it keeps freq at 300 when phone is locked.
[Galaxy S 4 i9506 Android Development] puschel_1:
Hi,

I have the following problem.

I installed nightly from 19.10.2014 an restored apps from I8190 (S3mini) also on CM11. Eveything works fine until today.

I want to update Facebook by play store and get error (not enough memory) during installation. Other, bigger apps have no problem.

I checked space pf every partition with app Freespace, enough free memory in every partition.

Even after de-installing it is not possible, to install Facebook again. TitaniumBackup also gets into endless loop trying to restore a backup.

So can anybody help me to solve the problem?

Thanks!
[Galaxy S 4 i9506 Android Development] DualJoe:
Go to recovery and wipe dalvik cache to flush odex files. When starting the rom again you should notice the dexopt process (counting apps process). If that's not happening something went wrong and dalvik cache wasn't cleared (depends on recovery).
[Galaxy S 4 i9506 Android Development] puschel_1:
Thanks, but that was the first thing I did. After starting apps were optimized (counted up as always after clearing dalvik-cache).

I also de-installed a big app (Google+) to see if there is an effect, but there wasn't one.

Further ideas?
[Galaxy S 4 i9506 Android Development] DualJoe:
The apk file, the odex file and the /data subfolder must math the same UID/permissions stated in the /data/system/packages.xml. If something differs that leads to access problems it usually ends up in errors like 'disk full' since the app/system cannot write and simply throws out this (in that case not true) error message. That might happen if the backup program fails to restore the app properly.

In such a case i would restore the apps manually by installing the app by hand, starting it once (so the /data subfolder gets created), inject the app user data manually and set permissions accordingly. It helps a lot to have SSH/SFTP installed for such maintenance.

Maybe there's still something like 'Fix Permissions' in Recovery. You might want to check that first. Not sure if it can fix these problems as well.

Edit:

Btw.. anyone know how to enable multicore dexopt in CM11 (was reverted in M6)? I think Temasek once wrote it needs to be explicitly enabled by setprop or something now. I can't find anything about it though...
[Galaxy S 4 i9506 Android Development] puschel_1:
Sounds like a plan, thanks!

But problem is, if I uninstall FB, I can not install it again... Or did I missunderstand?

Is there a how-to for my problem with step-by-step instructions anywhere here in the "xda-world"?

Or is there another way to fix the permission problem?

Thanks a lot!

Edit: tried to install app" fix permissions", same problem, not enough space...

In CWM 6.0.4.8 I can't find an option to fix permissions... HELP please!

Gesendet von meinem GT-I9506 mit Tapatalk
[Galaxy S 4 i9506 Android Development] DualJoe:
Then try TWRP. Its there for sure.

You maybe might want to open a thread in Q&A section instead as there are much more people. Its not a CM/ROM related issue anyway. Don't forget to post exactly how you saved/restored the apps. Good luck! :)
[Galaxy S 4 i9506 Android Development] puschel_1:
Tried to flash TWRP by odin and zip form CWM, in both cases bootloop... CWM works fine.

Now I did a complete wipe / factory reset and used Googles backup of apps. In most cases fine, some apps have to be customized again, but now it works...

Thanks for your help!
[Galaxy S 4 i9506 Android Development] ShaneDiNozzo:
TWRP needs 4.4 bootloader.
[Galaxy S 4 i9506 Android Development] puschel_1:
Before I flashed CM11 there was stock 4.3 installed.

My other I9506 is on rooted stock 4.2.2 and TWRP 2.8.1.0, is that normal?

Gesendet von meinem SM-G900F mit Tapatalk
[Galaxy S 4 i9506 Android Development] mezo91:
Sound still distorted :(
[Galaxy S 4 i9506 Android Development] DualJoe:
There is no perfect solution for that. If you raise volume too much it is distorted no matter what. I personally have lowered the main speaker volume to '64' in 'mixer_paths.xml' to get more precision in lower volume steps.
[Galaxy S 4 i9506 Android Development] puschel_1:
Hi, me again ;)

I installed this CM11 (nightly) on a I9506 with stock 4.3.

What do I have to do to get a 4.4.2 bootloader flashed (to get Two working)?

Also strange thing is, when I restart the phone, in the upper third of the display there is "pixel salad" for a short time when S4 logo is shown.

Is this problem also caused by the bootloader?

Thanks a lot!

Gesendet von meinem GT-I9506 mit Tapatalk
[Galaxy S 4 i9506 Android Development] DualJoe:
Flash official Samsung 4.4 with Odin.

What is "Two"?

It should read something like 'Kernel Android is not SE enforcing - blahblah Bit set'. That's normal.
[Galaxy S 4 i9506 Android Development] DualJoe:
[MENTION=5291759]solk2[/MENTION]:

Its not just the alarm that doesn't react on sensors (turn phone 180°). The Google Camera / Photosphere has a free view mode that also doesn't work. At least it throws some errors this time:

10-24 03:18:20.326 E/LightCycle(5505): Sensor reader is not initialized.
10-24 03:19:12.486 E/SensorManager(5505): sensor or listener is null
[Galaxy S 4 i9506 Android Development] puschel_1:
Thanks a lot! Two = to ;)

So is it possible to flash only the bootloader with odin, when CM11 is installed? I'll take 4.4.2 NEE for the bootloader, ok?
[Galaxy S 4 i9506 Android Development] DualJoe:
There is more supplementary data. Better flash full image like intended.
[Galaxy S 4 i9506 Android Development] puschel_1:
So first make a backup with CWM of CM11, wipe/factory reset, flash 4.4.2 with Odin, restore CM11 backup with CWM and then install TWRP with CWM, right?

Gesendet von meinem SM-G900F mit Tapatalk
[Galaxy S 4 i9506 Android Development] solk2:
Just tried alarm and google camera photosphere. Evertything worked fine and I hadn't this messages. What version are you running?
[Galaxy S 4 i9506 Android Development] solk2:
84 is stock value. Maybe it will sound better when new DSP on CM will appear. Coz current DSPManager can't handle qc effects correctly.
[Galaxy S 4 i9506 Android Development] solk2:
You forgot flashing CWM after Odin.
[Galaxy S 4 i9506 Android Development] DualJoe:
You're right. I had sensors blocked for google gms.

For alarm i need at least two turns even though description says "flip down to dismiss". On I9300 it was just one turn for sure. Maybe i need to calibrate the compass or something...

Sensor Readout is a nice app to check sensors btw..

Edit: Aargh.. i calibrated with 'GPS Status' and now 'flip to dismiss' doesn't work at all anymore, lol. Will play some more with it.

Edit2:

I have DSP disabled/frozen. An alternative DSP is ViPER4Android. But actually, i can't notice any distortions on lower volumes. Even the high noise floor i once reported seems to be much better these days. It's not completely gone but it's on par with other devices i've had.
[Galaxy S 4 i9506 Android Development] nicogri:
Noob question but is QI charging working with this rom ?
[Galaxy S 4 i9506 Android Development] solk2:
Didn't tested. Don't have it. Probably working. Coz most of charging part is taken from stock.
[Galaxy S 4 i9506 Android Development] DualJoe:
Is there any custom gfx driver or something in the kernel that differs from Samsung kernel? I once injected your (prebuilt) kernel just for fun into TWRP but the recovery binary couldn't create a framebuffer (fb0). The rest of the environment seemed ok though (adbd, shell, usb...).

Btw, battery consumption is fine. :good:

Not my "all-days" result but on good days it looks like this...
[Galaxy S 4 i9506 Android Development] solk2:
Yes. Frame buffer and adreno drivers differs from stock a lot.
[Galaxy S 4 i9506 Android Development] Kelden:
Since I switched to official cyanogenmod version from xda version, IrDA stopped working.

Anybody else who has problems with IrDA?
[Galaxy S 4 i9506 Android Development] puschel_1:
Just to be sure: I want to update bootloader etc. from stock 4.4.2 and after that run CM11 again.

1. Make a backup in CWM of all partitions

2. normal wipe/factory reset

3. flash stock 4.4.2 (NEE) with Odin 3.09

4. flash CWM and restore which partitions? I don't think that it's right to restore all...

5. flash TWRP from CWM or by Odin 3.09

Is this right? Or do I have to install clean CM11 from CWM and wipe system to clean crap from NEE?

Sorry for my noob-questions...
[Galaxy S 4 i9506 Android Development] solk2:
Thats coz not all developers updated their apps for KK. Google standartized IR API only in KK. So fill bugreports to respective app developers. For example SmartRemote working fine.
[Galaxy S 4 i9506 Android Development] solk2:
Yes. You can run full restore. It wont restore bootloader. It restores only kernel, system, data and cache.
[Galaxy S 4 i9506 Android Development] DualJoe:
The CM11 camera resolutions are somewhat buggy. The 12.8MP and 8MP are 4:3 only and 6MP (even though 16:9) is 3k only. The 'Scene Modes' are not working at all. Even though camera in general is very verbose in logs most stuff seems useless in logcat. I couldn't find anything useful so far...

The Google camera seems to have built-in hardware templates or something. I noticed that on S2 as well. It's not supported there even though system camera works fine.

On i9506 it's the other way round. The system camera is not yet working flawlessly whereas the Google camera provides proper resolutions (9.6MP/16:9/4k) making it the 1st choice atm. Unfortunately it doesn't support scene modes.
[Galaxy S 4 i9506 Android Development] solk2:
Resolution is selected from list in Camera app. So I need to add it to CM Camera app. If it passes review then it will be there.

I'll look into scene modes. But I need to flash stock ROM first to see what parameters it sets.
[Galaxy S 4 i9506 Android Development] mezo91:
Im on userdebug build and have a user build update notification ota. Should i do it or not.
[Galaxy S 4 i9506 Android Development] solk2:
User build?:confused: As I know CM buildbot doesn't build user builds. Only userdebug.
[Galaxy S 4 i9506 Android Development] mezo91:
Should i download or no?
[Galaxy S 4 i9506 Android Development] DualJoe:
Your decision. Create a backup first if in doubt.
[Galaxy S 4 i9506 Android Development] solk2:
Now I understand. No you shouldn't. That's same version as you have. Only user build. You better download cm from their server and update to nightly.
[Galaxy S 4 i9506 Android Development] mezo91:
Do i have to? Did cm make a build for i9506? Im happy with build, its nice.
[Galaxy S 4 i9506 Android Development] DracoPiece:
can you build for e330L? LGU
[Galaxy S 4 i9506 Android Development] Kiryo24:
I'm experiencing random reboots pretty often. Like 1-3 times a day. I'm on 20141024.
[Galaxy S 4 i9506 Android Development] Kelden:
Thanks. It works now.
[Galaxy S 4 i9506 Android Development] DualJoe:
I had two random reboots as well with build 20141031. Screen freezes for some secs and then blackscreen/reset. Last_kmsg doesn't show any severe errors. There's only an emergency SysRq to remount all partitions r/o and then the system restarts gracefully.
[Galaxy S 4 i9506 Android Development] solk2:
Sorry. No. I don't even know how different this device.
[Galaxy S 4 i9506 Android Development] solk2:
Please post last_kmsg. I only see a lot of third party apps errors.
[Galaxy S 4 i9506 Android Development] solk2:
Sow this. But can't determine source of this reboot. So please post yours last_kmsg and logcat. SysRq means that some userspace app sent it. So most likely Kyrio24 have often reboots coz of errors from xposed keyboard.
[Galaxy S 4 i9506 Android Development] DualJoe:
I probably still have the last_kmsg. Will take a look once I'm there.

How can i get a logcat after reboot?
[Galaxy S 4 i9506 Android Development] solk2:
That is troublesome. The only thing that gets in my mind that you need to write logcat to SD like logcat -b main > /storage/sdcard1/logcat.log. But it will make only sense if it reboots one more time.
[Galaxy S 4 i9506 Android Development] DualJoe:
Kernel logs attached. Will try to catch logcat next.

This is my init.d script btw.

#!/system/bin/sh

(
for i in `seq 1 120`; do
if [ "$(busybox ls -A /storage/sdcard1)" ]; then
x=0
while [ $x -lt 20 ]; do
if [ ! -e /storage/sdcard1/logcat$x.log ]; then
/system/bin/sh -c "logcat -b main > /storage/sdcard1/logcat$x.log" &
break
else
x=$((x+1))
fi
done
break
else
sleep 2
fi
done
) &
[Galaxy S 4 i9506 Android Development] fixe:
Just want to say THANK YOU to solk and the other developers for the great work! :)

I replaced my broken nexus 4 with the i9506 - without CM i had already sold it... :) :good::good:
[Galaxy S 4 i9506 Android Development] hs911:
since i am not very happy with stock 4.4 i plan to introduce cm (like i did on all my previous phones) so i have one last question: does cm support screen mirroring and is it working with solks build?
[Galaxy S 4 i9506 Android Development] neumann:
Works perfectly, just download the chromecast app and have fun.
[Galaxy S 4 i9506 Android Development] bambuk:
Hi all

I installed this build on my i9506 and have touch issue during call: impossible to use touchpad during a call. It disable the ability to desactivate microphone, to activate speaker, to use DTMF, ...

First, screen stuck off during call, it was the proximity sensor data which where wrong because of crack in front of it on my screen

Now, screen turns ON but impossible to touch on dialer, I only manage to stop the call via the notification bar

Thanks in advance for your help
[Galaxy S 4 i9506 Android Development] solk2:
Sorry. But I don't have such issue. Post logcats to see whats wrong.
[Galaxy S 4 i9506 Android Development] solk2:
Thanks. For now it looks like some race condition is sec_debug. Seems like if phone is hangs (or some app) for a couple of secs and you press power, maybe for short period, but it can pass enough time for sec_debug to think that it needs to start emergency reboot. I think I'll increase this timeout for safety. But not to get in such situations don't press power key for too long.
[Galaxy S 4 i9506 Android Development] DualJoe:
I just pressed power in one case to see if anything (screen-off) reacts. But that doesn't matter. It always freezes/reboots after 3 secs. I think the SysRq is triggered by a watchdog as the system is unrecoverably corrupted.

It crashed again an hour ago (no power button involved) but the logs are useless. The 'main' buffer doesn't hold any important stuff. I will start again with all buffers.

The latest device tree commits show libril/interrupt changes. That's potential...
[Galaxy S 4 i9506 Android Development] solk2:
If you talking about qcom,sec-auxpcm-gpio-clk_duos then it is not related to RIL and it is not used in our device so thats why it was removed. I'll upload today some changes. Will see if it helps.
[Galaxy S 4 i9506 Android Development] Kiryo24:
Sorry it took so long