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,582
Trophies
2
Age
29
Location
I forgot
Website
POCKET.LIKEITS
XP
19,316
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,582
Trophies
2
Age
29
Location
I forgot
Website
POCKET.LIKEITS
XP
19,316
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,582
Trophies
2
Age
29
Location
I forgot
Website
POCKET.LIKEITS
XP
19,316
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,582
Trophies
2
Age
29
Location
I forgot
Website
POCKET.LIKEITS
XP
19,316
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
  • No one is chatting at the moment.
  • Psionic Roshambo @ Psionic Roshambo:
    Float like a butterfly burns when I pee lol
    +1
  • BigOnYa @ BigOnYa:
    So does that mean your date was not good? It burns now?
    +1
  • K3Nv2 @ K3Nv2:
    Got two new stds in one night
    +1
  • BigOnYa @ BigOnYa:
    Giggity
    +1
  • The Catboy @ The Catboy:
    I don't bite! Minus the times when I did bite
  • The Catboy @ The Catboy:
    Like 5 minutes ago
  • K3Nv2 @ K3Nv2:
    Billie needs her lunch
  • K3Nv2 @ K3Nv2:
    Ffs papa brought back the cheeseburger pizza it's like the only decent pie they had since the 80s
  • BigOnYa @ BigOnYa:
    I'm not a fan of papa johns, but that does sound good. We hardly order out pizza, I like making my own, but when we do its donatoes
  • K3Nv2 @ K3Nv2:
    I get them like once every two months anymore
  • K3Nv2 @ K3Nv2:
    Just because it's half a mile from where I live
  • BigOnYa @ BigOnYa:
    Request next time you order, that Shaq deliver it to you
  • K3Nv2 @ K3Nv2:
    I want him to buy me a chain also
  • K3Nv2 @ K3Nv2:
    Open it right next to the one we have
    +1
  • BakerMan @ BakerMan:
    guys should i make a new thread and just count the amount of posts until kyle, luke or leo joins the thread for fun?
  • BakerMan @ BakerMan:
    kyle's fine, just waiting for that wario joke

    luke and leo though, they yap until the thread's enjoyability is about halved
  • K3Nv2 @ K3Nv2:
    Leo is Luke's alterego when he gets hard
  • BigOnYa @ BigOnYa:
    Luke is gone, he got banned. And I'm surprised Leo hasn't yet
  • K3Nv2 @ K3Nv2:
    Subway was actually pretty decent tonight
  • BigOnYa @ BigOnYa:
    Wut you get, a seafood and psi salad sub
  • K3Nv2 @ K3Nv2:
    Psi had my footlong meatball special
    +1
  • PandaPandel @ PandaPandel:
    i want a meatball sandwich
    now
  • K3Nv2 @ K3Nv2:
    Gay
  • BigOnYa @ BigOnYa:
    Bout time you came out and admitted it
  • K3Nv2 @ K3Nv2:
    Bigonya talks to himself often
    +1
    K3Nv2 @ K3Nv2: Bigonya talks to himself often +1