Home > XT720-patch

XT720-patch

XT720-patch is a project mainly written in SHELL and C, it's free.

A collection of bugfixes and patches for Dexter's 1.3 ROM

A collection of bugfixes and patches for Dexter's 1.3 ROM

Summary:

  • Extended power menu (adds Reboot, Recovery)

  • Performance and library tweaks (xavwanted)

  • Add conservative governor (c19932, nadlabak)

  • Improve SD card read performance (reverendkjr)

  • memhack (khalpowers) moves dalvik-cache to either /cache or /sd-ext Note: Default moves dalvik-cache to /cache Note: Will use /sd-ext/dalvik-cache instead if it exists (see also "User control of /sd-ext" below)

  • minfree memory parameters tweaked Note: Parameters from AutoKiller Memory Optimizer database http://andrs.w3pla.net/autokiller/list/currentType/378 http://andrs.w3pla.net/autokiller/list/currentType/591

  • Fix milestone overclock persistence

  • Autodetects ext2/3 (kousik)

  • ext2/3 partition is checked and possibly repaired on boot

  • Disable automatic apps2ext. Native Froyo App2SD is not affected. Note: See also "User control of /sd-ext" below Note: apps2ext used to be called app2sd before native Froyo App2SD (apps2fat) existed. Confusing!

  • Add support for Link2SD (see user control of /sd-ext below) Note: See also "User control of /sd-ext" below

  • User control of /sd-ext through manual creation of directories /sd-ext/app (move /data/app to /sd-ext [apps2ext]) /sd-ext/dalvik-cache (move /data/dalvik-cache to /sd-ext) /sd-ext/app-private (move /data/app-private to /sd-ext) /sd-ext/link2sd (enable Link2SD 1.5.1 support) Note: apps2ext has priority over link2sd and overrides! It doesn't make sense to use both!

  • Replaces /system/oc with modular scripts in /system/etc/init.c

ChangeLog:

2011/03/16 stock221v13-bugfix-3:

  • Add extended power menu.

    Note: Mucho thanks to untermench's "[REF] How to add Reboot to power menu (updated 10/21/2010)" http://forum.xda-developers.com/showpost.php?p=8674580&postcount=1

    Note: How this deals with the XT720's bootstrapped OpenRecovery

     Unlike the Milestone (which has a vulnerable recovery), the
     XT720 uses a bootstrapped recovery. To trigger openrecovery
     boot, Skrilax's modified the "reboot" to create a
     /cache/.boot_to_or file. This file can't be created by the
     2000 user that the power menu runs as, so we have to switch
     to root to create the file. Unfortunately, SuperUser doesn't
     like running during a shutdown and even if you move the check
     to earlier (say when the power button appears) SuperUser's
     accept permissions screen appears behind the power menu and
     the button is completely obscured so you can't grant
     permissions. Also, suid shell scripts don't work. It is
     possible to create a non-suid script that runs su to create
     the file, but setup for getting the SuperUser permissions to
     work is not user-friendly enough. So instead I build a
     super-simple single-purpose binary that can be run suid
     (/system/xbin/boot_to_or):
    
        #include <stdio.h>
        #include <unistd.h>
    
        int main()
        {
           setuid( 0 );
           (void)fopen("/cache/.boot_to_or", "w");
           return 0;
        }
  • Add conservative governor.

  • Set read ahead for sdcard to 2MB

2011/03/16 stock221v13-bugfix-2:

  • Set minfree at boot (/system/etc/init.d/00_minfree) Note: Parameters from AutoKiller Memory Optimizer database http://andrs.w3pla.net/autokiller/list/currentType/378 http://andrs.w3pla.net/autokiller/list/currentType/591 Note: Uses 1536,2048,4096,10240,12800,15360 (corresponds to 6mb,8mb,16mb,40mb,50mb,60mb) Note: This corresponds to AutoKiller Memory Optimzer's "Optimum" preset.

  • Implement memhack: move dalvik-cache from /data to /cache. This is also default behavior (However, dalvik-cache will be sent to /sd-ext/dalvik-cache instead if it exists).

  • Apply xavwanted's egl.cfg performance tweak.

  • Apply xavwanted's newer updated media libraries.

  • Fix typo'd filenames: /system/bin/fmradioserver1 -> /system/bin/fmradioserver /system/usr/keylayout/qwerty.kl1 -> /system/usr/keylayout/qwerty.kl /system/usr/keychars/qwerty.kcm.bin1 -> /system/usr/keychars/qwerty.kcm.bin

  • Delay calling /system/etc/init.c/ until just after both /data and /cache are available (for memhack)

  • Add some logging to 05_overclock and 10_sdext

  • 10_sdext uses "e2fsck -p" instead of "e2fsck -y"

2011/02/24 stock221v13-bugfix-1:

  • Replace /system/oc with modular scripts in /system/etc/init.c/ 00_interactive (load interactive governor), 05_overclock (load milestone overclock), 10_sdext (manage /sd-ext partition, app2ext, Link2SD, etc)

  • Fix milestone overclock persistence (05_overclock)

    Milestone Overclock's preferences are parsed from the XML in /data/data and the sdcard and are applied after oc-settings. oc-settings is now dos2unix transformed before execution.

  • Improved for managment of /sd-ext (10_sdext)

    • Add kousik's ext2/3 mount autodetection hack

    • Perform e2fsck before mounting /sd-ext (modeled on CyanogenMod) [/system/xbin/e2fsck copied from OpenRecovery/sbin/e2fsck-or]

    • Use "-o noatime,nodiratime" (modeled on CyanogenMod)

    • Allow more control of /sd-ext. Users enable or disable features by creating directories on /sd-ext

      /sd-ext/app (mode /data/app to /sd-ext [apps2sd]) /sd-ext/dalvik-cache (move /data/dalvik-cache to /sd-ext) /sd-ext/app-private (move /data/app-private to /sd-ext) /sd-ext/link2sd (enable Link2SD 1.5.1 support)

    • apps2sd/app2ext is nolonger automatically enabled. To enable apps2sd create an /sd-ext/app directory and reboot. If you've already have /sd-ext/app no changes are needed.

    • Allow dalvik-cache to be moved to /sd-ext (create /sd-ext/dalvik-cache to enable).

  • Add support for Link2SD 1.5.1 (create /sd-ext/link2sd to enable) Link2SD support will only be enabled if both /sd-ext/link2sd exists AND /sd-ext/app does not exist.

    Note: Link2SD now has an option to move corresponding dalvik-cache with apps to /sd-ext. DON'T mix this with moving the entire dalvik-cache to /sd-ext/dalvik-cache. Pick one or the other.

Usage:

1) Build the update

./build-update.sh patchname

This will create an OpenRecovery update called patchname.zip inside the updates/ directory.

2) Copy the update into OpenRecovery/updates/ on the sdcard.

3) Boot into OpenRecovery.

4) Use "Apply Update" menu option and select your update.

Notes:

  • Not compatible with 1.2a.

  • The contents of src/system/ramdisk/ becomes the root filesystem after 2ndinit. /system/ramdisk.tar is build automatically from this directory by build script.

  • The generated patch uses the unsigned, nobinary OpenRecovery update method because I don't know any better and I don't know what are the advantages of the more complicated types.

  • git does not currently track empty directories so .gitignore files are present inside directories that are intended to be empty such as src/system/ramdisk/sd-ext. The build script excludes all .gitignore files.

  • The build script creates META-INF/com/google/android/updater-script from META-INF/com/google/android/updater-script.in. Currently all this does is update personalize display when the update is applied in OpenRecovery to include the patchname.

  • Be sure to set file ownership and permissions in patch/META-INF/com/google/android/updater-script.in

  • The ./build-update.sh build script has been tested on Debian, Ubuntu and MacOS X systems but doesn't do anything wierd. It needs bash, GNU tar, sed, and zip.

  • Thanks to Dexter and all the other wonderful, friendly contributers on XDA.

  • Development follows discussions and feedback on http://forum.xda-developers.com/showthread.php?t=939644