diff --git a/build/build_pdk_vendor.py b/build/build_pdk_vendor.py
deleted file mode 100755
index 624dbef..0000000
--- a/build/build_pdk_vendor.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2012 The Android Open Source Project
-#
-# 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.
-#
-import os, re, string, sys
-import pdk_utils as pu
-import setup_pdk_rel as setup
-
-def main(argv):
-  if len(argv) < 4:
-    print "Usage: build_pdk_vendor.py top_dir cpu_arch target_hw [lunch_target] [-jxx] [-c]"
-    print "   Runs pdk_rel build from given top_dir"
-    print "   cpu_arch: cpu arch to use like armv7-a-neon_true"
-    print "   target_hw: target H/W to build"
-    print "   lunch_target: lunch target for build. If not specified, full_target_hw-eng"
-    print "   -jxx : number of jobs for make"
-    print "   -c: clean before build"
-    sys.exit(1)
-
-  top_dir = argv[1]
-  cpu_arch = argv[2]
-  target_hw = argv[3]
-  build_j = "-j12"
-  lunch_target = "full_" + target_hw + "-eng"
-  clean_build = False
-  argv_current = 4
-  while len(argv) > argv_current:
-    arg = argv[argv_current]
-    if arg.startswith("-j"):  
-      build_j = arg
-    elif arg == "-c":
-      clean_build = True
-    else:
-      lunch_target = arg
-    argv_current += 1
-  if not os.path.isfile(top_dir + "/pdk/build/pdk_vendor.mk"):
-    print "WARNING: pdk/build/pdk_vendor.mk does not exist!!!!"
-
-  if clean_build:
-    command = "python " + top_dir + "/pdk/build/clean_pdk_rel.py " + top_dir
-    pu.execute_command(command, "cannot clean")
-
-  # setup binary and data
-  command = "python " + top_dir + "/pdk/build/setup_pdk_rel.py " + top_dir + " " \
-           + cpu_arch + " " + target_hw
-  pu.execute_command(command, "cannot copy pdk bin")
-
-  # actual build
-  command = "cd " + top_dir + " && . build/envsetup.sh && lunch " + lunch_target + " && " \
-          + "make " + build_j + " pdk_rel"
-  pu.execute_command(command, "pdk build failed")
-
-if __name__ == '__main__':
-  main(sys.argv)
diff --git a/build/clean_pdk_rel.py b/build/clean_pdk_rel.py
deleted file mode 100755
index 7306c04..0000000
--- a/build/clean_pdk_rel.py
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2012 The Android Open Source Project
-#
-# 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.
-#
-
-# script to clean pdk_rel source tree to allow copying new PDK bins and data
-import os, sys
-
-import pdk_utils as pu
-import setup_pdk_rel as setup
-
-def main(argv):
-  if len(argv) != 2:
-    print "Usage: clean_pdk_rel.py top_dir"
-    print "   cleans PDK data and PDK bin copied."
-    print "   Following directories are removed:"
-    print "     out"
-    print "     all files copied from pdk_data.zip, and PDK_DATA_COPIED"
-    print "     all files under " + setup.PDK_CPU_ARCH_TOP_DIR + "/pdk_bin_XXX directories" 
-    sys.exit(1)
-
-  top_dir = argv[1]
-
-  os.system("rm -rf " + top_dir + "/out")
-  pu.remove_files_listed(top_dir,
-                         pu.load_list(top_dir + "/PDK_DATA_COPIED"))
-  os.system("rm -f " + top_dir + "/PDK_DATA_COPIED")
-  os.system(" rm -rf " + top_dir + "/" + setup.PDK_CPU_ARCH_TOP_DIR + "/pdk_bin_*")
-
-if __name__ == '__main__':
-  main(sys.argv)
diff --git a/build/copy_pdk_bins.py b/build/copy_pdk_bins.py
deleted file mode 100755
index 0fa0bbe..0000000
--- a/build/copy_pdk_bins.py
+++ /dev/null
@@ -1,280 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2012 The Android Open Source Project
-#
-# 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.
-#
-# script to copy PDK_eng build result into a dir for PDK_rel build
-
-import os, string, sys, shutil
-import pdk_utils as pu
-
-
-# currently javalib.jar is not used and target jar is just copied in raw copy process
-def copy_jar(src_jar_dir, dest_dir, jar_name):
-  """copy classes.jar and javalib.jar to dest_dir/jar_name dir"""
-  pu.copy_file_if_exists(src_jar_dir, dest_dir + "/" + jar_name, "classes.jar")
-  pu.copy_file_if_exists(src_jar_dir, dest_dir + "/" + jar_name, "javalib.jar")
-
-def copy_classes_or_javalib(src_jar_dir, dest_dir, jar_name):
-  """For host, either classes.jar or javalib.jar is enough.
-     Use javalib only when there is no classes.jar"""
-  if pu.copy_file_new_name_if_exists(src_jar_dir + "/classes.jar", dest_dir + "/" + jar_name,
-                                     jar_name + ".jar"):
-    return
-  pu.copy_file_new_name_if_exists(src_jar_dir + "/javalib.jar", dest_dir + "/" + jar_name,
-                                  jar_name + ".jar")
-
-class DependencyMk(object):
-  def __init__(self, file_full_name):
-    self.f = open(file_full_name, "a+")
-
-  def __del__(self):
-    self.f.flush()
-    self.f.close()
-
-  def addHostA(self, a_name):
-    self.f.write("include $(CLEAR_VARS)\n")
-    self.f.write("LOCAL_PREBUILT_LIBS := " + "host/lib/" + a_name + ".a\n")
-    self.f.write("LOCAL_MODULE_TAGS := optional\n")
-    self.f.write("include $(BUILD_HOST_PREBUILT)\n")
-
-  def addHostSo(self, so_name):
-    # same as .a in makefile, distinguished by extension in build/core/multi_prebuilt.mk
-    self.f.write("include $(CLEAR_VARS)\n")
-    self.f.write("LOCAL_PREBUILT_LIBS := " + "host/lib/" + so_name + ".so\n")
-    self.f.write("LOCAL_MODULE_TAGS := optional\n")
-    self.f.write("include $(BUILD_HOST_PREBUILT)\n")
-
-  def addHostJar(self, jar_name):
-    self.f.write("include $(CLEAR_VARS)\n")
-    self.f.write("LOCAL_MODULE_TAGS := optional\n")
-    self.f.write("LOCAL_PREBUILT_JAVA_LIBRARIES := " + "host/java_lib/" + jar_name
-                 + "/" + jar_name + ".jar\n")
-    self.f.write("include $(BUILD_HOST_PREBUILT)\n")
-
-  def addTargetA(self, a_name):
-    self.f.write("include $(CLEAR_VARS)\n")
-    self.f.write("LOCAL_MODULE := " + a_name + "\n")
-    self.f.write("LOCAL_SRC_FILES := target/lib/" + a_name + ".a\n")
-    self.f.write("LOCAL_MODULE_TAGS := optional\n")
-    self.f.write("LOCAL_MODULE_SUFFIX := .a\n")
-    self.f.write("LOCAL_MODULE_CLASS := STATIC_LIBRARIES\n")
-    self.f.write("include $(BUILD_PREBUILT)\n")
-
-  def addTargetSo(self, so_name):
-    self.f.write("include $(CLEAR_VARS)\n")
-    self.f.write("LOCAL_MODULE := " + so_name + "\n")
-    self.f.write("LOCAL_SRC_FILES := target/lib/" + so_name + ".so\n")
-    self.f.write("LOCAL_MODULE_TAGS := optional\n")
-    self.f.write("LOCAL_MODULE_SUFFIX := .so\n")
-    self.f.write("LOCAL_MODULE_CLASS := SHARED_LIBRARIES\n")
-    self.f.write("LOCAL_MODULE_PATH := $(TARGET_OUT)/lib\n")
-    self.f.write("OVERRIDE_BUILT_MODULE_PATH := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)\n")
-    self.f.write("include $(BUILD_PREBUILT)\n")
-
-  def addTargetJar(self, jar_name):
-    self.f.write("include $(CLEAR_VARS)\n")
-    self.f.write("LOCAL_MODULE_TAGS := optional\n")
-    self.f.write("LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := " + jar_name + ":target/java_lib/" +
-                 jar_name + "/classes.jar\n")
-    self.f.write("include $(BUILD_MULTI_PREBUILT)\n")
-
-  def addString(self, message):
-    self.f.write(message)
-
-# individual files top copy as it is
-# product/maguro will be substituted into product/target_name later
-raw_file_list = [
-# "target/common/obj/PACKAGING/public_api.txt",
-  "host/linux-x86/bin/dx",
-  "host/linux-x86/bin/aapt",
-  # necessary for bootstrapping in host as the path is always assumed
-  "host/common/obj/JAVA_LIBRARIES/core-hostdex_intermediates/classes.jar",
-  "host/common/obj/JAVA_LIBRARIES/core-hostdex_intermediates/javalib.jar",
-  "host/common/obj/JAVA_LIBRARIES/core-junit-hostdex_intermediates/classes.jar",
-  "host/common/obj/JAVA_LIBRARIES/core-junit-hostdex_intermediates/javalib.jar",
-  # these permission stuffs are not copied as frameworks is not built
-  "target/product/maguro/system/etc/permissions/com.android.location.provider.xml",
-  "target/product/maguro/system/etc/permissions/platform.xml",
-  ]
-
-# the whole dir to copy as it is
-raw_dir_list = [
-  "target/product/maguro/system/etc/dhcpcd",
-  "target/product/maguro/system/etc/ppp",
-  "target/product/maguro/system/app",
-  "target/product/maguro/system/bin",
-  "target/product/maguro/system/etc/security",
-  "target/product/maguro/system/framework",
-  "target/product/maguro/system/lib",
-  # tools for debugging, not all of them are built in pdk_rel build
-  "target/product/maguro/system/xbin"
-  ]
-
-# from host/linux-x86/obj/STATIC_LIBRARIES/XYZ_intermediates
-host_a_list = [
-  "libandroidfw",
-  "libRS"
-  ]
-
-# from host/linux-x86/obj/lib
-host_so_list = [
-  ]
-
-# from host/commom/JAVA_LIBRARIES/XYZ_intermediates
-host_jar_list = [
-  "core-hostdex",
-  "dx",
-  "core-junit-hostdex"
-  ]
-
-# from target/product/product_name/obj/STATIC_LIBRARIES/XYZ_intermediates
-target_a_list = [
-  "libdrmframeworkcommon",
-  "libcpustats",
-  "libv8",
-  "libmedia_helper"
-  ]
-
-# from target/product/product_name/obj/lib
-target_so_list = [
-  "libandroid",
-  "libandroidfw",
-  "libandroid_runtime",
-  "libandroid_servers",
-  "libjnigraphics",
-  "libnativehelper",
-  "libemoji",
-  "libdrmframework",
-  "libdvm",
-  "libchromium_net",
-  "libcamera_client",
-  "libmedia",
-  "libstagefright",
-  "libstagefright_foundation",
-  "libRS",
-  "libmedia_native" # TODO temp fix for build error: should be removed after moving to f/native
-  ]
-
-
-# from target/common/obj/JAVA_LIBRARIES
-target_jar_list = [
-  "core",
-  "core-junit",
-  "ext",
-  "framework",
-  "android.test.runner",
-  "android_stubs_current",
-  "filterfw"
-  ]
-
-# files unnecessarily built for PDK. remove after copy
-raw_target_files_to_remove = [
-  # redundant
-  "target/product/maguro/system/app/Home.apk",
-  # stingray build included due to wrong mk file
-  "target/product/maguro/system/app/StingrayProgramMenu*.apk",
-  "target/product/maguro/system/app/SprintMenu.apk",
-  "target/product/maguro/system/app/WiMAX*.apk",
-  # wallpaper, not necessary
-  "target/product/maguro/system/app/Microbes.apk",
-  # H/W depedent anyway
-  "target/procuct/maguro/system/hw",
-  "target/product/maguro/system/lib/hw",
-  "target/product/maguro/system/lib/libOMX.SEC.*.so",
-  "target/product/maguro/system/lib/libSEC_OMX*.so",
-  "target/product/maguro/system/lib/libWiMAX*.so",
-  "target/product/maguro/system/lib/libOMX.TI.*.so",
-  "target/product/maguro/system/lib/libOMX_Core.so"
-  ]
-
-def main(argv):
-  if len(argv) != 4:
-    print "Usage: copy_pdk_bins.py src_top_dir dest_top_dir src_target_device"
-    print "   ex: copy_pdk_bins.py ../master vendor/pdk_bin_j_arm maguro"
-    sys.exit(1)
-  src_top_dir = argv[1]
-  src_out_dir = argv[1] + "/out/"
-  dest_top_dir = argv[2]
-  target_name = argv[3]
-
-  # now replace product/maguro to product/target_name for all lists
-  replacement_list = [
-    raw_file_list,
-    raw_dir_list,
-    raw_target_files_to_remove
-    ]
-  for dir_list in replacement_list:
-    for i in xrange(len(dir_list)):
-      replacement = dir_list[i].replace("product/maguro", "product/" + target_name)
-      dir_list[i] = replacement
-
-  src_target_top_dir = src_out_dir + "/target/product/" + target_name + "/"
-  # delete existing binaries
-  os.system("rm -rf " + dest_top_dir + "/host")
-  os.system("rm -rf " + dest_top_dir + "/raw_copy")
-  os.system("rm -rf " + dest_top_dir + "/target")
-  # copy template for mk
-  pu.copy_file_if_exists(src_top_dir + "/pdk/build", dest_top_dir, "pdk_prebuilt.mk")
-  mkFile = DependencyMk(dest_top_dir + "/pdk_prebuilt.mk")
-  mkFile.addString("\n\n\n")
-  mkFile.addString("PDK_BIN_ORIGINAL_TARGET := " + target_name + "\n")
-
-  for file_name in raw_file_list:
-    pu.copy_file_if_exists(src_out_dir, dest_top_dir + "/raw_copy", file_name)
-
-  for raw_dir in raw_dir_list:
-    pu.copy_dir(src_out_dir, dest_top_dir + "/raw_copy", raw_dir)
-
-  for host_a in host_a_list:
-    pu.copy_file_if_exists(src_out_dir + "/host/linux-x86/obj/STATIC_LIBRARIES/" + host_a +
-                           "_intermediates", dest_top_dir + "/host/lib", host_a + ".a")
-    mkFile.addHostA(host_a)
-
-  for host_so in host_so_list:
-    pu.copy_file_if_exists(src_out_dir + "/host/linux-x86/obj/lib/",
-                           dest_top_dir + "/host/lib", host_so + ".so")
-    mkFile.addHostSo(host_so)
-
-  src_host_jar_top = src_out_dir + "/host/common/obj/JAVA_LIBRARIES/"
-  for host_jar in host_jar_list:
-    src_host_jar_dir = src_host_jar_top + host_jar + "_intermediates/"
-    copy_classes_or_javalib(src_host_jar_dir, dest_top_dir + "/host/java_lib/", host_jar)
-    mkFile.addHostJar(host_jar)
-
-  for target_a in target_a_list:
-    pu.copy_file_if_exists(src_target_top_dir + "obj/STATIC_LIBRARIES/" + target_a +
-                           "_intermediates", dest_top_dir + "/target/lib", target_a + ".a")
-    mkFile.addTargetA(target_a)
-
-  for target_so in target_so_list:
-    pu.copy_file_if_exists(src_target_top_dir + "obj/lib/",
-                           dest_top_dir + "/target/lib", target_so + ".so")
-    mkFile.addTargetSo(target_so)
-
-  src_target_jar_top = src_out_dir + "/target/common/obj/JAVA_LIBRARIES/"
-  for target_jar in target_jar_list:
-    src_target_jar_dir = src_target_jar_top + target_jar + "_intermediates/"
-    copy_jar(src_target_jar_dir, dest_top_dir + "/target/java_lib", target_jar)
-    mkFile.addTargetJar(target_jar)
-
-  for file_to_remove in raw_target_files_to_remove:
-    os.system("rm -rf " + dest_top_dir + "/raw_copy/" + file_to_remove)
-
-  # rename raw_copy/target/product/target_name to target/product/pdk_target
-  os.system("mv " + dest_top_dir + "/raw_copy/target/product/" + target_name \
-             + " " + dest_top_dir + "/raw_copy/target/product/pdk_target")
-
-if __name__ == '__main__':
-  main(sys.argv)
diff --git a/build/copy_pdk_data.py b/build/copy_pdk_data.py
deleted file mode 100755
index 6a34f36..0000000
--- a/build/copy_pdk_data.py
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2012 The Android Open Source Project
-#
-# 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.
-#
-
-# script to copy necessary data / source for PDK build from
-# the current and the previous branch
-
-import os, string, sys, shutil
-import pdk_utils as pu
-import create_source_tree as tree
-
-def clean_dest_dirs(dest_vendor_data):
-  dir_to_clean = []
-  dir_to_clean += tree.prev_copy_dir_list
-  dir_to_clean += tree.additional_dir_pdk_rel_list
-  print dir_to_clean
-  for file_name in tree.copy_files_pdk_rel_list:
-    [path, name] = file_name.rsplit("/", 1)
-    print path
-    dir_to_clean.append(path)
-
-  for dir_name in dir_to_clean:
-    dir_path = dest_vendor_data + "/" + dir_name
-    print "deleting all files under " + dir_path
-    if os.path.isfile(dir_path):
-      # this is wrong, just remove the file
-      os.system("rm " + dir_path)
-    if os.path.isdir(dir_path):
-      file_list = pu.list_files(dir_path, ".git")
-      print file_list
-      for file_name in file_list:
-        os.system("rm " + file_name)
-
-def main(argv):
-  if len(argv) < 4:
-    print "Usage: copy_pdk_data.py current previous dest_dir [-c]"
-    print "   ex: copy_pdk_data.py ../jb_master ../ics_master ./out/target/pdk_data"
-    print "   -c to clean dest_dir"
-    sys.exit(1)
-  current_branch = os.path.abspath(argv[1])
-  previous_branch = os.path.abspath(argv[2])
-  dest_dir = os.path.abspath(argv[3])
-
-  cp_option = ""
-  if len(argv) == 5 and argv[4] == "-c":
-    clean_dest_dirs(dest_dir)
-    cp_option = "-n" # do not overwrite
-
-  for dir_name in tree.prev_copy_dir_list:
-    pu.copy_dir(previous_branch, dest_dir, dir_name, cp_option)
-
-  for dir_name in tree.additional_dir_pdk_rel_list:
-    pu.copy_dir(current_branch, dest_dir, dir_name, cp_option)
-
-  for file_name in tree.copy_files_pdk_rel_list:
-    pu.copy_files(current_branch, dest_dir, file_name)
-
-if __name__ == '__main__':
-  main(sys.argv)
diff --git a/build/create_source_tree.py b/build/create_source_tree.py
deleted file mode 100755
index e4aea2a..0000000
--- a/build/create_source_tree.py
+++ /dev/null
@@ -1,221 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2012 The Android Open Source Project
-#
-# 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.
-#
-
-# script to create minimal source tree for pdk_eng / pdk_rel build
-# pdk/build/pdk.mk file will be checked to detect necessary files
-# together with additional addition in this script for build dependency
-
-import os, string, sys, shutil
-import pdk_utils as pu
-
-
-def get_one_var_occurrence(f, dir_list_var):
-  dir_list = []
-  for line in f:
-    start = line.find(dir_list_var)
-    if (start != -1) and (line[0] != "#"): # found the pattern
-      break
-  # it can be eof, but the next for-loop will filter it out
-  for line in f:
-    words = line.split()
-    #print words
-    if len(words) > 0:
-      dir_list.append(words[0])
-    if len(words) != 2:
-      break
-  return dir_list
-
-def extract_build_dir(makefile, dir_list_var):
-  f = open(makefile, "r")
-  dir_list = []
-  while 1:
-    list_found = get_one_var_occurrence(f, dir_list_var)
-    if len(list_found) == 0:
-      break;
-    dir_list += list_found
-  f.close();
-  return dir_list
-
-def create_symbolic_link(src_top, dest_top, dir_name):
-  src_full = src_top + "/" + dir_name
-  dest_full = dest_top + "/" + dir_name
-  print "create symbolic link from " + dest_full + " to " + src_full
-  # remove existing link first to prevent recursive loop
-  os.system("rm -rf " + dest_full)
-  os.system("ln -s " + src_full + " " + dest_full)
-
-
-# when these dirs are copied as a whlole, only symbolic link will be created
-# instead of full copying. These dirs should not be overwritten or replaced by copy
-symbolic_link_list = [
-  "bionic",
-  "build",
-  "dalvik",
-  "development",
-  "external",
-  "external/clang",
-  "external/llvm",
-  "libcore",
-  "pdk",
-  "prebuilt",
-  "prebuilts",
-  "sdk",
-  "system"
-]
-
-# the whole dir copied
-additional_dir_list = [
-  "pdk"
-  ]
-
-# these dirs will be direcly pulled as the whole git.
-# so these files will not go under vendor/pdk/data
-additional_dir_pdk_rel_list_git = [
-  "external/libnl-headers",
-  "external/proguard",
-  "external/v8",
-  "external/safe-iop",
-]
-
-additional_dir_pdk_rel_list = [
-  "frameworks/base/build",
-  "frameworks/base/cmds/dumpstate",
-  "frameworks/base/include/androidfw",
-  "frameworks/base/include/android_runtime",
-  "frameworks/base/native/include",
-  "dalvik/libnativehelper/include",
-  "system/media/audio_effects/include", # should be removed after refactoring
-  "frameworks/base/include/drm", # for building legacy HAL, not in PDK release?
-  "frameworks/base/include/media", # for building legacy HAL, not in PDK release?
-  "frameworks/base/libs/rs/scriptc" # may remove after refactoring RS
-  ]
-
-# only files under the dir is copied, not subdirs
-dir_copy_only_files_list = [
-  ]
-
-copy_files_list = [
-  "Makefile"
-  ]
-
-copy_files_pdk_rel_list = [
-  "libcore/include/UniquePtr.h", # by h/libhardware/tests/keymaster
-  "frameworks/base/media/libeffects/data/audio_effects.conf",
-  "development/data/etc/apns-conf_sdk.xml",
-  "development/data/etc/vold.conf"
-  ]
-
-prev_copy_dir_list = [
-  "frameworks/base/data"
-  ]
-
-# for PDK_ENG build only, use old version
-prev_copy_dir_pdk_eng_list = [
-  "packages/apps/Bluetooth",
-  "packages/inputmethods/LatinIME",
-  "packages/providers/ApplicationsProvider",
-  "packages/providers/CalendarProvider",
-  #"packages/providers/DownloadProvider", old version does not build
-  "packages/providers/GoogleContactsProvider",
-  "packages/providers/TelephonyProvider",
-  "packages/providers/ContactsProvider",
-  "packages/providers/DrmProvider",
-  "packages/providers/MediaProvider",
-  "packages/providers/UserDictionaryProvider"
-  ]
-
-# not necessary although copied due to the dir list from pdk.mk
-files_to_remove = [
-  "vendor/moto/olympus",
-  "vendor/samsung/manta",
-  "vendor/samsung/mysidspr",
-  "vendor/samsung/toro",
-  "vendor/samsung/crespo", # should be removed when crespo is supproted
-  "vendor/nvidia/proprietary-tegra3",
-  "packages/providers/BrowserProvider",
-  "hardware/ti/omap4xxx/test/CameraHal" # cannot build with PDK source
-  ]
-
-def main(argv):
-  if len(argv) < 5:
-    print "Usage: create_source_tree.py pdk_type(eng or rel) current_src_top_dir prev_src_top_tree dest_top_dir"
-    print "   ex: create_source_tree.py eng ../jb_master ../ics_master /pdk_eng_source"
-    sys.exit(1)
-  pdk_eng = (argv[1] == "eng")
-  src_top_dir = os.path.abspath(argv[2])
-  prev_src_top_dir = os.path.abspath(argv[3])
-  dest_top_dir = os.path.abspath(argv[4])
-
-  full_copy = True
-  # hidden command for initial testing of manually added parts
-  if len(argv) == 6:
-    if argv[5] == "0":
-      full_copy = False
-  dir_list = []
-  if full_copy:
-    dir_list += extract_build_dir(src_top_dir + "/pdk/build/pdk.mk", "BUILD_PDK_SUBDIRS")
-    dir_list += extract_build_dir(src_top_dir + "/pdk/build/pdk_google.mk", "BUILD_PDK_SUBDIRS")
-    if pdk_eng:
-      dir_list += extract_build_dir(src_top_dir + "/pdk/build/pdk.mk", "BUILD_PDK_ENG_SUBDIRS")
-    else:
-      dir_list += extract_build_dir(src_top_dir + "/pdk/build/pdk.mk", "BUILD_PDK_REL_SUBDIRS")
-
-  dir_list += additional_dir_list
-  if not pdk_eng:
-    dir_list += additional_dir_pdk_rel_list_git
-    dir_list += additional_dir_pdk_rel_list
-  for dir_prev_version in prev_copy_dir_list:
-    if dir_prev_version in dir_list:
-      dir_list.remove(dir_prev_version)
-  print "copy list", dir_list
-
-  os.system("mkdir -p " + dest_top_dir)
-  for dir_name in dir_list:
-    if dir_name in symbolic_link_list:
-      create_symbolic_link(src_top_dir, dest_top_dir, dir_name)
-    else:
-      pu.copy_dir(src_top_dir, dest_top_dir, "/" + dir_name)
-
-  for dir_name in dir_copy_only_files_list:
-    pu.copy_dir_only_file(src_top_dir, dest_top_dir, "/" + dir_name)
-
-  copy_files_list_ = copy_files_list
-  if not pdk_eng:
-    copy_files_list_ += copy_files_pdk_rel_list
-  for file_name in copy_files_list_:
-    pu.copy_files(src_top_dir, dest_top_dir, "/" + file_name)
-
-  # overwrite files
-  pu.copy_files(src_top_dir + "/vendor/pdk/data/google/overwrite", dest_top_dir, "/*")
-
-  for file_name in files_to_remove:
-    os.system("rm -rf " + dest_top_dir + "/" + file_name)
-
-  prev_copy_dir_list_ = []
-  prev_copy_dir_list_ += prev_copy_dir_list
-  if pdk_eng:
-    prev_copy_dir_list_ += prev_copy_dir_pdk_eng_list
-  print "use ICS version for ", prev_copy_dir_list_
-  for dir_name in prev_copy_dir_list_:
-    os.system("rm -rf " + dest_top_dir + "/" + dir_name)
-    if dir_name in symbolic_link_list:
-      create_symbolic_link(prev_src_top_dir, dest_top_dir, dir_name)
-    else:
-      pu.copy_dir(prev_src_top_dir, dest_top_dir, "/" + dir_name)
-
-if __name__ == '__main__':
-  main(sys.argv)
diff --git a/build/pdk.mk b/build/pdk.mk
deleted file mode 100644
index 914185c..0000000
--- a/build/pdk.mk
+++ /dev/null
@@ -1,198 +0,0 @@
-#
-# Copyright (C) 2012 The Android Open Source Project
-#
-# 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.
-#
-
-# common build dirs for pdk_eng and pdk_rel builds
-# this list should be minimal to make pdk_rel build fast
-
-# BUILD_PDK_SUBDIRS is parsed by a script to extract source tree list automatically.
-# To make that parsing simple, the first line should not include any explicit directory name.
-BUILD_PDK_SUBDIRS := \
-	abi \
-	bionic \
-	bootable \
-	build \
-	prebuilt \
-	prebuilts
-
-
-# if pdk_vendor.mk exist, do not include pdk_google.mk
-# pdk_vendor.mk should add more dirs for pdk_rel build
-# that is, it should include BUILD_PDK_SUBDIRS += \ to add additional dir for build
-ifneq (,$(wildcard $(TOPDIR)pdk/build/pdk_vendor.mk))
-include $(TOPDIR)pdk/build/pdk_vendor.mk
-else
-include $(TOPDIR)pdk/build/pdk_google.mk
-endif
-
-ifeq ($(PDK_BUILD_TYPE), pdk_eng)
-# addition for pdk_eng
-BUILD_PDK_ENG_SUBDIRS := \
-	dalvik \
-	development \
-	device \
-	external \
-	frameworks \
-	hardware \
-	libcore \
-	packages/apps/Bluetooth \
-	packages/apps/Launcher2 \
-	packages/apps/Settings \
-	packages/inputmethods/LatinIME \
-	packages/providers \
-	sdk \
-	system
-
-
-BUILD_PDK_SUBDIRS += $(BUILD_PDK_ENG_SUBDIRS)
-
-ifeq ($(TARGET_CPU_SMP), true)
-PDK_BIN_NAME := pdk_bin_$(TARGET_ARCH_VARIANT)_true
-else # !SMP
-PDK_BIN_NAME := pdk_bin_$(TARGET_ARCH_VARIANT)_false
-endif # !SMP
-
-.PHONY: pdk_bin_zip pdk_data_zip
-pdk_bin_zip: $(OUT_DIR)/target/$(PDK_BIN_NAME).zip pdk_data_zip
-
-
-$(OUT_DIR)/target/$(PDK_BIN_NAME).zip: $(OUT_DIR)/target/$(PDK_BIN_NAME)
-	$(info Creating $(OUT_DIR)/target/$(PDK_BIN_NAME).zip)
-	$(hide) cd $(dir $@) && rm -rf $(notdir $@) && cd $(PDK_BIN_NAME) && zip -rq ../$(notdir $@) *
-
-# explicitly put dependency on two final images to avoid copying every time
-# It is too early and INSTALLED_SYSTEMIMAGE is not defined yet.
-$(OUT_DIR)/target/$(PDK_BIN_NAME): $(OUT_DIR)/target/product/$(TARGET_DEVICE)/boot.img \
-                                   $(OUT_DIR)/target/product/$(TARGET_DEVICE)/system.img
-	python $(TOPDIR)pdk/build/copy_pdk_bins.py . $(OUT_DIR)/target/$(PDK_BIN_NAME) $(TARGET_DEVICE)
-
-pdk_data_zip: $(OUT_DIR)/target/pdk_data.zip
-
-$(OUT_DIR)/target/pdk_data.zip: $(OUT_DIR)/target/pdk_data
-	$(info Creating $(OUT_DIR)/target/pdk_data.zip)
-	$(hide) cd $(dir $@) && rm -rf $(notdir $@) && cd pdk_data && zip -rq ../$(notdir $@) *
-
-$(OUT_DIR)/target/pdk_data:  $(OUT_DIR)/target/product/$(TARGET_DEVICE)/boot.img \
-                             $(OUT_DIR)/target/product/$(TARGET_DEVICE)/system.img
-	python $(TOPDIR)pdk/build/copy_pdk_data.py . . $(OUT_DIR)/target/pdk_data
-
-else # pdk_rel
-
-# overwrite the definition from conflig.mk, no package build in pdk_rel
-BUILD_PACKAGE :=
-
-# addition for pdk_rel
-BUILD_PDK_REL_SUBDIRS := \
-	device/common \
-	device/sample \
-	external/antlr \
-	external/bluetooth \
-	external/bsdiff \
-	external/bzip2 \
-	external/clang \
-	external/dbus \
-	external/doclava \
-	external/expat \
-	external/fdlibm \
-	external/flac \
-	external/freetype \
-	external/gcc-demangle \
-	external/giflib \
-	external/gtest \
-	external/guava \
-	external/icu4c \
-	external/jhead \
-	external/jpeg \
-	external/jsilver \
-	external/jsr305 \
-	external/liblzf \
-	external/libpng \
-	external/libvpx \
-	external/llvm \
-	external/mksh \
-	external/openssl \
-	external/protobuf \
-	external/sonivox \
-	external/speex \
-	external/stlport \
-	external/tinyalsa \
-	external/tremolo \
-	external/wpa_supplicant \
-	external/wpa_supplicant_6 \
-	external/wpa_supplicant_8 \
-	external/yaffs2 \
-	external/zlib \
-	frameworks/base/data \
-	frameworks/compile \
-	frameworks/native \
-	hardware/libhardware \
-	hardware/libhardware_legacy \
-	hardware/ril \
-	system/bluetooth \
-	system/core \
-	system/extras \
-	system/media/audio_utils \
-	system/netd \
-	system/security \
-	system/vold
-
-# system should be put back to common list once system/media is refactored
-
-BUILD_PDK_SUBDIRS += $(BUILD_PDK_REL_SUBDIRS)
-
-# naming convention for bin repository: pdk_bin_CPUArch_SMPSupport
-# ex: pdk_bin_armv7-a_true (armv7-a with SMP support)
-ifeq ($(TARGET_CPU_SMP), true)
-PDK_BIN_PRIMARY := pdk_bin_$(TARGET_ARCH_VARIANT)_true
-# this dir will not exist, so SMP CPU requires SMP version
-PDK_BIN_SECONDARY := pdk_bin_no_such_dir
-else # !SMP
-PDK_BIN_PRIMARY := pdk_bin_$(TARGET_ARCH_VARIANT)_false
-# if non-SMP binary does not exist, use SMP version
-PDK_BIN_SECONDARY := pdk_bin_$(TARGET_ARCH_VARIANT)_true
-endif # !SMP
-
-PDK_BIN_VENDOR_TOP_DIR := $(TOPDIR)vendor/pdk/data/partner
-
-ifneq (,$(wildcard $(PDK_BIN_VENDOR_TOP_DIR)/$(PDK_BIN_PRIMARY)))
-PDK_BIN_REPOSITORY := $(PDK_BIN_VENDOR_TOP_DIR)/$(PDK_BIN_PRIMARY)
-else # !PRIMARY
-ifneq (,$(wildcard $(PDK_BIN_VENDOR_TOP_DIR)/$(PDK_BIN_SECONDARY)))
-$(info PDK_BIN using secondary option $(PDK_BIN_SECONDARY) for build)
-PDK_BIN_REPOSITORY := $(PDK_BIN_VENDOR_TOP_DIR)/$(PDK_BIN_SECONDARY)
-else # !SECONDARY
-$(error Neither $(PDK_BIN_VENDOR_TOP_DIR)/$(PDK_BIN_PRIMARY) nor \
-  $(PDK_BIN_VENDOR_TOP_DIR)/$(PDK_BIN_SECONDARY) exists.)
-endif # !SECONDARY
-endif # !PRIMARY
-
-
-include $(PDK_BIN_REPOSITORY)/pdk_prebuilt.mk
-
-ifeq ($(PDK_BIN_ORIGINAL_TARGET), )
-$(error PDK_BIN_ORIGINAL_TARGET not set in $(PDK_BIN_REPOSITORY)/pdk_prebuilt.mk)
-endif
-
-ifeq (,$(wildcard $(OUT_DIR)/target/product/$(TARGET_DEVICE)/PDK_BIN_COPIED))
-$(error PDK binaries necessary for pdk_rel build are not there! Did you run setup_pdk_rel.py? )
-endif # PDK_BIN_COPIED
-
-ifeq (,$(wildcard $(TOPDIR)PDK_DATA_COPIED))
-$(error PDK data necessary for pdk_rel build are not there! Did you run setup_pdk_rel.py? )
-endif # PDK_DATA_COPIED
-
-PRODUCT_PACKAGES += core core-junit
-
-endif # pdk_rel
diff --git a/build/pdk_google.mk b/build/pdk_google.mk
deleted file mode 100644
index 639f7c7..0000000
--- a/build/pdk_google.mk
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Copyright (C) 2012 The Android Open Source Project
-#
-# 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.
-#
-
-# subdirs for building pdk_eng/pdk_rel for maruro/crespo
-BUILD_PDK_SUBDIRS += \
-	device/samsung/tuna \
-	device/samsung/maguro \
-	device/ti/panda \
-	hardware/broadcom \
-	hardware/invensense \
-	hardware/ti/omap4xxx \
-	vendor/broadcom \
-	vendor/invensense \
-	vendor/khronos \
-	vendor/nxp/pn544 \
-	vendor/samsung \
-	vendor/ti
-
-
-
diff --git a/build/pdk_prebuilt.mk b/build/pdk_prebuilt.mk
deleted file mode 100644
index 82a2eb9..0000000
--- a/build/pdk_prebuilt.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Copyright (C) 2012 The Android Open Source Project
-#
-# 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.
-#
-
-
-# This file under pdk/build is the template for the same file under vendor/pdk
-# The file under vendor/pdk is automatically generated, and should not be manually edited.
-
-LOCAL_PATH := $(call my-dir)
-
diff --git a/build/prepare_pdk_tree.py b/build/prepare_pdk_tree.py
new file mode 100755
index 0000000..4be9744
--- /dev/null
+++ b/build/prepare_pdk_tree.py
@@ -0,0 +1,146 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2012 The Android Open Source Project
+#
+# 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.
+#
+
+# prepare_pdk_tree.py target_dir [-m manifest] pdk_groups
+# Ex: prepare_pdk_tree.py ../tmp/pdk grouper
+# create mount_pdk.sh and umount_pdk.sh, which mounts/umounts pdk sources.
+
+import os
+import re
+import sys
+import subprocess
+
+
+class ManifestHandler(object):
+
+    def __init__(self):
+        # current pattern
+        self.current = 0
+        self.patterns = [re.compile('path=\"([^\"]*)\".*groups=\"([^\"]*)\"'), \
+                         re.compile('groups=\"([^\"]*)\".*path=\"([^\"]*)\"')]
+
+    def getAttribs(self, line):
+        attrib = [None, None] # list of path, groups
+        m = self.patterns[self.current].search(line)
+        # if match fails, try both pattens and change default one
+        # if match founds
+        if m is None:
+            notCurrent = 1 - self.current
+            mOther = self.patterns[notCurrent].search(line)
+            if mOther is not None:
+                # toggle
+                self.current = notCurrent
+                m = mOther
+        if m is not None:
+            if (self.current == 0):
+                attrib[0] = m.group(1)
+                attrib[1] = m.group(2)
+            else:
+                attrib[0] = m.group(2)
+                attrib[1] = m.group(1)
+        return attrib
+
+def isInGroups(groupsAttrib, groups):
+    if groupsAttrib is None:
+        return False
+    for group in groups:
+        if group in groupsAttrib:
+            return True
+    return False
+
+def getPDKDirs(manifest, groups):
+    subdirs = []
+    handler = ManifestHandler()
+    f = open(manifest, 'r')
+    for line in f:
+        [path, groupsAttrib] = handler.getAttribs(line)
+        if isInGroups(groupsAttrib, groups):
+            subdirs.append(path)
+    f.close()
+    return subdirs
+
+def create_symbolic_link(src_top, dest_top, dir_name):
+    src_full = src_top + "/" + dir_name
+    dest_full = dest_top + "/" + dir_name
+    #print "create symbolic link from " + dest_full + " to " + src_full
+    # remove existing link first to prevent recursive loop
+    os.system("rm -rf " + dest_full)
+    os.system("ln -s " + src_full + " " + dest_full)
+
+# The only file not from manifest.
+copy_files_list = [ "Makefile" ]
+MOUNT_FILE = 'mount_pdk.sh'
+UMOUNT_FILE = 'umount_pdk.sh'
+SH_HEADER = "#!/bin/bash\n#Auto-generated file, do not edit!\n"
+
+def main(argv):
+    manifestFile = ".repo/manifest.xml"
+    groups = ["pdk"]
+    if len(argv) < 2:
+        print "create_pdk_tree.py target_dir [-m manifest] pdk_groups"
+        print " ex) create_pdk_tree.py ../tmp grouper"
+        print " Note that pdk group is included by default"
+        print " Do not create target_dir under the current source tree. This will cause build error."
+        sys.exit(1)
+    targetDir = argv[1]
+    argc = 2
+    if len(argv) > 2:
+        if argv[2] == "-m":
+            manifestFile = argv[3]
+            argc += 2
+    while argc < len(argv):
+        groups.append(argv[argc])
+        argc += 1
+    sourceDir = os.path.abspath('.')
+    targetDir = os.path.abspath(targetDir)
+
+    p = subprocess.Popen("mount", stdout = subprocess.PIPE)
+    targetMounted = False
+    for line in p.stdout:
+        if targetDir in line:
+            targetMounted = True
+    p.stdout.close()
+
+    if targetMounted:
+        print "target dir already mounted"
+        if os.path.exists(targetDir + '/' + UMOUNT_FILE):
+            print "Use existing file", UMOUNT_FILE, "to unmount"
+            sys.exit(1)
+        else:
+            print "Will create scripts, but may need manual unmount"
+
+    subdirs = getPDKDirs(manifestFile, groups)
+    print subdirs
+    os.system("mkdir -p " + targetDir)
+    mountf = open(targetDir + '/' + MOUNT_FILE, 'w+')
+    mountf.write(SH_HEADER)
+    umountf = open(targetDir + '/' + UMOUNT_FILE, 'w+')
+    umountf.write(SH_HEADER)
+    for subdir in subdirs:
+        os.system("mkdir -p " + targetDir + '/' + subdir)
+        mountf.write("mount --bind " + sourceDir + "/" + subdir + " " + targetDir + "/" + subdir + \
+                        "\n")
+        umountf.write("umount " + sourceDir + "/" + subdir + "\n")
+    for file_name in copy_files_list:
+        create_symbolic_link(sourceDir, targetDir, file_name)
+    mountf.close()
+    umountf.close()
+    os.system("chmod 700 " + targetDir + '/' + MOUNT_FILE)
+    os.system("chmod 700 " + targetDir + '/' + UMOUNT_FILE)
+
+if __name__ == '__main__':
+    main(sys.argv)
diff --git a/build/setup_pdk_rel.py b/build/setup_pdk_rel.py
deleted file mode 100755
index 75b90f7..0000000
--- a/build/setup_pdk_rel.py
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2012 The Android Open Source Project
-#
-# 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.
-#
-
-# script to prepare pdk_rel branches for build.
-# This should be run after every make clean as necessary files will be deleted
-# TODO : set up source code as well
-
-import os, re, string, sys
-import pdk_utils as pu
-
-PDK_BIN_PREFIX = "pdk_bin_"
-PDK_BIN_TOP_DIR = "/vendor/pdk/data/partner/bin"
-PDK_CPU_ARCH_TOP_DIR = "/vendor/pdk/data/partner"
-PDK_DATA_TOP_DIR = "/vendor/pdk/data/partner/data"
-
-def list_available_pdk_bins(path):
-  """returns the list of pdk_bin_* dir under the given path"""
-  pdk_bins_dict = {}
-
-  file_list = pu.list_files(os.path.abspath(path))
-  for file_name in file_list:
-    m = re.search(PDK_BIN_PREFIX + "(.*)\.zip$", file_name)
-    if m != None:
-      print " pdk_bin for arch " + m.group(1) + " @ " + file_name
-      pdk_bins_dict[m.group(1)] = file_name
-  return pdk_bins_dict
-
-def main(argv):
-  if len(argv) != 4:
-    print "Usage: setup_pdk_rel.py top_dir cpu_conf target_hw"
-    print "   ex: setup_pdk_rel.py pdk_rel_source armv7-a-neon_true maguro"
-    sys.exit(1)
-  top_dir = argv[1]
-  cpu_conf = argv[2]
-  target_hw = argv[3]
-
-  pdk_bins_dict = list_available_pdk_bins(top_dir + PDK_BIN_TOP_DIR)
-
-  if not (cpu_conf in pdk_bins_dict):
-    print "Specified cpu_conf", cpu_conf, "not avaialble under", top_dir + PDK_BIN_TOP_DIR
-    print "Avaiable configurations are ", pdk_bins_dict.keys()
-    sys.exit(1)
-
-  pdk_bin_zip = pdk_bins_dict[cpu_conf]
-  pdk_data_zip = top_dir + PDK_DATA_TOP_DIR + "/pdk_data.zip"
-  pdk_partner_data_cpu_path = top_dir + PDK_CPU_ARCH_TOP_DIR + "/" + PDK_BIN_PREFIX + cpu_conf
-  PDK_BIN_COPIED = top_dir + "/out/target/product/" + target_hw + "/PDK_BIN_COPIED"
-  PDK_DATA_COPIED = top_dir + "/PDK_DATA_COPIED"
-
-  copy_out_dir = pu.src_newer_than_dest(pdk_bin_zip, PDK_BIN_COPIED)
-  copy_partner_data_cpu = pu.src_newer_than_dest(pdk_bin_zip, pdk_partner_data_cpu_path)
-  copy_pdk_data = pu.src_newer_than_dest(pdk_data_zip, PDK_DATA_COPIED)
-
-  if copy_out_dir:
-    print "copy pdk bins to out"
-    # clean out as binary is changed
-    pu.remove_if_exists(top_dir + "/out")
-    command = "mkdir -p " + top_dir + "/out && " \
-            + "cd " + top_dir + "/out && " \
-            + "rm -rf raw_copy && " \
-            + "unzip " + os.path.abspath(pdk_bin_zip) + " raw_copy/* && " \
-            + "mv raw_copy/target/product/pdk_target raw_copy/target/product/" + target_hw + " &&" \
-            + "mv -f raw_copy/* . && " \
-            + "touch " + os.path.abspath(PDK_BIN_COPIED)
-    os.system(command)
-
-  if copy_partner_data_cpu:
-    print "copy pdk bins to " + pdk_partner_data_cpu_path
-    pu.remove_if_exists(pdk_partner_data_cpu_path)
-    command = "mkdir -p " + pdk_partner_data_cpu_path + " && " \
-            + "cd " + pdk_partner_data_cpu_path + " && " \
-            + "unzip -o " + os.path.abspath(pdk_bin_zip) + " host/* target/* pdk_prebuilt.mk"
-    os.system(command)
-
-  if copy_pdk_data:
-    print "copy pdk data"
-    # first remove old files
-    pu.remove_files_listed(top_dir, pu.load_list(PDK_DATA_COPIED))
-    command = "cd " + top_dir + " && " \
-            + "unzip -o " + os.path.abspath(pdk_data_zip)
-    os.system(command)
-    # recorde copied files to delete correctly.
-    pu.save_list(pu.list_files_in_zip(pdk_data_zip), PDK_DATA_COPIED)
-
-
-if __name__ == '__main__':
-  main(sys.argv)
