compile galaxysmtd

2015 The master branch of Android in the Android Open Source Project (AOSP) requires OpenJava 7. On Ubuntu, use OpenJDK. You dont need webupd8team-java-trusty.list
 deb trusty main
as this is for Oracle java but we need openjdk, verify by opening a new shell.
cd android/system 
repo init -u git:// -b cm-11.0
repo sync -c -j1
(It will sync only current using one thread) 
repo selfupdate
. build/
cd system/vendor/cm  
cd android/system
Edit the file .repo/local_manifests/local_manifest.xml
cat .repo/local_manifests/local_manifest.xml
Again repeat
repo sync -c -j1

Obtain the proprietary files:
Connect device

cd system/device/samsung/galaxysmtd

If you had installed OpenJava then verify all your java related stuff points to SunJava
See xda and groups