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
  • Psionic Roshambo @ Psionic Roshambo:
    Meth addicts don't move out of a house they are trying to sell and the boyfriend says she moved and does not know where lol
  • K3Nv2 @ K3Nv2:
    I was about to be like can't wait for gta6 so @Psionic Roshambo can tell me places to go then you drop that
    +3
  • BigOnYa @ BigOnYa:
    But gta6 will be in Psi hometown, and all cars will have a women on the roof, booty shaking.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    That was a thing here in Florida for a minute
  • Psionic Roshambo @ Psionic Roshambo:
    Like cars with the booty shaking lol I seen it once in person was like smiling lol
    +1
  • K3Nv2 @ K3Nv2:
    Nah I'm talking about visiting areas he hides his bodies at
  • Psionic Roshambo @ Psionic Roshambo:
    Vice City kind of feels like Miami lol
  • Xdqwerty @ Xdqwerty:
    @Psionic Roshambo, it's a parody iirc
  • BigOnYa @ BigOnYa:
    Yea think that's where it was supposed to be, Miami
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Having been to Miami hmmm probably a hundred times lol
  • Psionic Roshambo @ Psionic Roshambo:
    Back in my days as a delivery driver for a cartel well driver slash guy they would send if a payment was forgotten lol
  • Psionic Roshambo @ Psionic Roshambo:
    you know to help them find their checkbook lol
  • BigOnYa @ BigOnYa:
    Gta4 was NewYork or Chicago, gta5 is California
  • K3Nv2 @ K3Nv2:
    Damn camera phones catching crimes
  • Psionic Roshambo @ Psionic Roshambo:
    Always some women screaming... You break a few thousand dollars worth of crap in someone's living room and they scream lol
  • Psionic Roshambo @ Psionic Roshambo:
    lol Ken yeah the things I did as a kid I am soooo glad those didn't exist
  • K3Nv2 @ K3Nv2:
    If someone breaks my $20 TV stand their nose is getting broke
  • Psionic Roshambo @ Psionic Roshambo:
    Psi would be doing like 300-3,000 years in prison lol
  • K3Nv2 @ K3Nv2:
    Have some in closet allegations?
  • Psionic Roshambo @ Psionic Roshambo:
    Someone tried to pull a gun on me once, they reached into the couch thinking I wouldn't notice, quick kick to the arm snapping it between the wrist and elbow broke like a swing lol I reached into the couch to see what was in there, cool a free .380 lol had to hit him with it a few times to remind him not to do it again lol
  • Psionic Roshambo @ Psionic Roshambo:
    He had the 20K he owed the very next day it was a miracle lol
  • Psionic Roshambo @ Psionic Roshambo:
    Psi was a bad bad man at one point lol
  • BigOnYa @ BigOnYa:
    We need a GTA based on your life, or at least put you in 6 as a character.
  • Psionic Roshambo @ Psionic Roshambo:
    I don't think people would believe 10% of the things I have done lol thank god...
  • Psionic Roshambo @ Psionic Roshambo:
    I have a giant check list of impossible things, and I haven't done them all yet lol
    Psionic Roshambo @ Psionic Roshambo: I have a giant check list of impossible things, and I haven't done them all yet lol