yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Alpha] modpunk:
I've contacted a friend who knows the wireless code in the kernel better than I do. The issue is that the function __cfg80211_wdev_from_attrs() in the bcmdhd driver is looking for the p2p0 device and doesn't find it. So it returns ENODEV. I've looked what's adding the device to that list and this is the function nl80211_new_interface() which is triggered by NL80211_CMD_NEW_INTERFACE.

Looking into wpa_supplicant NL80211_CMD_NEW_INTERFACE is used by nl80211_create_iface_once() which is called by nl80211_create_iface() and this function is called by wpa_driver_nl80211_if_add(). I've added more debug to wpa_driver_nl80211_if_add() but the function is not called at all.

So I'm a bit further but this is still strange.
[Samsung Galaxy Alpha] L1qu1d:
If you still want or need it, I can give you a hand here and there as soon as I get some more free time. Currently finishing up a semester and just locking down work. You've done amazing so far:) keep it up.

Codes I know:

c/C++(11)

Python

Java

And others that shouldn't be relevant to this
[Samsung Galaxy Alpha] modpunk:
Sure. Patches are always welcome. It doesn't matter what programming languages you know. You need to be able to read strace logs, that's the most important thing for Android porting.
[Samsung Galaxy Alpha] L1qu1d:
Alright message me in pm if you need anything:)
[Samsung Galaxy Alpha] modpunk:
Here is a list of things which do not work yet:

Wifi isn't working

Sound input (recording) isn't working yet

NFC is missing

Camera recording doesn't work
[Samsung Galaxy Alpha] faldo:
Does this mean RIL is working now? :o

I'm so exited of getting the clean CM-look instead of the bloated Touchwiz... i wish i had the knowledge to help you guys out with development.
[Samsung Galaxy Alpha] modpunk:
No, it isn't. I will work on RIL as soon as wifi and audio is working. It makes no sense to get RIL working if you can't capture audio ...
[Samsung Galaxy Alpha] kiloah:
any news? :3
[Samsung Galaxy Alpha] airbus360:
I've now started to build, using [MENTION=4297219]modpunk[/MENTION]s patches (big thanks to him) I will start to look at debugging the Wifi with help from a friend of mine who knows a lot about it.
[Samsung Galaxy Alpha] tron13:
how can I help you?
[Samsung Galaxy Alpha] modpunk:
See the TODO list I posted earlier ...
[Samsung Galaxy Alpha] modpunk:
Good news. A lot of my patches required in CM have been pushed upstream today.
[Samsung Galaxy Alpha] neofral:
i just finished syncing repo. do you think the patches will be included so i don't have to add anything?
[Samsung Galaxy Alpha] modpunk:
You still need 4 patches which are not upstream yet. See the updated PATCHES file.
[Samsung Galaxy Alpha] neofral:
thanks for your quick reply. i just realized that the roomservice.xml is loading the patches.

compiling now, will give it a shot and see if can get any debugging going on :fingers-crossed:
[Samsung Galaxy Alpha] neofral:
i tried to compile yesterday whole day without success.

after reading the README and PATCHES files i noticed something and i don't know if it's so important

when entering the "lunch" command without an option i get to select the device, and i don't see anything like cm_slte-userdebug. however, i noticed that cm_slte-eng is present.

should we try "luch cm_slte-eng" instead of "lunch cm_slte-userdebug:?
[Samsung Galaxy Alpha] modpunk:
cm_slte-eng is a engeneering build. It has adb enabled by default and more developers tools installled by default. You use cm_slte-userdebug if you ship a build to users. So the engineering build is what you probably want to have. You will see a red screen flicker, this is not an issue but shows visually a full screen update has been done.
[Samsung Galaxy Alpha] neofral:
in either build that i choose i get an error and unable to build

this is the terminal screen end:

Import includes file: /home/neofral/cyanogenmod/system/out/target/product/slte/obj/EXECUTABLES/healthd_intermediates/import_includes
make: *** No rule to make target '/home/neofral/cyanogenmod/system/out/target/product/slte/obj/SHARED_LIBRARIES/libion_exynos_intermediates/export_includes', needed by '/home/neofral/cyanogenmod/system/out/target/product/slte/obj/STATIC_LIBRARIES/libbinder_intermediates/import_includes'. Stop.
make: *** Waiting for unfinished jobs....
Import includes file: /home/neofral/cyanogenmod/system/out/target/product/slte/obj/STATIC_LIBRARIES/libbatteryservice_intermediates/import_includes

is this happening due to missing/improper build packages or something else?

i have attached a copy of the full terminal screen
[Samsung Galaxy Alpha] modpunk:
Do you have the exynos5-insignal repo?
[Samsung Galaxy Alpha] modpunk:
I think I got audio capture working. Still need to do volume fine tuning.
[Samsung Galaxy Alpha] neofral:
i just found out that the README file is not the same viewe as MASTER, TESTING and CM-11. the roomservice.xml file includes different repos viewed as TESTING or CM-11. i just added the new roomservice.xml contents and tried to build today and again wasn't successful. i'm rebuilding my virtual machine and install all the repo-s from scratch, will do another "./extract-files.sh" and see if i can get it without errors this time. there are couple of files that can't be copies by the script and have to place them manually.

will try to build again tonight.
[Samsung Galaxy Alpha] modpunk:
I don't see how reinstalling a VM fixes the issue that you have the wrong repositories. Especially I wouldn't want to resync CM again as it takes several hours ... This is the Windows way fixing things. That's not needed on LInux ...
[Samsung Galaxy Alpha] neofral:
i agree with you but you didn't release any build to flash on our devices so until now the only way is to try and build myself, flash and see what i can help with debugging
[Samsung Galaxy Alpha] modpunk:
Well the ROM is in development state. It is not useable and you need a build to actually debug things. Often you need gdb to attach it to a process. Also it is documented how to build a ROM on your own if you want to help with development. So if you want to help you should learn how the ROM is built and how things are working :)
[Samsung Galaxy Alpha] neofral:
exactly :)

so please share your build so i don't loose time while i'm trying to build.

let's debug things and then i'll get my build
[Samsung Galaxy Alpha] bonuzzz:
What do you want to see? As Modpunk said, it's not usable at the current stage. If you want to help, you have to know how to compile cm. But if you know, you will compile it without any problems.
[Samsung Galaxy Alpha] airbus360:
I managed to get it compiled and booting. Modpunk has done a great job so far with it all. Just that darn wifi that puzzles me because its nothing like I had seen before.
[Samsung Galaxy Alpha] modpunk:
The issue is that wpa_supplicant can't set the p2p0 interface into station mode. The reason for this is that the kernel can't find the device in the list of wifi devices. So why isn't it added there (see my earlier posts). There is either a function call in the kernel missing or wpa_supplicant is missing to do a call to the kernel.
[Samsung Galaxy Alpha] airbus360:
I get you, I have called a person I know in on this as well.

Merry Christmas everyone!
[Samsung Galaxy Alpha] bonuzzz:
wifi is working. but under console only. i'm able to scan access points
[Samsung Galaxy Alpha] modpunk:
It might be that a config option in the framework will fix it. The question is why it want to set the p2p0 interface into station mode. I need to talk to a friend again who knows the kenrel wifi stack better. I was on vacation the last days. I will look into it again starting next week.
[Samsung Galaxy Alpha] modpunk:
Yay, I got the wifi working :)
[Samsung Galaxy Alpha] bonuzzz:
is socket wpa_wlan0 working?
[Samsung Galaxy Alpha] modpunk:
Yes, it is.
[Samsung Galaxy Alpha] bonuzzz:
It will be interesting to see your solution.
[Samsung Galaxy Alpha] modpunk:
I've just modified wpa_supplicant. I will cleanup the code and create a patch for CM and add the needed define to the BoardConfig tomorrow. The next step is to get the Samsung RILD working: hardware/samsung/ril/xmm6262/libril/
[Samsung Galaxy Alpha] bonuzzz:
I tried to solve without patches to wpa_supplicant....

alpha has xmm7260 modem. maybe it will starting with replacing ril header, but i dont have any tools to debug ril unfortunately
[Samsung Galaxy Alpha] blinksilver:
Also this isnt the first time samsung has gone with the octa/xmm combo, The galaxy tab 3 10.1 lte used the xmm7160.

According to this:

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

Someone has gotten the RIL partially working, so it might be a nice place to start. Thanks again for your efforts

****My mistake****: while this does indeed use the XMM7160, it does not use an exnyos 5 octa, opting instead for an intel atom.
[Samsung Galaxy Alpha] modpunk:
http://git.cryptomilk.org/projects/...G&id=edd07a7dc66665b14fd98666e4460d887e696099

This commit adds the right directive to the BoardConfig and updates PATCHES file to the CM commit for wpa_supplicant. It is a simple workaround and works quite well for me. Let me know if it works for you :)
[Samsung Galaxy Alpha] modpunk:
Here is my TODO list. If someone wants to help, pick up a topic, create patches and send them to me via mail or give me the url to the git repo. I will start to work on RIL.

# RIL
Get the xmm6262 working with xmm7260.
Add ril routing support to audio hal.

Test usb and wifi tethering.

# CMHW
BOARD_HARDWARE_CLASS += hardware/samsung/cmhw

VibratorHW.java is wrong, copy to device tree and modify it? Check other
devices how to fix it.

# MMS
Create overlay/packages/apps/Mms/res/xml/mms_config.xml

Check stock MMS apk for mms config.

# Audio
Revisit sound recording, capture volume to low?
Check if CM DPS Manager is working.
Do we need voicefx in audio_effects.conf

# Camera
Fix video recording.

# Media
Check if youtube is working.

# DRM
Get drmserver and mobicore working.

# NFC
Get NFC working (low priority)
[Samsung Galaxy Alpha] Jeshter2000:
Rule 1 : Do not ask for Eta's!
[Samsung Galaxy Alpha] modpunk:
I dunno. It depends on how much time I have for it and how long it takes to figure out how things work. Often it is guessing as we do not have any documentation. If others would help with the development it would be faster. Well that's the reason why I post the TODO list.
[Samsung Galaxy Alpha] modpunk:
I've added RILD support to the audio HAL now but it can't connect to the rild.
[Samsung Galaxy Alpha] modpunk:
I've fixed YouTube (h264 decoding) on the SLTE. It works with the following commit:

http://review.cyanogenmod.org/84107

For debugging h264 decoding you need to turn on kernel debug messages:

echo 8 > /proc/sys/kernel/printk
echo 7 > /sys/module/s5p_mfc/parameters/debug
echo 2 > /sys/module/videobuf2_core/parameters/debug

Video recording is not working yet. Probably a related issue ...
[Samsung Galaxy Alpha] neofral:
i'm still trying to build the rom and try and help...

i think i got somewhere near the end but i get the following error:

Install system fs image: /home/neofral/cyanogenmod/system/out/target/product/slte/system.img
/home/neofral/cyanogenmod/system/out/target/product/slte/system.img+ maxsize=2451406848 blocksize=135168 total=425511168 reserve=24870912
Package target files: /home/neofral/cyanogenmod/system/out/target/product/slte/obj/PACKAGING/target_files_intermediates/cm_slte-target_files-b71fc84bcb.zip
Package OTA: /home/neofral/cyanogenmod/system/out/target/product/slte/cm_slte-ota-b71fc84bcb.zip
MKBOOTIMG= \
./build/tools/releasetools/ota_from_target_files -v \
-p /home/neofral/cyanogenmod/system/out/host/linux-x86 \
-k build/target/product/security/testkey \
--backup=true \
--override_device=auto \
\
\
/home/neofral/cyanogenmod/system/out/target/product/slte/obj/PACKAGING/target_files_intermediates/cm_slte-target_files-b71fc84bcb.zip /home/neofral/cyanogenmod/system/out/target/product/slte/cm_slte-ota-b71fc84bcb.zip
unzipping target target-files...
running: unzip -o -q /home/neofral/cyanogenmod/system/out/target/product/slte/obj/PACKAGING/target_files_intermediates/cm_slte-target_files-b71fc84bcb.zip -d /tmp/targetfiles-sMGCzC
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files", line 1132, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files", line 1075, in main
OPTIONS.info_dict = common.LoadInfoDict(input_zip)
File "/home/neofral/cyanogenmod/system/build/tools/releasetools/common.py", line 155, in LoadInfoDict
d["fstab"] = LoadRecoveryFSTab(zip, d["fstab_version"])
File "/home/neofral/cyanogenmod/system/build/tools/releasetools/common.py", line 227, in LoadRecoveryFSTab
raise ValueError("malformed recovery.fstab line: \"%s\"" % (line,))
ValueError: malformed recovery.fstab line: "/efs ext4 /dev/block/mmcblk0p3 flags=backup=1"
make: *** [/home/neofral/cyanogenmod/system/out/target/product/slte/cm_slte-ota-b71fc84bcb.zip] Error 1
neofral@neofral:~/cyanogenmod/system$

can somebody tell me what am i doing wrong. i've searched the net for the past couple of days and couldn't find a solution:(
[Samsung Galaxy Alpha] airbus360:
Use this fix (thanks modpunk :)

tools/releasetools/common.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index e45bb96..f7945ab 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -125,6 +125,7 @@ def LoadInfoDict(zip):

if "fstab_version" not in d:
d["fstab_version"] = "1"
+ d["fstab_version"] = "1"

try:
data = zip.read("META/imagesizes.txt")
@@ -187,8 +188,8 @@ def LoadRecoveryFSTab(zip, fstab_version):
line = line.strip()
if not line or line.startswith("#"): continue
pieces = line.split()
- if not (3 <= len(pieces) <= 4):
- raise ValueError("malformed recovery.fstab line: \"%s\"" % (line,))
+ if not (3 <= len(pieces) <= 7):
+ raise ValueError("malformed version 1 recovery.fstab line: \"%s\", pieces: %d" % (line,len(pieces),))

p = Partition()
p.mount_point = pieces[0]
@@ -196,7 +197,7 @@ def LoadRecoveryFSTab(zip, fstab_version):
p.device = pieces[2]
p.length = 0
options = None
- if len(pieces) >= 4:
+ if len(pieces) >= 4 and pieces[3] != 'NULL':
if pieces[3].startswith("/"):
p.device2 = pieces[3]
if len(pieces) >= 5:

goes in the build directory.
[Samsung Galaxy Alpha] neofral:
finally got it built. however, using TWRP to flash it says: error executing updater binary...

tried to flash through heimdall and for each *.img file it gives the same error: tar header contained an invalid file size

any suggestions?
[Samsung Galaxy Alpha] qkdxorjs1002:
Can you post log(with error) from twrp?

You can get it on TWRP Advanced Tab
[Samsung Galaxy Alpha] neofral:
formated data,chache & dalvik and flashed...

---------- Post added at 04:49 PM ---------- Previous post was at 04:34 PM ----------

not necessary, i didn't do a format and i received the error. modified the updater-script to do that for me for next flash

thank you anyway
[Samsung Galaxy Alpha] modpunk:
I made a big step with Radio today. The data connection is fully working but I can't do a phone call.
[Samsung Galaxy Alpha] neofral:
i noticed there is something wrong with the sim-card detection, maybe next we can look into this.

have updated the repo with the changes?
[Samsung Galaxy Alpha] modpunk:
No, the problem is my SlteRIL.java implementation.
[Samsung Galaxy Alpha] neofral:
are you sure we have all the proprietary blobs for the RIL? i noticed some files missing from the directory compared to stock rom
[Samsung Galaxy Alpha] modpunk:
Yes, else the rild wouldn't start. See the linking section of libsec-ril ...
[Samsung Galaxy Alpha] modpunk:
I've pushed my "Work in progress" to the TESTING branch for working RIL. http://review.cyanogenmod.org/#/c/84989/ is also needed ...
[Samsung Galaxy Alpha] modpunk:
I'm able to make phone calls now, but there are still several issues ...

The earpiece (handset speaker) doesn't have any output in a phone call. So you don't understand what the other party is saying. Something is wrong with audio routing. The number calling is not displayed or sent to the Caller App correctly.
[Samsung Galaxy Alpha] modpunk:
I've extended the RIL java implemntation and I fixed an important bug so that the number calling is finally displayed! No I need to get audio routing correct!
[Samsung Galaxy Alpha] toms95:
Try if there is output to headphones. As far as i know on hardware level on the wolfsons chip there are 3 independent 20mW channels of output for earphones- two channels goes to 3,5 mm headphones jack and one to phones earpiece. I don't really know how Samsung is handling the channels on the software side, but it could be the cause, that phone chooses the wrong channel.
[Samsung Galaxy Alpha] gaurav247star:
Super THanks FOr unofficial Cyanogenmod.... i know it underdevelopment
[Samsung Galaxy Alpha] modpunk:
You are right! If I plug in the headphones it works. At least I know what to look into now! Thanks!!!!
[Samsung Galaxy Alpha] modpunk:
I think the mixer_paths.xml may not be setup correctly. I think I need to play around with that longer ...

Here is my try to fix it: http://git.cryptomilk.org/projects/...G&id=0262baacd8dedbd2b732e56088ef91b2b64a160b

The mixer_paths.xml is a translation from:

The values are from here: http://git.cryptomilk.org/projects/...G&id=0262baacd8dedbd2b732e56088ef91b2b64a160b
[Samsung Galaxy Alpha] anythingdust:
friends, how long to wait alpha/beta for ordinary users?

thank you for your work
[Samsung Galaxy Alpha] Gh3ttoKiLL4:
Never ask for ETAs, dude..
[Samsung Galaxy Alpha] anythingdust:
WTF is ETAs?
[Samsung Galaxy Alpha] saxmydix:
http://en.wikipedia.org/wiki/Estimated_time_of_arrival
[Samsung Galaxy Alpha] tileeq:
I would wanna ask for current progress if its possible, like what isnt working yet and what is.
[Samsung Galaxy Alpha] modpunk:
Check the TODO list I posted, pick an item and fix it ...
[Samsung Galaxy Alpha] modpunk:
I've rewrote the mixer_paths.xml and made it much more complex with more details from tinyucm.conf. The earpiece is still not working in voice calls ...

http://git.cryptomilk.org/projects/.../tree/configs/audio/mixer_paths.xml?h=TESTING

Maybe we need to send something to RIL ...
[Samsung Galaxy Alpha] modpunk:
An IDA Pro license would really help ...
[Samsung Galaxy Alpha] tnicko:
Which version, windows, Linux or mac? Any idea how much?
[Samsung Galaxy Alpha] modpunk:
The IDA Pro Starter (Linux) Named License which should be enough for android blobs costs 450 Euro. I don't have any spare money for that right now.

A friend of mine has one and he sent me the functions. I have at least fixed some values in libsecril-client now.
[Samsung Galaxy Alpha] tnicko:
Damn that's a bit steep. Had no idea it would be that expensive. Would just the demo and maybe a specific plugin suffice? Completely out of my realm but thought I could help in getting you what you needed. But that 450Euro threw me.
[Samsung Galaxy Alpha] modpunk:
No, the demo is not really enough. That's why I ask a friend who has access to one.

I got some donations for the CM development from other people. I first thought I could use it to pay my infrastructure, but I think if it will be enough some day, I will buy a IDA Pro license.
[Samsung Galaxy Alpha] leripe:
How much are you sort of the 450€? I think some people could throw few bucks here an there. :)
[Samsung Galaxy Alpha] modpunk:
Currently 46 Euro
[Samsung Galaxy Alpha] modpunk:
After fixing the ril_interface and improving the audio HAL, I've tried again what happens if I use the libsecril-client.so blob. Now the earpiece works but the all what it produces is strange noise.

At least now I know that the CM libsecril-client code has some bugs. The noise might be due to a wrong sample rate.
[Samsung Galaxy Alpha] modpunk:
I think I got it working phone calls working ...
[Samsung Galaxy Alpha] modpunk:
IT WORKS!!! Woooohooooooo! I can't believe it, phone calls are fully working now!!

modpunk dances ...
[Samsung Galaxy Alpha] tnicko:
Dude!
[Samsung Galaxy Alpha] gaurav247star:
u did it buddy.. ....:good: :good:
[Samsung Galaxy Alpha] anythingdust:
many people waiting and wants to dance with you, bro ))
[Samsung Galaxy Alpha] modpunk:
There is still a lot of work and fine tuning ahead, but the most important features of the phone are working now. I will cleanup the changes for the audio HAL next week and fix the remaining issues with the mixer_paths.xml. Currently I only have the config for narrow band. I need to add wide band features and mixer settings too.

If someone is around who can write C code and understands strace output, speak up help with the TODO list is much appreciated.

Thanks to all people who donated so far!!!!

As I said earlier if there are enough donations I will buy a License for IDA Pro which is really expensive.
[Samsung Galaxy Alpha] leripe:
Could you put the "TODO" / "not working yet" list to the first post so we can follow the progress more easily? :)
[Samsung Galaxy Alpha] modpunk:
ss

Done. The list is much longer for sure. These are the main issues for the most important features.
[Samsung Galaxy Alpha] lamahgra:
Thx ...sounds good
[Samsung Galaxy Alpha] CuraeL:
You're doing a great piece of work for the uninitiated such as myself. I'm so glad it pays off for you too.

Thank you so much for all the work you've done.
[Samsung Galaxy Alpha] modpunk:
Fixed more stuff and updated TODO :)
[Samsung Galaxy Alpha] lamahgra:
Looks like there is hope..for all alpha owner... to get an real slim android on their device...
[Samsung Galaxy Alpha] anythingdust:
I am willing to be tested, if necessary
[Samsung Galaxy Alpha] modpunk:
V/audio_hw_primary(22494): adev_set_call_audio_path: ril_set_call_audio_path(0)
V/audio_hw_primary(22494): start_voice_call: Opening voice PCMs
V/audio_hw_primary(22494): XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX adev_set_wb_amr_callback: Turn on wide band support
V/audio_hw_primary(22494): stop_voice_call: Closing voice PCMs
D/AudioPolicyManagerBase(22494): setOutputDevice() changing device from (2) to (1) force (1) delayMs (104) on Output (2)
D/AudioPolicyManagerBase(22494): setOutputDevice() changing device from (2) to (1) force (1) delayMs (0) on Output (3)
V/audio_hw_primary(22494): out_set_parameters: key value pairs: routing=1
W/AudioFlinger(22494): write blocked for 581 msecs, 1 delayed writes, thread 0xb50f1008
V/audio_hw_primary(22494): start_voice_call: Opening voice PCMs

The next item on the TODO list is fixed. Wide band (3G and higher) audio support.
[Samsung Galaxy Alpha] modpunk:
The home key can now wake the device.

What one should know about keylayout files:

The documentation for keylayout files

https://source.android.com/devices/input/key-layout-files.html

states, that it looks for /system/usr/keylayout/DEVICE_NAME.kl. You can find the device and keycodes with getevent. For the home, volume and power key this is gpio_keys.8. All special chars needs to be replaced by an underscore '_'. So the resulting name needs to be 'gpio_keys_8.kl'.

If you have issues to get it working add '#define DEBUG_PROBE 1' to libs/input/InputDevice.cpp in frameworks/native.
[Samsung Galaxy Alpha] modpunk:
I had video decoding already working. I was able to watch videos on YouTube, but it stopped working and I have no idea why. It looks like a bad change unrelated to our device ...
[Samsung Galaxy Alpha] modpunk:
If someone want to help, MTP needs probably fixing. Start with updating the device and kernel tree.

The Kernel MTP driver is drivers/usb/gadget/f_mtp_samsung.c which is different from the standard MTP driver drivers/usb/gadget/f_mtp.c.

If you try to start MTP it fails and reports an device error in /proc/kmsg

To turn on debugging do e.g.

diff --git a/media/mtp/MtpDevice.cpp b/media/mtp/MtpDevice.cpp
index d672dff..22d8105 100644
--- a/media/mtp/MtpDevice.cpp
+++ b/media/mtp/MtpDevice.cpp
@@ -15,6 +15,7 @@
*/

#define LOG_TAG "MtpDevice"
+#define LOG_NDEBUG 0

#include "MtpDebug.h"
#include "MtpDevice.h"

This can be done for each file. Setting it in MtpDebug.h will produce a lot of output!