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

Thread: Does the automatic setInstallLocation even work?

  1. Droid Ninja
    Se7enLC's Avatar
    Member #
    5148
    Join Date
    Nov 2009
    Posts
    1,263
    Liked
    6 times
    Phone
    Samsung Galaxy Nexus
    #1

    Does the automatic setInstallLocation even work?

    Can somebody using BB 0.2 run this test and tell me what it says?

    Code:
    pm getInstallLocation
    If that doesn't work, run this:

    Code:
    cd /system/bin
    sh pm getInstallLocation
    Please let me know if you had to use the second method and what the output is.
    Cool CM Tricks
    custom_backup_list.txt - make a list of files in /system that will survive a nightly install (ringtones, notifications, system apps, wallpapers, whatever)
    in Terminal Emulator, set this as your shell command: "/system/xbin/su -c /system/xbin/bash". You get all the features of bash, root access, and you can still use the initial command field for whatever you want (default is adding /data/local/bin to your path)
  2. Sponsor
    DF Advertising
    Join Date
    Nov 2008
    Location
    DroidForums.net
     
     
     
     
  3. Developer
    actngrezy's Avatar
    Member #
    49451
    Join Date
    Mar 2010
    Location
    delaware
    Posts
    1,072
    Liked
    29 times
    Phone
    motorola droid
    DroidForums.net Developer
    #2
    Quote Originally Posted by Se7enLC View Post
    Can somebody using BB 0.2 run this test and tell me what it says?

    Code:
    pm getInstallLocation
    If that doesn't work, run this:

    Code:
    cd /system/bin
    sh pm getInstallLocation
    Please let me know if you had to use the second method and what the output is.
    Give me n gr if none does it by time I'm home I will


    Looking for devices to expand p.e.
    Let me know if you have one for sale or to donate.
  4. Junior Droid
    temchik's Avatar
    Member #
    76842
    Join Date
    Jun 2010
    Posts
    18
    Phone
    Moto Droid (Froyo)
    #3
    mine returns 2. by the way, even if I set it manually to 1 a reboot reverts it back to 2...
  5. Droid Ninja
    Se7enLC's Avatar
    Member #
    5148
    Join Date
    Nov 2009
    Posts
    1,263
    Liked
    6 times
    Phone
    Samsung Galaxy Nexus
    #4
    Quote Originally Posted by temchik View Post
    mine returns 2. by the way, even if I set it manually to 1 a reboot reverts it back to 2...
    Huh - must be something weird about my installation.

    I'm looking directly at the installation file for BB 0.2 (FRF57V02.zip) at:
    /system/bin/pm
    /system/etc/install-recovery.sh

    And I see NO WAY that pm should be able to execute from the commandline OR from /system/bin if those two files properly install. pm, even if marked executable, cannot execute unless you add #!/system/bin/sh as the first line.

    Can somebody post the contents of their /system/bin/pm file and verify that it runs when they type "pm"? Can you also type "busybox which pm" to see that it is, in fact, executing the /system/bin/pm script?
    Cool CM Tricks
    custom_backup_list.txt - make a list of files in /system that will survive a nightly install (ringtones, notifications, system apps, wallpapers, whatever)
    in Terminal Emulator, set this as your shell command: "/system/xbin/su -c /system/xbin/bash". You get all the features of bash, root access, and you can still use the initial command field for whatever you want (default is adding /data/local/bin to your path)
  6. Junior Droid
    temchik's Avatar
    Member #
    76842
    Join Date
    Jun 2010
    Posts
    18
    Phone
    Moto Droid (Froyo)
    #5
    here's mine:

    Code:
    # busybox which pm
    busybox which pm
    /system/bin/pm
    # ls -l /system/bin/pm
    ls -l /system/bin/pm
    -rwxr-xr-x root     shell         191 2008-08-01 08:00 pm
    # cat /system/bin/pm
    cat /system/bin/pm
    # Script to start "pm" on the device, which has a very rudimentary
    # shell.
    #
    base=/system
    export CLASSPATH=$base/framework/pm.jar
    exec app_process $base/bin com.android.commands.pm.Pm "$@"
    
    # pm getInstallLocation
    pm getInstallLocation
    2[external]
  7. Droid Ninja
    Se7enLC's Avatar
    Member #
    5148
    Join Date
    Nov 2009
    Posts
    1,263
    Liked
    6 times
    Phone
    Samsung Galaxy Nexus
    #6
    Huh, that's exactly what I have.

    Looks like it's a bug (intentional feature?) in the default android shell that makes it just assume that any executable text file is a shell script without needing a shebang line! I switched back to the default shell, and it worked fine again.

    To anybody else having this problem - you need to modify /system/bin/pm to include that header line, and you're all set.

    http://en.wikipedia.org/wiki/Shebang_%28Unix%29
    Cool CM Tricks
    custom_backup_list.txt - make a list of files in /system that will survive a nightly install (ringtones, notifications, system apps, wallpapers, whatever)
    in Terminal Emulator, set this as your shell command: "/system/xbin/su -c /system/xbin/bash". You get all the features of bash, root access, and you can still use the initial command field for whatever you want (default is adding /data/local/bin to your path)
  8. Master Droid
    michael_campbell's Avatar
    Member #
    63778
    Join Date
    Apr 2010
    Location
    Atlanta suburbia.
    Posts
    328
    Phone
    Moto Droid 1.
    #7
    Quote Originally Posted by Se7enLC View Post
    Huh, that's exactly what I have.

    Looks like it's a bug (intentional feature?) in the default android shell that makes it just assume that any executable text file is a shell script without needing a shebang line! I switched back to the default shell, and it worked fine again.

    To anybody else having this problem - you need to modify /system/bin/pm to include that header line, and you're all set.

    Shebang (Unix) - Wikipedia, the free encyclopedia

    This is fairly standard unix behavior.

    Code:
    bash-3.2$ ls -la foo
    ls: cannot access foo: No such file or directory
    bash-3.2$ echo "echo I am foo\!" > foo
    bash-3.2$ chmod +x foo
    bash-3.2$ ./foo
    I am foo!
    bash-3.2$
  9. Droid Ninja
    Se7enLC's Avatar
    Member #
    5148
    Join Date
    Nov 2009
    Posts
    1,263
    Liked
    6 times
    Phone
    Samsung Galaxy Nexus
    #8
    Quote Originally Posted by michael_campbell View Post
    This is fairly standard unix behavior.

    Code:
    bash-3.2$ ls -la foo
    ls: cannot access foo: No such file or directory
    bash-3.2$ echo "echo I am foo\!" > foo
    bash-3.2$ chmod +x foo
    bash-3.2$ ./foo
    I am foo!
    bash-3.2$
    Well I stand corrected! I guess the bug lies with the busybox ash shell, then, for not exhibiting that behavior. I've never actually tried to make a shell script without a shebang line. Learn something new every day...
    Cool CM Tricks
    custom_backup_list.txt - make a list of files in /system that will survive a nightly install (ringtones, notifications, system apps, wallpapers, whatever)
    in Terminal Emulator, set this as your shell command: "/system/xbin/su -c /system/xbin/bash". You get all the features of bash, root access, and you can still use the initial command field for whatever you want (default is adding /data/local/bin to your path)
  10. Master Droid
    michael_campbell's Avatar
    Member #
    63778
    Join Date
    Apr 2010
    Location
    Atlanta suburbia.
    Posts
    328
    Phone
    Moto Droid 1.
    #9
    Quote Originally Posted by Se7enLC View Post
    Well I stand corrected! I guess the bug lies with the busybox ash shell, then, for not exhibiting that behavior. I've never actually tried to make a shell script without a shebang line. Learn something new every day...
    The only reason I knew was that I often forget the shebang on perl/ruby/python scripts, and then gasp in awe at the error messages that (ba)sh emits when trying to run the damn things!

Ads

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. Automatic Rom Backup
    By OneTenderRebel in forum Droid Hacks
    Replies: 7
    Last Post: 06-12-2010, 07:21 AM
  2. Automatic Brightness doesn't work
    By VirtualGeek in forum Droid Hacks
    Replies: 2
    Last Post: 06-04-2010, 08:33 AM
  3. Automatic Re-dialer?
    By msmingel in forum Android Applications
    Replies: 1
    Last Post: 04-08-2010, 06:14 AM
  4. automatic pausing
    By ggtus in forum Android Tech Support
    Replies: 0
    Last Post: 03-14-2010, 02:46 PM
  5. automatic on/off
    By dabootsan in forum Android General Discussions
    Replies: 8
    Last Post: 02-09-2010, 11:08 AM

Search tags for this page

adb setinstalllocation

,

adb shell pm setinstalllocation

,

adb shell pm setinstalllocation 0

,

adb shell pm setinstalllocation 2

,

adb shell pm setinstalllocation 2 device not found

,
adb shell setinstalllocation
,
android pm setinstalllocation
,
android setinstalllocation 2
,

pm setinstalllocation

,
pm setinstalllocation 0
,

pm setinstalllocation 1

,

pm setinstalllocation 2

,

setinstalllocation

,

setinstalllocation 2

,
setinstalllocation doesn't work
Click on a term to search our site for related topics.
Find us on Google+