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[1] == "addgvskeymap") { parse("sys/".$type[1]); } if($type[1] == "stockkeymap") { parse("sys/".$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') { 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); } if($type[1] == '3dgallery') { parse("gallery3d"); } 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]."/".$type[2]); } 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($type[1] == 'rglibdvm') { $updateScript .= "set_perm 0 0 0644 SYSTEM:lib/libdvm.so".chr(10)."delete_recursive DATA:dalvik-cache".chr(10); } if($type[1] == 'stocklibdvm') { $updateScript .= "set_perm 0 0 0644 SYSTEM:lib/libdvm.so SYSTEM:lib/libnativehelper.so".chr(10)." set_perm 0 0 0755 SYSTEM:bin/dalvikvm".chr(10)."delete_recursive DATA:dalvik-cache".chr(10); } if($type[1] == 'rgcalc') { $updateScript .= "set_perm 0 0 0644 SYSTEM:app/Calculator.apk".chr(10)."delete SYSTEM:app/Calculator.odex".chr(10)."delete_recursive DATA:dalvik-cache".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) { $updateScript .= "delete DATA:local/bootanimation.zip".chr(10)."set_perm 0 0 0644 SYSTEM:media/bootanimation.zip".chr(10); } if(strpos($exec,'thm:') !== false) { parse("de03deodex"); } //$str.='mount -t rfs -o remount,ro /dev/stl5 /system'.chr(10); $cusapprmsh.="echo app backup and removal complete".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); } $updateScript .= "show_progress 0.2 10".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 { ?>
[Fresh Install] - [Customize Phone]
|
Install Android 2.1 DE03 - Fresh Install[back] This will install your phone with Android 2.1 DE03, deleting ALL of your data. If you're only wanting to customize your current DE03 install then skip this section.
|
|
Customize Your Phone[back] This will customize your phone with custom apps, themes, boot animations, etc. You must have Android 2.1 DE03 installed prior to using this - if not, go back to the Fresh Install section. Instructions:
This ROM does not effect anything on the /data partition - meaning no data or settings will be changed by using this ROM. |
| |||||||||||||||||||||||||||||||||||||||||