DroidForums.net is the original Verizon Android Forum! Registered Users do not see these ads. Please Register - It's Free!
Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31

Thread: Scripts for nightly builds

  1. Developer
    jeffv2's Avatar
    Member #
    151962
    Join Date
    Dec 2010
    Location
    south jersey
    Posts
    1,241
    Liked
    3 times
    Phone
    galaxy nexus
    DroidForums.net Developer
    #1

    Scripts for nightly builds

    here's my script for nightly builds.
    i can add anything you want. just ask

    FEATURES:

    - checks if script has been run before. ( on current build )
    - removes unneeded apps
    - changes wifi scantime
    - remaps keys ( only if you have a file on sdcard called jeffv2 "/sdcard/jeffv2" )
    - has option to change lcd density ( you must manually change the value in the script for now )
    - reboots the phone if you have /sdcard/reboot file


    put on the root of sdcard & run

    HTML Code:
    su
    
    . /sdcard/setup.txt
    HTML Code:
    #!/bin/bash
    #
    
    #######edit these values
    lcd=240
    wifi=90
    heap=24m
    #######
    
    file=/system/.setup
    remap=/sdcard/jeffv2
    reboot=/sdcard/reboot
    
    
    if [ -f "$file" ]; then 
    echo "no need to run twice !!!" 
    else
    sed -i 's/ro.sf.lcd_density=240/ro.sf.lcd_density=240/g' /system/build.prop
    sed -i 's/wifi.supplicant_scan_interval = 15/wifi.supplicant_scan_interval = $wifi/g' /system/build.prop
    sed -i 's/ro.telephony.call_ring.delay=3000/ro.telephony.call_ring.delay=1000/g' /system/build.prop
    sed -i 's/ro.media.dec.jpeg.memcap=20000000/ro.media.dec.jpeg.memcap=24000000/g' /system/build.prop
    sed -i 's/dalvik.vm.heapsize=24m/dalvik.vm.heapsize=$heap/g' /system/build.prop
    
    rm /system/app/Calendar.apk
    rm /system/app/CalendarProvider.apk
    rm /system/app/CarHomeLauncher.apk
    rm /system/app/GoogleCalendarSyncAdapter.apk
    rm /system/app/GoogleQuickSearchBox.apk
    rm /system/app/LatinImeTutorial.apk
    rm /system/app/LiveWallpapers.apk
    rm /system/app/LiveWallpapersPicker.apk
    rm /system/app/MagicSmokeWallpapers.apk
    rm /system/app/PicoTts.apk
    rm /system/app/Protips.apk
    rm /system/app/SetupWizard.apk
    rm /system/app/SoundRecorder.apk
    rm /system/app/TtsService.apk
    rm /system/app/VisualizationWallpapers.apk
    rm /system/app/VoiceDialer.apk
    rm /system/app/VpnServices.apk
    rm /system/app/FileManager.apk
    rm /system/app/ADWLauncher.apk
    echo  > $file
    
    if [ -f "$remap" ]; then
    sed -i 's/key 114   VOLUME_DOWN       WAKE/key 114   VOLUME_UP         WAKE/g' /system/usr/keylayout/qwerty.kl
    sed -i 's/key 114   VOLUME_DOWN       WAKE/key 114   VOLUME_UP         WAKE/g' /system/usr/keylayout/sholes-keypad.kl 
    sed -i 's/key 212   CAMERA/key 212   VOLUME_DOWN       WAKE/g' /system/usr/keylayout/qwerty.kl
    sed -i 's/key 212   CAMERA/key 212   VOLUME_DOWN       WAKE/g' /system/usr/keylayout/sholes-keypad.kl
    else 
    
    echo  > $file
    
    if [ -f "$reboot" ]
    then
    reboot
    else
    echo "thanks for using my script"
    fi
    fi
    fi
    Last edited by jeffv2; 03-08-2011 at 05:45 PM.
  2.  
     
     
     
  3. Droid Ninja
    Bear in NM's Avatar
    Member #
    3690
    Join Date
    Nov 2009
    Posts
    1,389
    Liked
    5 times
    Phone
    Bionic (sad but sweet)
    #2
    You Linux guys, no fair Fox and I were discussing this earlier in the main nightly thread. He/she prefers the longer scripting like yours. I tend to break mine up, using Gscript. The definate advantage to your method is being able to use the native terminal program if you choose. Me, I gotta hit the market to get Gscript. Does help showcase why a basic terminal and file manager is stock. Options, options. And thankfully our ADB days are mostly behind us, unless you are really hard core.

    Thanks for posting your script. It actually give me a point of reference to research. WAG, sed, search and edit?????? For us windows types, the webpages with linux 101 commands and codes tend to be sorely lacking.

    Craig
  4. Master Droid
    gambit07's Avatar
    Member #
    129334
    Join Date
    Oct 2010
    Posts
    384
    Phone
    Motorola Droid, Droid X
    #3
    Quote Originally Posted by jeffv2 View Post
    Just thought I would share my script that I run with every nightly update
    Its easier then manually doing this.

    -it remaps my volume button
    -changes lcd density
    -changes wifi scan time
    & remove a bunch of apps I never use...

    I just placed it in /data/local/bin. So I always have it and all I have to run in terminal is setup.sh

    If anyone would like me to write you a script just ask(:

    HTML Code:
    #!/bin/bash
    #
    #mount r/w
    #
    
    mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system 
    
    #
    #remap keys
    #
    
    sed -i 's/key 212   CAMERA/key 212   VOLUME_DOWN       WAKE/g' /system/usr/keylayout/qwerty.kl
    
    sed -i 's/key 212   CAMERA/key 212   VOLUME_DOWN       WAKE/g' /system/usr/keylayout/sholes-keypad.kl
    
    #
    #
    #build.prop edits
    #
    #
    
    sed -i 's/ro.sf.lcd_density=240/ro.sf.lcd_density=220/g' /system/build.prop
    
    sed -i 's/wifi.supplicant_scan_interval = 15/wifi.supplicant_scan_interval = 90/g' /system/build.prop
    
    
    #
    #remove unwanted apps
    #
    #
    
    rm /system/app/Calendar.apk
    
    rm /system/app/CalendarProvider.apk
    
    rm /system/app/CarHomeLauncher.apk
    
    rm /system/app/GoogleCalendarSyncAdapter.apk
    
    rm /system/app/GoogleQuickSearchBox.apk
    
    rm /system/app/LatinImeTutorial.apk
    
    rm /system/app/LiveWallpapers.apk
    
    rm /system/app/LiveWallpapersPicker.apk
    
    rm /system/app/MagicSmokeWallpapers.apk
    
    rm /system/app/PicoTts.apk
    
    rm /system/app/Protips.apk
    
    rm /system/app/SetupWizard.apk
    
    rm /system/app/SoundRecorder.apk
    
    rm /system/app/TtsService.apk
    
    rm /system/app/VisualizationWallpapers.apk
    
    rm /system/app/VoiceDialer.apk
    
    rm /system/app/VpnServices.apk
    
    rm /system/app/FileManager.apk
    
    rm /system/app/ADWLauncher.apk
    Looks good! I'm guessing I can just save this in a text file but what does the extension have to be?
    Edit: Also just curious, why do you remap your volume keys?
    Last edited by gambit07; 02-20-2011 at 05:38 PM.
  5. Developer Relations
    CJM's Avatar
    Member #
    117189
    Join Date
    Sep 2010
    Location
    Mississippi Gulf Coast
    Posts
    8,982
    Liked
    1034 times
    Phone
    Moto X
    Premium Member
    #4
    Thanks for posting this, Jeff.

    Swyped from a Droid
  6. Developer
    winner00's Avatar
    Member #
    4915
    Join Date
    Nov 2009
    Location
    Utah
    Posts
    1,112
    Liked
    57 times
    Twitter
    expertontech
    Phone
    LTE Galaxy Nexus
    DroidForums.net Developer
    Premium Member
    #5
    Quote Originally Posted by gambit07 View Post
    Quote Originally Posted by jeffv2 View Post
    Just thought I would share my script that I run with every nightly update
    Its easier then manually doing this.

    -it remaps my volume button
    -changes lcd density
    -changes wifi scan time
    & remove a bunch of apps I never use...

    I just placed it in /data/local/bin. So I always have it and all I have to run in terminal is setup.sh

    If anyone would like me to write you a script just ask(:

    HTML Code:
    #!/bin/bash
    #
    #mount r/w
    #
    
    mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system 
    
    #
    #remap keys
    #
    
    sed -i 's/key 212   CAMERA/key 212   VOLUME_DOWN       WAKE/g' /system/usr/keylayout/qwerty.kl
    
    sed -i 's/key 212   CAMERA/key 212   VOLUME_DOWN       WAKE/g' /system/usr/keylayout/sholes-keypad.kl
    
    #
    #
    #build.prop edits
    #
    #
    
    sed -i 's/ro.sf.lcd_density=240/ro.sf.lcd_density=220/g' /system/build.prop
    
    sed -i 's/wifi.supplicant_scan_interval = 15/wifi.supplicant_scan_interval = 90/g' /system/build.prop
    
    
    #
    #remove unwanted apps
    #
    #
    
    rm /system/app/Calendar.apk
    
    rm /system/app/CalendarProvider.apk
    
    rm /system/app/CarHomeLauncher.apk
    
    rm /system/app/GoogleCalendarSyncAdapter.apk
    
    rm /system/app/GoogleQuickSearchBox.apk
    
    rm /system/app/LatinImeTutorial.apk
    
    rm /system/app/LiveWallpapers.apk
    
    rm /system/app/LiveWallpapersPicker.apk
    
    rm /system/app/MagicSmokeWallpapers.apk
    
    rm /system/app/PicoTts.apk
    
    rm /system/app/Protips.apk
    
    rm /system/app/SetupWizard.apk
    
    rm /system/app/SoundRecorder.apk
    
    rm /system/app/TtsService.apk
    
    rm /system/app/VisualizationWallpapers.apk
    
    rm /system/app/VoiceDialer.apk
    
    rm /system/app/VpnServices.apk
    
    rm /system/app/FileManager.apk
    
    rm /system/app/ADWLauncher.apk
    Looks good! I'm guessing I can just save this in a text file but what does the extension have to be?
    Edit: Also just curious, why do you remap your volume keys?
    I think his up or down volume key is broken.
    Galaxy Nexus Setup
    Rom: My CM9 Kang
    Kernel: franco Nightly #135

    Theme: ICS
    Launcher: Trebuchet
    Recovery: Team Win 2.1


    Twitter: expertontech
    CM7 Thread with My Build for OG Droid





    Thanks for the donation!
  7. Master Droid
    gambit07's Avatar
    Member #
    129334
    Join Date
    Oct 2010
    Posts
    384
    Phone
    Motorola Droid, Droid X
    #6
    Quote Originally Posted by jeffv2 View Post
    Just thought I would share my script that I run with every nightly update
    Its easier then manually doing this.

    -it remaps my volume button
    -changes lcd density
    -changes wifi scan time
    & remove a bunch of apps I never use...

    I just placed it in /data/local/bin. So I always have it and all I have to run in terminal is setup.sh

    If anyone would like me to write you a script just ask(:

    HTML Code:
    #!/bin/bash
    #
    #mount r/w
    #
    
    mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system 
    
    #
    #remap keys
    #
    
    sed -i 's/key 212   CAMERA/key 212   VOLUME_DOWN       WAKE/g' /system/usr/keylayout/qwerty.kl
    
    sed -i 's/key 212   CAMERA/key 212   VOLUME_DOWN       WAKE/g' /system/usr/keylayout/sholes-keypad.kl
    
    #
    #
    #build.prop edits
    #
    #
    
    sed -i 's/ro.sf.lcd_density=240/ro.sf.lcd_density=220/g' /system/build.prop
    
    sed -i 's/wifi.supplicant_scan_interval = 15/wifi.supplicant_scan_interval = 90/g' /system/build.prop
    
    
    #
    #remove unwanted apps
    #
    #
    
    rm /system/app/Calendar.apk
    
    rm /system/app/CalendarProvider.apk
    
    rm /system/app/CarHomeLauncher.apk
    
    rm /system/app/GoogleCalendarSyncAdapter.apk
    
    rm /system/app/GoogleQuickSearchBox.apk
    
    rm /system/app/LatinImeTutorial.apk
    
    rm /system/app/LiveWallpapers.apk
    
    rm /system/app/LiveWallpapersPicker.apk
    
    rm /system/app/MagicSmokeWallpapers.apk
    
    rm /system/app/PicoTts.apk
    
    rm /system/app/Protips.apk
    
    rm /system/app/SetupWizard.apk
    
    rm /system/app/SoundRecorder.apk
    
    rm /system/app/TtsService.apk
    
    rm /system/app/VisualizationWallpapers.apk
    
    rm /system/app/VoiceDialer.apk
    
    rm /system/app/VpnServices.apk
    
    rm /system/app/FileManager.apk
    
    rm /system/app/ADWLauncher.apk
    Alright, I figure it's just .sh, my other question is where is data/local/bin? I opened up root explorer to try and find it but the only folders in data/local are download and tmp.
  8. Master Droid
    gambit07's Avatar
    Member #
    129334
    Join Date
    Oct 2010
    Posts
    384
    Phone
    Motorola Droid, Droid X
    #7
    I've also tried putting setup.sh in the local folder and CD'ing up to it to run from there but I just get setup.sh not found. Any ideas?
  9. Master Droid
    666ogre666's Avatar
    Member #
    41110
    Join Date
    Feb 2010
    Location
    New Jersey
    Posts
    585
    Liked
    9 times
    Twitter
    Gil_Smash
    Phone
    Galaxy Nexus
    #8
    This script looks cool, im assuming I could remove sections and have it still run? Some of the features your remove I use and I have no need to remap and buttons.
    Rom: SteelDroid Nexus 1.0
    Theme: Stock
    Kernel: franco.Kernel Nightly
    Launcher: Nova
  10. Developer
    jeffv2's Avatar
    Member #
    151962
    Join Date
    Dec 2010
    Location
    south jersey
    Posts
    1,241
    Liked
    3 times
    Phone
    galaxy nexus
    DroidForums.net Developer
    #9
    /data/local/bin is a path that terminal emulator already has as a path, so you can drop any scripts or anything like that there.. but you have to make the folder. & I remap my keys because my volume up button is broken. So I make my camera button the volume down (:

    Sent from my Droid using Tapatalk
  11. Developer
    jeffv2's Avatar
    Member #
    151962
    Join Date
    Dec 2010
    Location
    south jersey
    Posts
    1,241
    Liked
    3 times
    Phone
    galaxy nexus
    DroidForums.net Developer
    #10
    And yes, edit and use this to your likeing. When you run iit just type ". Setup.sh" with that extra period.

    I also added a

    If [ -f "/sdcard/reboot" ]
    Then
    Reboot
    Fi

    To the script, this. Way if the user has a blank file on the sdcard that's named reboot then the phone will reboot after running the command

    Sent from my Droid using Tapatalk
Page 1 of 4 123 ... LastLast

Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Similar Threads

  1. kernel for CM7 Nightly Builds?
    By dr01dm0dd3r in forum Cyanogenmod
    Replies: 7
    Last Post: 01-22-2011, 11:31 PM
  2. #Crackflashers nightly cm builds for droid
    By nwilkins15 in forum Android Roms
    Replies: 6
    Last Post: 01-09-2011, 02:39 PM
  3. Possible to run REVOlution on Nightly builds?
    By skatingrocker17 in forum Koush
    Replies: 0
    Last Post: 08-26-2010, 05:27 PM
  4. nightly builds
    By marty4short in forum Koush
    Replies: 20
    Last Post: 05-05-2010, 04:17 PM

Search tags for this page

android night build ??
,
android nightly build script
,
build.prop script
,
chromium nightly android
,
googlecalendarsyncadapter.apk
,

nightly build script

,
removing apps from build process cyanogenmod
,
rm android terminal
,
ro.sf.lcd
,
synergy nightly builds
Click on a term to search our site for related topics.
Find us on Google+