Android: 文件操作大全

  1. android的文件操作要有权限:
  2. view plaincopy to clipboardprint?
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission> 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
  3. SD卡下的文件操作:
  4. 1、判断SD卡是否插入
  5. view plaincopy to clipboardprint?
    Environment.getExternalStorageState().equals(  
            android.os.Environment.MEDIA_MOUNTED); 
    Environment.getExternalStorageState().equals(
            android.os.Environment.MEDIA_MOUNTED);
  6. 2、获得sd卡根目录:
  7. view plaincopy to clipboardprint?
    File skRoot = Environment.getExternalStorageDirectory(); 
    File skRoot = Environment.getExternalStorageDirectory();
  8. 私有目录下的文件操作:
  9. 1、获得私有根目录:
  10. view plaincopy to clipboardprint?
    File fileRoot = Context.getFilesDir()+"\"; 
     File fileRoot = Context.getFilesDir()+"\";
  11. 还未整理
  12. 文件夹或文件夹操作:
  13. 1、确定或获得文件夹和文件路径
  14. a、获得文件或文件夹的绝对路径和相对路径。区别
  15. view plaincopy to clipboardprint?
    String path = File.getPath();//相对  
    String path = File.getAbsoultePath();//绝对 
    String path = File.getPath();//相对
    String path = File.getAbsoultePath();//绝对
  16. b 、获得文件或文件夹的父目录
  17. view plaincopy to clipboardprint?
    String parentPath = File.getParent(); 
    String parentPath = File.getParent();
  18. c、获得文件或文件夹的名称:
  19. view plaincopy to clipboardprint?
    String Name = File.getName(); 
    String Name = File.getName();
  20. 2、建立文件或文件夹
  21. view plaincopy to clipboardprint?
    File.mkDir(); //建立文件夹  
    File.createNewFile();//建立文件 
    File.mkDir(); //建立文件夹
    File.createNewFile();//建立文件
     
  22. 3、判断是文件或文件夹
  23. view plaincopy to clipboardprint?
    File.isDirectory() 
    File.isDirectory()
  24. 4、列出文件夹下的所有文件和文件夹名
  25. view plaincopy to clipboardprint?
    File[] files = File.listFiles(); 
    File[] files = File.listFiles();
  26. 5、修改文件夹和文件名
  27. view plaincopy to clipboardprint?
    File.renameTo(dest); 
    File.renameTo(dest);
  28. 6、删除文件夹或文件
  29. view plaincopy to clipboardprint?
    File.delete(); 
    File.delete();
  30. view plaincopy to clipboardprint?
    package otheri.common;  
     
    import java.io.File;  
    import java.io.FileInputStream;  
    import java.io.FileOutputStream;  
    import java.io.IOException;  
    import java.io.InputStream;  
    import java.io.OutputStream;  
     
    import otheri.io.Input;  
    import otheri.io.Output;  
    import android.content.Context;  
    import android.os.Environment;  
     
    public class FileHelper {  
        private Context context;  
        private String SDPATH;  
        private String FILESPATH;  
     
        public FileHelper(Context context) {  
            this.context = context;  
            SDPATH = Environment.getExternalStorageDirectory().getPath() + "\";  
            FILESPATH = this.context.getFilesDir().getPath() + "\";  
        }  
     
         
        public File creatSDFile(String fileName) throws IOException {  
            File file = new File(SDPATH + fileName);  
            file.createNewFile();  
            return file;  
        }  
     
         
        public boolean delSDFile(String fileName) {  
            File file = new File(SDPATH + fileName);  
            if (file == null || !file.exists() || file.isDirectory())  
                return false;  
            file.delete();  
            return true;  
        }  
     
         
        public File creatSDDir(String dirName) {  
            File dir = new File(SDPATH + dirName);  
            dir.mkdir();  
            return dir;  
        }  
     
         
        public boolean delSDDir(String dirName) {  
            File dir = new File(SDPATH + dirName);  
            return delDir(dir);  
        }  
     
         
        public boolean renameSDFile(String oldfileName, String newFileName) {  
            File oleFile = new File(SDPATH + oldfileName);  
            File newFile = new File(SDPATH + newFileName);  
            return oleFile.renameTo(newFile);  
        }  
     
         
        public boolean copySDFileTo(String srcFileName, String destFileName)  
                throws IOException {  
            File srcFile = new File(SDPATH + srcFileName);  
            File destFile = new File(SDPATH + destFileName);  
            return copyFileTo(srcFile, destFile);  
        }  
     
         
        public boolean copySDFilesTo(String srcDirName, String destDirName)  
                throws IOException {  
            File srcDir = new File(SDPATH + srcDirName);  
            File destDir = new File(SDPATH + destDirName);  
            return copyFilesTo(srcDir, destDir);  
        }  
     
         
        public boolean moveSDFileTo(String srcFileName, String destFileName)  
                throws IOException {  
            File srcFile = new File(SDPATH + srcFileName);  
            File destFile = new File(SDPATH + destFileName);  
            return moveFileTo(srcFile, destFile);  
        }  
     
         
        public boolean moveSDFilesTo(String srcDirName, String destDirName)  
                throws IOException {  
            File srcDir = new File(SDPATH + srcDirName);  
            File destDir = new File(SDPATH + destDirName);  
            return moveFilesTo(srcDir, destDir);  
        }  
     
     
         
        public Output writeSDFile(String fileName) throws IOException {  
            File file = new File(SDPATH + fileName);  
            FileOutputStream fos = new FileOutputStream(file);  
            return new Output(fos);  
        }  
     
         
        public Output appendSDFile(String fileName) throws IOException {  
            File file = new File(SDPATH + fileName);  
            FileOutputStream fos = new FileOutputStream(file, true);  
            return new Output(fos);  
        }  
     
         
        public Input readSDFile(String fileName) throws IOException {  
            File file = new File(SDPATH + fileName);  
            FileInputStream fis = new FileInputStream(file);  
            return new Input(fis);  
        }  
          
          
         
        public File creatDataFile(String fileName) throws IOException {  
            File file = new File(FILESPATH + fileName);  
            file.createNewFile();  
            return file;  
        }  
     
         
        public File creatDataDir(String dirName) {  
            File dir = new File(FILESPATH + dirName);  
            dir.mkdir();  
            return dir;  
        }  
     
         
        public boolean delDataFile(String fileName) {  
            File file = new File(FILESPATH + fileName);  
            return delFile(file);  
        }  
     
         
        public boolean delDataDir(String dirName) {  
            File file = new File(FILESPATH + dirName);  
            return delDir(file);  
        }  
     
         
        public boolean renameDataFile(String oldName, String newName) {  
            File oldFile = new File(FILESPATH + oldName);  
            File newFile = new File(FILESPATH + newName);  
            return oldFile.renameTo(newFile);  
        }  
     
         
        public boolean copyDataFileTo(String srcFileName, String destFileName)  
                throws IOException {  
            File srcFile = new File(FILESPATH + srcFileName);  
            File destFile = new File(FILESPATH + destFileName);  
            return copyFileTo(srcFile, destFile);  
        }  
     
         
        public boolean copyDataFilesTo(String srcDirName, String destDirName)  
                throws IOException {  
            File srcDir = new File(FILESPATH + srcDirName);  
            File destDir = new File(FILESPATH + destDirName);  
            return copyFilesTo(srcDir, destDir);  
        }  
     
         
        public boolean moveDataFileTo(String srcFileName, String destFileName)  
                throws IOException {  
            File srcFile = new File(FILESPATH + srcFileName);  
            File destFile = new File(FILESPATH + destFileName);  
            return moveFileTo(srcFile, destFile);  
        }  
     
         
        public boolean moveDataFilesTo(String srcDirName, String destDirName)  
                throws IOException {  
            File srcDir = new File(FILESPATH + srcDirName);  
            File destDir = new File(FILESPATH + destDirName);  
            return moveFilesTo(srcDir, destDir);  
        }  
     
         
        public Output wirteFile(String fileName) throws IOException {  
            OutputStream os = context.openFileOutput(fileName,  
                    Context.MODE_WORLD_WRITEABLE);  
            return new Output(os);  
        }  
     
         
        public Output appendFile(String fileName) throws IOException {  
            OutputStream os = context.openFileOutput(fileName, Context.MODE_APPEND);  
            return new Output(os);  
        }  
     
         
        public Input readFile(String fileName) throws IOException {  
            InputStream is = context.openFileInput(fileName);  
            return new Input(is);  
        }  
          
          
          
         
         
         */  
         
        public boolean delFile(File file) {  
            if (file.isDirectory())  
                return false;  
            return file.delete();  
        }  
     
         
        public boolean delDir(File dir) {  
            if (dir == null || !dir.exists() || dir.isFile()) {  
                return false;  
            }  
            for (File file : dir.listFiles()) {  
                if (file.isFile()) {  
                    file.delete();  
                } else if (file.isDirectory()) {  
                    delDir(file);// 递归  
                }  
            }  
            dir.delete();  
            return true;  
        }  
     
         
        public boolean copyFileTo(File srcFile, File destFile) throws IOException {  
            if (srcFile.isDirectory() || destFile.isDirectory())  
                return false;// 判断是否是文件  
            FileInputStream fis = new FileInputStream(srcFile);  
            FileOutputStream fos = new FileOutputStream(destFile);  
            int readLen = 0;  
            byte[] buf = new byte[1024];  
            while ((readLen = fis.read(buf)) != -1) {  
                fos.write(buf, 0, readLen);  
            }  
            fos.flush();  
            fos.close();  
            fis.close();  
            return true;  
        }  
     
         
        public boolean copyFilesTo(File srcDir, File destDir) throws IOException {  
            if (!srcDir.isDirectory() || !destDir.isDirectory())  
                return false;// 判断是否是目录  
            if (!destDir.exists())  
                return false;// 判断目标目录是否存在  
            File[] srcFiles = srcDir.listFiles();  
            for (int i = 0; i &lt; srcFiles.length; i++) {  
                if (srcFiles[i].isFile()) {  
                    // 获得目标文件  
                    File destFile = new File(destDir.getPath() + "\" 
                            + srcFiles[i].getName());  
                    copyFileTo(srcFiles[i], destFile);  
                } else if (srcFiles[i].isDirectory()) {  
                    File theDestDir = new File(destDir.getPath() + "\" 
                            + srcFiles[i].getName());  
                    copyFilesTo(srcFiles[i], theDestDir);  
                }  
            }  
            return true;  
        }  
     
         
        public boolean moveFileTo(File srcFile, File destFile) throws IOException {  
            boolean iscopy = copyFileTo(srcFile, destFile);  
            if (!iscopy)  
                return false;  
            delFile(srcFile);  
            return true;  
        }  
     
         
        public boolean moveFilesTo(File srcDir, File destDir) throws IOException {  
            if (!srcDir.isDirectory() || !destDir.isDirectory()) {  
                return false;  
            }  
            File[] srcDirFiles = srcDir.listFiles();  
            for (int i = 0; i &lt; srcDirFiles.length; i++) {  
                if (srcDirFiles[i].isFile()) {  
                    File oneDestFile = new File(destDir.getPath() + "\" 
                            + srcDirFiles[i].getName());  
                    moveFileTo(srcDirFiles[i], oneDestFile);  
                    delFile(srcDirFiles[i]);  
                } else if (srcDirFiles[i].isDirectory()) {  
                    File oneDestFile = new File(destDir.getPath() + "\" 
                            + srcDirFiles[i].getName());  
                    moveFilesTo(srcDirFiles[i], oneDestFile);  
                    delDir(srcDirFiles[i]);  
                }  
     
            }  
            return true;  
        }  

    package otheri.common;
  31. import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
  32. import otheri.io.Input;
    import otheri.io.Output;
    import android.content.Context;
    import android.os.Environment;
  33. public class FileHelper {
     private Context context;
     private String SDPATH;
     private String FILESPATH;
  34.  public FileHelper(Context context) {
      this.context = context;
      SDPATH = Environment.getExternalStorageDirectory().getPath() + "\";
      FILESPATH = this.context.getFilesDir().getPath() + "\";
     }
  35.  
     public File creatSDFile(String fileName) throws IOException {
      File file = new File(SDPATH + fileName);
      file.createNewFile();
      return file;
     }
  36.  
     public boolean delSDFile(String fileName) {
      File file = new File(SDPATH + fileName);
      if (file == null || !file.exists() || file.isDirectory())
       return false;
      file.delete();
      return true;
     }
  37.  
     public File creatSDDir(String dirName) {
      File dir = new File(SDPATH + dirName);
      dir.mkdir();
      return dir;
     }
  38.  
     public boolean delSDDir(String dirName) {
      File dir = new File(SDPATH + dirName);
      return delDir(dir);
     }
  39.  
     public boolean renameSDFile(String oldfileName, String newFileName) {
      File oleFile = new File(SDPATH + oldfileName);
      File newFile = new File(SDPATH + newFileName);
      return oleFile.renameTo(newFile);
     }
  40.  
     public boolean copySDFileTo(String srcFileName, String destFileName)
       throws IOException {
      File srcFile = new File(SDPATH + srcFileName);
      File destFile = new File(SDPATH + destFileName);
      return copyFileTo(srcFile, destFile);
     }
  41.  
     public boolean copySDFilesTo(String srcDirName, String destDirName)
       throws IOException {
      File srcDir = new File(SDPATH + srcDirName);
      File destDir = new File(SDPATH + destDirName);
      return copyFilesTo(srcDir, destDir);
     }
  42.  
     public boolean moveSDFileTo(String srcFileName, String destFileName)
       throws IOException {
      File srcFile = new File(SDPATH + srcFileName);
      File destFile = new File(SDPATH + destFileName);
      return moveFileTo(srcFile, destFile);
     }
  43.  
     public boolean moveSDFilesTo(String srcDirName, String destDirName)
       throws IOException {
      File srcDir = new File(SDPATH + srcDirName);
      File destDir = new File(SDPATH + destDirName);
      return moveFilesTo(srcDir, destDir);
     }

  44.  
     public Output writeSDFile(String fileName) throws IOException {
      File file = new File(SDPATH + fileName);
      FileOutputStream fos = new FileOutputStream(file);
      return new Output(fos);
     }
  45.  
     public Output appendSDFile(String fileName) throws IOException {
      File file = new File(SDPATH + fileName);
      FileOutputStream fos = new FileOutputStream(file, true);
      return new Output(fos);
     }
  46.  
     public Input readSDFile(String fileName) throws IOException {
      File file = new File(SDPATH + fileName);
      FileInputStream fis = new FileInputStream(file);
      return new Input(fis);
     }
     
     
     
     public File creatDataFile(String fileName) throws IOException {
      File file = new File(FILESPATH + fileName);
      file.createNewFile();
      return file;
     }
  47.  
     public File creatDataDir(String dirName) {
      File dir = new File(FILESPATH + dirName);
      dir.mkdir();
      return dir;
     }
  48.  
     public boolean delDataFile(String fileName) {
      File file = new File(FILESPATH + fileName);
      return delFile(file);
     }
  49.  
     public boolean delDataDir(String dirName) {
      File file = new File(FILESPATH + dirName);
      return delDir(file);
     }
  50.  
     public boolean renameDataFile(String oldName, String newName) {
      File oldFile = new File(FILESPATH + oldName);
      File newFile = new File(FILESPATH + newName);
      return oldFile.renameTo(newFile);
     }
  51.  
     public boolean copyDataFileTo(String srcFileName, String destFileName)
       throws IOException {
      File srcFile = new File(FILESPATH + srcFileName);
      File destFile = new File(FILESPATH + destFileName);
      return copyFileTo(srcFile, destFile);
     }
  52.  
     public boolean copyDataFilesTo(String srcDirName, String destDirName)
       throws IOException {
      File srcDir = new File(FILESPATH + srcDirName);
      File destDir = new File(FILESPATH + destDirName);
      return copyFilesTo(srcDir, destDir);
     }
  53.  
     public boolean moveDataFileTo(String srcFileName, String destFileName)
       throws IOException {
      File srcFile = new File(FILESPATH + srcFileName);
      File destFile = new File(FILESPATH + destFileName);
      return moveFileTo(srcFile, destFile);
     }
  54.  
     public boolean moveDataFilesTo(String srcDirName, String destDirName)
       throws IOException {
      File srcDir = new File(FILESPATH + srcDirName);
      File destDir = new File(FILESPATH + destDirName);
      return moveFilesTo(srcDir, destDir);
     }
  55.  
     public Output wirteFile(String fileName) throws IOException {
      OutputStream os = context.openFileOutput(fileName,
        Context.MODE_WORLD_WRITEABLE);
      return new Output(os);
     }
  56.  
     public Output appendFile(String fileName) throws IOException {
      OutputStream os = context.openFileOutput(fileName, Context.MODE_APPEND);
      return new Output(os);
     }
  57.  
     public Input readFile(String fileName) throws IOException {
      InputStream is = context.openFileInput(fileName);
      return new Input(is);
     }
     
     
     
     
     
      */
     
     public boolean delFile(File file) {
      if (file.isDirectory())
       return false;
      return file.delete();
     }
  58.  
     public boolean delDir(File dir) {
      if (dir == null || !dir.exists() || dir.isFile()) {
       return false;
      }
      for (File file : dir.listFiles()) {
       if (file.isFile()) {
        file.delete();
       } else if (file.isDirectory()) {
        delDir(file);// 递归
       }
      }
      dir.delete();
      return true;
     }
  59.  
     public boolean copyFileTo(File srcFile, File destFile) throws IOException {
      if (srcFile.isDirectory() || destFile.isDirectory())
       return false;// 判断是否是文件
      FileInputStream fis = new FileInputStream(srcFile);
      FileOutputStream fos = new FileOutputStream(destFile);
      int readLen = 0;
      byte[] buf = new byte[1024];
      while ((readLen = fis.read(buf)) != -1) {
       fos.write(buf, 0, readLen);
      }
      fos.flush();
      fos.close();
      fis.close();
      return true;
     }
  60.  
     public boolean copyFilesTo(File srcDir, File destDir) throws IOException {
      if (!srcDir.isDirectory() || !destDir.isDirectory())
       return false;// 判断是否是目录
      if (!destDir.exists())
       return false;// 判断目标目录是否存在
      File[] srcFiles = srcDir.listFiles();
      for (int i = 0; i &lt; srcFiles.length; i++) {
       if (srcFiles[i].isFile()) {
        // 获得目标文件
        File destFile = new File(destDir.getPath() + "\"
          + srcFiles[i].getName());
        copyFileTo(srcFiles[i], destFile);
       } else if (srcFiles[i].isDirectory()) {
        File theDestDir = new File(destDir.getPath() + "\"
          + srcFiles[i].getName());
        copyFilesTo(srcFiles[i], theDestDir);
       }
      }
      return true;
     }
  61.  
     public boolean moveFileTo(File srcFile, File destFile) throws IOException {
      boolean iscopy = copyFileTo(srcFile, destFile);
      if (!iscopy)
       return false;
      delFile(srcFile);
      return true;
     }
  62.  
     public boolean moveFilesTo(File srcDir, File destDir) throws IOException {
      if (!srcDir.isDirectory() || !destDir.isDirectory()) {
       return false;
      }
      File[] srcDirFiles = srcDir.listFiles();
      for (int i = 0; i &lt; srcDirFiles.length; i++) {
       if (srcDirFiles[i].isFile()) {
        File oneDestFile = new File(destDir.getPath() + "\"
          + srcDirFiles[i].getName());
        moveFileTo(srcDirFiles[i], oneDestFile);
        delFile(srcDirFiles[i]);
       } else if (srcDirFiles[i].isDirectory()) {
        File oneDestFile = new File(destDir.getPath() + "\"
          + srcDirFiles[i].getName());
        moveFilesTo(srcDirFiles[i], oneDestFile);
        delDir(srcDirFiles[i]);
       }
  63.   }
      return true;
     }
    }
     
  64. getPath与getAbsoultePath的区别:
  65. getAbsolutePath():返回抽象路径名的绝对路径名字符串。
  66. view plaincopy to clipboardprint?
    public static void test1(){  
            File file1 = new File(".\\test1.txt");  
            File file2 = new File("D:\\workspace\\test\\test1.txt");  
            System.out.println("-----默认相对路径:取得路径不同------");  
            System.out.println(file1.getPath());  
            System.out.println(file1.getAbsolutePath());  
            System.out.println("-----默认绝对路径:取得路径相同------");  
            System.out.println(file2.getPath());  
            System.out.println(file2.getAbsolutePath());  
              
        }  
     
    -----默认相对路径:取得路径不同------  
    .\test1.txt  
    D:\workspace\test\.\test1.txt  
    -----默认绝对路径:取得路径相同------  
    D:\workspace\test\test1.txt  
    D:\workspace\test\test1.txt  
     
    ----------------------------------------------------  
     
    public static void test2() throws Exception{  
            File file = new File("..\\src\\test1.txt");  
            System.out.println(file.getAbsolutePath());  
            System.out.println(file.getCanonicalPath());  
        }  
    D:\workspace\test\..\src\test1.txt  
    D:\workspace\src\test1.txt  
     
    --------------------------------------------  
    public static void test3() throws Exception{  
            File file = new File("D:\\Text.txt");  
            System.out.println(file.getCanonicalPath()); 

 

(引自: http://blog.csdn.net/fenghome/archive/2010/06/13/5668598.aspx)

android文件架构详解 cache : 是缓存临时文件夹,据说是除了T-mobile的OTA更新外,别无用处。 红色标记的两个文件是debug模式下产生的 data : 存放用户安装的软件以及各种数据。 default.prop : 默认配置文件 dev : 设备节点文件的存放地 etc : 指向 /system/etc ,配置文件存放目录 init : 系统启动到文件系统的时候第一个运行的程序。 init.goldfish.rc : 初始化文件 init.rc : 初始化文件 proc : /proc文件系统下的多种文件提供的系统信息不是针对某个特定进程的,而是能够在整个系统范围的上下文中使用。 root : 为空 。 sbin: 只放了一个用於调试的adbd程序 sdcard: 是SD卡中的FAT32文件系统挂载的目录 sqlite_stmt_journals: 一个根目录下的tmpfs文件系统,用於存放临时文件数据。 sys : 用於挂载 sysfs文件系统。 在设备模型中,sysfs文件系统用来表示设备的结构.将设备的层次结构形象的反应到用户空间中.用户空间可以修改sysfs中的文件属性来修改设备的属性值 system :系统中的大部分东西都在这各目录下,很重要的一个目录文件 system目录是在Android文件系统占有及其重要的位置,基本上所有的工具和应用程序都在这个目录下,我看来是一个真正的rootfs。他在Android手机中存放在nandflash的 mtd3中,是一个yaffs2文件系统,在启动时被挂载在root的/system目录下,其中包含有: # ls -a -l /system drwxr-xr-x root 208 1970-01-01 08:00 xbin drwxr-xr-x root root 1970-01-01 08:00 modules drwxr-xr-x root root 2010-06-23 09:39 framework drwxr-xr-x root root 2010-06-23 09:39 fonts drwxr-xr-x root root 2010-06-23 09:39 etc -rw-r--r-- root root 2197 2010-06-23 09:39 build.prop drwxr-xr-x root root 2010-06-23 09:39 media drwxr-xr-x root shell 2010-06-23 09:39 bin drwxr-xr-x root root 2010-06-23 09:39 usr drwxr-xr-x root root 2010-06-23 09:39 app drwxr-xr-x root root 2010-06-23 09:39 lost+found drwxr-xr-x root root 2010-06-23 09:39 lib drwxr-xr-x root root 2010-06-23 09:39 sd -rw-r--r-- root root 1452010-06-23 09:39 init.rc # xbin :下放了很多系统管理工具,这些工具不是到toolbox的链接,每个都是可执行程序。如果你看到这些命令你会发现他们根本不常用,他们都是为系统管理员准备的,是一些系统管理和配置工具。这个文件夹的作用相当於标准Linux文件系统中的 /sbin。 modules:使用来存放内核模块(主要是fs和net)和模块配置文件的地方。 framework: 是JAVA平台的一些核心文件,属於JAVA平台系统框架文件。里面的文件都是.jar和.odex文件。 备注:什么是odex文件? odex是被优化过的JAVA程序文件,体积通常是.jar的4倍左右。执行效率比.jar高。 fonts :字体库文件的存放目录。 etc :这里存放了系统中几乎所有的配置文件,根目录下的/etc就链结於此。 build.prop :是一个属性文件,在Android系统中.prop文件很重要,记录了系统的设置和改变,类似於/etc中的文件。 media :里面主要是存放了系统的铃声的,分为 notifications(通知)、ui(界面)、alarms(警告)和ringtones(铃声),里面都是.ogg音频文件。 bin :是存放用户常用的工具程序的,其中大部分是到toolbox的链接(类似嵌入式Linux中的busybox)。toolbox应该是 google简化版的busybox。 usr :用户的配置文件,如键盘布局、共享、时区文件等等。您可以cat 来看看。 app :存放的是Android系统自带的JAVA应用程序。 lost+found :yaffs文件系统固有的,类似回收站的文件夹,只有是yaffs文件系统都会有。 lib :存放几乎所有的共享库(.so)文件。 sd :SD卡中的EXT2分区的挂载目录 init.rc :一个初始化脚本,用於将/system/modules和/system/xbin挂载为cramfs,避免系统被无意破坏
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值