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 http://ppa.launchpad.net/webupd8team/java/ubuntu 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://github.com/CyanogenMod/android.git -b cm-11.0
repo sync -c -j1
(It will sync only current using one thread) 
repo selfupdate
. build/envsetup.sh
cd system/vendor/cm  
./get-prebuilts
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
./extract-files.sh

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