title: Building Android source: error when executing mm?
body: <p><strong>Update</strong></p>
  
  <p>I got this working. How I am not sure. I did no config changes at all. What I did was:</p>
  
  <ul>
  <li>Modify <code>Dialog</code> in <code>frameworks/base/core/java/android/app</code>.</li>
  <li>Went to my root (<code>/path/to/source/</code>).</li>
  <li>Then I did <code>mmm frameworks/base/</code>.</li>
  </ul>
  
  <p>Everything worked. Then I  tried <em>exactly</em> what I had already tried below:</p>
  
  <ul>
  <li>Modify <code>ScrollView</code> (I actually never said which file I was modifying) in <code>frameworks/base/core/java/android/widget</code>.</li>
  <li>I <code>ch</code>'ed to <code>frameworks/base/core/java/android/widget</code>.</li>
  <li>Then I did <code>mm</code>.</li>
  </ul>
  
  <p>This time I had no errors like before when the files were removed. Now it just works.</p>
  
  <p>Maybe this was some caching or bug?</p>
  
  <p><strong>/Update</strong></p>
  
  <p>I am building the Android source code for the emulator. I built the whole code with <code>make -j32</code> and the system.img gets to the output <code>out/target/product/generic/system.img</code>. The emulator works simply by calling <code>emulator</code>.</p>
  
  <p>When I do changes in <code>frameworks/base/core/java/android/widget</code>, using the <code>hmm</code> documentation, the most appropriate command would be <code>mm</code> to build the current directory.</p>
  
  <p>Unfortunately I get an error:</p>
  
  <blockquote>
    <p>make: * No rule to make target</p>
    
    <p>`out/target/product/generic/system/framework/framework-res.apk',</p>
    
    <p>needed by `out/target/product/generic/system/framework/framework.jar'.</p>
    
    <p>Stop. </p>
    
    <p>make: Leaving directory
    `/path/to/source/'</p>
  </blockquote>
  
  <p>Leaving me to do <code>make -j32</code> again to get the emulator to run and apply my fixes. </p>
  
  <p>Checking the <code>out/target/product/generic/</code> folder after using the <code>mm</code> command, system.img has been removed with several other things.</p>
  
  <p>When I read the logs this is printed:</p>
  
  <blockquote>
    <p><em>*</em> Forcing "make installclean"...</p>
    
    <p><em>*</em> rm -rf out/target/product/generic/data/* out/target/product/generic/data-qemu/*</p>
    
    <p>out/target/product/generic/userdata-qemu.img</p>
    
    <p>out/host/linux-x86/obj/NOTICE_FILES out/host/linux-x86/sdk</p>
    
    <p>out/target/product/generic/<em>.img out/target/product/generic/</em>.txt</p>
    
    <p>out/target/product/generic/<em>.xlb out/target/product/generic/</em>.zip</p>
    
    <p>out/target/product/generic/kernel out/target/product/generic/data</p>
    
    <p>out/target/product/generic/obj/APPS</p>
    
    <p>out/target/product/generic/obj/NOTICE_FILES</p>
    
    <p>out/target/product/generic/obj/PACKAGING</p>
    
    <p>out/target/product/generic/recovery out/target/product/generic/root</p>
    
    <p>out/target/product/generic/system</p>
    
    <p>out/target/product/generic/dex_bootjars</p>
    
    <p>out/target/product/generic/obj/JAVA_LIBRARIES</p>
    
    <p>out/target/product/generic/obj/FAKE</p>
    
    <p>out/target/product/generic/obj/EXECUTABLES/adbd_intermediates</p>
    
    <p>out/target/product/generic/obj/EXECUTABLES/init_intermediates</p>
    
    <p>out/target/product/generic/obj/ETC/mac_permissions.xml_intermediates</p>
    
    <p>out/target/product/generic/obj/ETC/sepolicy_intermediates</p>
    
    <p><em>*</em> Done with the cleaning, now starting the real build. make: Entering directory `/path/to/source/'</p>
  </blockquote>
  
  <p>My guess is that it will clean "outdated" data and then rebuild it with the already prebuilt Android source code BUT with my changes in the <code>frameworks/base/core/java/android/widget</code> folder.</p>
  
  <p>Is this the right approach? I was under the impression <code>mm</code> would compile what was needed in the current directory and somehow insert this data to the system.img.</p>
  
  <p>I have also seen the command <code>mm -B</code>, what does the <code>-B</code> do?</p>