Results 1 to 10 of 10
  1. Thread Author  Thread Author    #1  

    Default Installing apks via the terminal emulator

    So, I still need to reinstall my gallery.apk, and I can't do it by just clicking on it, even with root. Can anyone tell me what the proper terminal commands would be to install the darned thing?

    Thanks!
  2. #2  
    JkdJedi's Avatar
    Android Enthusiast

    Posts
    2,106 Posts
    ROM
    SKAnkCM10/Milestone6

    Default

    Quote Originally Posted by ottscay View Post
    So, I still need to reinstall my gallery.apk, and I can't do it by just clicking on it, even with root. Can anyone tell me what the proper terminal commands would be to install the darned thing?

    Thanks!
    Are you on Apex?
  3. Thread Author  Thread Author    #3  

    Default

    No. In fact I want to try apex, but first I want to have a fully working stock, which means I need to reinstall the gallery.apk (which was messed up by a program I was beta testing). So I can't just use the apex script
  4. #4  
    JkdJedi's Avatar
    Android Enthusiast

    Posts
    2,106 Posts
    ROM
    SKAnkCM10/Milestone6

    Default

    Quote Originally Posted by ottscay View Post
    No. In fact I want to try apex, but first I want to have a fully working stock, which means I need to reinstall the gallery.apk (which was messed up by a program I was beta testing). So I can't just use the apex script
    try this, it might work....

    $su
    # push gallery.apk /system/app

    It might work only system/app is read only and I had to Mount the system in bootstrap in order to push a similar .apk file via ADB. It's possible though with $su

    hope it works!
  5. #5  
    tntdroid's Avatar
    Droiderator

    Posts
    5,672 Posts
    ROM
    Bugless Nexus

    Default

    Quote Originally Posted by ottscay View Post
    So, I still need to reinstall my gallery.apk, and I can't do it by just clicking on it, even with root. Can anyone tell me what the proper terminal commands would be to install the darned thing?

    Thanks!
    What no stock backup to flash back? If your trying to get a fresh system to backup and flash to to get ota updates id just sbf. Then backup and run apex.

    Sent from my DROIDX using Tapatalk
  6. Thread Author  Thread Author    #6  

    Default

    Well, everything else is working fine, so I was just going to use this image as my backup if I could get the gallery working, then back it up. That way I don't have to sbf when I want to go back (and I don't have to reinstall apps).

    Edit: that said, it didn't work, so I'll probably have to sbf
  7. #7  

    Default

    Quote Originally Posted by ottscay View Post
    Well, everything else is working fine, so I was just going to use this image as my backup if I could get the gallery working, then back it up. That way I don't have to sbf when I want to go back (and I don't have to reinstall apps).

    Edit: that said, it didn't work, so I'll probably have to sbf
    What SBF are you using, there's so many versions of modified versions I really haven't figured out which one is the stock untouched SBF for 2.2.1 (2.3.340)?
    Last edited by wildman; 12-28-2010 at 08:26 PM.
    Samsung S3
    Time to feel the POWER...
  8. #8  
    JkdJedi's Avatar
    Android Enthusiast

    Posts
    2,106 Posts
    ROM
    SKAnkCM10/Milestone6

    Default

    Quote Originally Posted by ottscay View Post
    So, I still need to reinstall my gallery.apk, and I can't do it by just clicking on it, even with root. Can anyone tell me what the proper terminal commands would be to install the darned thing?

    Thanks!
    If you havnt figured this out yet and you still have this gallery.apk in your system/app, try and see if your permissions are set right. Just compare them to any other apk you got there. change them if you have to and then do a reboot, it's a coin flip.
  9. #9  

    Default

    Quote Originally Posted by JkdJedi View Post
    If you havnt figured this out yet and you still have this gallery.apk in your system/app, try and see if your permissions are set right. Just compare them to any other apk you got there. change them if you have to and then do a reboot, it's a coin flip.
    Also if apk is still in the system/app directory you can click on the apk and it usually prompts to reinstall the app. I have been able to do that with a number of installed apps but I never tried system apps.
    Samsung S3
    Time to feel the POWER...
  10. #10  
    ezun's Avatar

    Posts
    100 Posts
    Global Posts
    120 Global Posts

    Default

    Here are a couple of different options to try.

    For both options you will need to put the gallery apk into the same directory as your sdk install. (if you don't know what this is try to pull a file from your device and see where it ends up. Mine is /AndroidSDK/tools because I installed the SDK in the /AndroidSDK directory on my PC)

    with all of the commands to type below ignore the single quotes (')

    *Install from PC*
    1) connect your phone and make sure adb can detect it.
    - Launch command prompt
    - Navigate to your sdk directory
    - type 'adb devices' - you should now see your device listed.
    2) Go back to the command prompt and type 'adb install [apk name.apk]
    3) You should now see a success message, if you it fails try my other option below.

    *Manually place APK into /system/app*
    1) connect your phone and make sure adb can detect it.
    - Launch command prompt
    - Navigate to your sdk directory
    - type 'adb devices' - you should now see your device listed.
    2) push gallery apk to your sd card.
    -type 'adb push [apk name.apk] /sdcard/[apk name.apk]
    3) Launch a second command prompt
    -type 'adb shell'
    -type 'su'
    -type 'mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system'
    4) go back to first command prompt
    -type 'adb shell'
    -type 'su'
    -type 'cd /system/app'
    -type 'cp /sdcard/[apk name.apk] [apk name.apk]'
    -command prompt will show 'cp /sdcard/[apk name.apk] [apk name.apk]'
    -type 'exit' (this will get you out of su)
    -type 'exit' again (this should get you out of adb shell)
    -type 'exit' again (this should close the command prompt)
    5) go back to first command prompt
    -type 'exit' (this will get you out of su)
    -type 'exit' again (this should get you out of adb shell)
    -type 'adb reboot' (this will reboot your phone)
    -type 'exit' again (this should close the command prompt)

    You may not need to do this in 2 command prompts, but for some reason I've had issue using just one before.

    one of these should work. If not, post the errors you get and we'll work through it.
    BB9700 -> Droid Incredible -> Droid X

Posting Permissions

B