Apps2SD auto script execute

Discussion in 'Bugless' started by rutger1413, Jun 28, 2010.

  1. rutger1413
    Offline

    rutger1413 New Member

    Joined:
    Nov 3, 2009
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    0
    I want to automatically execute the apps2sd script to default to auto when i reboot. Where can i place the command at that it will execute automatically? Or better, where can i find where Pete enables it by default on boot so that i can change it? Thanks!
  2. trainstroker
    Offline

    trainstroker New Member

    Joined:
    Dec 10, 2009
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    0
    you can get an app from the market to auto execute a script upon boot. also, i think that what you want can be handled by editing /system/bin/install-recovery.sh
  3. actngrezy
    Offline

    actngrezy New Member Developer

    Joined:
    Mar 21, 2010
    Messages:
    1,074
    Likes Received:
    2
    Trophy Points:
    0
    Location:
    delaware
    the install recovery.sh is in the etc folder and it no longer contains the pm setInstallLocation line so it cannot be edited to execute aps2sd on demand now unless you add this line:

    pm setInstallLocation 0

    0=auto 1=internal and 2=external

    This was how apps2sd was enabled by default in earlier versions but on this version apps are set to install internally by default so you can run the script to have to move install apps to your sd then move the ones to yoru phone you would like per say widgets. then re-run the srcitp after a reboot. I am not sure if you add that line if it will work but it may as that is how it was implemented before. Ill try to add the line and see if it does work. Ill give an update soon or if anyoen else can confirm?

    update: if you add that line and the number say 0 is auot or 2 for sdcard then yes this will work.
    navigate to yoru etc folder and mount as rw using root explorer and long press on the install-recovery.sh file and select open with text editor. you can then scroll to the bottom and add the line

    pm setInstallLocation 0

    because you want auto so you use 0
    if you want external(sdcard) then use 2

    now everytime you reboot in market will stilldownload apps to the spot you set
    Last edited: Jun 28, 2010
  4. trainstroker
    Offline

    trainstroker New Member

    Joined:
    Dec 10, 2009
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    0

    i thought setInstallLocation 2 was sdcard, 1 was internal memory and 0 was auto. also is this script run every time upon boot? because i like my apps on the internal memory. would love to change.
  5. actngrezy
    Offline

    actngrezy New Member Developer

    Joined:
    Mar 21, 2010
    Messages:
    1,074
    Likes Received:
    2
    Trophy Points:
    0
    Location:
    delaware
    yes 0 is auto 1 is internal 2 is external I edited my post i guess right when you wrote this post. Yesh this will run every time on boot if you add th epm set install location 1 line to the install recovery.sh file in the etc folder but you have to write it exactly like this
    pm setInstallLocation 0,1,or 2 just select which number for your location. and make sure you have the caps where they are needed. If you type this in terminal it will not survive a reboot but if you use petes apps2sd script a few have said that will survive a reboot when it was tested and of course that is much easier then editing this file
    Last edited: Jun 28, 2010
  6. Se7enLC
    Offline

    Se7enLC New Member

    Joined:
    Nov 16, 2009
    Messages:
    1,263
    Likes Received:
    0
    Trophy Points:
    0
    IMPORTANT

    You do not need to automatically execute anything to keep the sd card installs turned on or off on reboot! When you run "pm setInstallLocation", the setting IS saved permanently. The only reason that the startup script needed to be edited before was because pete's startup script was forcing that pm command to run on boot, setting it to install to the SD card! As of BB version 0.3, it is no longer being set on boot, so your settings will be saved.

    Put Simply:
    If you want to have things install to SD card, type:
    Code:
    apps2sd -e
    If you want things to always install to the internal memory, type:
    Code:
    apps2sd -i
    
    If you want to let the system automatically determine where to install, type:
    Code:
    apps2sd -a
    
    You don't need to do anything else to make the change stay permanently. It already does. All that apps2sd script does is run the pm setInstallLocation command. It doesn't do anything else fancy.
    Last edited: Jun 28, 2010
  7. actngrezy
    Offline

    actngrezy New Member Developer

    Joined:
    Mar 21, 2010
    Messages:
    1,074
    Likes Received:
    2
    Trophy Points:
    0
    Location:
    delaware
    Yeah at first people said it didnt stay permanently and then a few started sayign they did so thank you for confirming this.
  8. Se7enLC
    Offline

    Se7enLC New Member

    Joined:
    Nov 16, 2009
    Messages:
    1,263
    Likes Received:
    0
    Trophy Points:
    0
    Yep, It's the perpetual problem with software. By the time everybody finally understands how something works, the developer comes out with a new version that changes everything :p
  9. rutger1413
    Offline

    rutger1413 New Member

    Joined:
    Nov 3, 2009
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    0
    I guess my test case didnt work with the script.

    I installed a program that defaulted to the SD card on accident and didnt realize it b/c i set it to auto. So yes the script does work correctly....im just retarded.

    Thank you for your help though. I am a unix guy, but was unsure of which script was called at login.

    Thanks agian.
  10. GirLuvsDroid
    Offline

    GirLuvsDroid New Member

    Joined:
    Feb 18, 2010
    Messages:
    1,551
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Wilmington, DE
    I tested this earlier today using the apps2sd script in the Bugless Beast Toolkit Script Helper. The change did survive reboot.

    Using the BB Toolkit, you don't even need to type the script in the emulator!
  11. mike1986.
    Offline

    mike1986. New Member

    Joined:
    Feb 11, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Since a long time I'm trying to implement one feature into my custom ROM. I want to have InstallLocation 1 by default.

    I've already tried the following:

    1. I created init.d script called 90setlocation with following commands:
    but it doesn't work. Default InstallLocation is still 0 [auto]

    2. I created install-recovery.sh file which I placed in etc folder. install-recovery.sh has the following commands:
    also I tried with:

    but non of them works. install-recovery.sh should be executed from init.rc in boot.img but even if I add it to init.d script "/system/etc/install-recovery.sh" the default InstallLocation is still 0.

    I know I can do it with adb shell by typing pm setInstallLocation 1 or I can use e.g. Move2SD Enabler app but I want to have it set to 1 by default from the very beginning without need to change it after flashing ROM.

    Any ideas?

    Thanks!
Similar Threads
  1. PirateSonny
    Replies:
    1
    Views:
    532
  2. mising
    Replies:
    11
    Views:
    10,307
  3. molo41
    Replies:
    5
    Views:
    3,155
  4. motiond
    Replies:
    5
    Views:
    1,178
  5. yourname1245
    Replies:
    20
    Views:
    1,507
Loading...
Search tags for this page
android automatic run a command after boot
,
android run script on boot automatically
,
android run sh
,
android script auto
,

apps2sd droid x2.bin

,
aps2sd script
,
auto run script android init
,
how to run a script on android
,
run .sh on android
,
run script automatically at android boot init.omap4pandaboar
,
run sh script after recovery android
,
running a script upon boot in android