Android 各分区解释

1.系统自带分区

system:系统分区.我们刷机器一般就是刷的这个分区.

userdata:数据分区.

cache:缓存分区

recovery:Recovery分区,相当于建立在hboot与android系统间的一个中间层,如名字一般,主要用于系统调试和恢复。.

boot: 存放内核和ramdisk的分区.

hboot:这个是SPL所在的分区,即bootloader

radio:这个是无线所在的分区,即基带所在分区

根据我的理解,在刷机的时候,主要更改的是system分区,即 /System;刷固件刷的是radio和recovery,此时我才知道radio和基带原来是一个东西!!

2.与Linux的区别

我用过Ubuntu一段时间,个人感觉确实很相似;

在linux下的根目录的文件:

[big@localhost ]$ ls /
bin   dev  home  lib64       media  opt   root  selinux  sys  usr
boot  etc  lib   lost+found  mnt    proc  sbin  srv      tmp  var

在linux下,/boot可以单独挂载一个200M左右的分区上,事实上很多都这样做,作用与google中的boot作用是一样的;tmp和google中的cache作用一样;

但是在android中,/System内又有一个完整的目录结构,至于内外两层的具体分工,额还不了解...

3.贴一下 update-script (HTC Round)

这个还需慢慢琢磨,ROM中的位置为  META-INF\com\google\android 


assert(getprop("ro.product.device") == "vigor" || getprop("ro.build.product") == "vigor" || getprop("ro.product.board") == "vigor");
ui_print("");
ui_print("");
ui_print("----------------------------------------------");
ui_print("       qc26 sense4.1 odex gsm rom  13/03/16   ");
ui_print("----------------------------------------------");
ui_print("");
ui_print("");
show_progress(0.4, 0);
ui_print("_______________________________________________");
ui_print("___________.....Please_waiting.....____________");
ui_print("_______________________________________________");
ui_print("");
ui_print("");

ui_print("-> Formatting /System EXT4");
unmount("/System");
format("ext4", "EMMC", "/dev/block/mmcblk0p29");

ui_print("-> Formatting /data EXT4");
unmount("/data");
format("ext4", "EMMC", "/dev/block/mmcblk0p35");

delete_recursive("/data/dalvik-cache");
delete_recursive("/data/dalvik-cache");
delete_recursive("/data/dalvik-cache");
delete_recursive("/data/dalvik-cache");
delete_recursive("/data/boot-cache");
delete_recursive("/data/agent");
delete_recursive("/data/anr");
delete_recursive("/data/app-cache");
delete_recursive("/data/backup");
delete_recursive("/data/com.android.browser/app_databases");
delete_recursive("/data/com.android.browser/app_geolocation/CachedPosition.db");
delete_recursive("/data/com.android.browser/app_icons");
delete_recursive("/data/com.android.email/cache");
delete_recursive("/data/com.android.htccontacts/cache");
delete_recursive("/data/com.android.htccontacts/databases/webviewCache.db");
delete_recursive("/data/com.android.mms/cache");
delete_recursive("/data/com.android.mms/bufferFileForMms");
delete_recursive("/data/com.androidapps.spare_parts/cache");
delete_recursive("/data/com.androidapps.spare_parts/databases/webviewCache.db");
delete_recursive("/data/com.ebay.mobile/cache");
delete_recursive("/data/com.facebook.katana/cache");
delete_recursive("/data/com.google.android.apps.gtalkservice/files/sslcache");
delete_recursive("/data/com.google.android.apps.maps/cache");
delete_recursive("/data/com.google.android.apps.maps/databases/webviewCache.db");
delete_recursive("/data/com.google.android.apps.providers.gmail/files/sslcache");
delete_recursive("/data/com.google.android.apps.providers.subscribedfeeds/files/sslcache");
delete_recursive("/data/com.google.android.location/files");
delete_recursive("/data/com.htc.album/cache");
delete_recursive("/data/com.htc.friendstream/cache");
delete_recursive("/data/com.htc.launcher/cache");
delete_recursive("/data/com.htc.socialnetwork.facebook/cache");
delete_recursive("/data/com.noshufou.android.su/cache");
delete_recursive("/data/com.pandora.android/cache");
delete_recursive("/data/dontpanic");
delete_recursive("/data/local/tmp");
delete_recursive("/data/lost+found");
delete_recursive("/data/misc/agent_htc");
delete_recursive("/data/misc/wimax");
delete_recursive("/data/property");
delete_recursive("/data/system/dropbox");
delete_recursive("/data/system/throttle");
delete_recursive("/data/system/usagestats");
delete_recursive("/data/batterystats.bin");
delete_recursive("/data/batterystats.bin");
delete_recursive("/data/batterystats.bin");
delete_recursive("/data/system/uiderrors.txt");
delete_recursive("/data/tombstones");
delete_recursive("/data/wimax");
delete_recursive("/sdcard/.android_secure");
delete_recursive("/sdcard/.bookmark_thumb1");
delete_recursive("/sdcard/. easc");
delete_recursive("/sdcard/.footprints");
delete_recursive("/sdcard/.Mail");
delete_recursive("/sdcard/albumthumbs");
delete_recursive("/sdcard/DCIM/.thumbnails");
delete_recursive("/sdcard/LOST.DIR");
delete_recursive("/sdcard/rosie_scroll");
delete_recursive("/sdcard/rssreader");
delete_recursive("/sdcard/tmp");
delete_recursive("/sdcard/.data");
delete_recursive("/sdcard/.fseventsd");
delete_recursive("/sdcard/.quickoffice");
delete_recursive("/sdcard/.TemporaryItems");
delete_recursive("/sdcard/.Trashes");
delete_recursive("/sdcard/com.ebay.mobile.DivertedLogging.txt");
delete_recursive("/sdcard/LazyList");

show_progress(0.400000, 30);
ui_print("-> Mount System");
run_program("/sbin/tune2fs", "-m", "0", "/dev/block/mmcblk0p29");
mount("ext4", "EMMC", "/dev/block/mmcblk0p29", "/system");
package_extract_dir("system", "/system");

ui_print("-> Mount Data");
mount("ext4", "EMMC", "/dev/block/mmcblk0p35", "/data");
package_extract_dir("data", "/data");

ui_print("-> Setting symlinks");

symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/chownto");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/dmesg");
symlink("dumpstate", "/system/bin/dumpcrash");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/getprop");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/ln");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/mkdir");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/mv");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/setprop");
symlink("/system/bin/mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/wipe");
symlink("busybox", "/system/xbin/arp");
symlink("busybox", "/system/xbin/ash");
symlink("busybox", "/system/xbin/awk");
symlink("busybox", "/system/xbin/basename");
symlink("busybox", "/system/xbin/bbconfig");
symlink("busybox", "/system/xbin/brctl");
symlink("busybox", "/system/xbin/bunzip2");
symlink("busybox", "/system/xbin/bzcat");
symlink("busybox", "/system/xbin/bzip2");
symlink("busybox", "/system/xbin/cal");
symlink("busybox", "/system/xbin/cat");
symlink("busybox", "/system/xbin/catv");
symlink("busybox", "/system/xbin/chgrp");
symlink("busybox", "/system/xbin/chmod");
symlink("busybox", "/system/xbin/chown");
symlink("busybox", "/system/xbin/chroot");
symlink("busybox", "/system/xbin/cksum");
symlink("busybox", "/system/xbin/clear");
symlink("busybox", "/system/xbin/cmp");
symlink("busybox", "/system/xbin/cp");
symlink("busybox", "/system/xbin/cpio");
symlink("busybox", "/system/xbin/cut");
symlink("busybox", "/system/xbin/date");
symlink("busybox", "/system/xbin/dc");
symlink("busybox", "/system/xbin/dd");
symlink("busybox", "/system/xbin/depmod");
symlink("busybox", "/system/xbin/devmem");
symlink("busybox", "/system/xbin/df");
symlink("busybox", "/system/xbin/diff");
symlink("busybox", "/system/xbin/dirname");
symlink("busybox", "/system/xbin/dmesg");
symlink("busybox", "/system/xbin/dnsd");
symlink("busybox", "/system/xbin/dos2unix");
symlink("busybox", "/system/xbin/du");
symlink("busybox", "/system/xbin/echo");
symlink("busybox", "/system/xbin/ed");
symlink("busybox", "/system/xbin/egrep");
symlink("busybox", "/system/xbin/env");
symlink("busybox", "/system/xbin/expr");
symlink("busybox", "/system/xbin/false");
symlink("busybox", "/system/xbin/fdisk");
symlink("busybox", "/system/xbin/fgrep");
symlink("busybox", "/system/xbin/find");
symlink("busybox", "/system/xbin/fold");
symlink("busybox", "/system/xbin/free");
symlink("busybox", "/system/xbin/freeramdisk");
symlink("busybox", "/system/xbin/fuser");
symlink("busybox", "/system/xbin/getopt");
symlink("busybox", "/system/xbin/grep");
symlink("busybox", "/system/xbin/gunzip");
symlink("busybox", "/system/xbin/gzip");
symlink("busybox", "/system/xbin/head");
symlink("busybox", "/system/xbin/hexdump");
symlink("busybox", "/system/xbin/id");
symlink("busybox", "/system/xbin/ifconfig");
symlink("busybox", "/system/xbin/insmod");
symlink("busybox", "/system/xbin/install");
symlink("busybox", "/system/xbin/ip");
symlink("busybox", "/system/xbin/kill");
symlink("busybox", "/system/xbin/killall");
symlink("busybox", "/system/xbin/killall5");
symlink("busybox", "/system/xbin/length");
symlink("busybox", "/system/xbin/less");
symlink("busybox", "/system/xbin/ln");
symlink("busybox", "/system/xbin/losetup");
symlink("busybox", "/system/xbin/ls");
symlink("busybox", "/system/xbin/lsmod");
symlink("busybox", "/system/xbin/lspci");
symlink("busybox", "/system/xbin/lsusb");
symlink("busybox", "/system/xbin/lzop");
symlink("busybox", "/system/xbin/lzopcat");
symlink("busybox", "/system/xbin/md5sum");
symlink("busybox", "/system/xbin/mkdir");
symlink("busybox", "/system/xbin/mke2fs");
symlink("busybox", "/system/xbin/mkfifo");
symlink("busybox", "/system/xbin/mkfs.ext2");
symlink("busybox", "/system/xbin/mknod");
symlink("busybox", "/system/xbin/mkswap");
symlink("busybox", "/system/xbin/mktemp");
symlink("busybox", "/system/xbin/modprobe");
symlink("busybox", "/system/xbin/more");
symlink("busybox", "/system/xbin/mount");
symlink("busybox", "/system/xbin/mountpoint");
symlink("busybox", "/system/xbin/mv");
symlink("busybox", "/system/xbin/netstat");
symlink("busybox", "/system/xbin/nice");
symlink("busybox", "/system/xbin/nohup");
symlink("busybox", "/system/xbin/nslookup");
symlink("busybox", "/system/xbin/ntpd");
symlink("busybox", "/system/xbin/od");
symlink("busybox", "/system/xbin/patch");
symlink("busybox", "/system/xbin/pgrep");
symlink("busybox", "/system/xbin/pidof");
symlink("busybox", "/system/xbin/ping");
symlink("busybox", "/system/xbin/pkill");
symlink("busybox", "/system/xbin/printenv");
symlink("busybox", "/system/xbin/printf");
symlink("busybox", "/system/xbin/ps");
symlink("busybox", "/system/xbin/pwd");
symlink("busybox", "/system/xbin/rdev");
symlink("busybox", "/system/xbin/readlink");
symlink("busybox", "/system/xbin/realpath");
symlink("busybox", "/system/xbin/renice");
symlink("busybox", "/system/xbin/reset");
symlink("busybox", "/system/xbin/rm");
symlink("busybox", "/system/xbin/rmdir");
symlink("busybox", "/system/xbin/rmmod");
symlink("busybox", "/system/xbin/route");
symlink("busybox", "/system/xbin/run-parts");
symlink("busybox", "/system/xbin/sed");
symlink("busybox", "/system/xbin/seq");
symlink("busybox", "/system/xbin/setsid");
symlink("busybox", "/system/xbin/sh");
symlink("busybox", "/system/xbin/sha1sum");
symlink("busybox", "/system/xbin/sha256sum");
symlink("busybox", "/system/xbin/sha512sum");
symlink("busybox", "/system/xbin/sleep");
symlink("busybox", "/system/xbin/sort");
symlink("busybox", "/system/xbin/split");
symlink("busybox", "/system/xbin/stat");
symlink("busybox", "/system/xbin/strings");
symlink("busybox", "/system/xbin/stty");
symlink("busybox", "/system/xbin/swapoff");
symlink("busybox", "/system/xbin/swapon");
symlink("busybox", "/system/xbin/sync");
symlink("busybox", "/system/xbin/sysctl");
symlink("busybox", "/system/xbin/tac");
symlink("busybox", "/system/xbin/tail");
symlink("busybox", "/system/xbin/tar");
symlink("busybox", "/system/xbin/tee");
symlink("busybox", "/system/xbin/telnet");
symlink("busybox", "/system/xbin/test");
symlink("busybox", "/system/xbin/tftp");
symlink("busybox", "/system/xbin/time");
symlink("busybox", "/system/xbin/top");
symlink("busybox", "/system/xbin/touch");
symlink("busybox", "/system/xbin/tr");
symlink("busybox", "/system/xbin/traceroute");
symlink("busybox", "/system/xbin/true");
symlink("busybox", "/system/xbin/tty");
symlink("busybox", "/system/xbin/tune2fs");
symlink("busybox", "/system/xbin/umount");
symlink("busybox", "/system/xbin/uname");
symlink("busybox", "/system/xbin/uniq");
symlink("busybox", "/system/xbin/unix2dos");
symlink("busybox", "/system/xbin/unlzop");
symlink("busybox", "/system/xbin/unzip");
symlink("busybox", "/system/xbin/uptime");
symlink("busybox", "/system/xbin/usleep");
symlink("busybox", "/system/xbin/uudecode");
symlink("busybox", "/system/xbin/uuencode");
symlink("busybox", "/system/xbin/vi");
symlink("busybox", "/system/xbin/watch");
symlink("busybox", "/system/xbin/wc");
symlink("busybox", "/system/xbin/which");
symlink("busybox", "/system/xbin/whoami");
symlink("busybox", "/system/xbin/xargs");
symlink("busybox", "/system/xbin/yes");
symlink("busybox", "/system/xbin/zcat");
symlink("busybox", "/system/xbin/[");
symlink("busybox", "/system/xbin/[[");

ui_print("-> Installing busybox");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");

ui_print("-> Setting permissions");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/app");
set_perm(0, 0, 0644, "/system/app/SuperSU.apk");
set_perm(0, 0, 0644, "/system/app/SuperSU.odex");
set_perm(0, 0, 0644, "/system/app/SuperSUpro.apk");
set_perm(0, 0, 0644, "/system/app/SuperSUpro.odex");

set_perm(1000, 1000, 0771, "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/local");
set_perm_recursive(1000, 1000, 0777, 0777, "/data/misc");
set_perm(0, 0, 0755, 0755, "/system/xbin/andrev_oc");

set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/.ext");
set_perm(0, 0, 06755, "/system/bin/.ext/.su");
set_perm(0, 3003, 06755, "/system/bin/ip");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
symlink("/system/bin/bash", "/system/bin/sh");
set_perm(1000, 1000, 0755, "/system/bin/bash");
set_perm(1000, 1000, 0755, "/system/xbin/sysro");
set_perm(1000, 1000, 0755, "/system/xbin/sysrw");
set_perm(0, 0, 0755, 0555, "/system/bin/swap");
set_perm(0, 0, 04755, "/system/bin/sh");
set_perm(0, 0, 0777, "/system/bin/zipalign");
symlink("/system/bin/mksh", "/system/bin/sh");
set_perm(0, 2000, 0755, "/system/bin/seeder");
set_perm(0, 2000, 0755, "/system/bin/sysinit");
set_perm(0, 0, 06755, "/system/bin/su");

set_perm(0, 0, 0755, "/system/etc/mkshrc");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 0, 0755, "/system/etc/be_movie");
set_perm(0, 0, 0755, "/system/etc/be_photo");
set_perm(0, 0, 0755, "/system/etc/sysctl.conf");
set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm(0, 2000, 0550, "/system/etc/init.qcom.bt.sh");
set_perm(0, 2000, 0550, "/system/etc/init.qcom.coex.sh");
set_perm(0, 2000, 0550, "/system/etc/init.qcom.dsps_links.sh");
set_perm(0, 2000, 0550, "/system/etc/init.qcom.fm.sh");
set_perm(0, 2000, 0550, "/system/etc/init.qcom.modem_links.sh");
set_perm(0, 2000, 0550, "/system/etc/init.qcom.post_boot.sh");
set_perm(0, 2000, 0550, "/system/etc/init.qcom.q6_links.sh");
set_perm(0, 2000, 0550, "/system/etc/init.qcom.radio_links.sh");
set_perm(0, 2000, 0550, "/system/etc/init.qcom.sdio.sh");
set_perm(0, 2000, 0550, "/system/etc/init.qcom.wcnss_links.sh");
set_perm(0, 2000, 0550, "/system/etc/init.qcom.wifi.sh");
set_perm(0, 0, 04755, "/system/etc/init.d/99complete");
set_perm(0, 0, 04755, "/system/etc/init.d/98tweaks");
set_perm(0, 0, 04755, "/system/etc/init.d/97cputweaks");
set_perm(0, 0, 04755, "/system/etc/init.d/96rngd");
set_perm(0, 0, 04755, "/system/etc/init.d/95disablefsync");
set_perm(0, 0, 04755, "/system/etc/init.d/93zipalign");
set_perm(0, 0, 04755, "/system/etc/init.d/90permissions");
set_perm(0, 0, 04755, "/system/etc/init.d/88zram");
set_perm(0, 0, 04755, "/system/etc/init.d/87battcalibration");
set_perm(0, 0, 04755, "/system/etc/init.d/85sqlite");
set_perm(0, 0, 04755, "/system/etc/init.d/69fstrim");
set_perm(0, 0, 04755, "/system/etc/init.d/40ext4tweaks");
set_perm(0, 0, 04755, "/system/etc/init.d/10cleanup_init_ram");
set_perm(0, 0, 04755, "/system/etc/init.d/08cleaner");
set_perm(0, 0, 04755, "/system/etc/init.d/07CFSK");
set_perm(0, 0, 04755, "/system/etc/init.d/03optiflags");
set_perm(0, 0, 04755, "/system/etc/init.d/01remount");
set_perm(0, 0, 04755, "/system/etc/init.d/00edt_tweaks");
set_perm(0, 0, 0777, "/system/etc/init.d/Juice_Kernel");
set_perm(0, 0, 0777, "/system/etc/init.d/Seeder");

set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(0, 0, 0644, "/system/etc/bluetooth/a2dp_avrcp.conf");

set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm(0, 0, 04755, "/system/etc/ppp/ip-up-vpn");

set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin/bb");
set_perm(1000, 1000, 0755, "/system/xbin/add-property-tag");
set_perm(1000, 1000, 0755, "/system/xbin/check-lost+found");
set_perm(1000, 1000, 0755, "/system/xbin/nano");
set_perm(1000, 1000, 0755, "/system/xbin/run-parts");
set_perm(1000, 1000, 0755, "/system/xbin/sleep");
set_perm(1000, 1000, 0755, "/system/xbin/zipalign");
set_perm(1000, 1000, 0755, "/system/xbin/zip");
set_perm(1000, 1000, 0755, "/system/xbin/wget");
set_perm(1000, 1000, 0755, "/system/xbin/wireless_modem");
set_perm(1000, 1000, 0755, "/system/xbin/vim");
set_perm(1000, 1000, 0755, "/system/xbin/unrar");
set_perm(0, 0, 04755, "/system/xbin/tcpdump");
set_perm(0, 2000, 0755, "/system/xbin/sqlite3");
set_perm(0, 2000, 0755, "/system/xbin/ssh");
set_perm(0, 0, 04755, "/system/xbin/sysro");
set_perm(0, 0, 04755, "/system/xbin/sysrw");
set_perm(0, 0, 04755, "/system/xbin/rw_boot");
set_perm(0, 0, 04755, "/system/xbin/ro_boot");
set_perm(0, 2000, 0755, "/system/xbin/rngd");
set_perm(0, 2000, 0755, "/system/xbin/openvpn");
set_perm(0, 2000, 0755, "/system/xbin/entro");
set_perm(0, 0, 04755, "/system/xbin/busybox");
set_perm(0, 0, 04755, "/system/xbin/7z");
set_perm(0, 0, 06755, "/system/xbin/su");
symlink("/system/xbin/su", "/system/bin/su");

symlink("/system/fonts/Roboto-Regular.ttf","/system/fonts/DroidSans.ttf");
symlink("/system/fonts/Roboto-Bold.ttf","/system/fonts/DroidSans-Bold.ttf");
symlink("/proc/calibration", "/system/etc/calibration");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");

set_perm(0, 2000, 0755, "/system/vendor");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/firmware");
set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/ext");
set_perm(0, 2000, 0755, "/system/vendor/ext");

ui_print("-> EXT4 Tweaks");
package_extract_dir("setup", "/tmp");
set_perm_recursive(0, 0, 0755, 0755, "/tmp");
run_program("/tmp/fsck.ext4", "-fy", "/dev/block/mmcblk0p29");
run_program("/tmp/mkfs.ext4", "-O", "^ext_attr,^has_journal,^huge_file", "-L", "SYSTEM", "-b", "4096", "-m", "0", "-F", "/dev/block/mmcblk0p29");
run_program("/tmp/tune2fs.ext4", "-c", "1", "-m", "0", "-o", "journal_data_writeback", "/dev/block/mmcblk0p29");
run_program("/tmp/fsck.ext4", "-Dfy", "/dev/block/mmcblk0p29");

ui_print("-> Installing Kernel");
assert(package_extract_file("Kernel/boot.img", "/tmp/boot.img"),
	write_raw_image("/tmp/boot.img", "boot"));

show_progress(0.100000, 1);
unmount("/data");
unmount("/system");

ui_print(" ");
ui_print("   ________________FINISHED_!______________ ");
ui_print("                                            ");
ui_print(" ");

show_progress(0.100000, 1);
run_program("/sbin/sleep", "5");
run_program("/sbin/reboot");





















http://wenku.baidu.com/view/2b0b05bffd0a79563c1e72c8.html

  • 1
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值