diff --git a/Android.bp b/Android.bp
index b8a4f82..ae31a60 100644
--- a/Android.bp
+++ b/Android.bp
@@ -209,6 +209,7 @@
         "java/builder.go",
         "java/gen.go",
         "java/java.go",
+        "java/proto.go",
         "java/resources.go",
     ],
     testSrcs: [
@@ -339,7 +340,7 @@
         linux_bionic: {
             enabled: true,
         },
-        linux: {
+        linux_glibc: {
             enabled: false,
         },
         darwin: {
@@ -360,7 +361,7 @@
         linux_bionic: {
             enabled: true,
         },
-        linux: {
+        linux_glibc: {
             enabled: false,
         },
         darwin: {
diff --git a/android/arch.go b/android/arch.go
index 3fe0345..db017fd 100644
--- a/android/arch.go
+++ b/android/arch.go
@@ -87,7 +87,7 @@
         host: {
             // Host variants
         },
-        linux: {
+        linux_glibc: {
             // Linux host variants
         },
         darwin: {
@@ -468,7 +468,7 @@
 		"Android64",
 		"Android32",
 		"Bionic",
-		"Linux",
+		// TODO(dwillemsen): "Linux",
 		"Not_windows",
 		"Arm_on_x86",
 		"Arm_on_x86_64",
@@ -479,7 +479,7 @@
 		for _, archType := range osArchTypeMap[os] {
 			targets = append(targets, os.Field+"_"+archType.Name)
 
-			if os == Linux { // TODO(dwillemsen): os.Linux()
+			if false { // TODO(dwillemsen): os.Linux()
 				target := "Linux_" + archType.Name
 				if !inList(target, targets) {
 					targets = append(targets, target)
@@ -597,10 +597,6 @@
 	arch := a.Arch()
 	os := a.Os()
 
-	if arch.ArchType == Common {
-		return
-	}
-
 	for i := range a.generalProperties {
 		genProps := a.generalProperties[i]
 		if a.archProperties[i] == nil {
@@ -612,6 +608,9 @@
 		multilibProp := archProps.FieldByName("Multilib")
 		targetProp := archProps.FieldByName("Target")
 
+		var field string
+		var prefix string
+
 		// Handle arch-specific properties in the form:
 		// arch: {
 		//     arm64: {
@@ -620,59 +619,61 @@
 		// },
 		t := arch.ArchType
 
-		field := proptools.FieldNameForProperty(t.Name)
-		prefix := "arch." + t.Name
-		archStruct := a.appendProperties(ctx, genProps, archProp, field, prefix)
+		if arch.ArchType != Common {
+			field := proptools.FieldNameForProperty(t.Name)
+			prefix := "arch." + t.Name
+			archStruct := a.appendProperties(ctx, genProps, archProp, field, prefix)
 
-		// Handle arch-variant-specific properties in the form:
-		// arch: {
-		//     variant: {
-		//         key: value,
-		//     },
-		// },
-		v := variantReplacer.Replace(arch.ArchVariant)
-		if v != "" {
-			field := proptools.FieldNameForProperty(v)
-			prefix := "arch." + t.Name + "." + v
-			a.appendProperties(ctx, genProps, archStruct, field, prefix)
-		}
-
-		// Handle cpu-variant-specific properties in the form:
-		// arch: {
-		//     variant: {
-		//         key: value,
-		//     },
-		// },
-		if arch.CpuVariant != arch.ArchVariant {
-			c := variantReplacer.Replace(arch.CpuVariant)
-			if c != "" {
-				field := proptools.FieldNameForProperty(c)
-				prefix := "arch." + t.Name + "." + c
+			// Handle arch-variant-specific properties in the form:
+			// arch: {
+			//     variant: {
+			//         key: value,
+			//     },
+			// },
+			v := variantReplacer.Replace(arch.ArchVariant)
+			if v != "" {
+				field := proptools.FieldNameForProperty(v)
+				prefix := "arch." + t.Name + "." + v
 				a.appendProperties(ctx, genProps, archStruct, field, prefix)
 			}
-		}
 
-		// Handle arch-feature-specific properties in the form:
-		// arch: {
-		//     feature: {
-		//         key: value,
-		//     },
-		// },
-		for _, feature := range arch.ArchFeatures {
-			field := proptools.FieldNameForProperty(feature)
-			prefix := "arch." + t.Name + "." + feature
-			a.appendProperties(ctx, genProps, archStruct, field, prefix)
-		}
+			// Handle cpu-variant-specific properties in the form:
+			// arch: {
+			//     variant: {
+			//         key: value,
+			//     },
+			// },
+			if arch.CpuVariant != arch.ArchVariant {
+				c := variantReplacer.Replace(arch.CpuVariant)
+				if c != "" {
+					field := proptools.FieldNameForProperty(c)
+					prefix := "arch." + t.Name + "." + c
+					a.appendProperties(ctx, genProps, archStruct, field, prefix)
+				}
+			}
 
-		// Handle multilib-specific properties in the form:
-		// multilib: {
-		//     lib32: {
-		//         key: value,
-		//     },
-		// },
-		field = proptools.FieldNameForProperty(t.Multilib)
-		prefix = "multilib." + t.Multilib
-		a.appendProperties(ctx, genProps, multilibProp, field, prefix)
+			// Handle arch-feature-specific properties in the form:
+			// arch: {
+			//     feature: {
+			//         key: value,
+			//     },
+			// },
+			for _, feature := range arch.ArchFeatures {
+				field := proptools.FieldNameForProperty(feature)
+				prefix := "arch." + t.Name + "." + feature
+				a.appendProperties(ctx, genProps, archStruct, field, prefix)
+			}
+
+			// Handle multilib-specific properties in the form:
+			// multilib: {
+			//     lib32: {
+			//         key: value,
+			//     },
+			// },
+			field = proptools.FieldNameForProperty(t.Multilib)
+			prefix = "multilib." + t.Multilib
+			a.appendProperties(ctx, genProps, multilibProp, field, prefix)
+		}
 
 		// Handle host-specific properties in the form:
 		// target: {
@@ -695,14 +696,16 @@
 		//         key: value,
 		//     },
 		// }
-		if os == Linux { // TODO(dwillemsen): os.Linux()
+		if false { // TODO(dwillemsen): os.Linux()
 			field = "Linux"
 			prefix = "target.linux"
 			a.appendProperties(ctx, genProps, targetProp, field, prefix)
 
-			field = "Linux_" + t.Name
-			prefix = "target.linux_" + t.Name
-			a.appendProperties(ctx, genProps, targetProp, field, prefix)
+			if arch.ArchType != Common {
+				field = "Linux_" + arch.ArchType.Name
+				prefix = "target.linux_" + arch.ArchType.Name
+				a.appendProperties(ctx, genProps, targetProp, field, prefix)
+			}
 		}
 
 		if os.Bionic() {
@@ -710,9 +713,11 @@
 			prefix = "target.bionic"
 			a.appendProperties(ctx, genProps, targetProp, field, prefix)
 
-			field = "Bionic_" + t.Name
-			prefix = "target.bionic_" + t.Name
-			a.appendProperties(ctx, genProps, targetProp, field, prefix)
+			if arch.ArchType != Common {
+				field = "Bionic_" + t.Name
+				prefix = "target.bionic_" + t.Name
+				a.appendProperties(ctx, genProps, targetProp, field, prefix)
+			}
 		}
 
 		// Handle target OS properties in the form:
@@ -743,9 +748,11 @@
 		prefix = "target." + os.Name
 		a.appendProperties(ctx, genProps, targetProp, field, prefix)
 
-		field = os.Field + "_" + t.Name
-		prefix = "target." + os.Name + "_" + t.Name
-		a.appendProperties(ctx, genProps, targetProp, field, prefix)
+		if arch.ArchType != Common {
+			field = os.Field + "_" + t.Name
+			prefix = "target." + os.Name + "_" + t.Name
+			a.appendProperties(ctx, genProps, targetProp, field, prefix)
+		}
 
 		if (os.Class == Host || os.Class == HostCross) && os != Windows {
 			field := "Not_windows"
diff --git a/android/paths.go b/android/paths.go
index 4a49d55..69a7b0d 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -247,6 +247,9 @@
 // each string.
 func pathsForModuleSrcFromFullPath(ctx ModuleContext, paths []string) Paths {
 	prefix := filepath.Join(ctx.AConfig().srcDir, ctx.ModuleDir()) + "/"
+	if prefix == "./" {
+		prefix = ""
+	}
 	ret := make(Paths, 0, len(paths))
 	for _, p := range paths {
 		path := filepath.Clean(p)
diff --git a/android/proto.go b/android/proto.go
index 9bb9cfb..1c70656 100644
--- a/android/proto.go
+++ b/android/proto.go
@@ -14,22 +14,6 @@
 
 package android
 
-import (
-	"github.com/google/blueprint"
-)
-
-func init() {
-	pctx.HostBinToolVariable("protocCmd", "aprotoc")
-}
-
-var (
-	proto = pctx.AndroidStaticRule("protoc",
-		blueprint.RuleParams{
-			Command:     "$protocCmd $protoOut=$protoOutFlags:$outDir $protoFlags $in",
-			CommandDeps: []string{"$protocCmd"},
-		}, "protoFlags", "protoOut", "protoOutFlags", "outDir")
-)
-
 // TODO(ccross): protos are often used to communicate between multiple modules.  If the only
 // way to convert a proto to source is to reference it as a source file, and external modules cannot
 // reference source files in other modules, then every module that owns a proto file will need to
@@ -38,30 +22,6 @@
 // and then external modules could depend on the proto module but use their own settings to
 // generate the source.
 
-func GenProto(ctx ModuleContext, protoFile Path,
-	protoFlags string, protoOut, protoOutFlags string, extensions []string) WritablePaths {
-
-	var outFiles WritablePaths
-	for _, ext := range extensions {
-		outFiles = append(outFiles, GenPathWithExt(ctx, "proto", protoFile, ext))
-	}
-
-	ctx.ModuleBuild(pctx, ModuleBuildParams{
-		Rule:        proto,
-		Description: "protoc " + protoFile.Rel(),
-		Outputs:     outFiles,
-		Input:       protoFile,
-		Args: map[string]string{
-			"outDir":        ProtoDir(ctx).String(),
-			"protoOut":      protoOut,
-			"protoOutFlags": protoOutFlags,
-			"protoFlags":    protoFlags,
-		},
-	})
-
-	return outFiles
-}
-
 func ProtoFlags(ctx ModuleContext, p *ProtoProperties) []string {
 	var protoFlags []string
 	if len(p.Proto.Local_include_dirs) > 0 {
diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go
index 469e960..f5858a7 100644
--- a/androidmk/cmd/androidmk/android.go
+++ b/androidmk/cmd/androidmk/android.go
@@ -107,7 +107,7 @@
 			"LOCAL_RENDERSCRIPT_INCLUDES": "renderscript.include_dirs",
 			"LOCAL_RENDERSCRIPT_FLAGS":    "renderscript.flags",
 
-			"LOCAL_JAVA_RESOURCE_DIRS":    "resource_dirs",
+			"LOCAL_JAVA_RESOURCE_DIRS":    "java_resource_dirs",
 			"LOCAL_JAVACFLAGS":            "javacflags",
 			"LOCAL_DX_FLAGS":              "dxflags",
 			"LOCAL_JAVA_LIBRARIES":        "libs",
@@ -357,7 +357,7 @@
 	}
 
 	if !inList("linux") && err == nil {
-		err = setVariable(ctx.file, ctx.append, "target.linux", "enabled", falseValue, true)
+		err = setVariable(ctx.file, ctx.append, "target.linux_glibc", "enabled", falseValue, true)
 	}
 
 	if !inList("darwin") && err == nil {
@@ -609,7 +609,7 @@
 	// 64 must be after x86_64
 	{"64", "multilib.lib64"},
 	{"darwin", "target.darwin"},
-	{"linux", "target.linux"},
+	{"linux", "target.linux_glibc"},
 	{"windows", "target.windows"},
 }
 
@@ -627,11 +627,11 @@
 		true:  "target.windows",
 		false: "target.not_windows"},
 	"($(HOST_OS),linux)": {
-		true:  "target.linux",
-		false: "target.not_linux"},
+		true:  "target.linux_glibc",
+		false: "target.not_linux_glibc"},
 	"($(HOST_OS), linux)": {
-		true:  "target.linux",
-		false: "target.not_linux"},
+		true:  "target.linux_glibc",
+		false: "target.not_linux_glibc"},
 	"($(BUILD_OS),darwin)": {
 		true:  "target.darwin",
 		false: "target.not_darwin"},
@@ -639,11 +639,11 @@
 		true:  "target.darwin",
 		false: "target.not_darwin"},
 	"($(BUILD_OS),linux)": {
-		true:  "target.linux",
-		false: "target.not_linux"},
+		true:  "target.linux_glibc",
+		false: "target.not_linux_glibc"},
 	"($(BUILD_OS), linux)": {
-		true:  "target.linux",
-		false: "target.not_linux"},
+		true:  "target.linux_glibc",
+		false: "target.not_linux_glibc"},
 	"(,$(TARGET_BUILD_APPS))": {
 		false: "product_variables.unbundled_build"},
 	"($(TARGET_BUILD_PDK),true)": {
diff --git a/androidmk/cmd/androidmk/androidmk_test.go b/androidmk/cmd/androidmk/androidmk_test.go
index 664d12c..4681a7d 100644
--- a/androidmk/cmd/androidmk/androidmk_test.go
+++ b/androidmk/cmd/androidmk/androidmk_test.go
@@ -256,7 +256,7 @@
         darwin: {
             srcs: ["darwin.c"],
         },
-        linux: {
+        linux_glibc: {
             srcs: ["linux.c"],
         },
         windows: {
diff --git a/cc/config/x86_darwin_host.go b/cc/config/x86_darwin_host.go
index 103f91f..3f079a4 100644
--- a/cc/config/x86_darwin_host.go
+++ b/cc/config/x86_darwin_host.go
@@ -100,7 +100,6 @@
 			"ncurses",
 			"objc",
 			"pthread",
-			"z",
 		}, "-l"),
 		"-framework AppKit",
 		"-framework CoreFoundation",
diff --git a/cc/config/x86_linux_host.go b/cc/config/x86_linux_host.go
index 80e9289..75416bd 100644
--- a/cc/config/x86_linux_host.go
+++ b/cc/config/x86_linux_host.go
@@ -123,7 +123,6 @@
 		"resolv",
 		"rt",
 		"util",
-		"z",
 	}, "-l")
 )
 
diff --git a/cc/gen.go b/cc/gen.go
index 9fc14c5..2280e0f 100644
--- a/cc/gen.go
+++ b/cc/gen.go
@@ -153,10 +153,9 @@
 			srcFiles[i] = cppFile
 			genLex(ctx, srcFile, cppFile)
 		case ".proto":
-			protoFiles := android.GenProto(ctx, srcFile, buildFlags.protoFlags,
-				"--cpp_out", "", []string{"pb.cc", "pb.h"})
-			srcFiles[i] = protoFiles[0]
-			deps = append(deps, protoFiles[1])
+			ccFile, headerFile := genProto(ctx, srcFile, buildFlags.protoFlags)
+			srcFiles[i] = ccFile
+			deps = append(deps, headerFile)
 		case ".aidl":
 			cppFile := android.GenPathWithExt(ctx, "aidl", srcFile, "cpp")
 			srcFiles[i] = cppFile
diff --git a/cc/pgo.go b/cc/pgo.go
index ccddece..f9c8bbf 100644
--- a/cc/pgo.go
+++ b/cc/pgo.go
@@ -24,7 +24,7 @@
 var (
 	// Add flags to ignore warnings that profiles are old or missing for
 	// some functions
-	profileUseOtherFlags = []string{}
+	profileUseOtherFlags = []string{"-Wno-backend-plugin"}
 )
 
 const pgoProfileProject = "toolchain/pgo-profiles"
diff --git a/cc/proto.go b/cc/proto.go
index 6049d44..a01951f 100644
--- a/cc/proto.go
+++ b/cc/proto.go
@@ -15,11 +15,46 @@
 package cc
 
 import (
+	"github.com/google/blueprint"
 	"github.com/google/blueprint/proptools"
 
 	"android/soong/android"
 )
 
+func init() {
+	pctx.HostBinToolVariable("protocCmd", "aprotoc")
+}
+
+var (
+	proto = pctx.AndroidStaticRule("protoc",
+		blueprint.RuleParams{
+			Command:     "$protocCmd --cpp_out=$outDir $protoFlags $in",
+			CommandDeps: []string{"$protocCmd"},
+		}, "protoFlags", "outDir")
+)
+
+// genProto creates a rule to convert a .proto file to generated .pb.cc and .pb.h files and returns
+// the paths to the generated files.
+func genProto(ctx android.ModuleContext, protoFile android.Path,
+	protoFlags string) (ccFile, headerFile android.WritablePath) {
+
+	ccFile = android.GenPathWithExt(ctx, "proto", protoFile, "pb.cc")
+	headerFile = android.GenPathWithExt(ctx, "proto", protoFile, "pb.h")
+
+	ctx.ModuleBuild(pctx, android.ModuleBuildParams{
+		Rule:        proto,
+		Description: "protoc " + protoFile.Rel(),
+		Outputs:     android.WritablePaths{ccFile, headerFile},
+		Input:       protoFile,
+		Args: map[string]string{
+			"outDir":     android.ProtoDir(ctx).String(),
+			"protoFlags": protoFlags,
+		},
+	})
+
+	return ccFile, headerFile
+}
+
 func protoDeps(ctx BaseModuleContext, deps Deps, p *android.ProtoProperties, static bool) Deps {
 	var lib string
 
diff --git a/jar/jar.go b/jar/jar.go
index f17bc98..08fa1ab 100644
--- a/jar/jar.go
+++ b/jar/jar.go
@@ -94,6 +94,8 @@
 		Method:             zip.Store,
 		UncompressedSize64: uint64(len(b)),
 	}
+	fh.SetMode(0700)
+	fh.SetModTime(DefaultTime)
 
 	return fh, b, nil
 }
diff --git a/java/app.go b/java/app.go
index 80d62fd..e40478a 100644
--- a/java/app.go
+++ b/java/app.go
@@ -53,8 +53,8 @@
 	Asset_dirs []string
 
 	// list of directories relative to the Blueprints file containing
-	// Java resources
-	Android_resource_dirs []string
+	// Android resources
+	Resource_dirs []string
 }
 
 type AndroidApp struct {
@@ -183,7 +183,7 @@
 	}
 
 	assetDirs := android.PathsWithOptionalDefaultForModuleSrc(ctx, a.appProperties.Asset_dirs, "assets")
-	resourceDirs := android.PathsWithOptionalDefaultForModuleSrc(ctx, a.appProperties.Android_resource_dirs, "res")
+	resourceDirs := android.PathsWithOptionalDefaultForModuleSrc(ctx, a.appProperties.Resource_dirs, "res")
 
 	var overlayResourceDirs android.Paths
 	// For every resource directory, check if there is an overlay directory with the same path.
diff --git a/java/builder.go b/java/builder.go
index b8332ad..b924d65 100644
--- a/java/builder.go
+++ b/java/builder.go
@@ -127,14 +127,9 @@
 	desugarFlags  string
 	aidlFlags     string
 	javaVersion   string
-}
 
-type jarSpec struct {
-	fileList, dir android.Path
-}
-
-func (j jarSpec) soongJarArgs() string {
-	return "-C " + j.dir.String() + " -l " + j.fileList.String()
+	protoFlags   string
+	protoOutFlag string
 }
 
 func TransformJavaToClasses(ctx android.ModuleContext, srcFiles, srcFileLists android.Paths,
@@ -144,7 +139,10 @@
 	annoDir := android.PathForModuleOut(ctx, "anno")
 	classJar := android.PathForModuleOut(ctx, "classes-compiled.jar")
 
-	javacFlags := flags.javacFlags + android.JoinWithPrefix(srcFileLists.Strings(), "@")
+	javacFlags := flags.javacFlags
+	if len(srcFileLists) > 0 {
+		javacFlags += " " + android.JoinWithPrefix(srcFileLists.Strings(), "@")
+	}
 
 	deps = append(deps, srcFileLists...)
 	deps = append(deps, flags.bootClasspath...)
@@ -169,8 +167,8 @@
 	return classJar
 }
 
-func RunErrorProne(ctx android.ModuleContext, srcFiles android.Paths, srcFileLists android.Paths,
-	flags javaBuilderFlags, deps android.Paths) android.Path {
+func RunErrorProne(ctx android.ModuleContext, srcFiles, srcFileLists android.Paths,
+	flags javaBuilderFlags) android.Path {
 
 	if config.ErrorProneJar == "" {
 		ctx.ModuleErrorf("cannot build with Error Prone, missing external/error_prone?")
@@ -181,7 +179,12 @@
 	annoDir := android.PathForModuleOut(ctx, "anno-errorprone")
 	classFileList := android.PathForModuleOut(ctx, "classes-errorprone.list")
 
-	javacFlags := flags.javacFlags + android.JoinWithPrefix(srcFileLists.Strings(), "@")
+	javacFlags := flags.javacFlags
+	if len(srcFileLists) > 0 {
+		javacFlags += " " + android.JoinWithPrefix(srcFileLists.Strings(), "@")
+	}
+
+	var deps android.Paths
 
 	deps = append(deps, srcFileLists...)
 	deps = append(deps, flags.bootClasspath...)
@@ -206,18 +209,11 @@
 	return classFileList
 }
 
-func TransformResourcesToJar(ctx android.ModuleContext, resources []jarSpec,
+func TransformResourcesToJar(ctx android.ModuleContext, jarArgs []string,
 	deps android.Paths) android.Path {
 
 	outputFile := android.PathForModuleOut(ctx, "res.jar")
 
-	jarArgs := []string{}
-
-	for _, j := range resources {
-		deps = append(deps, j.fileList)
-		jarArgs = append(jarArgs, j.soongJarArgs())
-	}
-
 	ctx.ModuleBuild(pctx, android.ModuleBuildParams{
 		Rule:        jar,
 		Description: "jar",
diff --git a/java/gen.go b/java/gen.go
index e473859..e55be91 100644
--- a/java/gen.go
+++ b/java/gen.go
@@ -85,21 +85,37 @@
 }
 
 func (j *Module) genSources(ctx android.ModuleContext, srcFiles android.Paths,
-	flags javaBuilderFlags) android.Paths {
+	flags javaBuilderFlags) (android.Paths, android.Paths) {
 
-	for i, srcFile := range srcFiles {
+	var protoFiles android.Paths
+	outSrcFiles := make(android.Paths, 0, len(srcFiles))
+
+	for _, srcFile := range srcFiles {
 		switch srcFile.Ext() {
 		case ".aidl":
 			javaFile := genAidl(ctx, srcFile, flags.aidlFlags)
-			srcFiles[i] = javaFile
+			outSrcFiles = append(outSrcFiles, javaFile)
 		case ".logtags":
 			j.logtagsSrcs = append(j.logtagsSrcs, srcFile)
 			javaFile := genLogtags(ctx, srcFile)
-			srcFiles[i] = javaFile
+			outSrcFiles = append(outSrcFiles, javaFile)
+		case ".proto":
+			protoFiles = append(protoFiles, srcFile)
+		default:
+			outSrcFiles = append(outSrcFiles, srcFile)
 		}
 	}
 
-	return srcFiles
+	var outSrcFileLists android.Paths
+
+	if len(protoFiles) > 0 {
+		protoFileList := genProto(ctx, protoFiles,
+			flags.protoFlags, flags.protoOutFlag, "")
+
+		outSrcFileLists = append(outSrcFileLists, protoFileList)
+	}
+
+	return outSrcFiles, outSrcFileLists
 }
 
 func LogtagsSingleton() blueprint.Singleton {
diff --git a/java/java.go b/java/java.go
index 5e063a5..9cde824 100644
--- a/java/java.go
+++ b/java/java.go
@@ -35,8 +35,8 @@
 func init() {
 	android.RegisterModuleType("java_defaults", defaultsFactory)
 
-	android.RegisterModuleType("java_library", LibraryFactory)
-	android.RegisterModuleType("java_library_static", LibraryFactory)
+	android.RegisterModuleType("java_library", LibraryFactory(true))
+	android.RegisterModuleType("java_library_static", LibraryFactory(false))
 	android.RegisterModuleType("java_library_host", LibraryHostFactory)
 	android.RegisterModuleType("java_binary", BinaryFactory)
 	android.RegisterModuleType("java_binary_host", BinaryHostFactory)
@@ -49,7 +49,6 @@
 
 // TODO:
 // Autogenerated files:
-//  Proto
 //  Renderscript
 // Post-jar passes:
 //  Proguard
@@ -70,15 +69,25 @@
 	Exclude_srcs []string `android:"arch_variant"`
 
 	// list of directories containing Java resources
-	Resource_dirs []string `android:"arch_variant"`
+	Java_resource_dirs []string `android:"arch_variant"`
 
-	// list of directories that should be excluded from resource_dirs
-	Exclude_resource_dirs []string `android:"arch_variant"`
+	// list of directories that should be excluded from java_resource_dirs
+	Exclude_java_resource_dirs []string `android:"arch_variant"`
 
-	// don't build against the default libraries (legacy-test, core-junit,
+	// list of files to use as Java resources
+	Java_resources []string `android:"arch_variant"`
+
+	// list of files that should be excluded from java_resources
+	Exclude_java_resources []string `android:"arch_variant"`
+
+	// don't build against the default libraries (bootclasspath, legacy-test, core-junit,
 	// ext, and framework for device targets)
 	No_standard_libs *bool
 
+	// don't build against the framework libraries (legacy-test, core-junit,
+	// ext, and framework for device targets)
+	No_framework_libs *bool
+
 	// list of module-specific flags that will be used for javac compiles
 	Javacflags []string `android:"arch_variant"`
 
@@ -100,6 +109,9 @@
 	// If set to false, don't allow this module to be installed.  Defaults to true.
 	Installable *bool
 
+	// If set to true, include sources used to compile the module in to the final jar
+	Include_srcs *bool
+
 	// List of modules to use as annotation processors
 	Annotation_processors []string
 
@@ -132,6 +144,7 @@
 	android.DefaultableModuleBase
 
 	properties       CompilerProperties
+	protoProperties  android.ProtoProperties
 	deviceProperties CompilerDeviceProperties
 
 	// output file suitable for inserting into the classpath of another compile
@@ -182,10 +195,11 @@
 )
 
 type sdkDep struct {
-	useModule, useFiles, useDefaultLibs bool
-	module                              string
-	jar                                 android.Path
-	aidl                                android.Path
+	useModule, useFiles, useDefaultLibs, invalidVersion bool
+
+	module string
+	jar    android.Path
+	aidl   android.Path
 }
 
 func decodeSdkDep(ctx android.BaseContext, v string) sdkDep {
@@ -205,14 +219,24 @@
 		aidl := filepath.Join(dir, "framework.aidl")
 		jarPath := android.ExistentPathForSource(ctx, "sdkdir", jar)
 		aidlPath := android.ExistentPathForSource(ctx, "sdkdir", aidl)
+
+		if (!jarPath.Valid() || !aidlPath.Valid()) && ctx.AConfig().AllowMissingDependencies() {
+			return sdkDep{
+				invalidVersion: true,
+				module:         "sdk_v" + v,
+			}
+		}
+
 		if !jarPath.Valid() {
 			ctx.PropertyErrorf("sdk_version", "invalid sdk version %q, %q does not exist", v, jar)
 			return sdkDep{}
 		}
+
 		if !aidlPath.Valid() {
 			ctx.PropertyErrorf("sdk_version", "invalid sdk version %q, %q does not exist", v, aidl)
 			return sdkDep{}
 		}
+
 		return sdkDep{
 			useFiles: true,
 			jar:      jarPath.Path(),
@@ -227,13 +251,7 @@
 		}
 	}
 
-	if ctx.AConfig().UnbundledBuild() {
-		if v == "" {
-			if ctx, ok := ctx.(android.ModuleContext); ok {
-				ctx.AddMissingDependencies([]string{"sdk_version_must_be_set_for_modules_used_in_unbundled_builds"})
-			}
-			return sdkDep{}
-		}
+	if ctx.AConfig().UnbundledBuild() && v != "" {
 		return toFile(v)
 	}
 
@@ -259,15 +277,15 @@
 			sdkDep := decodeSdkDep(ctx, j.deviceProperties.Sdk_version)
 			if sdkDep.useDefaultLibs {
 				ctx.AddDependency(ctx.Module(), bootClasspathTag, config.DefaultBootclasspathLibraries...)
-				ctx.AddDependency(ctx.Module(), libTag, config.DefaultLibraries...)
+				if !proptools.Bool(j.properties.No_framework_libs) {
+					ctx.AddDependency(ctx.Module(), libTag, config.DefaultLibraries...)
+				}
 			}
 			if sdkDep.useModule {
 				ctx.AddDependency(ctx.Module(), bootClasspathTag, sdkDep.module)
 			}
 		} else {
-			if j.deviceProperties.Dex {
-				ctx.AddDependency(ctx.Module(), bootClasspathTag, config.DefaultBootclasspathLibraries...)
-			}
+			// TODO(ccross): add hostdex support
 		}
 	}
 	ctx.AddDependency(ctx.Module(), libTag, j.properties.Libs...)
@@ -275,6 +293,25 @@
 	ctx.AddDependency(ctx.Module(), libTag, j.properties.Annotation_processors...)
 
 	android.ExtractSourcesDeps(ctx, j.properties.Srcs)
+	android.ExtractSourcesDeps(ctx, j.properties.Java_resources)
+
+	if j.hasSrcExt(".proto") {
+		protoDeps(ctx, &j.protoProperties)
+	}
+}
+
+func hasSrcExt(srcs []string, ext string) bool {
+	for _, src := range srcs {
+		if filepath.Ext(src) == ext {
+			return true
+		}
+	}
+
+	return false
+}
+
+func (j *Module) hasSrcExt(ext string) bool {
+	return hasSrcExt(j.properties.Srcs, ext)
 }
 
 func (j *Module) aidlFlags(ctx android.ModuleContext, aidlPreprocess android.OptionalPath,
@@ -313,7 +350,9 @@
 	var deps deps
 
 	sdkDep := decodeSdkDep(ctx, j.deviceProperties.Sdk_version)
-	if sdkDep.useFiles {
+	if sdkDep.invalidVersion {
+		ctx.AddMissingDependencies([]string{sdkDep.module})
+	} else if sdkDep.useFiles {
 		deps.classpath = append(deps.classpath, sdkDep.jar)
 		deps.aidlIncludeDirs = append(deps.aidlIncludeDirs, sdkDep.aidl)
 	}
@@ -377,8 +416,6 @@
 		flags.javaVersion = "${config.DefaultJavaVersion}"
 	}
 
-	var extraDeps android.Paths
-
 	flags.bootClasspath.AddPaths(deps.bootClasspath)
 	flags.classpath.AddPaths(deps.classpath)
 
@@ -395,7 +432,15 @@
 
 	srcFiles := ctx.ExpandSources(j.properties.Srcs, j.properties.Exclude_srcs)
 
-	srcFiles = j.genSources(ctx, srcFiles, flags)
+	if hasSrcExt(srcFiles.Strings(), ".proto") {
+		flags = protoFlags(ctx, &j.protoProperties, flags)
+	}
+
+	var srcFileLists android.Paths
+
+	srcFiles, srcFileLists = j.genSources(ctx, srcFiles, flags)
+
+	srcFileLists = append(srcFileLists, deps.srcFileLists...)
 
 	ctx.VisitDirectDeps(func(module blueprint.Module) {
 		if gen, ok := module.(genrule.SourceFileGenerator); ok {
@@ -403,37 +448,52 @@
 		}
 	})
 
-	deps.srcFileLists = append(deps.srcFileLists, j.ExtraSrcLists...)
-
-	var extraJarDeps android.Paths
+	srcFileLists = append(srcFileLists, j.ExtraSrcLists...)
 
 	var jars android.Paths
 
 	if len(srcFiles) > 0 {
-		// Compile java sources into .class files
-		classes := TransformJavaToClasses(ctx, srcFiles, deps.srcFileLists, flags, extraDeps)
-		if ctx.Failed() {
-			return
-		}
-
+		var extraJarDeps android.Paths
 		if ctx.AConfig().IsEnvTrue("RUN_ERROR_PRONE") {
 			// If error-prone is enabled, add an additional rule to compile the java files into
 			// a separate set of classes (so that they don't overwrite the normal ones and require
-			// a rebuild when error-prone is turned off).  Add the classes as a dependency to
-			// the jar command so the two compiles can run in parallel.
+			// a rebuild when error-prone is turned off).
 			// TODO(ccross): Once we always compile with javac9 we may be able to conditionally
 			//    enable error-prone without affecting the output class files.
-			errorprone := RunErrorProne(ctx, srcFiles, deps.srcFileLists, flags, extraDeps)
+			errorprone := RunErrorProne(ctx, srcFiles, srcFileLists, flags)
 			extraJarDeps = append(extraJarDeps, errorprone)
 		}
 
+		// Compile java sources into .class files
+		classes := TransformJavaToClasses(ctx, srcFiles, srcFileLists, flags, extraJarDeps)
+		if ctx.Failed() {
+			return
+		}
+
 		jars = append(jars, classes)
 	}
 
-	resourceJarSpecs := ResourceDirsToJarSpecs(ctx, j.properties.Resource_dirs, j.properties.Exclude_resource_dirs)
-	if len(resourceJarSpecs) > 0 {
+	dirArgs, dirDeps := ResourceDirsToJarArgs(ctx, j.properties.Java_resource_dirs, j.properties.Exclude_java_resource_dirs)
+	fileArgs, fileDeps := ResourceFilesToJarArgs(ctx, j.properties.Java_resources, j.properties.Exclude_java_resources)
+
+	var resArgs []string
+	var resDeps android.Paths
+
+	resArgs = append(resArgs, dirArgs...)
+	resDeps = append(resDeps, dirDeps...)
+
+	resArgs = append(resArgs, fileArgs...)
+	resDeps = append(resDeps, fileDeps...)
+
+	if proptools.Bool(j.properties.Include_srcs) {
+		srcArgs, srcDeps := ResourceFilesToJarArgs(ctx, j.properties.Srcs, j.properties.Exclude_srcs)
+		resArgs = append(resArgs, srcArgs...)
+		resDeps = append(resDeps, srcDeps...)
+	}
+
+	if len(resArgs) > 0 {
 		// Combine classes + resources into classes-full-debug.jar
-		resourceJar := TransformResourcesToJar(ctx, resourceJarSpecs, extraJarDeps)
+		resourceJar := TransformResourcesToJar(ctx, resArgs, resDeps)
 		if ctx.Failed() {
 			return
 		}
@@ -452,12 +512,12 @@
 	manifest := android.OptionalPathForModuleSrc(ctx, j.properties.Manifest)
 
 	// Combine the classes built from sources, any manifests, and any static libraries into
-	// classes-combined.jar.  If there is only one input jar this step will be skipped.
+	// classes.jar.  If there is only one input jar this step will be skipped.
 	outputFile := TransformJarsToJar(ctx, "classes.jar", jars, manifest, false)
 
 	if j.properties.Jarjar_rules != nil {
 		jarjar_rules := android.PathForModuleSrc(ctx, *j.properties.Jarjar_rules)
-		// Transform classes-combined.jar into classes-jarjar.jar
+		// Transform classes.jar into classes-jarjar.jar
 		outputFile = TransformJarJar(ctx, outputFile, jarjar_rules)
 		if ctx.Failed() {
 			return
@@ -467,7 +527,7 @@
 	j.classpathFile = outputFile
 
 	// TODO(ccross): handle hostdex
-	if ctx.Device() && len(srcFiles) > 0 {
+	if ctx.Device() && j.installable() {
 		dxFlags := j.deviceProperties.Dxflags
 		if false /* emma enabled */ {
 			// If you instrument class files that have local variable debug information in
@@ -520,10 +580,6 @@
 			return
 		}
 
-		// TODO(ccross): For now, use the desugared jar as the classpath file.  Eventually this
-		// might cause problems because desugar wants non-desugared jars in its class path.
-		j.classpathFile = desugarJar
-
 		// Compile classes.jar into classes.dex
 		dexJarFile := TransformClassesJarToDexJar(ctx, desugarJar, flags)
 		if ctx.Failed() {
@@ -541,6 +597,10 @@
 	j.outputFile = outputFile
 }
 
+func (j *Module) installable() bool {
+	return j.properties.Installable == nil || *j.properties.Installable
+}
+
 var _ Dependency = (*Library)(nil)
 
 func (j *Module) ClasspathFiles() android.Paths {
@@ -572,7 +632,7 @@
 func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) {
 	j.compile(ctx)
 
-	if j.properties.Installable == nil || *j.properties.Installable == true {
+	if j.installable() {
 		j.installFile = ctx.InstallFile(android.PathForModuleInstall(ctx, "framework"),
 			ctx.ModuleName()+".jar", j.outputFile)
 	}
@@ -582,23 +642,31 @@
 	j.deps(ctx)
 }
 
-func LibraryFactory() android.Module {
-	module := &Library{}
+func LibraryFactory(installable bool) func() android.Module {
+	return func() android.Module {
+		module := &Library{}
 
-	module.deviceProperties.Dex = true
+		if !installable {
+			module.properties.Installable = proptools.BoolPtr(false)
+		}
+		module.deviceProperties.Dex = true
 
-	module.AddProperties(
-		&module.Module.properties,
-		&module.Module.deviceProperties)
+		module.AddProperties(
+			&module.Module.properties,
+			&module.Module.deviceProperties,
+			&module.Module.protoProperties)
 
-	InitJavaModule(module, android.HostAndDeviceSupported)
-	return module
+		InitJavaModule(module, android.HostAndDeviceSupported)
+		return module
+	}
 }
 
 func LibraryHostFactory() android.Module {
 	module := &Library{}
 
-	module.AddProperties(&module.Module.properties)
+	module.AddProperties(
+		&module.Module.properties,
+		&module.Module.protoProperties)
 
 	InitJavaModule(module, android.HostSupported)
 	return module
@@ -644,6 +712,7 @@
 	module.AddProperties(
 		&module.Module.properties,
 		&module.Module.deviceProperties,
+		&module.Module.protoProperties,
 		&module.binaryProperties)
 
 	InitJavaModule(module, android.HostAndDeviceSupported)
@@ -656,6 +725,7 @@
 	module.AddProperties(
 		&module.Module.properties,
 		&module.Module.deviceProperties,
+		&module.Module.protoProperties,
 		&module.binaryProperties)
 
 	InitJavaModule(module, android.HostSupported)
diff --git a/java/java_test.go b/java/java_test.go
index 7159e3f..a4a3f52 100644
--- a/java/java_test.go
+++ b/java/java_test.go
@@ -16,6 +16,7 @@
 
 import (
 	"android/soong/android"
+	"android/soong/genrule"
 	"fmt"
 	"io/ioutil"
 	"os"
@@ -55,10 +56,11 @@
 
 	ctx := android.NewTestArchContext()
 	ctx.RegisterModuleType("android_app", android.ModuleFactoryAdaptor(AndroidAppFactory))
-	ctx.RegisterModuleType("java_library", android.ModuleFactoryAdaptor(LibraryFactory))
+	ctx.RegisterModuleType("java_library", android.ModuleFactoryAdaptor(LibraryFactory(true)))
 	ctx.RegisterModuleType("java_library_host", android.ModuleFactoryAdaptor(LibraryHostFactory))
 	ctx.RegisterModuleType("java_import", android.ModuleFactoryAdaptor(ImportFactory))
 	ctx.RegisterModuleType("java_defaults", android.ModuleFactoryAdaptor(defaultsFactory))
+	ctx.RegisterModuleType("filegroup", android.ModuleFactoryAdaptor(genrule.FileGroupFactory))
 	ctx.PreArchMutators(android.RegisterPrebuiltsPreArchMutators)
 	ctx.PreArchMutators(android.RegisterPrebuiltsPostDepsMutators)
 	ctx.PreArchMutators(android.RegisterDefaultsPreArchMutators)
@@ -92,6 +94,10 @@
 		"c.java":     nil,
 		"a.jar":      nil,
 		"b.jar":      nil,
+		"res/a":      nil,
+		"res/b":      nil,
+		"res2/a":     nil,
+
 		"prebuilts/sdk/14/android.jar":    nil,
 		"prebuilts/sdk/14/framework.aidl": nil,
 	})
@@ -111,7 +117,7 @@
 	case strings.HasSuffix(name, ".jar"):
 		return name
 	default:
-		return filepath.Join(buildDir, ".intermediates", name, "android_common", "classes-desugar.jar")
+		return filepath.Join(buildDir, ".intermediates", name, "android_common", "classes-compiled.jar")
 	}
 }
 
@@ -133,7 +139,7 @@
 			name: "baz",
 			srcs: ["c.java"],
 		}
-		`)
+	`)
 
 	javac := ctx.ModuleForTests("foo", "android_common").Rule("javac")
 	combineJar := ctx.ModuleForTests("foo", "android_common").Rule("combineJar")
@@ -142,8 +148,8 @@
 		t.Errorf(`foo inputs %v != ["a.java"]`, javac.Inputs)
 	}
 
-	bar := filepath.Join(buildDir, ".intermediates", "bar", "android_common", "classes-desugar.jar")
-	baz := filepath.Join(buildDir, ".intermediates", "baz", "android_common", "classes-desugar.jar")
+	bar := filepath.Join(buildDir, ".intermediates", "bar", "android_common", "classes-compiled.jar")
+	baz := filepath.Join(buildDir, ".intermediates", "baz", "android_common", "classes-compiled.jar")
 
 	if !strings.Contains(javac.Args["classpath"], bar) {
 		t.Errorf("foo classpath %v does not contain %q", javac.Args["classpath"], bar)
@@ -158,8 +164,28 @@
 	}
 }
 
+func TestArchSpecific(t *testing.T) {
+	ctx := testJava(t, `
+		java_library {
+			name: "foo",
+			srcs: ["a.java"],
+			target: {
+				android: {
+					srcs: ["b.java"],
+				},
+			},
+		}
+	`)
+
+	javac := ctx.ModuleForTests("foo", "android_common").Rule("javac")
+	if len(javac.Inputs) != 2 || javac.Inputs[0].String() != "a.java" || javac.Inputs[1].String() != "b.java" {
+		t.Errorf(`foo inputs %v != ["a.java", "b.java"]`, javac.Inputs)
+	}
+}
+
 var classpathTestcases = []struct {
 	name          string
+	moduleType    string
 	host          android.OsClass
 	properties    string
 	bootclasspath []string
@@ -214,27 +240,41 @@
 	{
 
 		name:       "host default",
-		host:       android.Host,
+		moduleType: "java_library_host",
 		properties: ``,
+		host:       android.Host,
 		classpath:  []string{},
 	},
 	{
 		name:       "host nostdlib",
+		moduleType: "java_library_host",
 		host:       android.Host,
 		properties: `no_standard_libs: true`,
 		classpath:  []string{},
 	},
+	{
+
+		name:       "host supported default",
+		host:       android.Host,
+		properties: `host_supported: true,`,
+		classpath:  []string{},
+	},
+	{
+		name:       "host supported nostdlib",
+		host:       android.Host,
+		properties: `host_supported: true, no_standard_libs: true`,
+		classpath:  []string{},
+	},
 }
 
 func TestClasspath(t *testing.T) {
 	for _, testcase := range classpathTestcases {
 		t.Run(testcase.name, func(t *testing.T) {
-			hostExtra := ""
-			if testcase.host == android.Host {
-				hostExtra = "_host"
+			moduleType := "java_library"
+			if testcase.moduleType != "" {
+				moduleType = testcase.moduleType
 			}
-			ctx := testJava(t, `
-			java_library`+hostExtra+` {
+			ctx := testJava(t, moduleType+` {
 				name: "foo",
 				srcs: ["a.java"],
 				`+testcase.properties+`
@@ -349,17 +389,123 @@
 		t.Errorf(`foo inputs %v != ["a.java"]`, javac.Inputs)
 	}
 
-	bar := filepath.Join(buildDir, ".intermediates", "bar", "android_common", "classes-desugar.jar")
+	bar := filepath.Join(buildDir, ".intermediates", "bar", "android_common", "classes-compiled.jar")
 	if !strings.Contains(javac.Args["classpath"], bar) {
 		t.Errorf("foo classpath %v does not contain %q", javac.Args["classpath"], bar)
 	}
 
-	baz := filepath.Join(buildDir, ".intermediates", "baz", "android_common", "classes-desugar.jar")
+	baz := filepath.Join(buildDir, ".intermediates", "baz", "android_common", "classes-compiled.jar")
 	if len(combineJar.Inputs) != 2 || combineJar.Inputs[1].String() != baz {
 		t.Errorf("foo combineJar inputs %v does not contain %q", combineJar.Inputs, baz)
 	}
 }
 
+func TestResources(t *testing.T) {
+	var table = []struct {
+		name  string
+		prop  string
+		extra string
+		args  string
+	}{
+		{
+			// Test that a module with java_resource_dirs includes a file list file
+			name: "resource dirs",
+			prop: `java_resource_dirs: ["res"]`,
+			args: "-C res -l ",
+		},
+		{
+			// Test that a module with java_resources includes the files
+			name: "resource files",
+			prop: `java_resources: ["res/a", "res/b"]`,
+			args: "-C . -f res/a -C . -f res/b",
+		},
+		{
+			// Test that a module with a filegroup in java_resources includes the files with the
+			// path prefix
+			name: "resource filegroup",
+			prop: `java_resources: [":foo-res"]`,
+			extra: `
+				filegroup {
+					name: "foo-res",
+					path: "res",
+					srcs: ["res/a", "res/b"],
+				}`,
+			args: "-C res -f res/a -C res -f res/b",
+		},
+		{
+			// Test that a module with "include_srcs: true" includes its source files in the resources jar
+			name: "include sources",
+			prop: `include_srcs: true`,
+			args: "-C . -f a.java -C . -f b.java -C . -f c.java",
+		},
+	}
+
+	for _, test := range table {
+		t.Run(test.name, func(t *testing.T) {
+			ctx := testJava(t, `
+				java_library {
+					name: "foo",
+					srcs: [
+						"a.java",
+						"b.java",
+						"c.java",
+					],
+					`+test.prop+`,
+				}
+			`+test.extra)
+
+			foo := ctx.ModuleForTests("foo", "android_common").Output("classes.jar")
+			fooRes := ctx.ModuleForTests("foo", "android_common").Output("res.jar")
+
+			if !inList(fooRes.Output.String(), foo.Inputs.Strings()) {
+				t.Errorf("foo combined jars %v does not contain %q",
+					foo.Inputs.Strings(), fooRes.Output.String())
+			}
+
+			if !strings.Contains(fooRes.Args["jarArgs"], test.args) {
+				t.Errorf("foo resource jar args %q does not contain %q",
+					fooRes.Args["jarArgs"], test.args)
+			}
+		})
+	}
+}
+
+func TestExcludeResources(t *testing.T) {
+	ctx := testJava(t, `
+		java_library {
+			name: "foo",
+			srcs: ["a.java"],
+			java_resource_dirs: ["res", "res2"],
+			exclude_java_resource_dirs: ["res2"],
+		}
+
+		java_library {
+			name: "bar",
+			srcs: ["a.java"],
+			java_resources: ["res/*"],
+			exclude_java_resources: ["res/b"],
+		}
+	`)
+
+	fooRes := ctx.ModuleForTests("foo", "android_common").Output("res.jar")
+
+	expected := "-C res -l " + fooRes.Implicits[0].String()
+	if fooRes.Args["jarArgs"] != expected {
+		t.Errorf("foo resource jar args %q is not %q",
+			fooRes.Args["jarArgs"], expected)
+
+	}
+
+	barRes := ctx.ModuleForTests("bar", "android_common").Output("res.jar")
+
+	expected = "-C . -f res/a"
+	if barRes.Args["jarArgs"] != expected {
+		t.Errorf("bar resource jar args %q is not %q",
+			barRes.Args["jarArgs"], expected)
+
+	}
+}
+
 func fail(t *testing.T, errs []error) {
 	if len(errs) > 0 {
 		for _, err := range errs {
diff --git a/java/proto.go b/java/proto.go
new file mode 100644
index 0000000..324868a
--- /dev/null
+++ b/java/proto.go
@@ -0,0 +1,98 @@
+// Copyright 2017 Google Inc. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package java
+
+import (
+	"github.com/google/blueprint"
+	"github.com/google/blueprint/proptools"
+
+	"android/soong/android"
+)
+
+func init() {
+	pctx.HostBinToolVariable("protocCmd", "aprotoc")
+}
+
+var (
+	proto = pctx.AndroidStaticRule("protoc",
+		blueprint.RuleParams{
+			Command: `rm -rf $outDir && mkdir -p $outDir && ` +
+				`$protocCmd $protoOut=$protoOutFlags:$outDir $protoFlags $in && ` +
+				`find $outDir -name "*.java" > $out`,
+			CommandDeps: []string{"$protocCmd"},
+		}, "protoFlags", "protoOut", "protoOutFlags", "outDir")
+)
+
+func genProto(ctx android.ModuleContext, protoFiles android.Paths,
+	protoFlags string, protoOut, protoOutFlags string) android.WritablePath {
+
+	protoFileList := android.PathForModuleGen(ctx, "proto.filelist")
+
+	ctx.ModuleBuild(pctx, android.ModuleBuildParams{
+		Rule:        proto,
+		Description: "protoc " + protoFiles[0].Rel(),
+		Output:      protoFileList,
+		Inputs:      protoFiles,
+		Args: map[string]string{
+			"outDir":        android.ProtoDir(ctx).String(),
+			"protoOut":      protoOut,
+			"protoOutFlags": protoOutFlags,
+			"protoFlags":    protoFlags,
+		},
+	})
+
+	return protoFileList
+}
+
+func protoDeps(ctx android.BottomUpMutatorContext, p *android.ProtoProperties) {
+	switch proptools.String(p.Proto.Type) {
+	case "micro":
+		ctx.AddDependency(ctx.Module(), staticLibTag, "libprotobuf-java-micro")
+	case "nano":
+		ctx.AddDependency(ctx.Module(), staticLibTag, "libprotobuf-java-nano")
+	case "stream":
+		// TODO(ccross): add dependency on protoc-gen-java-stream binary
+		ctx.PropertyErrorf("proto.type", `"stream" not supported yet`)
+		// No library for stream protobufs
+	case "lite", "":
+		ctx.AddDependency(ctx.Module(), staticLibTag, "libprotobuf-java-lite")
+	case "full":
+		if ctx.Host() {
+			ctx.AddDependency(ctx.Module(), staticLibTag, "libprotobuf-java-full")
+		} else {
+			ctx.PropertyErrorf("proto.type", "full java protos only supported on the host")
+		}
+	default:
+		ctx.PropertyErrorf("proto.type", "unknown proto type %q",
+			proptools.String(p.Proto.Type))
+	}
+}
+
+func protoFlags(ctx android.ModuleContext, p *android.ProtoProperties, flags javaBuilderFlags) javaBuilderFlags {
+	switch proptools.String(p.Proto.Type) {
+	case "micro":
+		flags.protoOutFlag = "--javamicro_out"
+	case "nano":
+		flags.protoOutFlag = "--javanano_out"
+	case "stream":
+		flags.protoOutFlag = "--javastream_out"
+	case "lite", "":
+		flags.protoOutFlag = "--java_out"
+	default:
+		ctx.PropertyErrorf("proto.type", "unknown proto type %q",
+			proptools.String(p.Proto.Type))
+	}
+	return flags
+}
diff --git a/java/resources.go b/java/resources.go
index 60dc934..85ebd52 100644
--- a/java/resources.go
+++ b/java/resources.go
@@ -15,7 +15,9 @@
 package java
 
 import (
+	"fmt"
 	"path/filepath"
+	"strings"
 
 	"github.com/google/blueprint/bootstrap"
 
@@ -40,17 +42,17 @@
 	return false
 }
 
-func ResourceDirsToJarSpecs(ctx android.ModuleContext, resourceDirs, excludeDirs []string) []jarSpec {
+func ResourceDirsToJarArgs(ctx android.ModuleContext,
+	resourceDirs, excludeDirs []string) (args []string, deps android.Paths) {
 	var excludes []string
 
 	for _, exclude := range excludeDirs {
-		excludes = append(excludes, android.PathForModuleSrc(ctx, exclude, "**/*").String())
+		excludes = append(excludes,
+			filepath.Join(android.PathForModuleSrc(ctx, exclude).String(), "**/*"))
 	}
 
 	excludes = append(excludes, resourceExcludes...)
 
-	var jarSpecs []jarSpec
-
 	for _, resourceDir := range resourceDirs {
 		if isStringInSlice(resourceDir, excludeDirs) {
 			continue
@@ -63,9 +65,29 @@
 
 			pattern := filepath.Join(dir.String(), "**/*")
 			bootstrap.GlobFile(ctx, pattern, excludes, fileListFile.String(), depFile)
-			jarSpecs = append(jarSpecs, jarSpec{fileListFile, dir})
+			args = append(args,
+				"-C", dir.String(),
+				"-l", fileListFile.String())
+			deps = append(deps, fileListFile)
 		}
 	}
 
-	return jarSpecs
+	return args, deps
+}
+
+func ResourceFilesToJarArgs(ctx android.ModuleContext,
+	res, exclude []string) (args []string, deps android.Paths) {
+	files := ctx.ExpandSources(res, exclude)
+
+	for _, f := range files {
+		rel := f.Rel()
+		path := f.String()
+		if !strings.HasSuffix(path, rel) {
+			panic(fmt.Errorf("path %q does not end with %q", path, rel))
+		}
+		path = filepath.Clean(strings.TrimSuffix(path, rel))
+		args = append(args, "-C", filepath.Clean(path), "-f", f.String())
+	}
+
+	return args, files
 }
diff --git a/python/binary.go b/python/binary.go
index 91b7a54..b7b5056 100644
--- a/python/binary.go
+++ b/python/binary.go
@@ -162,7 +162,7 @@
 	var interp string
 	switch actual_version {
 	case pyVersion2:
-		interp = "python2"
+		interp = "python2.7"
 	case pyVersion3:
 		interp = "python3"
 	default:
