title: AOSP add new custom System Service
body: <p>I've downloaded the Android Source from source.android.com build it and was able to run it successfully on an emulator. </p>
  
  <p>Now I want to add new System Service to Android. I do not have much idea in building and running AOSP considering this is my first time doing so.</p>
  
  <p>I followed this simple article in adding a TestService to AOSP. Added the new codes, modified SystemServer.java accordingly, but make command wasn't a success.</p>
  
  <p>After the modifications I ran <pre><code>make update-api</code></pre> to update current.txt
  After which I ran <pre><code>make -j4 command</code></pre> which failed with the following errors.</p>
  
  <pre><code>frameworks/base/services/java/com/android/server/SystemServer.java:268: illegal character: \8220
              ServiceManager.addService(“Test”, new TestService(context));
                                        ^
  frameworks/base/services/java/com/android/server/SystemServer.java:268: ';' expected
              ServiceManager.addService(“Test”, new TestService(context));
                                         ^
  frameworks/base/services/java/com/android/server/SystemServer.java:268: illegal character: \8221
              ServiceManager.addService(“Test”, new TestService(context));
                                             ^
  frameworks/base/services/java/com/android/server/SystemServer.java:268: ';' expected
              ServiceManager.addService(“Test”, new TestService(context));
                                              ^
  frameworks/base/services/java/com/android/server/SystemServer.java:268: ';' expected
              ServiceManager.addService(“Test”, new TestService(context));
                                                                        ^</code></pre>
  
  <p>Clearly the errors are on the lines where I added couple of lines to SystemServer.java to register the Service. So how do I deal with compilation errors in the java files that I added/modified? I'm thinking this is something trivial, but don't have enough experience with AOSP get a hold of this. Any thoughts/suggestions appreciated.</p>