[TOOLS] Script to apply init.d hacks and edit prop file

Discussion in 'Galaxy Nexus Development' started by jeffv2, Mar 3, 2012.

  1. jeffv2

    jeffv2 Developer
    Developer

    Joined:
    Dec 23, 2010
    Messages:
    1,240
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    south jersey
    Ratings:
    +0
    now this will make someone like me that flashes roms alot and changes init.d alot and the prop file...

    should work fine now i just need someone to review it and make sure its fine, plus i need permission to upload the files... then the script will use wget


    Code:
    
    
    #!/system/bin/sh
    
    # variables that start with a "c" that can be changed or removed.
    #
    
    c1="persist.sys.shutdown.mode=hibernate"
    c2="debug.sf.nobootanimation=1"
    c3="#add your tweaks here"
    c4="#add your tweaks here"
    c5="#add your tweaks here"
    
    
    #do not change unless you know what you're doing
    #
    
    system="-t ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/system /system"
    sdcard="/sdcard/custom_script"
    
    
    # mount system rw so changes can be made
    #
    
    mount -o rw,remount $system
    
    
    # make directory for stuff
    #
    if [ ! -d $sdcard/];then
    mkdir $sdcard/
    fi
    
    # extract stuff if downloaded from droidforums
    #
    
    if [ -f /sdcard/gofaster.zip];then
    mv /sdcard/gofaster.zip > $sdcard/
    unzip $sdcard/gofaster.zip
    fi
    
    if [ -f /system/.custom_script_already_ran];then
    echo "no need to run twice"
    exit 0
    else
    
    echo -e "$(cat /system/build.prop)\n""$c1\n""$c2\n""$c3\n""$c4\n""$c5\n" > /system/build.prop
    echo "$(cat $sdcard/99gofasterth3ory) > /system/etc/init.d/99gofasterth3ory
    echo "$(cat $sdcard/97cron) > /system/etc/init.d/97cron
    chmod 0555 /system/etc/init.d/*
    echo *> /system/.custom_script_already_ran
    
    
    fi
    mount -o rw,remount $system
    
    any help would be great:)
     
    #1 jeffv2, Mar 3, 2012
    Last edited: Mar 4, 2012
Search tags for this page
android add script in init.d
,

android init.d

,
create init.d script android
,
d edit
,
edit init.d android
,
init d galaxy nexus
,
init d script android
,
init.d script android
,
init.d script s3
,

init.d scripts android