Comparte en Google+ que te gusta esto!!  Comparte en FaceBook que te gusta esto!!  Twittea que te gusta esto!
Enviar respuesta 
Tutorial Crea tus propios scripts de instalación, modifica los ya existentes....(novatos)

17-09-2013, 06:41 PM
Mensaje: #41
RE: Crea tus propios scripts de instalación, modifica los ya existentes....(novatos) | »Enlace directo«


Saludos....
Unas preguntillas.... con esta linea
package_extract_dir("system", "/system");

1º Supongamos que en la carpeta system del zip tengo 4 archivos....¿copia esos 4 archivos a la carpeta system del dispositivo, dejando los demas archivos del system del dispositivo intactos?

2º Si uno de los archivos a copiar ya existe en el system del dispositivo.... ¿lo sobreescribe?

Gracias y saludos Rolleyes



Firma de chujalt
Mensaje enviado desde mi PC usando un explorador web

A todos los usuarios que colaboran para que este foro sea cada vez mas grande
Imagen
Dar las gracias por este post! Cita este mensaje en tu respuesta

17-09-2013, 09:05 PM
Mensaje: #42
Crea tus propios scripts de instalación, modifica los ya existentes....(novatos) | »Enlace directo«


(17-09-2013 06:41 PM)chujalt escribió:  Saludos....
Unas preguntillas.... con esta linea
package_extract_dir("system", "/system");

1º Supongamos que en la carpeta system del zip tengo 4 archivos....¿copia esos 4 archivos a la carpeta system del dispositivo, dejando los demas archivos del system del dispositivo intactos?

2º Si uno de los archivos a copiar ya existe en el system del dispositivo.... ¿lo sobreescribe?

Gracias y saludos Rolleyes

Lo primero es si, incluso si tienes carpetas que no están en system, las creará, los demás los dejará totalmente intactos.

Lo segundo es si, los sobreescribe con los que hay en el zip.

Saludos! Sonrisa



Firma de PureMod
A todos los usuarios que hacen de esto foro un sitio mejor y único... GRACIAS!!

-->ATENCIÓN! Las "Normas del Foro" son para todo el mundo, léelas con atención!<--
-->Ayúdanos con el mantenimiento del foro haciendo tu donativo aquí!<--
Dar las gracias por este post! Cita este mensaje en tu respuesta

17-09-2013, 09:31 PM
Mensaje: #43
RE: Crea tus propios scripts de instalación, modifica los ya existentes....(novatos) | »Enlace directo«


Gracias @PureMod ..... como siempre, al pie del cañón..... un crack Guiño



Firma de chujalt
Mensaje enviado desde mi PC usando un explorador web

A todos los usuarios que colaboran para que este foro sea cada vez mas grande
Imagen
Dar las gracias por este post! Cita este mensaje en tu respuesta
[-] Los siguientes usuarios han dado las gracias a chujalt por este post:
PureMod (17-09-2013)

10-02-2014, 08:00 PM
Mensaje: #44
Ayuda con script de instalación | »Enlace directo«


Hola, estoy intentando modificar el updater-script que la cocina de XDA da a mi ROM para instalarla, pero no consigo entender la sintaxis del mismo adaptada a mi terminal.

Este es el script que no me funciona:

show_progress(0.1, 0);
format("ext4", "EMMC", "/system", "0");
mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "/system");
package_extract_dir("system", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/data");
delete("/data/local");
package_extract_file("check_data_app", "/tmp/check_data_app");
set_perm(0, 0, 0777, "/tmp/check_data_app");
run_program("/tmp/check_data_app");
package_extract_dir("data", "/data");
set_perm(2000, 2000, 0771, "/data/local");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
package_extract_dir("system", "/system");
symlink("dumpstate", "/system/bin/dumpcrash");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/chown");
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("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/lsof");
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/reboot");
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("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/touch");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/wipe");
symlink("toolbox", "/system/bin/chcon");
symlink("toolbox", "/system/bin/setenforce");
symlink("toolbox", "/system/bin/grep");
symlink("toolbox", "/system/bin/runcon");
symlink("toolbox", "/system/bin/touchinput");
symlink("toolbox", "/system/bin/md5");
symlink("toolbox", "/system/bin/getsebool");
symlink("toolbox", "/system/bin/setsebool");
symlink("toolbox", "/system/bin/restorecon");
symlink("toolbox", "/system/bin/getenforce");
symlink("toolbox", "/system/bin/load_policy");
symlink("toolbox", "/system/bin/cp");
symlink("toolbox", "/system/bin/playback");
symlink("toolbox", "/system/bin/du");
symlink("/system/lib/modules/wlan_mt6628.ko", "/system/lib/modules/wlan.ko");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
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");
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(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm_recursive(0, 2000, 0755, 0755, "/system/vendor/bin");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm(0, 2000, 0755, "/system/vendor/lib/egl");
set_perm(0, 2000, 0755, "/system/vendor/lib/hw");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/busybox");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/su");
symlink("/system/xbin/su", "/system/bin/su");
show_progress(0.1, 10);
show_progress(0.2, 0);
assert(package_extract_file("boot.img", "/tmp/boot.img"),
        write_raw_image("/tmp/boot.img", "boot"),
        delete("/tmp/boot.img"));
show_progress(0.2, 10);
unmount("/system");
unmount("/data");

A continuación pongo el script de una ROM que se instala sin problemas:

show_progress(0.950000, 50);
format("ext4", "EMMC", "/system", "0");
mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "/system");
package_extract_dir("system", "/system");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("aee_debuggerd", "/system/bin/debuggerd");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/cat", "/system/bin/chmod",
         "/system/bin/chown", "/system/bin/cmp", "/system/bin/date",
         "/system/bin/dd", "/system/bin/df", "/system/bin/dmesg",
         "/system/bin/getevent", "/system/bin/getprop", "/system/bin/hd",
         "/system/bin/id", "/system/bin/ifconfig", "/system/bin/iftop",
         "/system/bin/insmod", "/system/bin/ioctl", "/system/bin/ionice",
         "/system/bin/kill", "/system/bin/ln", "/system/bin/log",
         "/system/bin/ls", "/system/bin/lsmod", "/system/bin/lsof",
         "/system/bin/md5", "/system/bin/mkdir", "/system/bin/mount",
         "/system/bin/mv", "/system/bin/nandread", "/system/bin/netstat",
         "/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/printenv",
         "/system/bin/ps", "/system/bin/reboot", "/system/bin/renice",
         "/system/bin/rm", "/system/bin/rmdir", "/system/bin/rmmod",
         "/system/bin/route", "/system/bin/schedtop", "/system/bin/sendevent",
         "/system/bin/setconsole", "/system/bin/setprop", "/system/bin/sleep",
         "/system/bin/smd", "/system/bin/start", "/system/bin/stop",
         "/system/bin/sync", "/system/bin/top", "/system/bin/touch",
         "/system/bin/umount", "/system/bin/uptime", "/system/bin/vmstat",
         "/system/bin/watchprops",
         "/system/bin/wipe");
symlink("wlan_mt6628.ko", "/system/lib/modules/wlan.ko");
ui_print("Creating busybox system links...");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
"/system/xbin/ash", "/system/xbin/awk",
"/system/xbin/basename", "/system/xbin/bunzip2",
"/system/xbin/bzip2", "/system/xbin/cal",
"/system/xbin/cat", "/system/xbin/chgrp",
"/system/xbin/chmod", "/system/xbin/chown",
"/system/xbin/cmp", "/system/xbin/cp",
"/system/xbin/cpio", "/system/xbin/cut",
"/system/xbin/date", "/system/xbin/dd",
"/system/xbin/df", "/system/xbin/diff",
"/system/xbin/dos2unix", "/system/xbin/du",
"/system/xbin/echo", "/system/xbin/egrep",
"/system/xbin/expr", "/system/xbin/false",
"/system/xbin/fgrep", "/system/xbin/find",
"/system/xbin/free", "/system/xbin/ftpget",
"/system/xbin/ftpput", "/system/xbin/grep",
"/system/xbin/gunzip", "/system/xbin/gzip",
"/system/xbin/ifconfig", "/system/xbin/insmod",
"/system/xbin/kill", "/system/xbin/killall",
"/system/xbin/less", "/system/xbin/lsmod",
"/system/xbin/md5sum", "/system/xbin/mknod",
"/system/xbin/more", "/system/xbin/netstat",
"/system/xbin/od", "/system/xbin/pidof",
"/system/xbin/ping", "/system/xbin/ping6",
"/system/xbin/printf", "/system/xbin/ps",
"/system/xbin/rm", "/system/xbin/rmmod",
"/system/xbin/route", "/system/xbin/sed",
"/system/xbin/seq", "/system/xbin/sort",
"/system/xbin/strings", "/system/xbin/tail",
"/system/xbin/telnet", "/system/xbin/test",
"/system/xbin/tftp", "/system/xbin/top",
"/system/xbin/touch", "/system/xbin/true",
"/system/xbin/uname", "/system/xbin/unix2dos",
"/system/xbin/unzip", "/system/xbin/vi",
"/system/xbin/wc", "/system/xbin/wget",
"/system/xbin/which", "/system/xbin/xargs",
"/system/xbin/yes");
symlink("busybox", "/system/xbin/adjtimex", "/system/xbin/arp",
"/system/xbin/base64",
"/system/xbin/bbconfig", "/system/xbin/blkid", "/system/xbin/blockdev",
"/system/xbin/brctl", "/system/xbin/bzcat",
"/system/xbin/catv", "/system/xbin/chattr", "/system/xbin/chroot",
"/system/xbin/clear", "/system/xbin/comm",
"/system/xbin/crond",
"/system/xbin/crontab",
"/system/xbin/dc", "/system/xbin/depmod",
"/system/xbin/devmem",
"/system/xbin/dirname", "/system/xbin/dmesg", "/system/xbin/dnsd",
"/system/xbin/ed", "/system/xbin/env",
"/system/xbin/expand",
"/system/xbin/fdisk",
"/system/xbin/flash_lock", "/system/xbin/flash_unlock",
"/system/xbin/flashcp", "/system/xbin/flock", "/system/xbin/fold",
"/system/xbin/freeramdisk", "/system/xbin/fsync",
"/system/xbin/fuser",
"/system/xbin/getopt", "/system/xbin/groups",
"/system/xbin/halt",
"/system/xbin/head", "/system/xbin/hexdump", "/system/xbin/id",
"/system/xbin/ifconfig", "/system/xbin/inetd",
"/system/xbin/install", "/system/xbin/iostat", "/system/xbin/ip",
"/system/xbin/killall5",
"/system/xbin/length", "/system/xbin/ln",
"/system/xbin/losetup", "/system/xbin/ls", "/system/xbin/lsattr",
"/system/xbin/lsusb", "/system/xbin/lzcat",
"/system/xbin/lzma", "/system/xbin/lzop", "/system/xbin/lzopcat",
"/system/xbin/man", "/system/xbin/mesg",
"/system/xbin/mkdir", "/system/xbin/mke2fs", "/system/xbin/mkfifo",
"/system/xbin/mkfs.ext2", "/system/xbin/mkfs.vfat",
"/system/xbin/mkswap", "/system/xbin/mktemp",
"/system/xbin/modinfo", "/system/xbin/modprobe",
"/system/xbin/mount", "/system/xbin/mountpoint", "/system/xbin/mpstat",
"/system/xbin/mv", "/system/xbin/nanddump", "/system/xbin/nandwrite",
"/system/xbin/nice", "/system/xbin/nohup",
"/system/xbin/nslookup", "/system/xbin/ntpd",
"/system/xbin/patch", "/system/xbin/pgrep",
"/system/xbin/pkill", "/system/xbin/pmap",
"/system/xbin/poweroff", "/system/xbin/printenv",
"/system/xbin/pstree", "/system/xbin/pwd",
"/system/xbin/pwdx", "/system/xbin/rdev", "/system/xbin/readlink",
"/system/xbin/realpath", "/system/xbin/renice", "/system/xbin/reset",
"/system/xbin/resize", "/system/xbin/rev",
"/system/xbin/rmdir",
"/system/xbin/run-parts", "/system/xbin/rx",
"/system/xbin/setconsole", "/system/xbin/setserial",
"/system/xbin/setsid", "/system/xbin/sh", "/system/xbin/sha1sum",
"/system/xbin/sha256sum", "/system/xbin/sha512sum",
"/system/xbin/sleep", "/system/xbin/split",
"/system/xbin/stat", "/system/xbin/stty",
"/system/xbin/sum", "/system/xbin/swapoff", "/system/xbin/swapon",
"/system/xbin/sync", "/system/xbin/sysctl", "/system/xbin/tac",
"/system/xbin/tar", "/system/xbin/taskset",
"/system/xbin/tee", "/system/xbin/telnetd",
"/system/xbin/tftpd",
"/system/xbin/time", "/system/xbin/timeout",
"/system/xbin/tr", "/system/xbin/traceroute",
"/system/xbin/ttysize", "/system/xbin/tune2fs",
"/system/xbin/umount", "/system/xbin/uncompress",
"/system/xbin/unexpand", "/system/xbin/uniq",
"/system/xbin/unlzma", "/system/xbin/unlzop", "/system/xbin/unxz",
"/system/xbin/uptime", "/system/xbin/usleep",
"/system/xbin/uudecode", "/system/xbin/uuencode",
"/system/xbin/watch",
"/system/xbin/whoami",
"/system/xbin/xz", "/system/xbin/xzcat",
"/system/xbin/zcat");
ui_print("Creating busybox system links...done");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
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");
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(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm(1014, 2000, 0550, "/system/etc/wide-dhcpv6/dhcp6c.script");
set_perm(0, 2000, 0755, "/system/vendor");
set_perm_recursive(0, 2000, 0755, 0755, "/system/vendor/bin");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/lib/drm");
set_perm(0, 0, 0644, "/system/vendor/lib/drm/libdrmwvmplugin.so");
set_perm(0, 2000, 0755, "/system/vendor/lib/egl");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/lib/hw");
set_perm(0, 0, 0644, "/system/vendor/lib/hw/gralloc.mt6589.so");

set_perm_recursive(0, 0, 0777, 0777, "system/etc/init.d");

set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 0755, "/system/xbin/tcpdump");
set_perm(0, 0, 0777, "/system/bin/.ext");
set_perm(0, 0, 06755, "/system/bin/.ext/.su");
set_perm(0, 0, 0644, "/system/app/Superuser.apk");
set_perm(0, 0, 06755, "/system/xbin/busybox");
set_perm(0, 1000, 06750, "/system/xbin/shelld");
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(0, 0, 06755, "/system/xbin/vlu");



show_progress(0.65, 0);
ui_print("Replacing boot.img..");

show_progress(0.200000, 0);
show_progress(0.200000, 10);
assert(package_extract_file("boot.img", "/tmp/boot.img"),
        write_raw_image("/tmp/boot.img", "bootimg"),
        delete("/tmp/boot.img"));
        
show_progress(0.65, 0);
ui_print("Clearing Data..");

format("ext4", "EMMC", "/dev/block/mmcblk0p7", "0");
mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/data");
package_extract_dir("data", "/data");

show_progress(0.050000, 0);
ui_print(" ");
ui_print("Almost finish..");


ui_print("Enabling Init.d...");
package_extract_file("add_initd.sh", "/tmp/add_initd.sh");
set_perm(0, 0, 0777, "/tmp/add_initd.sh");
run_program("/tmp/add_initd.sh");
ui_print("Enabling Init.d...done");
ui_print("Rebooting..");

unmount("/system");
unmount("/data");
run_program("/sbin/sleep", "5");
run_program("/sbin/reboot");


Por favor, ¿alguien me puede ayudar? Confundido

Gracias.


Dar las gracias por este post! Cita este mensaje en tu respuesta

10-02-2014, 08:32 PM
Mensaje: #45
RE: Crea tus propios scripts de instalación, modifica los ya existentes....(novatos) | »Enlace directo«


Pues espero el tutorial de los comandos de permisos lo demas ya lo se Ok



Firma de Parrakit
Tu Opinion Vale mucho Ok
Dar las gracias por este post! Cita este mensaje en tu respuesta

10-02-2014, 08:35 PM
Mensaje: #46
RE: Crea tus propios scripts de instalación, modifica los ya existentes....(novatos) | »Enlace directo«


(10-02-2014 08:00 PM)naxo1978 escribió:  Hola, estoy intentando modificar el updater-script que la cocina de XDA da a mi ROM para instalarla, pero no consigo entender la sintaxis del mismo adaptada a mi terminal.

Este es el script que no me funciona:

show_progress(0.1, 0);
format("ext4", "EMMC", "/system", "0");
mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "/system");
package_extract_dir("system", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/data");
delete("/data/local");
package_extract_file("check_data_app", "/tmp/check_data_app");
set_perm(0, 0, 0777, "/tmp/check_data_app");
run_program("/tmp/check_data_app");
package_extract_dir("data", "/data");
set_perm(2000, 2000, 0771, "/data/local");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
package_extract_dir("system", "/system");
symlink("dumpstate", "/system/bin/dumpcrash");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/chown");
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("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/lsof");
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/reboot");
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("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/touch");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/wipe");
symlink("toolbox", "/system/bin/chcon");
symlink("toolbox", "/system/bin/setenforce");
symlink("toolbox", "/system/bin/grep");
symlink("toolbox", "/system/bin/runcon");
symlink("toolbox", "/system/bin/touchinput");
symlink("toolbox", "/system/bin/md5");
symlink("toolbox", "/system/bin/getsebool");
symlink("toolbox", "/system/bin/setsebool");
symlink("toolbox", "/system/bin/restorecon");
symlink("toolbox", "/system/bin/getenforce");
symlink("toolbox", "/system/bin/load_policy");
symlink("toolbox", "/system/bin/cp");
symlink("toolbox", "/system/bin/playback");
symlink("toolbox", "/system/bin/du");
symlink("/system/lib/modules/wlan_mt6628.ko", "/system/lib/modules/wlan.ko");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
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");
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(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm_recursive(0, 2000, 0755, 0755, "/system/vendor/bin");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm(0, 2000, 0755, "/system/vendor/lib/egl");
set_perm(0, 2000, 0755, "/system/vendor/lib/hw");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/busybox");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/su");
symlink("/system/xbin/su", "/system/bin/su");
show_progress(0.1, 10);
show_progress(0.2, 0);
assert(package_extract_file("boot.img", "/tmp/boot.img"),
        write_raw_image("/tmp/boot.img", "boot"),
        delete("/tmp/boot.img"));
show_progress(0.2, 10);
unmount("/system");
unmount("/data");

A continuación pongo el script de una ROM que se instala sin problemas:

show_progress(0.950000, 50);
format("ext4", "EMMC", "/system", "0");
mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "/system");
package_extract_dir("system", "/system");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("aee_debuggerd", "/system/bin/debuggerd");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/cat", "/system/bin/chmod",
         "/system/bin/chown", "/system/bin/cmp", "/system/bin/date",
         "/system/bin/dd", "/system/bin/df", "/system/bin/dmesg",
         "/system/bin/getevent", "/system/bin/getprop", "/system/bin/hd",
         "/system/bin/id", "/system/bin/ifconfig", "/system/bin/iftop",
         "/system/bin/insmod", "/system/bin/ioctl", "/system/bin/ionice",
         "/system/bin/kill", "/system/bin/ln", "/system/bin/log",
         "/system/bin/ls", "/system/bin/lsmod", "/system/bin/lsof",
         "/system/bin/md5", "/system/bin/mkdir", "/system/bin/mount",
         "/system/bin/mv", "/system/bin/nandread", "/system/bin/netstat",
         "/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/printenv",
         "/system/bin/ps", "/system/bin/reboot", "/system/bin/renice",
         "/system/bin/rm", "/system/bin/rmdir", "/system/bin/rmmod",
         "/system/bin/route", "/system/bin/schedtop", "/system/bin/sendevent",
         "/system/bin/setconsole", "/system/bin/setprop", "/system/bin/sleep",
         "/system/bin/smd", "/system/bin/start", "/system/bin/stop",
         "/system/bin/sync", "/system/bin/top", "/system/bin/touch",
         "/system/bin/umount", "/system/bin/uptime", "/system/bin/vmstat",
         "/system/bin/watchprops",
         "/system/bin/wipe");
symlink("wlan_mt6628.ko", "/system/lib/modules/wlan.ko");
ui_print("Creating busybox system links...");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
"/system/xbin/ash", "/system/xbin/awk",
"/system/xbin/basename", "/system/xbin/bunzip2",
"/system/xbin/bzip2", "/system/xbin/cal",
"/system/xbin/cat", "/system/xbin/chgrp",
"/system/xbin/chmod", "/system/xbin/chown",
"/system/xbin/cmp", "/system/xbin/cp",
"/system/xbin/cpio", "/system/xbin/cut",
"/system/xbin/date", "/system/xbin/dd",
"/system/xbin/df", "/system/xbin/diff",
"/system/xbin/dos2unix", "/system/xbin/du",
"/system/xbin/echo", "/system/xbin/egrep",
"/system/xbin/expr", "/system/xbin/false",
"/system/xbin/fgrep", "/system/xbin/find",
"/system/xbin/free", "/system/xbin/ftpget",
"/system/xbin/ftpput", "/system/xbin/grep",
"/system/xbin/gunzip", "/system/xbin/gzip",
"/system/xbin/ifconfig", "/system/xbin/insmod",
"/system/xbin/kill", "/system/xbin/killall",
"/system/xbin/less", "/system/xbin/lsmod",
"/system/xbin/md5sum", "/system/xbin/mknod",
"/system/xbin/more", "/system/xbin/netstat",
"/system/xbin/od", "/system/xbin/pidof",
"/system/xbin/ping", "/system/xbin/ping6",
"/system/xbin/printf", "/system/xbin/ps",
"/system/xbin/rm", "/system/xbin/rmmod",
"/system/xbin/route", "/system/xbin/sed",
"/system/xbin/seq", "/system/xbin/sort",
"/system/xbin/strings", "/system/xbin/tail",
"/system/xbin/telnet", "/system/xbin/test",
"/system/xbin/tftp", "/system/xbin/top",
"/system/xbin/touch", "/system/xbin/true",
"/system/xbin/uname", "/system/xbin/unix2dos",
"/system/xbin/unzip", "/system/xbin/vi",
"/system/xbin/wc", "/system/xbin/wget",
"/system/xbin/which", "/system/xbin/xargs",
"/system/xbin/yes");
symlink("busybox", "/system/xbin/adjtimex", "/system/xbin/arp",
"/system/xbin/base64",
"/system/xbin/bbconfig", "/system/xbin/blkid", "/system/xbin/blockdev",
"/system/xbin/brctl", "/system/xbin/bzcat",
"/system/xbin/catv", "/system/xbin/chattr", "/system/xbin/chroot",
"/system/xbin/clear", "/system/xbin/comm",
"/system/xbin/crond",
"/system/xbin/crontab",
"/system/xbin/dc", "/system/xbin/depmod",
"/system/xbin/devmem",
"/system/xbin/dirname", "/system/xbin/dmesg", "/system/xbin/dnsd",
"/system/xbin/ed", "/system/xbin/env",
"/system/xbin/expand",
"/system/xbin/fdisk",
"/system/xbin/flash_lock", "/system/xbin/flash_unlock",
"/system/xbin/flashcp", "/system/xbin/flock", "/system/xbin/fold",
"/system/xbin/freeramdisk", "/system/xbin/fsync",
"/system/xbin/fuser",
"/system/xbin/getopt", "/system/xbin/groups",
"/system/xbin/halt",
"/system/xbin/head", "/system/xbin/hexdump", "/system/xbin/id",
"/system/xbin/ifconfig", "/system/xbin/inetd",
"/system/xbin/install", "/system/xbin/iostat", "/system/xbin/ip",
"/system/xbin/killall5",
"/system/xbin/length", "/system/xbin/ln",
"/system/xbin/losetup", "/system/xbin/ls", "/system/xbin/lsattr",
"/system/xbin/lsusb", "/system/xbin/lzcat",
"/system/xbin/lzma", "/system/xbin/lzop", "/system/xbin/lzopcat",
"/system/xbin/man", "/system/xbin/mesg",
"/system/xbin/mkdir", "/system/xbin/mke2fs", "/system/xbin/mkfifo",
"/system/xbin/mkfs.ext2", "/system/xbin/mkfs.vfat",
"/system/xbin/mkswap", "/system/xbin/mktemp",
"/system/xbin/modinfo", "/system/xbin/modprobe",
"/system/xbin/mount", "/system/xbin/mountpoint", "/system/xbin/mpstat",
"/system/xbin/mv", "/system/xbin/nanddump", "/system/xbin/nandwrite",
"/system/xbin/nice", "/system/xbin/nohup",
"/system/xbin/nslookup", "/system/xbin/ntpd",
"/system/xbin/patch", "/system/xbin/pgrep",
"/system/xbin/pkill", "/system/xbin/pmap",
"/system/xbin/poweroff", "/system/xbin/printenv",
"/system/xbin/pstree", "/system/xbin/pwd",
"/system/xbin/pwdx", "/system/xbin/rdev", "/system/xbin/readlink",
"/system/xbin/realpath", "/system/xbin/renice", "/system/xbin/reset",
"/system/xbin/resize", "/system/xbin/rev",
"/system/xbin/rmdir",
"/system/xbin/run-parts", "/system/xbin/rx",
"/system/xbin/setconsole", "/system/xbin/setserial",
"/system/xbin/setsid", "/system/xbin/sh", "/system/xbin/sha1sum",
"/system/xbin/sha256sum", "/system/xbin/sha512sum",
"/system/xbin/sleep", "/system/xbin/split",
"/system/xbin/stat", "/system/xbin/stty",
"/system/xbin/sum", "/system/xbin/swapoff", "/system/xbin/swapon",
"/system/xbin/sync", "/system/xbin/sysctl", "/system/xbin/tac",
"/system/xbin/tar", "/system/xbin/taskset",
"/system/xbin/tee", "/system/xbin/telnetd",
"/system/xbin/tftpd",
"/system/xbin/time", "/system/xbin/timeout",
"/system/xbin/tr", "/system/xbin/traceroute",
"/system/xbin/ttysize", "/system/xbin/tune2fs",
"/system/xbin/umount", "/system/xbin/uncompress",
"/system/xbin/unexpand", "/system/xbin/uniq",
"/system/xbin/unlzma", "/system/xbin/unlzop", "/system/xbin/unxz",
"/system/xbin/uptime", "/system/xbin/usleep",
"/system/xbin/uudecode", "/system/xbin/uuencode",
"/system/xbin/watch",
"/system/xbin/whoami",
"/system/xbin/xz", "/system/xbin/xzcat",
"/system/xbin/zcat");
ui_print("Creating busybox system links...done");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
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");
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(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm(1014, 2000, 0550, "/system/etc/wide-dhcpv6/dhcp6c.script");
set_perm(0, 2000, 0755, "/system/vendor");
set_perm_recursive(0, 2000, 0755, 0755, "/system/vendor/bin");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/lib/drm");
set_perm(0, 0, 0644, "/system/vendor/lib/drm/libdrmwvmplugin.so");
set_perm(0, 2000, 0755, "/system/vendor/lib/egl");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/lib/hw");
set_perm(0, 0, 0644, "/system/vendor/lib/hw/gralloc.mt6589.so");

set_perm_recursive(0, 0, 0777, 0777, "system/etc/init.d");

set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 0755, "/system/xbin/tcpdump");
set_perm(0, 0, 0777, "/system/bin/.ext");
set_perm(0, 0, 06755, "/system/bin/.ext/.su");
set_perm(0, 0, 0644, "/system/app/Superuser.apk");
set_perm(0, 0, 06755, "/system/xbin/busybox");
set_perm(0, 1000, 06750, "/system/xbin/shelld");
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(0, 0, 06755, "/system/xbin/vlu");



show_progress(0.65, 0);
ui_print("Replacing boot.img..");

show_progress(0.200000, 0);
show_progress(0.200000, 10);
assert(package_extract_file("boot.img", "/tmp/boot.img"),
        write_raw_image("/tmp/boot.img", "bootimg"),
        delete("/tmp/boot.img"));
        
show_progress(0.65, 0);
ui_print("Clearing Data..");

format("ext4", "EMMC", "/dev/block/mmcblk0p7", "0");
mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/data");
package_extract_dir("data", "/data");

show_progress(0.050000, 0);
ui_print(" ");
ui_print("Almost finish..");


ui_print("Enabling Init.d...");
package_extract_file("add_initd.sh", "/tmp/add_initd.sh");
set_perm(0, 0, 0777, "/tmp/add_initd.sh");
run_program("/tmp/add_initd.sh");
ui_print("Enabling Init.d...done");
ui_print("Rebooting..");

unmount("/system");
unmount("/data");
run_program("/sbin/sleep", "5");
run_program("/sbin/reboot");


Por favor, ¿alguien me puede ayudar? Confundido

Gracias.

Si no se te resuelve en la tarde aca en mexico cuando este en la lap yo te lo resuelvo.



Firma de Parrakit
Tu Opinion Vale mucho Ok
Dar las gracias por este post! Cita este mensaje en tu respuesta
[-] Los siguientes usuarios han dado las gracias a Parrakit por este post:
naxo1978 (10-02-2014)

10-02-2014, 08:42 PM
Mensaje: #47
script de instalación | »Enlace directo«


Ok Parrakit, muchas gracias. No me preocupa tanto que me resuelvas la duda, sino aprender a resolverla y entender la solución Ok


Dar las gracias por este post! Cita este mensaje en tu respuesta

17-02-2014, 10:43 PM
Mensaje: #48
Script pendiente | »Enlace directo«


(10-02-2014 08:35 PM)Parrakit escribió:  Si no se te resuelve en la tarde aca en mexico cuando este en la lap yo te lo resuelvo.

Hola, espero no molestarte, solo recordarte que espero tu ayuda Triste

Gracias.


Dar las gracias por este post! Cita este mensaje en tu respuesta
Enviar respuesta 




Usuario(s) navegando en este tema: 1 invitado(s)