title: How to change my storage from data/data to Android/data
body: <p>am a rookie. The present location of my app folder when installed is in data/data but I want to change the folder location(com.time.notes) to Android/data which is where alot of the folder of the apps I install shows, this is the code am presently trying.</p>
  
  <pre><code>   public void backup(String item) {
      OutputStream myOutput = null;
      InputStream myInput = null;
      File directory;
      String databasePath = "/data/data/"+getPackageName()+"/databases/Memo.db";
      File f = new File(databasePath);
  
      if (f.exists()) {
          try {
  
              directory = new File("/mnt/sdcard/"+getResources().getString(R.string.app_name)+"/Backup");
              if (!directory.exists())
                  directory.mkdir();
              if (item.equals("Backup")) {
  
                  myOutput = new FileOutputStream(directory.getAbsolutePath() + File.separator + "/"+getResources().getString(R.string.app_name));
  
                  myInput = new FileInputStream(databasePath);
                  Toast.makeText(this, "Backup Location " + directory, Toast.LENGTH_LONG).show();
              } else if (item.equals("Restore")) {
                  myInput = new FileInputStream(directory.getAbsolutePath() + File.separator + "/"+getResources().getString(R.string.app_name));
  
                  myOutput = new FileOutputStream(databasePath);
                  Toast.makeText(this, "Backup Restored Successfully ", Toast.LENGTH_LONG).show();
  
              }
              byte[] buffer = new byte[1024];
              int length;
              while ((length = myInput.read(buffer)) &gt; 0) {
                  myOutput.write(buffer, 0, length);
              }
  
              myOutput.flush();
          } catch (Exception e) {
          } finally {
              try {
                  if (myOutput != null) {
                      myOutput.close();
                      myOutput = null;
                  }
                  if (myInput != null) {
                      myInput.close();
                      myInput = null;
                  }
              } catch (Exception e) {
              }
          }
      }
  }
  </code></pre>