yashsingh1/xdaforums huggingface dataset:
[Galaxy S 4 i9505 Original Android Development] gabx:
More info about the bluetooth issue :

there is a pointer error in this func:

void hci_le_ltk_reply(struct hci_conn *conn, u8 ltk[16])
{
struct hci_dev *hdev = conn->hdev;
struct hci_cp_le_ltk_reply cp;

BT_DBG("%p", conn);

memset(&cp, 0, sizeof(cp));

cp.handle = cpu_to_le16(conn->handle);
memcpy(cp.ltk, ltk, sizeof(ltk));

hci_send_cmd(hdev, HCI_OP_LE_LTK_REPLY, sizeof(cp), &cp);
}

To be more precise, the error comes from memcpy(cp.ltk, ltk, sizeof(ltk)) . memcpy is expecting either u8 or an explicit length in the sizeof() call.

I am trying to understand. This is a classic error, so we should find how to deal with it :)

---------- Post added at 10:23 AM ---------- Previous post was at 10:19 AM ----------

SOLVED.

in /net/bluetooth/hci_conn.c

ligne 398, change sizeof() this way :

memcpy(cp.ltk, ltk, sizeof(u8));

Next :

drivers/input/keyboard/cypress_touchkey_236/cypress-touchkey-236.c: In function 'brightness_level_show':

drivers/input/keyboard/cypress_touchkey_236/cypress-touchkey-236.c:475:30: warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
[Galaxy S 4 i9505 Original Android Development] broodplank1337:
Nice that you solved it!

and yes that one sucks, you need to adjust gcc params in general, in Makefile and in arch/arm/Makefile I bleieve. I dont know what params to use though
[Galaxy S 4 i9505 Original Android Development] gabx:
removed
[Galaxy S 4 i9505 Original Android Development] swa100:
Still having occasional random freezes. I'm on the latest release.

Greetz
[Galaxy S 4 i9505 Original Android Development] gabx:
It is not a gcc flag issue. In fact, code is wrong in this function:

static ssize_t brightness_level_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
int count;

count = snprintf(buf, sizeof(buf), "%d\n", vol_mv_level);

printk(KERN_DEBUG "[TouchKey] Touch LED voltage = %d\n", vol_mv_level);
return count;
}

in this case, it is NOT possible to pass the sizeof() function to buf. In our case, buf has already a size set to 1
[Galaxy S 4 i9505 Original Android Development] TichDarkener:
Qualcomm-optimized Dalvik Runtime

Hi, I would like to test the qualcomm-optimized Dalvik Runtime included in your Boosterpack V8 on Slimkat without messing with the kernel.

Can somebody tell me which files I need to leave in the provided zip?

I'm guessing I need /system/bin/dalvikvm and /system/lib/libdvm.so

Did I miss a crucial file, would libdvm.so mess with the SlimKat stock kernel? Do I need to edit anything in META-INF (I think not?!)?

Any help would be appreciated. If somebody could provide a flashable zip with only the optimized dalvik runtime so I can test it in SlimKat (and other AOSP based ROMS) I would be very grateful.

Thanks for your help.

Kind Regards, Tich
[Galaxy S 4 i9505 Original Android Development] gabx:
For now, I can't get rid of this error with cypress_touchkey_236.

This type of error is known, but I can find a workaround.
[Galaxy S 4 i9505 Original Android Development] broodplank1337:
Google first hit "moto x optimized dalvik"

http://xdaforums.com/google-nexus-5/general/mod-dalvik-bionic-library-optimization-t2537299

there it is ;)

just install the dalvik only package and its done, it works on all new models.

and I only used libdvm.so libqc-opt.so and libcutils.so I did not use the binaries (installd and such)

it can only be fixed with proper parameters. i will work it out soon

btw I have done some experimental undervolting for Touchscreen (cypress) and Vibrator module (vibetoonz)

https://github.com/AOSP-S4-KK/platf...mmit/3849e1bf4d67597b4d01a2225ae3c7007fc9cd09

Also undervolted IRDA, barcode emulator and WLAN now

https://github.com/AOSP-S4-KK/platform_kernel_samsung_jf/commits/kk-4.4_uvtest
[Galaxy S 4 i9505 Original Android Development] gabx:
I tried with a GCC 4.9 toolchain, but the error is still here. We need to put a value instead of sizeof(buf)

Removing it from the snprintf() leaves us with a casting issue.

Using sprintf() and removing it leaves no error, but other errors later. This file seems very funky !!

BLAME SAMSUNG

---------- Post added at 06:23 PM ---------- Previous post was at 05:49 PM ----------

From http://gcc.gnu.org/gcc-4.8/changes.htm

A new -Wsizeof-pointer-memaccess warning has been added (also enabled by -Wall) to warn about suspicious length parameters to certain string and memory built-in functions if the argument uses sizeof. This warning warns e.g. about memset (ptr, 0, sizeof (ptr)); if ptr is not an array, but a pointer, and suggests a possible fix, or about memcpy (&foo, ptr, sizeof (&foo));.

That is the error we are dealing with. Disabling the -Wall flag could may be one solution. Not sure it is a good idea...
[Galaxy S 4 i9505 Original Android Development] destevez:
Brood, already know why i could not download the rom the other day...

it fails downloading with 3g, requires a wifi connection..
[Galaxy S 4 i9505 Original Android Development] Brotuck:
Is it me or does voip not work in this rom ? Mic and speaker do not function.

Verstuurd vanaf mijn GT-I9505 met Tapatalk
[Galaxy S 4 i9505 Original Android Development] saphirrot:
[MENTION=4354408]broodplank1337[/MENTION]

As you may think, i´m very glad with the latest release .. But i still have some strange Proximity Sensor behavior.

1. If i get called, my screen reacts after 3 seconds and showing me the Caller Number and other information. It reacts instanly with sounds, not with the screen.

2. If i answer the call and want to end the call with pressing the big red button ( i dont know the englisch word for it *facepalm*) the proximity Sensor do nothing. The Screen stays off.... Only Turns on when pressing the Volume Key...

I would be very grateful for help , thanks <3
[Galaxy S 4 i9505 Original Android Development] houmles:
I had exactly same problem couple of months ago and had to give my phone to repair as the proximity sensor was damaged somehow.

It happened right after flashing some custom rom and after that it didn't work even in stock rom.

I also tried some calibration scripts/fixes which I found here on xda but it didn't helped too.
[Galaxy S 4 i9505 Original Android Development] saphirrot:
Thanks, i just tested the sensor with an app. Its working fine... But not in the rom !
[Galaxy S 4 i9505 Original Android Development] Edgio60:
Have you tried these fixes? The manual fix worked for me.

http://xdaforums.com/showthread.php?p=48468330
[Galaxy S 4 i9505 Original Android Development] broodplank1337:
idd the proximity sensors is running overkill, my browser was flipping all the time when doing small movements xd

ill look into it
[Galaxy S 4 i9505 Original Android Development] petrus764:
Sure it's not dust? The S4 is known for getting dust on the sensor, making it behave like a total maniac. I had to have mine in for repair.

Google it/search on xda, you'll find alot of people with the same issue.
[Galaxy S 4 i9505 Original Android Development] gabx:
So far, no more errors with this infamous cypress-touchkey-236.c, but not sure my hacks are OK.

Dealing now with :

include/asm-generic/int-ll64.h:19:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'

For someone with no knowledge in C, debugging is not a trivial affair
[Galaxy S 4 i9505 Original Android Development] K900i:
Happens after everycall.....when ever i try to end the call phone screen wouldn't turn on! i would have to press the power button lock and then unlock it...its kind of pain...

Brood, before a few days you had said that your phone screen had broken....how did you fix ?
[Galaxy S 4 i9505 Original Android Development] danny_and_2:
In most cases, that error accour when somethings not defined. Normally that can be fixed with a "struct".

I've seen that Christopher's look a bit diffrent, from 28 to 34.

https://github.com/Christopher83/sa..._ion_pmem_adsp/include/asm-generic/int-ll64.h

#ifdef __GNUC__
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#else
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#endif

But again, i'm no shark to debug either. :(

Best regards
[Galaxy S 4 i9505 Original Android Development] gabx:
Right, but this is not the fix in our case. I already tried this way.

Am I blind, drunk or under medication ? I do not see any diff between your file and his file.
[Galaxy S 4 i9505 Original Android Development] danny_and_2:
Hmm, sad. Would have made it easier lol. :(

Hmm, I opned the githubs again & u are right, no diff. Guess I must have opened another kernel that asop. Strange.

I'll go take my medication now lol. :D
[Galaxy S 4 i9505 Original Android Development] petrus764:
That is standard behaviour for dust on the sensor. It may work better in other roms/stock because there may be different values for when to activate/deactivate screen, but you are having the issue in the first place because of dust. You can either try to recalibrate the sensor, theres a thread on it here on xda, open the phone and clean it, rma it or try to blow hard and long into the speaker grill. Last one wont be permanent, but you are likely to see a temporary improvement.
[Galaxy S 4 i9505 Original Android Development] gabx:
Please, try to find again the kernel source with a modified one. I am quite sure there is something wrong in this file. It is important as it defines the

char __s8 which is used in many other files. So we have error cascades !
[Galaxy S 4 i9505 Original Android Development] Warmax88:
I love this ROM but i have a very big problem... We use google hangouts at work and for some reason i don't get message notificactions until i launch the application... I've checked the app settings and everything looks fine. Is there a workaround? I love this ROM but i need notifications!

Thank you!
[Galaxy S 4 i9505 Original Android Development] gabx:
Did you enable "notify me" in the settings/developer option ?
[Galaxy S 4 i9505 Original Android Development] danny_and_2:
Seems that I'd looked in int-l64.h instead of the int-ll64.h which explains my mistake.

I'd look'd into diffrent kernels, S4, S3, nothing of those stands-out. :(
[Galaxy S 4 i9505 Original Android Development] petrus764:
I was having Exchange push issues for my work email, so I'm guessing they're related. Anyway, in my case it was a kernel issue. I set the cpu governor to performance, upped the min. mhz to 594, enabled hotplugging. On the screen off settings i set max mhz to 1890, profile to performance once again, profile sched to sio. I also tweaked the gpu settings by min mhz to 200 and performance governor. Same screen off settings there.

That worked for me atleast, and I now recieve notifications while the phone is in sleep. Battery life is more or less the same in my experience.
[Galaxy S 4 i9505 Original Android Development] gabx:
The build with GCC 4.8 is improving.

I found a way to remove all warnings of type :

warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]

I am now dealing with a few errors left, and not sure if my workaround will build a bootable kernel
[Galaxy S 4 i9505 Original Android Development] swa100:
Still experiencing random freezes. Tried your default kernel, Alucard kernel and ktoonsez kernel. Random freezes on all.. Any idea how to fix it?
[Galaxy S 4 i9505 Original Android Development] broodplank1337:
yes I found how to fix it as well. what erorrs are you facing besides that? I already could compile it on -Os with gcc 4.8 linaro. but not yet on o3.

I have had 1 random freeze so far but not as worse at it was. and now I know what the cause is.

I reverted the disabled qcom enhancements (https://github.com/AOSP-S4-KK/platf...mmit/e282cd74f21f3e393cd756698c6dc04b04a9fcdd). which fixes the video scale inside skype and such but causes the random freezes..

so i will have to find a solution between those 2

but the cause is very often now right? almost never? it should be like that atleast

btw do you handle a lot of media while getting the freezes?

and I have merged something that allows sepolicy for cpu handling (what also fixed the random freezes in the first place)
[Galaxy S 4 i9505 Original Android Development] gabx:
Very good job dude.

I am working with -Og. a good compromise.

I am left with -Waggressive-loop-optimizations errors
[Galaxy S 4 i9505 Original Android Development] scarmon25:
Google released their own camera on the market today. If someone could install it and see if HDR works for them I would be greatful. It isn't for me but I would love to verify.

https://play.google.com/store/apps/details?id=com.google.android.GoogleCamera

This poor device has seen more flashes than a college kid at Marti Gras. Jflteusc
[Galaxy S 4 i9505 Original Android Development] DigitalUnderground:
So [MENTION=4790322]kufikugel[/MENTION] (developer of slimkat for nexus 5) supplied us a compatibility fix for that camera to work with slimkat. HDR works now for the n5. Maybe, if [MENTION=4354408]broodplank1337[/MENTION] can't get it (which he probably can do on his own) he may be able to bounce ideas off to see if it can be fixed.

I know they're different phones... But they both use pure aosp as a base so it may be easier than one would think
[Galaxy S 4 i9505 Original Android Development] scarmon25:
Do you have a link to the compatibility fix?

This poor device has seen more flashes than a college kid at Marti Gras. Jflteusc
[Galaxy S 4 i9505 Original Android Development] kufikugel:
Do not think that HDR will work on jf with the new camera. Samsung is using a complete other camera hal to render the HDR stuff. Although who knows maybe Google added support :D so try it and let us know :p
[Galaxy S 4 i9505 Original Android Development] scarmon25:
Well other apps such as snap camera have perfect HDR working. Even better than the stock aosp camera does. So it has to be possible. If an independent developer can do it then surely Google can. The crazy thing is on stock Samsung Touchwiz. The option isn't even there. I would be fine with that if I could completely remove the option. I'm an ocd type person. If it doesn't work I would rather it not even be there lol.

This poor device has seen more flashes than a college kid at Marti Gras. Jflteusc
[Galaxy S 4 i9505 Original Android Development] DigitalUnderground:
http://xdaforums.com/showthread.php?p=51961358

Compatibility fix for NEXUS 5

Please inspect the zip before flashing as it is not made for your device specifically and [MENTION=4790322]kufikugel[/MENTION] says it may not work.

Flash at your own risk
[Galaxy S 4 i9505 Original Android Development] scarmon25:
No fixy. No worries tho.

This poor device has seen more flashes than a college kid at Marti Gras. Jflteusc
[Galaxy S 4 i9505 Original Android Development] broodplank1337:
Thanks.

Add this to Makefile at KBUILD_CFLAGS: -Wno-aggressive-loop-optimizations

and the new camera app is nice i think. the black bar on the right is a bit too big but ok. the focus effect is cool. but it drains a lot of battery!

oh and btw guys, I have been invited to XDA DevCon again, and I can get a free ticket maybe. it's in Manchester UK at 26 to 28 September. :D I think I will go this year since it's not so far to travel like Miami Florida (last year)

:cool:
[Galaxy S 4 i9505 Original Android Development] gabx:
That's much better. zImage is now built. What's the quickest way to test it ? Find another S4 kernel.zip and replace with my image ??
[Galaxy S 4 i9505 Original Android Development] broodplank1337:
quickest way is to that yes, but you have to know that you also need to push all modules (which are spread in folder after compilation), do control + f and search for ".ko". copy all those files in a folder called "modules" and push "adb push modules /system/lib/modules; adb shell chmod 644 /system/lib/modules/*"
[Galaxy S 4 i9505 Original Android Development] gabx:
Good. I guess I have to $ mkbootimg first, right ? If yes, what are your parameters ?

I then will use KT-SGS4-KK4.4-AOSP-INTL-04.07.2014.zip.

Did your 4.8 boot.img booted ?

EDIT: will use your script :

http://xdaforums.com/showthread.php?t=2351533

No v4.4 :(

Got it:

PAGE SIZE: 2048

BASE ADDRESS: 0x80200000

RAMDISK ADDRESS: 0x82200000

CMDLINE: 'androidboot.hardware=qcom user_debug=31 zcache msm_rtb.filter=0x3F ehci-hcd.park=3 maxcpus=2'
[Galaxy S 4 i9505 Original Android Development] broodplank1337:
do this:

get https://github.com/dsixda/Android-Kitchen/archive/master.zip
unzip master.zip
mv -f Android-Kitchen-master ~/Android-Kitchen
echo -e '\n#!/bin/bash\ncd ~/Android-Kitchen\n./menu' >> ~/Android-Kitchen/kitchen
chmod 755 ~/Android-Kitchen/kitchen
ln -s ~/Android-Kitchen/kitchen ~/bin/kitchen
ln -s ~/Android-Kitchen/kitchen ~/Desktop/Android-Kitchen

then make a folder called working_test place boot.img from my kernel (for ramdisk) in there.

open ./menu

press 0 > 12 > w (even if it doesnt show) this will extract mine

go in working_lol and replace zImage

on menu again you press b and its built

and use that line i gave you above for pushing the modules
[Galaxy S 4 i9505 Original Android Development] gabx:
Why not just do this ( I get the parameters from your current boot.img in last build)

../mkbootimg --kernel zImage --ramdisk ramdisk.gz --cmdline "androidboot.hardware=qcom user_debug=31 zcache msm_rtb.filter=0x3F ehci-hcd.park=3 maxcpus=2" -o boot.img --base "0x80200000" --ramdiskaddr "0x82200000"
[Galaxy S 4 i9505 Original Android Development] broodplank1337:
lol I know that, i was just explaining it :P
[Galaxy S 4 i9505 Original Android Development] gabx:
Ok. It sounds to me it is much quicker than the kitchen stuff !!

In fact, I was lazy first at finding your command line parameters :(

Does your gcc 4.8 kernel boot ?
[Galaxy S 4 i9505 Original Android Development] gabx:
My kernel.zip package must be a garbage !!

Installation aborted.

I used the KT-SGS4-KK4.4-AOSP-INTL-04.07.2014.zip , unzip, placed my boot.img, push all modules in the modules directory.

Will try with another kernel.zip floating around.
[Galaxy S 4 i9505 Original Android Development] broodplank1337:
Yes I have got it booting, GCC4.8 Linaro, compiled on O3. with undervolted CPU, WLAN, Display, Vibrator, IRDA and Barcode Emulator
[Galaxy S 4 i9505 Original Android Development] gabx:
Very good.

I didn't even tested mine yet !

It built fine with -03,not even one warning, but I don't know if it boots :(
[Galaxy S 4 i9505 Original Android Development] broodplank1337:
thnx. go test it and you will find out :P
[Galaxy S 4 i9505 Original Android Development] gabx:
even with another kernel , Kernel-Alucard-V2.6.6da-[22-20]-[16-04]-AOSP-EUR-KK4.4-SGIV-PWR-CORE, installation aborted.

I must do something wrong when unzipping/pushing my boot.img & modules/zipping.

Btw, never mind, as you succeed in building with GCC 4.8 and -03. Glad for you. I will although tried to see if mine is booting.

By curiosity, how did you get rid of all these [-Wsizeof-pointer-memaccess] errors ?
[Galaxy S 4 i9505 Original Android Development] broodplank1337:
just flash it manually. then, no need for a zip. if you can compile a kernel you can also flash a kernel manually

dd if=/sdcard/boot.img of=/dev/block/mmcblk0p20

and modules (.ko) to /system/lib/modules

thats it

and I fixed that error by just adding -Wno-sizeof-pointer-memaccess in Makefile under KBUILD_CFLAGS

let me know results!
[Galaxy S 4 i9505 Original Android Development] Me Gusta:
Pff.. This all sounds like some extreme sorcery.. Can't wait for the result however :p:D

Me Gusta!
[Galaxy S 4 i9505 Original Android Development] gabx:
ah bien voila. F** hell, I am stupid.

dd if=/sdcard/boot.img of=/dev/block/mmcblk0p20

--> bootloop :(

Not sure I unpack your boot.img & mkbootimg the right way thus.

1- got your boot.img form your last AOSP442-I9505-PreFinal-Sabermod_Linaro

2- $ ./split_boot s4/boot.img ---> got your boot.img-ramdisk.cpio.gz

3- with my own built zImage:

./mkbootimg --kernel zImage --ramdisk boot.img-ramdisk.cpio.gz --cmdline "androidboot.hardware=qcom user_debug=31 zcache msm_rtb.filter=0x3F ehci-hcd.park=3 maxcpus=2" -o boot.img --base "0x80200000"

- 4- at the root directory of your kernel dir :

find -type f -name "*.ko" | xargs cp -t ../modules

Thereafter adb push everything to sdcard, adb shell, mount -o rw,remount /system & dd & cp, chmod.

Anything wrong in creating the boot.img process ??
[Galaxy S 4 i9505 Original Android Development] broodplank1337:
hmm it seems you are doing the right thing. but to be sure pls sent me the zImage and ill make an image for you as well. if mine does work there must be something wrong in your method
[Galaxy S 4 i9505 Original Android Development] Faschoda:
Hey dude, no offense but wouldn't it be better to send brood a pm?
[Galaxy S 4 i9505 Original Android Development] gabx:
TY. attached.

My kernel is maybe borken. I didn't use -Wno-sizeof-pointer-memaccess flag, but modified some pieces of code in the culprit functions. I understood the eroor given by sizeof(). It took a pointer as argument and size of a pointer is always 1. So I initialized a new variable this way:

static ssize_t bufsz = sizeof(buf);
return snprintf(buf, bufsz, "%u\n", ret);

and the error gone. I have still have doubt between ssize and size. Both work and the build went fine, but maybe one is wrong, or maybe my hack is a piece of sh*
[Galaxy S 4 i9505 Original Android Development] gabx:
Yes, I can, but usually threads are made for this. All users can then benefit from any technical discussion, which can may be of some help.

That's the way forums/mailing lists have been working for long.

But I guess you do not care about any technical discussion, but wait for your new ROM to flash.

If the OP wants me to stop using the thread, I think he can tell me and we will go private. As far as I know, he didn't ask me to stop spamming his thread.
[Galaxy S 4 i9505 Original Android Development] broodplank1337:
idd gcc 4.8 is more strict. but luckily for everything is a solution.

good you found it

attached boot.img with your zImage
[Galaxy S 4 i9505 Original Android Development] gabx:
and yyeeess, it boots. So I guess the one built with 4.9 will also boot, as I didn't get any build errors.

I do not know what I did wrong when mkbootimg.

I will then stop spamming the thread, as some users seem to have forgotten there is the word developers in the URL of this forum.

They certainly prefer ask for always some more pointless new functionality and wait for the next update to flash, flash and more flash.

Oh Brood, thank you for your wonderful ROM. I LOVE it and my phone is now one of the best of the world. I can even get the lottery numbers .BUT please, can I ask something:

A friend of mine has a ROM IamTheBestDev rc 4 fully optimized, and he sees his contact pictures in 3D. It would be nice to have same in your ROM.

Glad you managed to build with GCC 4.8 in a simplest way than I did with some code hacking.

I know why I stopped long time ago wasting my time here. Of course, nothing related to you Sir :)
[Galaxy S 4 i9505 Original Android Development] broodplank1337:
I dont think its spam since it's specific developer talk regarding compilation of kernel for this rom. but thats just my opinion.

Anyways, thank you! I do my best :)

He should use the Dialer/Contacts app from AOSP then
[Galaxy S 4 i9505 Original Android Development] danny_and_2:
I think it's relevant, because we/us/all help Florent improve his already perfectionistic rom made for all of us. Togehter we can make the rom better by enlightning Florent with new features from kernel to rom, he may not include everything, but some he implant.

Florent you do a hell of a job here, your support & your kindness is the reason why u are the only rom, I'll run as a daily driver.

-- Edit

Oh btw mate! Hell of a debugging job you'd have done! I take my hat off for u!
[Galaxy S 4 i9505 Original Android Development] Faschoda:
Dude as I said it wasn't meant in an offensive way! IT was just a question. I'm sorry that I hurt your feelings and sorry for making a mistake.