Android Package Installer

Castiel

Well-Known Member
OP
Member
Joined
Oct 15, 2010
Messages
502
Trophies
1
Age
28
Location
Ba Sing Se
XP
469
Country
Canada
So, I currently have a Motorola Razr XT925 HD. I rooted it and was deleting some stuff. I may have kind of possibly not so accidentally deleted the package installer, so now I can't install anything onto my phone. I was reading somewhere a little while ago that there should be a way to install stuff directly from your computer but you need specific programs, yada yada yada. If someone could walk me through that, or if someone has a much easier way of making it so I can install things onto my phone again that would be fantastic!
 

Tom Bombadildo

Dick, With Balls
Member
Joined
Jul 11, 2009
Messages
14,580
Trophies
2
Age
29
Location
I forgot
Website
POCKET.LIKEITS
XP
19,263
Country
United States
There are a couple ways to do it, actually. You can put the packagerinstaller.apk on your SD card then use a root explorer (like ES File Explorer) to move it to /system/app. Then just restart your phone, and it should work from there. Done it hundreds of times with Trebuchet launcher on non-CM ROMs, works fine.

You can also use ADB on PC to push the apk file directly to /system/app as well.
 

Castiel

Well-Known Member
OP
Member
Joined
Oct 15, 2010
Messages
502
Trophies
1
Age
28
Location
Ba Sing Se
XP
469
Country
Canada
There are a couple ways to do it, actually. You can put the packagerinstaller.apk on your SD card then use a root explorer (like ES File Explorer) to move it to /system/app. Then just restart your phone, and it should work from there. Done it hundreds of times with Trebuchet launcher on non-CM ROMs, works fine.

You can also use ADB on PC to push the apk file directly to /system/app as well.

Sorry, but I'm a little confused on how that works. Don't .apk files have to be installed onto your phone before they can be moved to system apps?
 

Tom Bombadildo

Dick, With Balls
Member
Joined
Jul 11, 2009
Messages
14,580
Trophies
2
Age
29
Location
I forgot
Website
POCKET.LIKEITS
XP
19,263
Country
United States
It's a bit complicated, really, and I know I probably won't explain it right...but....Think of APKs like .jar files, they're archives that hold all the resources and assets and such all in one file that can be run from the system. Generally when you install an app, it'll move the APK to /data/apps and will then create a data directory in /data/data that holds all the settings and any other file generated by the APK. Large games like...Half Life or something require separate resources that must be downloaded with the APK, generally the APK will be small and then the app itself will download and move the files to /sdcard/Android/obb (or /data).

System apps are generally small, and don't require any additional files (since they're usually packaged with Android itself). Here's a screenshot of the /system/app directory on my Shield:

ebf0JBD.png

Just a bunch of APK files.
 

Castiel

Well-Known Member
OP
Member
Joined
Oct 15, 2010
Messages
502
Trophies
1
Age
28
Location
Ba Sing Se
XP
469
Country
Canada
It's a bit complicated, really, and I know I probably won't explain it right...but....Think of APKs like .jar files, they're archives that hold all the resources and assets and such all in one file that can be run from the system. Generally when you install an app, it'll move the APK to /data/apps and will then create a data directory in /data/data that holds all the settings and any other file generated by the APK. Large games like...Half Life or something require separate resources that must be downloaded with the APK, generally the APK will be small and then the app itself will download and move the files to /sdcard/Android/obb (or /data).

System apps are generally small, and don't require any additional files (since they're usually packaged with Android itself). Here's a screenshot of the /system/app directory on my Shield:

ebf0JBD.png

Just a bunch of APK files.

Gotcha. So, if I have downloaded the packageinstaller.apk, how would I use the ADT program to move it directly to system/apps?
 

Tom Bombadildo

Dick, With Balls
Member
Joined
Jul 11, 2009
Messages
14,580
Trophies
2
Age
29
Location
I forgot
Website
POCKET.LIKEITS
XP
19,263
Country
United States
ADB* There are some adb standalone installs, so you don't need to install the entire Android SDK, so that's an option to get ADB as well.

Download the drivers for your phone.
Turn USB Debugging mode on (it's in Developer Mode in the settings, if Dev mode isn't there go to Settings->About and find "Build Number" and tap it until Dev mode is enabled).
Plug your phone into your PC.
Open CMD prompt, cd to where adb.exe is in the Android SDK install folder (should be in x/Android/android-sdk/platform-tools), move the packageinstaller.apk to the same directory.
Type in "adb devices", it should attempt to connect to your phone.
Once it does, type "adb push packageinstaller.apk /system/app" .
It'll then send the apk to your /system/app directory. After that, restart your phone and it should be back again.
 

Castiel

Well-Known Member
OP
Member
Joined
Oct 15, 2010
Messages
502
Trophies
1
Age
28
Location
Ba Sing Se
XP
469
Country
Canada
ADB* There are some adb standalone installs, so you don't need to install the entire Android SDK, so that's an option to get ADB as well.

Download the drivers for your phone.
Turn USB Debugging mode on (it's in Developer Mode in the settings, if Dev mode isn't there go to Settings->About and find "Build Number" and tap it until Dev mode is enabled).
Plug your phone into your PC.
Open CMD prompt, cd to where adb.exe is in the Android SDK install folder (should be in x/Android/android-sdk/platform-tools), move the packageinstaller.apk to the same directory.
Type in "adb devices", it should attempt to connect to your phone.
Once it does, type "adb push packageinstaller.apk /system/app" .
It'll then send the apk to your /system/app directory. After that, restart your phone and it should be back again.

When I type adb devices it says adb is not a recognized as an internal or external command.

I don't want you to go to too much work. I'm trying to do this on Windows. But a step-by-step process would be nice. I am really confused :/
 

Tom Bombadildo

Dick, With Balls
Member
Joined
Jul 11, 2009
Messages
14,580
Trophies
2
Age
29
Location
I forgot
Website
POCKET.LIKEITS
XP
19,263
Country
United States
The only time that would happen is if you weren't in the directory of adb.exe in the CMD prompt.

Try holding shift, right clicking in the same directory as adb.exe, and pick "Open a command line window here", then continue with the ADB stuff. The above is literally the step by step.
 

Castiel

Well-Known Member
OP
Member
Joined
Oct 15, 2010
Messages
502
Trophies
1
Age
28
Location
Ba Sing Se
XP
469
Country
Canada
The only time that would happen is if you weren't in the directory of adb.exe in the CMD prompt.

Try holding shift, right clicking in the same directory as adb.exe, and pick "Open a command line window here", then continue with the ADB stuff. The above is literally the step by step.

Okay, wait. I got most of it. I understand. This is the last issue I'm having. It says it failed to copy packageinstaller.apk because it's a read-only file system.
 

Castiel

Well-Known Member
OP
Member
Joined
Oct 15, 2010
Messages
502
Trophies
1
Age
28
Location
Ba Sing Se
XP
469
Country
Canada
Ok, try pushing the apk to /sdcard/Download, then try using /system/app Mover to move the apk to the /system/app directory on your phone.

One second. I typed adb root and then adb su and now it's not able to find my device. Should I just close the cmd prompt and try again? This is the messages I have right now:
Help1.png
 

Castiel

Well-Known Member
OP
Member
Joined
Oct 15, 2010
Messages
502
Trophies
1
Age
28
Location
Ba Sing Se
XP
469
Country
Canada
Do you have any terminal or file explorer with root access installed? Either one will do the job.

All I got is /system/app Mover, and App Master. As far as I'm aware anyways.


Ok, try pushing the apk to /sdcard/Download, then try using /system/app Mover to move the apk to the /system/app directory on your phone.
The problem with that is, as far as I can tell, /system/app Mover doesn't access the SD card.
 

cracker

Nyah!
Member
Joined
Aug 24, 2005
Messages
3,619
Trophies
1
XP
2,213
Country
United States
Ok I thought up another way around your problem. Put this zip on the root of your internal storage and rename it update.zip. Next reboot into recovery (CWM or TWRP) and install the zip from there and reboot. It should then reinstall the apk during boot up.
 

Castiel

Well-Known Member
OP
Member
Joined
Oct 15, 2010
Messages
502
Trophies
1
Age
28
Location
Ba Sing Se
XP
469
Country
Canada
Ok I thought up another way around your problem. Put this zip on the root of your internal storage and rename it update.zip. Next reboot into recovery (CWM or TWRP) and install the zip from there and reboot. It should then reinstall the apk during boot up.

The link doesn't lead me to a download. Just to a black screen that says there should be a packageinstaller.zip.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BigOnYa @ BigOnYa:
    That is cheap, I used to pay $100 for a tine.
  • Psionic Roshambo @ Psionic Roshambo:
    Tine? One gram?
  • BigOnYa @ BigOnYa:
    Sixteenth
  • Psionic Roshambo @ Psionic Roshambo:
    Also it was literally out of a kilo when I got it off the boat so absolutely pure
  • Psionic Roshambo @ Psionic Roshambo:
    Holy shiz that's a lot
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I was getting 3.5 Grams for 320 could have stepped on it and doubled my money easy lol
    +1
  • BigOnYa @ BigOnYa:
    I'd be afraid to it nowdays, my heart would explode prob. I just stick beers n buds nowdays.
  • Psionic Roshambo @ Psionic Roshambo:
    I would get to drive from tarpon springs to like Miami a thousand bucks lol do that twice a week and back in 92 that was good money
  • Xdqwerty @ Xdqwerty:
    @BigOnYa,
    @Psionic Roshambo what are you guys talking about?
  • Psionic Roshambo @ Psionic Roshambo:
    Blew it on women and muscle cars lol
    +1
  • BigOnYa @ BigOnYa:
    @Xdqwerty Hamster food, its pricey nowadays to keep PCs running.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    I don't do anything except cigarettes and gotta stop eventually lol
    +1
  • BigOnYa @ BigOnYa:
    I'd do shrooms again if could find, and I was outside camping/fishing, and had a cooler full of beer.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I wouldn't mind some LSD, laughing until my face hurt sounds fun lol
    +1
  • BigOnYa @ BigOnYa:
    You ever try soaper powder/qauludes? I did once and like a dumbass drank beer on top of taking, I woke up laying in my backyard in the pouring rain, it knocked me out. I have not seen it around in many many years.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    No never tried a lot of things but never that lol
  • Psionic Roshambo @ Psionic Roshambo:
    I did pass out one time on a floor after taking a bunch of Ambien lol thought it would help me sleep and did it lol
  • Psionic Roshambo @ Psionic Roshambo:
    Girlfriend was working at a pharmacy and stole like 500 of them, was and still is the biggest pill bottle I have ever seen lol
  • K3Nv2 @ K3Nv2:
    Ativan is pretty legit
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    The last time I had to take something to help me sleep, I was prescribed Trazadone it was pretty OK to be honest.
  • Psionic Roshambo @ Psionic Roshambo:
    Not something I need at all these days, doing a lot better lol
  • BigOnYa @ BigOnYa:
    That Nuka Cola video with old ice grinder is cool, I want one.
    +1
    Xdqwerty @ Xdqwerty: @salazarcosplay, hi