title: Create specific device tree for AOSP
body: <p>I followed official Google`s tutorial to build my own AOSP and succeeded in all steps: I have a "Pure AOSP version" running on a nexus emulator. <a href="https://source.android.com/source/building.html" rel="noreferrer">https://source.android.com/source/building.html</a></p>
  
  <p>The story is I have some rare device came with some Android version full of a pre-installed app's obviously I don't want. I want to port Pure AOSP to my device - without any improvements or new features (So, for example, I don`t want to know how to build CM git repo).</p>
  
  <ol>
  <li><p>Is it working just add to my local above master branch correct files into <code>/device/vendor/model</code> and then under <code>cwd</code> of master branch execute <code>$ . build/envsetup.sh</code> ?</p></li>
  <li><p>If so, what are the files and their content I need to put under <code>/device/vendor/model</code>? I found a lot of guides how to pull already existing tree of CM or something else (<a href="http://xda-university.com/as-a-developer/porting-aosp-roms-using-source-code" rel="noreferrer">http://xda-university.com/as-a-developer/porting-aosp-roms-using-source-code</a>) and including this <a href="https://stackoverflow.com/questions/11352709/android-device-configuration-for-aosp">Android device configuration for AOSP</a> and looking on some git repo's of several devices, I tried to figure out the minimum complete set of files &amp; their content but I didn't find a correlation. I think there must be the minimum complete set and there is programming reason for the existence of each file. And what I saw in existed git repo`s was this set + custom extras each developer added for his own reasons. </p></li>
  <li><p>Aftermath How do I determine the Build name &amp; Buildtype to execute <code>$ lunch &lt;Build name&gt;-&lt;Buildtype &gt;</code>?</p></li>
  <li><p>How to integrate <code>$ make otapackage</code> in order to build the familiar one zip file to load via recovery like CWM?</p></li>
  </ol>
  
  <p>This is following my previous post: <a href="https://stackoverflow.com/questions/31492206/porting-aosp-to-specific-hardware-device/31493817?noredirect=1#comment50970778_31493817">Porting AOSP to specific hardware device</a>, But here the questions are more specific.</p>