addFile($deodexsh, "deodex.sh"); //$updateScript .= "delete_recursive /data/dalvik-cache/".chr(10); } // If one package is marked sys (system) or thm (theme) then copy system directory from zip to phone if(strpos($exec,'sys:') !== false || strpos($exec,'thm:') !== false || strpos($exec,'blogo:') !== false || strpos($exec,'banim:') !== false || strpos($exec,'kern:') !== false || strpos($exec,'recovery:') !== false ) { $updateScript .= "copy_dir PACKAGE:system SYSTEM:".chr(10); } // If there is an app for removal create backup directories on sdcard if(strpos($exec,'rem:') !== false || strpos($exec,'del:') !== false ) { $cusapprmsh .= "mkdir /sdcard/sdx".chr(10)."mkdir /sdcard/sdx/backup".chr(10)."mkdir /sdcard/sdx/backup/app".chr(10); } foreach($del as $k1) { $type = explode(":",$k1); $sys = strpos($k1,'sys'); //add busybox backup and removal commands for each application if($type[0] == "rem") { $cusapprmsh .= 'busybox cp /system/app/'.$type[1].' /sdcard/sdx/backup/app/'.chr(10).'rm /system/app/'.$type[1].chr(10); } if($type[0] == "thm") { parse("themes/".$type[1]."/".$type[2]); } if($type[0] == "recovery") { parse("recovery/".$type[1]); } if($type[0] == "kern") { parse($type[1]."/".$type[2]); } if($type[1] == 'rootv7') { //$ZIP -> zipDirectory("root","system"); //$ZIP->addFile(file_get_contents("root/system/bin/wlservice"), "system\bin\wlservice"); parse("root"); $updateScript .= "set_perm 0 0 0777 SYSTEM:etc/install-recovery.sh".chr(10)."set_perm 0 0 0777 SYSTEM:bin/wlservice".chr(10)."set_perm 0 0 0777 SYSTEM:bin/whoami".chr(10)."set_perm 0 0 0666 SYSTEM:etc/passwd".chr(10)."set_perm 0 0 0666 SYSTEM:etc/group".chr(10); } if($type[1] == 'livewallpaper') { //$ZIP->addFile(file_get_contents("wallpaper/system/app/LiveWallpapersPicker.apk"), "system\app\LiveWallpapersPicker.apk"); //$ZIP->addFile(file_get_contents("wallpaper/system/lib/libRS.so"), "system\lib\libRS.so"); //$ZIP->addFile(file_get_contents("wallpaper/system/lib/librs_jni.so"), "system\lib\librs_jni.so"); //$ZIP -> zipDirectory("wallpaper","system"); parse("wallpaper"); $updateScript .= "set_perm 0 0 0644 SYSTEM:lib/libRS.so".chr(10)."set_perm 0 0 0644 SYSTEM:lib/librs_jni.so".chr(10); } if($type[1] == 'youtube') { parse("youtubehd"); $updateScript .= "copy_dir PACKAGE:system SYSTEM:".chr(10); //zip addfile is broken in this version - joeykrims comment //$ZIP -> addFile(file_get_contents("apps/YouTube.apk"), "system\app\YouTube.apk"); } if($type[1] == '3dgallery') { parse("gallery3d"); //zip addfile is broken in this version - joeykrims comment //$ZIP -> addFile(file_get_contents("apps/Gallery3D.apk"), "system\app\Gallery3D.apk"); } if($type[1] == 'livewallpaper' || $type[0] == 'thm') { $updateScript .= "delete_recursive /data/dalvik-cache/".chr(10); } //if($type[0] == "blogo") //{ // parse("blogo-".$type[1]); //} if($type[0] == "blogo") { parse("blogo/".$type[1]); } if($type[0] == "banim") { parse("banim-".$type[1]); } if($type[1] == 'spranim') { $cusapprmsh .= "/sbin/busybox cp /system/bin/playlogo /sdcard/sdx/backup/playlogo".chr(10)."/sbin/busybox cp /system/media/bootani.qmg /sdcard/sdx/backup/bootani.qmg".chr(10); $updateScript .= "delete SYSTEM:bin/playlogo".chr(10)."delete SYSTEM:media/bootani.qmg".chr(10); } if($type[1] == 'baclear') { $updateScript .= "delete SYSTEM:media/bootanimation.zip".chr(10); } } if(strpos($exec,'kern:') !== false) { $kernelsh = "#!/system/bin/sh".chr(10)."#SDX sdx-developers.com scripted".chr(10)."flash_image boot /system/zImage".chr(10); $ZIP -> addFile($kernelsh, "kernel-update.sh"); $updateScript .= "run_program PACKAGE:kernel-update.sh".chr(10)."delete SYSTEM:zImage".chr(10); } if(strpos($exec,'recovery:') !== false) { $recoverysh = "#!/system/bin/sh".chr(10)."#SDX sdx-developers.com scripted".chr(10)."flash_image recovery /system/recovery.rfs".chr(10); $ZIP -> addFile($recoverysh, "recovery-flash.sh"); $updateScript .= "run_program PACKAGE:recovery-flash.sh".chr(10)."delete SYSTEM:recovery.rfs".chr(10); } if(strpos($exec,'blogo:') !== false) { $bootlogosh = "#!/system/bin/sh".chr(10)."#SDX sdx-developers.com scripted".chr(10)."flash_image boot3 /system/logo.png".chr(10); $ZIP -> addFile($bootlogosh, "bootlogo.sh"); $updateScript .= "run_program PACKAGE:bootlogo.sh".chr(10)."delete SYSTEM:logo.png".chr(10); } if(strpos($exec,'banim:') !== false) { //$banimsh = "#!/system/bin/sh".chr(10)."#SDX sdx-developers.com scripted".chr(10)."flash_image boot3 /system/logo.png".chr(10); //$bootlogosh .= "busybox cp -R PACKAGE:logo.png /system/".chr(10); //$bootlogosh = "#!/system/bin/sh".chr(10)."#SDX sdx-developers.com scripted".chr(10)."flash_image boot3 /system/sdxdevlogo3.png".chr(10); //$ZIP -> addFile($banimsh, "bootanim.sh"); $updateScript .= "delete DATA:local/bootanimation.zip".chr(10)."set_perm 0 0 0644 SYSTEM:media/bootanimation.zip".chr(10); //$updateScript .= "run_program PACKAGE:bootlogo.sh".chr(10); //$bootlogosh = "#!/system/bin/sh".chr(10)."#SDX sdx-developers.com scripted".chr(10)."flash_image boot3 /system/logo.png".chr(10)."/sbin/busybox rm /system/logo.png".chr(10); //$ZIP -> addFile($bootlogosh, "bootlogo.sh"); } if(strpos($exec,'thm:') !== false) { //parse("dd10deodex"); parse("de03deodex"); } //$str.='mount -t rfs -o remount,ro /dev/stl5 /system'.chr(10); //$str.='mount -t rfs -o remount,rw /dev/stl5 /system'.chr(10); $cusapprmsh.="echo app backup and removal complete".chr(10); $updateScript .= "show_progress 0.2 10".chr(10); //if(strpos($exec,'rem:') !== false || strpos($exec,'app:') !== false) if(strpos($exec,'rem:') !== false || strpos($exec,'del:') !== false ) { $ZIP -> addFile($cusapprmsh, "cus-apprm.sh"); //$updateScript .= "delete_recursive /data/dalvik-cache/".chr(10); } // If there is an app for removal or an app for install //if(strpos($exec,'rem:') !== false || strpos($exec,'app:') !== false) if(strpos($exec,'rem:') !== false || strpos($exec,'del:') !== false ) { $updateScript .= "run_program PACKAGE:cus-apprm.sh".chr(10); } $ZIP -> addFile($updateScript, "META-INF/com/google/android/update-script"); // This is run at the end of the script to add the files from the parse function. if(isset($dirtozip)){ //added incase there are no directories sent to parse() // Loop through every key/value combination generated from parse() //dirtozip will remove all duplicate files keeping the one added first $dirtozip = array_unique($dirtozip); foreach($dirtozip as $key => $value) { // Run the addFile function with the values from $key and $value $ZIP->addFile(file_get_contents($key),$value,mktime()); } } // write the zip file to file $zipfile = $ZIP->build_zip(); // Force download the zip header("Content-type: application/octet-stream"); //added content length per slushpupie header("Content-length: ".strlen($zipfile)); header("Content-disposition: attachment; filename=custom-SDX-update.zip"); echo $zipfile; } else { ?>
Disclaimer: Use this at your own risk.
"." ".$text[0]."
$to
Kryket - Haxsung Push 2.0.1
Moment Bios
Nexus Boot Animation - Landscape
Kryket - Samsung Morph

".ucfirst($user)." - ".ucfirst($itheme)."

".ucfirst($user)." - ".ucfirst($itheme)."