[Script] For Stock ROMS! Enable AutoStart Scripts! (etc/init.d folder) w/o VR Patch!

Search This thread

Notorious544d

Senior Member
Aug 18, 2011
2,104
2,370
London
Do I still have to download this to ensure that V6 starts at boot? Or does the V6 now do it automatically?
I'm using stock based Rom Atrix
 

zeppelinrox

Senior Member
Dec 21, 2010
9,374
21,589
IN THE FREAKIN' OP
If the rom has a /system/etc/init.d folder then the rom would likely have init.d enabled to run boot scripts.

But if it doesn't, this script should work to make any script in the init.d folder run at boot.

I personally got it to work flawlessly on an Atrix with the stock rom.
 
  • Like
Reactions: Notorious544d

quadjacks

Senior Member
Mar 10, 2008
395
38
UpState NY
If the rom has a /system/etc/init.d folder then the rom would likely have init.d enabled to run boot scripts.

But if it doesn't, this script should work to make any script in the init.d folder run at boot.

I personally got it to work flawlessly on an Atrix with the stock rom.
Hey Z, if i wanted to change to your scripts, couldn't I just delete what's in the init.d folder that my ROM has and run script manager for V6 & KAK?
 

phone_user

Senior Member
Nov 13, 2011
791
644
[sorry for off topic]
Nexus S does not have /system/bin/mot_boot_mode, but has /system/etc/init.goldfish.sh instead.
Code:
#!/system/bin/sh

ifconfig eth0 10.0.2.15 netmask 255.255.255.0 up
route add default gw 10.0.2.2 dev eth0

qemud=`getprop ro.kernel.android.qemud`
case "$qemud" in
    "")
    radio_ril=`getprop ro.kernel.android.ril`
    case "$radio_ril" in
        "")
        # no need for the radio interface daemon
        # telephony is entirely emulated in Java
        setprop ro.radio.noril yes
        stop ril-daemon
        ;;
    esac
    ;;
esac

num_dns=`getprop ro.kernel.android.ndns`
case "$num_dns" in
    2) setprop net.eth0.dns2 10.0.2.4
    ;;
    3) setprop net.eth0.dns2 10.0.2.4
    setprop net.eth0.dns3 10.0.2.5
    ;;
    4) setprop net.eth0.dns2 10.0.2.4
    setprop net.eth0.dns3 10.0.2.5
    setprop net.eth0.dns4 10.0.2.6
    ;;
esac

# disable boot animation for a faster boot sequence when needed
boot_anim=`getprop ro.kernel.android.bootanim`
case "$boot_anim" in
    0)  setprop debug.sf.nobootanimation 1
    ;;
esac

# call 'qemu-props' to set system properties from the emulator.
#
/system/bin/qemu-props

# this line doesn't really do anything useful. however without it the
# previous setprop doesn't seem to apply for some really odd reason
setprop ro.qemu.init.completed 1
Modifying this file, should I get for the same result?
 

zeppelinrox

Senior Member
Dec 21, 2010
9,374
21,589
IN THE FREAKIN' OP
I don't think so.
Since its on nearly every Android device, I'd think that it would be a prime hack that everybody knew about.
I looked into it once anyway but didn't come up with anything that worked.

However a quick google came up with this interesting idea
http://forums.androidcentral.com/optimus-v-rooting-roms-hacks/78686-init-d-support-3.html

Apparently many stock kernels call that install-recovery.sh file even if it doesn't exist.
In fact, I've came across that idea before on some blog... oh yeah now i remember... he used it to run supercharger... lol
So try using that idea first.

I just tested it but it didn't work.
I did change the permissions and ownership to those found in the goldfish file so don't forget to do that :)

You may find more useful info by googling up that filename plus init.d
 

markie57

New member
Jun 18, 2017
2
0
Thank you for this. this is an old thread, but I have something I need help with. I ran the script and it did it's job pretty well. All good. But now no firewall seems to work for me. can't block connections to apps. Something about iptables that after enabling init.d don't work anymore. I looked everywhere but can't seem to find a solution
 

Top Liked Posts

  • There are no posts matching your filters.
  • 24
    I'm not sure on which phones this will work.
    Motorola Milestone is for certain. Probably other Motorolas as well.
    If you have the file /system/bin/mot_boot_mode, then this should work just fine.

    Edit: Works on DroidX, Atrix, Bionic, Defy... (I guess it really does have a chance of working if you have mot_boot_mode :)

    Do this at your own risk

    What you need:

    1. GScript Lite or Script Manager
    2. Rooted Phone. For Milestoners, you can use Universal Androot (not in market ?)
    3. Busybox Installer

    You don't need to have a vulnerable recovery applied.

    Why you want it: People on custom roms take it for granted that they can run custom scripts from the /system/etc/init.d folder.

    Overclocking, tweaking memory settings, kernel tweaks, etc.

    Those on Stock ROMS usually have to resort to 3rd party apps (eg. Milestone Overclock, Auto Memory Manager) that take up memory to do stuff that custom roms do automatically and easily - with boot up scripts.

    It's possible for Stock ROMS to get this ability via open recovery but most users may find it overwhelming and confusing as to where to even start.

    I have also been working on GScripts to get my SuperCharging / Bulletproof Launcher tweaks to work on all phones without need of 3rd party software.
    I found that the easiest way would be with a startup script placed in the /system/etc/init.d - the same way that custom roms do it.

    Since alot of users would be uncomfortable with getting it working via open recovery, I converted the open recovery script to work in GScript!

    Booya!

    Instructions: 1. Extract the attached zip file into the root of your sdcard. The files should then be inside the folder /sdcard/gscript
    ................... 2. Run GScript Lite
    ................... 3. Press menu > Add script > Load file button
    ................... 4. Select "!Autostarts - Enable init.d on Stock ROMS.sh"
    ................... 5. Leave "Needs SU?" checked and press the Save button.
    ................... 6. It now shows up in the list of GScripts.
    ................... Note: GScript will save it internally within it's settings.
    ................... 7. Run the script by simply selecting it in GScript... and...
    ................... 8. Get tweaking!

    All thanks go to those who put Androidian OpenRecovery together! ie. Skrilax_CZ, Azhad and 89luca89!!


    1
    For charging it, use the wall charger.
    Does anything happen if you take the battery out and plug it in?
    Normally, you would get a big battery icon with a question mark.
    Then put the battery in and it changes to whatever the battery level is.
    1
    If you don't have much battery left, you're not gonna get too far.
    It'll just keep draining more n more.

    Howabout a car charger to charge it in the meantime?
    1
    ah ok.
    Hopefully it won't take too long to get it back