Android SW Development - Porting MPD to Android - Android Q&A, Help & Troubleshooting

Hello, I am looking to port MPD, the music player daemon SERVER to the Android platform. I was wondering if anyone had any advice to this end?
So far I imagine it will involve getting the sources of MPD (can't do that at work so will check tonight), finding an Android compiler and building all the dependencies and MPD itself using that? I believe the Android NDK can compile C and C++ into .apk's which then run in an Android virtual machine, but I'm not sure what issues that might cause on MPD in terms of accessing the audio hardware etc..
Failing this, perhaps an alternative is to install Linux for Android and run MPD directly out of that? I want to stick my phone straight into a speaker and use it to play music from a Windows or Linux machine on my LAN - this is exactly what MPD enables so I would really like to see a server port for Android, as would many others from what I've seen in my searching for it.
PS I know this is a sw development question but apparently I don't have enough posts to ask this question in the appropriate place.

I think this deserves a bump. Also a moderator needs to move it to the correct forum since I had too few posts to post it to the correct one.

I have considerable interest in getting MPD to run on Android as well. Now that XBMC is running on Android and the Nexus Q exists, it seems I have found an acceptable HTPC frontend.
I myself have not yet used XBMC for my music though, perhaps it is sufficient and mpd is not needed?
In terms of getting MPD to run in Android, we can drop the need for FFmpeg by using mediaplayer: developer.android.com/guide/topics/media/mediaplayer.html

What about a raspberry pi and raspbmc, regarding your wish for an HTPC? Believe this is much cheaper than using an Android based device.
Thanks for referencing me to that API... perhaps the ideal way to proceed is to develop a basic Android app using that and a basic JSON-RPC interface to be able to control it from any other device.

is there any progress in this regard? i'd love to install an mpd server, when i get my ouya

antisystem said:
is there any progress in this regard? i'd love to install an mpd server, when i get my ouya
Click to expand...
Click to collapse
Checkout github.com/rumpeltux/mpd/tree/android. It compiles and runs fine for me.

rumpeltux said:
Checkout github.com/rumpeltux/mpd/tree/android. It compiles and runs fine for me.
Click to expand...
Click to collapse
It didn't work for me..
How did you achieve it?

combro2k said:
It didn't work for me..
How did you achieve it?
Click to expand...
Click to collapse
I cant compile it, too.
A good Readme with depencies would be great.

k3x said:
I cant compile it, too.
A good Readme with depencies would be great.
Click to expand...
Click to collapse
I used a current Ubuntu. You may need: git build-essentials realpath autoconf automake libc6-dev-i386, not sure if more.
You’ll also need the android SDK and NDK (I used version r8e).
Code:
# clone the repository
cd mpd
git checkout android
# Be sure to adjust the paths in the top of compile-android.sh according to your sdk & ndk-location
./autogen.sh # Will start compiling, but it's ok if it fails.
./compile-android.sh

still not working
Thank you, but its is still not working.
I have sdk and ndk (same version) and adjusted the paths.
./autogen.sh #no errors
./compile-android.sh
ive tried to install the libs (configure: WARNING: ...) and reduced the warnings, but these libs i cant find.
problem is now:
Code:
In file included from src/PcmConvert.hxx:27:0,
from src/PcmConvert.cxx:21:
src/pcm_resample.h:31:24: fatal error: samplerate.h: No such file or directory
compilation terminated.
make[1]: *** [src/libpcm_a-PcmConvert.o] Fehler 1
Additional information:
in attachment

sudo cp /usr/include/samplerate.h ~/Arbeitsfläche/mpd-android/src
Code:
In file included from /tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/bits/locale_facets.h:43:0,
from /tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/bits/basic_ios.h:39,
from /tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/ios:45,
from /tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/ostream:40,
from /tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/iostream:40,
from /usr/include/adplug/database.h:27,
from /usr/include/adplug/player.h:29,
from /usr/include/adplug/adplug.h:27,
from src/decoder/AdPlugDecoderPlugin.cxx:29:
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:46:35: error: '_U' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:47:32: error: '_L' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:48:32: error: '_U' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:48:37: error: '_L' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:49:32: error: '_N' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:50:33: error: '_X' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:50:38: error: '_N' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:51:32: error: '_S' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:52:32: error: '_P' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:52:37: error: '_U' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:52:42: error: '_L' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:52:47: error: '_N' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:52:52: error: '_B' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:53:32: error: '_P' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:53:37: error: '_U' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:53:42: error: '_L' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:53:47: error: '_N' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:54:32: error: '_C' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:55:32: error: '_P' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:56:32: error: '_U' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:56:37: error: '_L' was not declared in this scope
/tmp/ndk-felix/arm-linux-androideabi-4.6/bin/../lib/gcc/../../include/c++/4.6/arm-linux-androideabi/bits/ctype_base.h:56:42: error: '_N' was not declared in this scope

k3x said:
Thank you, but its is still not working.
I have sdk and ndk (same version) and adjusted the paths.
./autogen.sh #no errors
./compile-android.sh
ive tried to install the libs (configure: WARNING: ...) and reduced the warnings, but these libs i cant find.
problem is now:
Code:
In file included from src/PcmConvert.hxx:27:0,
from src/PcmConvert.cxx:21:
src/pcm_resample.h:31:24: fatal error: samplerate.h: No such file or directory
compilation terminated.
make[1]: *** [src/libpcm_a-PcmConvert.o] Fehler 1
Additional information:
in attachment
Click to expand...
Click to collapse
mpd seems to be using the host system to detect which libraries are available. You’ll either need to uninstall those (in your case libsamplerate0-dev I guess) or adjust the configure command for mpd in compile-android.sh with a flag to explicitly disable the library (like --disable-lsr I guess).
My configuration looks like this (if you have more things in there, you most likely need to disable these explicitly):
Code:
########### MPD CONFIGURATION ############
Archive support:
(-bzip2) (-ISO9660) (-ZIP)
Client support:
(+IPv6) (+TCP) (+UNIX Domain Sockets)
File format support:
(-AAC) (-AdPlug) (-C64 SID) (-FFMPEG) (-FLAC) (-FluidSynth) (-GME)
(-libsndfile) (-MikMod) (-MODPLUG) (+MAD) (-MPG123) (-Musepack)
(+Opus) (-OggTremor) (+OggVorbis) (-WAVE) (-WavPack) (-WildMidi)
Other features:
(-libsamplerate) (-libmpdclient) (+inotify) (-SQLite)
Metadata support:
(+ID3)
Playback support:
(-ALSA) (-FFADO) (-FIFO) (+File Recorder) (+HTTP Daemon) (-JACK)
(-libao) (-Media MVP) (-OSS) (-OpenAL) (-OS X) (-Pipeline)
(-PulseAudio) (-ROAR) (-SHOUTcast) (-Solaris) (-WinMM)
Streaming encoder support:
(-FLAC) (-LAME) (+Ogg Vorbis) (+Opus) (-TwoLAME) (+WAVE)
Streaming support:
(-CDIO_PARANOIA) (-CURL) (-Despotify) (-Last.FM) (-Soundcloud)
(-MMS) (-SOUP)
##########################################

I got error
Code:
./compile-android.sh: 8: ./compile-android.sh: realpath: not found

But is it truly impossible to use direct alsa output here? Running this as root could possibly solve some problems...

Related

[Q] Compiling ICS

Hi i'm trying to build ICS Source but i'm getting this error:
HTML:
make: *** No rule to make target `out/target/product/ace/obj/STATIC_LIBRARIES/libaudiointerface_intermediates/libaudiointerface.a', needed by `out/target/product/ace/obj/SHARED_LIBRARIES/libaudio_intermediates/LINKED/libaudio.so'. Stop.
make: *** Waiting for unfinished jobs....
target thumb C++: libaudio <= hardware/msm7k/libaudio-qdsp5v2/AudioHardware.cpp
In file included from hardware/msm7k/libaudio-qdsp5v2/AudioHardware.cpp:34:
hardware/msm7k/libaudio-qdsp5v2/AudioHardware.h:51: error: expected class-name before '{' token
hardware/msm7k/libaudio-qdsp5v2/AudioHardware.h:70: error: ISO C++ forbids declaration of 'AudioStreamOut' with no type
hardware/msm7k/libaudio-qdsp5v2/AudioHardware.h:70: error: 'AudioStreamOut' declared as a 'virtual' field
hardware/msm7k/libaudio-qdsp5v2/AudioHardware.h:70: error: expected ';' before '*' token
hardware/msm7k/libaudio-qdsp5v2/AudioHardware.h:77: error: ISO C++ forbids declaration of 'AudioStreamIn' with no type
hardware/msm7k/libaudio-qdsp5v2/AudioHardware.h:77: error: 'AudioStreamIn' declared as a 'virtual' field
hardware/msm7k/libaudio-qdsp5v2/AudioHardware.h:77: error: expected ';' before '*' token
hardware/msm7k/libaudio-qdsp5v2/AudioHardware.h:85: error: 'AudioStreamOut' has not been declared
hardware/msm7k/libaudio-qdsp5v2/AudioHardware.h:86: error: 'AudioStreamIn' has not been declared
hardware/msm7k/libaudio-qdsp5v2/AudioHardware.h:97: error: expected class-name before '{' token
hardware/msm7k/libaudio-qdsp5v2/AudioHardware.h: In member function 'virtual int android::AudioHardware::AudioStreamOutQ5V2::format() const':
hardware/msm7k/libaudio-qdsp5v2/AudioHardware.h:110: error: 'AudioSystem' has not been declared
hardware/msm7k/libaudio-qdsp5v2/AudioHardware.h: In member function 'virtual uint32_t android::AudioHardware::AudioStreamOutQ5V2::latency() const':
hardware/msm7k/libaudio-qdsp5v2/AudioHardware.h:111: error: 'frameSize' was not declared in this scope
hardware/msm7k/libaudio-qdsp5v2/AudioHardware.cpp: In destructor 'virtual android::AudioHardware::~AudioHardware()':
hardware/msm7k/libaudio-qdsp5v2/AudioHardware.cpp:53: error: 'AudioStreamOut' was not declared in this scope
hardware/msm7k/libaudio-qdsp5v2/AudioHardware.cpp:53: error: expected primary-expression before ')' token
hardware/msm7k/libaudio-qdsp5v2/AudioHardware.cpp: At global scope:
hardware/msm7k/libaudio-qdsp5v2/AudioHardware.cpp:62: error: expected constructor, destructor, or type conversion before '*' token
hardware/msm7k/libaudio-qdsp5v2/AudioHardware.cpp:341: error: expected '}' at end of input
make: *** [out/target/product/ace/obj/SHARED_LIBRARIES/libaudio_intermediates/AudioHardware.o] Error 1
i have tryed many things to fix this erro but no success
i hope some one can help me
bump
Sent from my SGH-T959 using xda premium
Many devs face this error and they are fighting with this.
I just started compiling android but did finish a successful build at 05:00am this morning and didn't get (or see) this error but, no i'm expert by any means..
Considering the error:
No rule to make target `out/target/product/ace/obj/STATIC_LIBRARIES/libaudiointerface_intermediates/libaudiointerface.a', needed by....
Click to expand...
Click to collapse
It literally says its missing something, the rule, so would it be an idea to resync repo perhaps ?
I resynced last night and there were no changes. But, yes, resyncing is important... You never know when Google will drop more source, and they may or may not announce it via mailinglist.
Inspire 4G // BlackICE
Try compiling for tuna/maguro/panda first
Also, try removing libaudio folder from device folder, and if your device has aosp then try using libaudio from there(assuming you are using device from cm7)
I also face with this error ... Maybe something is wrong in include/media
I'm getting this error for my passion.
Ive gotten a little farther by changing the namespace from android to android_audio_legacy as they did it hardware/libhardware_legacy/include/hardware_legacy/
Has anyone managed to fix this problem yet?
But it will still conpiling. Not a big problem. We can fix this later.
Sent from Xperia X10 Self-modded
I can't even seen to compile for tuna keep getting errors on llvm. I compile cm7 so my builds setup is good. Confused
texasice said:
I'm getting this error for my passion.
Ive gotten a little farther by changing the namespace from android to android_audio_legacy as they did it hardware/libhardware_legacy/include/hardware_legacy/
Click to expand...
Click to collapse
Could you pastebin the modded file or generate an .patch file for your change ?
@up I also face with llvm error Do someone have fixed that issue ?
mikegapinski said:
Could you pastebin the modded file or generate an .patch file for your change ?
@up I also face with llvm error Do someone have fixed that issue ?
Click to expand...
Click to collapse
in AudioHardware.h line 28 change :
Code:
namespace android {
as mentioned to :
Code:
namespace android_audio_legacy {
I tried it myself just by curiosity and it leads to these errors :
Code:
target thumb C++: libaudio <= hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp
In file included from hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:37:
hardware/msm7k/libaudio-qsd8k/AudioHardware.h:318: error: 'Mutex' does not name a type
hardware/msm7k/libaudio-qsd8k/AudioHardware.h:328: error: ISO C++ forbids declaration of 'SortedVector' with no type
hardware/msm7k/libaudio-qsd8k/AudioHardware.h:328: error: expected ';' before '<' token
hardware/msm7k/libaudio-qsd8k/AudioHardware.h:337: error: 'Mutex' does not name a type
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:92: error: 'AudioHardware' has not been declared
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:102: error: 'AudioHardware' has not been declared
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:102: error: ISO C++ forbids declaration of 'AudioHardware' with no type
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp: In function 'int android::AudioHardware()':
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:103: error: only constructors take base initializers
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:109: error: 'TTY_MODE_OFF' was not declared in this scope
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:112: error: 'msm_bt_endpoint' was not declared in this scope
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:112: error: expected primary-expression before ')' token
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:116: error: invalid type in declaration before ';' token
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:118: error: 'doA1026_init' was not declared in this scope
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:124: error: 'mNumBTEndpoints' was not declared in this scope
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:125: error: 'mInit' was not declared in this scope
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:126: error: return-statement with no value, in function returning 'int'
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:131: error: return-statement with no value, in function returning 'int'
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:158: error: 'mNumBTEndpoints' was not declared in this scope
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:160: error: 'mBTEndpoints' was not declared in this scope
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:160: error: expected type-specifier before 'msm_bt_endpoint'
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:160: error: expected ';' before 'msm_bt_endpoint'
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:161: error: 'mInit' was not declared in this scope
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:164: error: expected primary-expression before 'int'
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:164: error: expected ')' before 'int'
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:167: error: return-statement with no value, in function returning 'int'
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:169: error: 'snd_get_bt_endpoint' cannot be used as a function
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:206: error: no return statement in function returning non-void
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp: At global scope:
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:208: error: expected constructor, destructor, or type conversion before '::' token
hardware/msm7k/libaudio-qsd8k/AudioHardware.cpp:2025: error: expected '}' at end of input
make: *** [out/target/product/passion/obj/SHARED_LIBRARIES/libaudio_intermediates/AudioHardware.o] Error 1
Any update on this? I had to add LOCAL_MODULE_TAGS := optional to some of the Android.mk to even reach that far. Faulty code from Google or am I doing something wrong myself?
Ive gotten past this by just removing the libaudio* folders from the Android.mk
It at least results in a system.img for the passion
In hardwark/msm7k/Android.mk
for mine qsd8k
from
Code:
common_msm_dirs := libcopybit liblights libopencorehw librpc libstagefrighthw
msm7k_dirs := $(common_msm_dirs) boot libgralloc libaudio
qsd8k_dirs := $(common_msm_dirs) libgralloc-qsd8k libaudio-qsd8k dspcrashd
msm7x30_dirs := liblights libgralloc-qsd8k librpc libaudio-qdsp5v2
to
Code:
common_msm_dirs := libcopybit liblights libopencorehw librpc libstagefrighthw
msm7k_dirs := $(common_msm_dirs) boot libgralloc libaudio
qsd8k_dirs := $(common_msm_dirs) dspcrashd
msm7x30_dirs := liblights libgralloc-qsd8k librpc libaudio-qdsp5v2
i also removed libgralloc cause it causes the screen to not work.
mikegapinski said:
Could you pastebin the modded file or generate an .patch file for your change ?
@up I also face with llvm error Do someone have fixed that issue ?
Click to expand...
Click to collapse
for go past llvm errors i've excluded -Werror in frameworks/compile/slang/Android.mk (local_cflags_for_slang line)
Fix, er, well, lets it build...
On the libaudio issue in msm7k for ICS:
Okay, after mucking around with it for a bit, it looks like it was an issue with namespaces, and things having the same name. So what I did to get it to compile is I went through and specified everything to use the android_audio_legacy namespace except for the things that needed to be on the android namespace.
I also slapped on a definition for 2 methods that were undefined. I do not know if it will work, but it does build.
My diff is here: http://pastebin.com/iP7FSa0C
Disclaimers:
C++ is not my primary language, actually, its not a language I know much of at all
I have not been able to test it, I can only verify that it builds, which I assume is better than having to remove the makefile.
I pretty much did the same thing as jbcode42
It builds but doesnt work.
http://pastebin.com/JGYBKfSs
I sow that libaudio.so is no more used in ICS i think ... Now it is an module under system/hw ex. audio.primary.goldfish ... We will need to wait for new soruces from CM or CA to get rid of the errors ...
lupohirp said:
for go past llvm errors i've excluded -Werror in frameworks/compile/slang/Android.mk (local_cflags_for_slang line)
Click to expand...
Click to collapse
Thanks for this. Any ideas why that error is coming up? It seems like others have got it to compile without modifications. What is everyone compiling on? I am on Ubuntu 11.10 with GCC 4.6.1

Could use some help compiling kit-kat.

Hey, for a while now I've been trying to port kit kat to the Optimus 3D. Along the lines I've ran into this issue building and can't go any further.
REALLY could use some help, without it I may have to abandon this.
Here is the error..
Code:
Import includes file: /home/bailey/android/cm11/out/target/product/p920/obj/EXECUTABLES/surfaceflinger_intermediates/import_includes
target thumb C++: surfaceflinger <= frameworks/native/services/surfaceflinger/main_surfaceflinger.cpp
In file included from frameworks/native/services/surfaceflinger/SurfaceFlinger.h:50:0,
from frameworks/native/services/surfaceflinger/main_surfaceflinger.cpp:26:
frameworks/native/services/surfaceflinger/DisplayDevice.h:61:27: error: 'HWC_DISPLAY_VIRTUAL' was not declared in this scope
frameworks/native/services/surfaceflinger/DisplayDevice.h:62:37: error: 'HWC_NUM_PHYSICAL_DISPLAY_TYPES' was not declared in this scope
In file included from frameworks/native/services/surfaceflinger/SurfaceFlinger.h:55:0,
from frameworks/native/services/surfaceflinger/main_surfaceflinger.cpp:26:
frameworks/native/services/surfaceflinger/DisplayHardware/HWComposer.h:67:32: error: 'HWC_NUM_PHYSICAL_DISPLAY_TYPES' was not declared in this scope
frameworks/native/services/surfaceflinger/DisplayHardware/HWComposer.h:69:35: error: 'HWC_DISPLAY_VIRTUAL' was not declared in this scope
In file included from frameworks/native/services/surfaceflinger/SurfaceFlinger.h:55:0,
from frameworks/native/services/surfaceflinger/main_surfaceflinger.cpp:26:
frameworks/native/services/surfaceflinger/DisplayHardware/HWComposer.h:347:25: error: 'HWC_NUM_PHYSICAL_DISPLAY_TYPES' was not declared in this scope
frameworks/native/services/surfaceflinger/DisplayHardware/HWComposer.h:354:34: error: 'HWC_NUM_PHYSICAL_DISPLAY_TYPES' was not declared in this scope
make: *** [/home/bailey/android/cm11/out/target/product/p920/obj/EXECUTABLES/surfaceflinger_intermediates/main_surfaceflinger.o] Error 1
[email protected]:~/android/cm11$

[Q] Cross compiling Python module using Android gcc Long bit error

I am attempting to compile Python along with the modules "openssl pil zope2" for Android using the "Python-for-android" project (https://github.com/kivy/python-for-android).
However it is not successful and errors out with the below error:
Code:
Getting distribution for 'zope.security==3.7.4'.
In file included from
/home/zac/Documents/Projects/Apps/python-for-android/build/hostpython/Python-2.7.2/Include/Python.h:58:0,
from src/zope/security/_proxy.c:19:
/home/zac/Documents/Projects/Apps/python-for-android/build/hostpython/Python-2.7.2/Include/pyport.h:849:2:
error: #error "LONG_BIT definition appears wrong for platform (bad
gcc/glibc config?)."
[B]#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc
config?)."[/B]
^
src/zope/security/_proxy.c: In function 'init_proxy':
src/zope/security/_proxy.c:1006:3: warning: dereferencing type-punned
pointer will break strict-aliasing rules [-Wstrict-aliasing]
Py_INCREF(&SecurityProxyType);
^
error: Setup script exited with error: command
'arm-linux-androideabi-gcc' failed with exit status 1
An error occurred when trying to install zope.security 3.7.4. Look
above this message for any errors that were output by easy_install.
While:
Installing test.
Getting distribution for 'zope.security==3.7.4'.
Error: Couldn't install: zope.security 3.7.4
What I am wondering is if anyone else has ever had a similar issue when trying to use the Android gcc, I have build zope.security just fine using the ARM gcc so it is not a platform issue but some bug/issue with the provided Android gcc in the NDK

[Q&A] [SOURCES][DEVONLY] CyanogenMod 11.0

Q&A for [SOURCES][DEVONLY] CyanogenMod 11.0
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [SOURCES][DEVONLY] CyanogenMod 11.0. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
CM11
Thank you for your efforts and hardwork. I look forward to running cm 11 on the alpha.
Congo from India. Pl. Check it and tell if all features working or not..
what about CM12 any news on that?
HELLO?
Hi. Nice to catch this thread.
I just wanna know... Can korean alpha get this cm11? Or...can get g850f only?
And i wanna talk to you. Cheer up!
Thank you for developing this alpha, modfunk!
Finally, good luck for my ss g alpha....
(i just wanna 'plus alpha' yeah!)
We will only know if you try. I don't know your hardware I only own a G850F
Hi there,
I can hardly wait to get CM11 on my device. Otherwise using this phone is pointelss for me. I would throw the whole Samsung stock ROM to somewhere that it can burn slowly and flawlessly to the ground.
Thanks guys for your efforts!
Can anybody show video hows cyano 11 on alpha ?
thnx
Simona Simmy said:
Can anybody show video hows cyano 11 on alpha ?
thnx
Click to expand...
Click to collapse
CM11 isn't ready for consuming yet on the alpha.
Yet this is called "Devonly" (developers only) and "source".
This means: get github access, get the source, get the tools, compile it, debug compilation process, fix compilation process, get a image.
Pray, push it on your device, hopefully you won't have softbricked your device.
Debug the features that are missing, fix the bugs, find solutions, recompile.
At the moment, modpunkt still has the following (major) issues:
http://forum.xda-developers.com/showpost.php?p=57233732&postcount=46
https://www.youtube.com/watch?v=1_H4AlQaNa0 seems to be a video that explains how to compile from source, it is not mine, but looks good from a first glance at google.
Simona Simmy said:
Can anybody show video hows cyano 11 on alpha ?
thnx
Click to expand...
Click to collapse
It's not useable. No network connection is working yet ...
Thank youu
Thanks to dev(s) from me too. It's interesting to follow your progress, it reminds me of the good old zte blade 1 ages where few devs hacked the **** out of that device.
How can I help ?
Hello guys, I have a Galaxy Alpha for over a week now... And just can't stand that touchwiz stock rom anymore..
So what can I do to help you guys ? I have no experience in porting roms, but I have SM-G850F and just want to help you guys.. For example I can test everything you give me and other things Just let me know
will try to help
Hello, @modpunk
Although I have no CM porting experience I know C and Java. I have set up my CM environment, built and deployed my own unofficial ROM to one of my other devices.
My SM-G850F should arrive this coming week and I just may try help with the TODO. I'm a little confused trying to find out what are your repos to place in my local manifests, can you please list and describe them?
TIA,
Nuno
nuno.f.ferreira said:
Hello, @modpunk
Although I have no CM porting experience I know C and Java. I have set up my CM environment, built and deployed my own unofficial ROM to one of my other devices.
My SM-G850F should arrive this coming week and I just may try help with the TODO. I'm a little confused trying to find out what are your repos to place in my local manifests, can you please list and describe them?
TIA,
Nuno
Click to expand...
Click to collapse
Everything is in the readme of the cm-11.0 rep
http://git.cryptomilk.org/projects/android/android_device_samsung_slte.git/tree/README?h=cm-11.0
Building CM11 for Samsung Galaxy Alpha
Hello,
Was trying to post in http://forum.xda-developers.com/galaxy-alpha/orig-development/sources-cyanogenmod-11-0-t2933305 but apparently need to do it here.
Building with this instructions http://git.cryptomilk.org/projects/android/android_device_samsung_slte.git/tree/README?h=cm-11.0 have the following error. Thought I ask before starting to dig...
<CONSOLE>
target thumb C++: hwcomposer.exynos5 <= hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp: In function 'bool hdmi_is_preset_supported(exynos5_hwc_composer_device_1_t*, int)':
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp:462:32: error: aggregate 'hdmi_is_preset_supported(exynos5_hwc_composer_device_1_t*, int)::v4l2_dv_enum_preset enum_preset' has incomplete type and cannot be defined
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp:469:45: error: 'VIDIOC_ENUM_DV_PRESETS' was not declared in this scope
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp: In function 'int hdmi_get_config(exynos5_hwc_composer_device_1_t*)':
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp:577:27: error: aggregate 'hdmi_get_config(exynos5_hwc_composer_device_1_t*)::v4l2_dv_preset preset' has incomplete type and cannot be defined
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp:578:32: error: aggregate 'hdmi_get_config(exynos5_hwc_composer_device_1_t*)::v4l2_dv_enum_preset enum_preset' has incomplete type and cannot be defined
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp:586:39: error: 'VIDIOC_G_DV_PRESET' was not declared in this scope
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp: In function 'int hdmi_output(exynos5_hwc_composer_device_1_t*, hdmi_layer_t&, hwc_layer_1_t&, private_handle_t*, int, int*)':
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp:1159:52: error: invalid conversion from '__u32 {aka unsigned int}' to 'v4l2_buf_type' [-fpermissive]
In file included from hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.h:52:0,
from hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp:27:
./hardware/samsung_slsi/exynos/include/exynos_v4l2.h:76:5: error: initializing argument 2 of 'int exynos_v4l2_streamon(int, v4l2_buf_type)' [-fpermissive]
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp: At global scope:
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp:4586:1: warning: missing initializer for member 'hw_module_t::dso' [-Wmissing-field-initializers]
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp:4586:1: warning: missing initializer for member 'hw_module_t::reserved' [-Wmissing-field-initializers]
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp: In function 'int hdmi_get_config(exynos5_hwc_composer_device_1_t*)':
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp:592:1: error: control reaches end of non-void function [-Werror=return-type]
cc1plus: some warnings being treated as errors
make: *** [/opt/android/system/out/target/product/slte/obj/SHARED_LIBRARIES/hwcomposer.exynos5_intermediates/ExynosHWC.o] Error 1
</CONSOLE>
TIA,
Nuno
nuno.f.ferreira said:
Hello,
Was trying to post in http://forum.xda-developers.com/galaxy-alpha/orig-development/sources-cyanogenmod-11-0-t2933305 but apparently need to do it here.
Building with this instructions http://git.cryptomilk.org/projects/android/android_device_samsung_slte.git/tree/README?h=cm-11.0 have the following error. Thought I ask before starting to dig...
<CONSOLE>
target thumb C++: hwcomposer.exynos5 <= hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp: In function 'bool hdmi_is_preset_supported(exynos5_hwc_composer_device_1_t*, int)':
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp:462:32: error: aggregate 'hdmi_is_preset_supported(exynos5_hwc_composer_device_1_t*, int)::v4l2_dv_enum_preset enum_preset' has incomplete type and cannot be defined
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp:469:45: error: 'VIDIOC_ENUM_DV_PRESETS' was not declared in this scope
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp: In function 'int hdmi_get_config(exynos5_hwc_composer_device_1_t*)':
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp:577:27: error: aggregate 'hdmi_get_config(exynos5_hwc_composer_device_1_t*)::v4l2_dv_preset preset' has incomplete type and cannot be defined
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp:578:32: error: aggregate 'hdmi_get_config(exynos5_hwc_composer_device_1_t*)::v4l2_dv_enum_preset enum_preset' has incomplete type and cannot be defined
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp:586:39: error: 'VIDIOC_G_DV_PRESET' was not declared in this scope
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp: In function 'int hdmi_output(exynos5_hwc_composer_device_1_t*, hdmi_layer_t&, hwc_layer_1_t&, private_handle_t*, int, int*)':
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp:1159:52: error: invalid conversion from '__u32 {aka unsigned int}' to 'v4l2_buf_type' [-fpermissive]
In file included from hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.h:52:0,
from hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp:27:
./hardware/samsung_slsi/exynos/include/exynos_v4l2.h:76:5: error: initializing argument 2 of 'int exynos_v4l2_streamon(int, v4l2_buf_type)' [-fpermissive]
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp: At global scope:
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp:4586:1: warning: missing initializer for member 'hw_module_t::dso' [-Wmissing-field-initializers]
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp:4586:1: warning: missing initializer for member 'hw_module_t::reserved' [-Wmissing-field-initializers]
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp: In function 'int hdmi_get_config(exynos5_hwc_composer_device_1_t*)':
hardware/samsung_slsi/exynos5-insignal/libhwc/ExynosHWC.cpp:592:1: error: control reaches end of non-void function [-Werror=return-type]
cc1plus: some warnings being treated as errors
make: *** [/opt/android/system/out/target/product/slte/obj/SHARED_LIBRARIES/hwcomposer.exynos5_intermediates/ExynosHWC.o] Error 1
</CONSOLE>
TIA,
Nuno
Click to expand...
Click to collapse
seems you haven't applied this patch: http://review.cyanogenmod.org/#/c/78565/
Thanks for the reply.
Hmm, I have CyanogenMod/android_hardware_samsung_slsi_exynos5-insignal in my local manifest and repos are synced. Do you mean there are patch sets that have to be applied manually? If so, do you know if anymore besides this one?
nuno.f.ferreira said:
Thanks for the reply.
Hmm, I have CyanogenMod/android_hardware_samsung_slsi_exynos5-insignal in my local manifest and repos are synced. Do you mean there are patch sets that have to be applied manually? If so, do you know if anymore besides this one?
Click to expand...
Click to collapse
yes, you have to apply that patch manually. No more patches are needed to build cm at this moment.
Thanks. Did that.
Now I have this. Is this known?
<CONSOLE>
Package OTA: /opt/android/system/out/target/product/slte/cm_slte-ota-67a8ffa7a4.zip
MKBOOTIMG= \
./build/tools/releasetools/ota_from_target_files -v \
-p /opt/android/system/out/host/linux-x86 \
-k build/target/product/security/testkey \
--backup=true \
--override_device=auto \
\
\
/opt/android/system/out/target/product/slte/obj/PACKAGING/target_files_intermediates/cm_slte-target_files-67a8ffa7a4.zip /opt/android/system/out/target/product/slte/cm_slte-ota-67a8ffa7a4.zip
unzipping target target-files...
running: unzip -o -q /opt/android/system/out/target/product/slte/obj/PACKAGING/target_files_intermediates/cm_slte-target_files-67a8ffa7a4.zip -d /tmp/targetfiles-6wcH3r
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 "/opt/android/system/build/tools/releasetools/common.py", line 155, in LoadInfoDict
d["fstab"] = LoadRecoveryFSTab(zip, d["fstab_version"])
File "/opt/android/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: *** [/opt/android/system/out/target/product/slte/cm_slte-ota-67a8ffa7a4.zip] Error 1
</CONSOLE>

Compile errors when building Cornerstone v4.3_r2.2

I'm trying to build this on my device, but I have some problems during the building process. First of all, I synced the AOSP 4.3_r2.2 source tree. Then I copied the entire cornerstone codes (from branch v4.3_r2.2) into the source tree. Then I start to build.
First, I got a lot of errors like these:
Code:
frameworks/base/core/res/res/values/public.xml:244: error: Symbol 'config_bluetooth_adapter_quick_switch' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1558: error: Symbol 'config_enableDreams' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:919: error: Symbol 'ic_suggestions_add' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:920: error: Symbol 'ic_suggestions_delete' declared with <java-symbol> not defined
...
After compared a lot, I found lots of missing symbols seems only in public.xml. If I were right, I think these symbols should be defined in somewhere else, then be added into public.xml. So I just removed these by restore the public.xml to unmodified (git checkout).
And then when I ran building again, I got the error like this:
Code:
frameworks/base/services/java/com/android/server/wm/DimAnimator.java:57: cannot find symbol
symbol : variable FX_SURFACE_DIM
location: class android.view.Surface
Surface.FX_SURFACE_DIM);
^
frameworks/base/services/java/com/android/server/wm/DimAnimator.java:54: internal error; cannot instantiate com.android.server.wm.WindowStateAnimator.SurfaceTrace.<init> at com.android.server.wm.WindowStateAnimator.SurfaceTrace to ()
mDimSurface = new WindowStateAnimator.SurfaceTrace(session, 0,
^
...
frameworks/base/services/java/com/android/server/wm/DimSurface.java:48: cannot find symbol
symbol : variable FX_SURFACE_DIM
location: class android.view.Surface
Surface.FX_SURFACE_DIM);
^
frameworks/base/services/java/com/android/server/wm/DimSurface.java:45: internal error; cannot instantiate com.android.server.wm.WindowStateAnimator.SurfaceTrace.<init> at com.android.server.wm.WindowStateAnimator.SurfaceTrace to ()
mDimSurface = new WindowStateAnimator.SurfaceTrace(session, 0,
^
...
By looked into the AOSP source, I found the Surface.FX_SURFACE_DIM should be SurfaceControl.FX_SURFACE_DIM, and the WindowStateAnimator.SurfaceTrace constructor's parameter number is different. So I wonder whether am I use the "right" source tree of AOSP? If not, which version should I sync? Since there are so many differences than the codes in cornerstone.
Thanks.
popoalex said:
I'm trying to build this on my device, but I have some problems during the building process. First of all, I synced the AOSP 4.3_r2.2 source tree. Then I copied the entire cornerstone codes (from branch v4.3_r2.2) into the source tree. Then I start to build.
First, I got a lot of errors like these:
Code:
frameworks/base/core/res/res/values/public.xml:244: error: Symbol 'config_bluetooth_adapter_quick_switch' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1558: error: Symbol 'config_enableDreams' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:919: error: Symbol 'ic_suggestions_add' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:920: error: Symbol 'ic_suggestions_delete' declared with <java-symbol> not defined
...
After compared a lot, I found lots of missing symbols seems only in public.xml. If I were right, I think these symbols should be defined in somewhere else, then be added into public.xml. So I just removed these by restore the public.xml to unmodified (git checkout).
And then when I ran building again, I got the error like this:
Code:
frameworks/base/services/java/com/android/server/wm/DimAnimator.java:57: cannot find symbol
symbol : variable FX_SURFACE_DIM
location: class android.view.Surface
Surface.FX_SURFACE_DIM);
^
frameworks/base/services/java/com/android/server/wm/DimAnimator.java:54: internal error; cannot instantiate com.android.server.wm.WindowStateAnimator.SurfaceTrace.<init> at com.android.server.wm.WindowStateAnimator.SurfaceTrace to ()
mDimSurface = new WindowStateAnimator.SurfaceTrace(session, 0,
^
...
frameworks/base/services/java/com/android/server/wm/DimSurface.java:48: cannot find symbol
symbol : variable FX_SURFACE_DIM
location: class android.view.Surface
Surface.FX_SURFACE_DIM);
^
frameworks/base/services/java/com/android/server/wm/DimSurface.java:45: internal error; cannot instantiate com.android.server.wm.WindowStateAnimator.SurfaceTrace.<init> at com.android.server.wm.WindowStateAnimator.SurfaceTrace to ()
mDimSurface = new WindowStateAnimator.SurfaceTrace(session, 0,
^
...
By looked into the AOSP source, I found the Surface.FX_SURFACE_DIM should be SurfaceControl.FX_SURFACE_DIM, and the WindowStateAnimator.SurfaceTrace constructor's parameter number is different. So I wonder whether am I use the "right" source tree of AOSP? If not, which version should I sync? Since there are so many differences than the codes in cornerstone.
Thanks.
Click to expand...
Click to collapse
Finally resolved the problem, by did these:
1. Removed the symbol definition from public.xml;
2. Replaced android.view.Surface with android.view.SurfaceControl, and WindowManagerService.DEFAULT_DIM_DURATION with WindowAnimator.DEFAULT_DIM_DURATION.

Categories

Resources