[Q] Update system APK without ADB Push? - General Questions and Answers

We have an app built into the system of a custom rom/hardware that allows the end-user to update various programs on the Android device. However, we have no way of updating the update program. If we do it normally by installing it like any other app, it gets reverted when the system is rebooted.
Is there a way to update a system APK without having to use adb push or have the end-user do anything special? I'd rather not have to send out a bunch of SD cards with firmware images and instruct each of them on how to update it. Is there some way we can sign the application so the Android OS knows it's a valid system app and not overwrite it?

Related

[Q] what is the process for upgrade pre-installed app?

Hi,
In my understand, the pre-installed apps are placed on path /system/app, and the /system partition should be read-only partition without rooted, right?
So how the pre-installed apps can be upgraded?
For example, the pre-installed Google Maps app can be updated from Android Market. How it can replace the old Google Maps app with a new one on /system/app? What is the process?
Can someone help me to understand it?
They're installed normally to /data/app, then system uses them instead of files from /system/app. You could have checked this out by yourself.
what is the details about Google maps upgrade?
Hi, Brut
Thank you.
But could you please explain more details? I'm using Motorola ME600, no built-in Google Maps and Android Market. I can't check it by myself.
If the updated apps are installed in /data/app, how can they do that? I mean they should not be installed successfully if the updated apps used the same package name as the olds. It should fail due to the old one still exist. And how about the signature of updated app? Should it same as the old one?
Even the update apps can be installed, how does the system use them to replace the built-ins? I think we should find 2 icons in the Lanucher if they have same main entry. But in fact, there is only one icon. Why?
PS: Sorry, I have no way to find the details by myself. Please give me a hand. Thanks in advance.
I think Android OS treats system apps differently. It knows these apps can't be overwritten directly, so it uses above technique for updating them. It permits to have these apps installed twice and then it ignores system ones. Of course both files have to be signed by the same key.
If you have root, then you could check this by yourself without Market or Maps.
Remount /system .
If you have 0 free space on this partition, then remove something to have at least 100KB.
Create empty app, build it and sign.
"adb push YourApp.apk /system/app/" - Android OS should detect this and install your app. You could see this in the logcat.
"adb install -r YourApp.apk" - Android will install it to /data and use it instead of version installed to /system .
Maybe Android not always prefers /data app, but one with greater versionCode. I don't know, didn't test this.
Thanks, Brut
I followed your suggestion and tried. Yes, system replace the /system one with /data one.
Thank you help me to know this behavior of Android system.

LG Viper (LS840) Overview

I purchased an LG Viper LTE (refurbished) from FreedomPop and have spent a bit of time playing with it and determining its capabilities and limitations. I want to have a central repository of knowledge regarding this phone. Some of this may overlap with other devices (LG or other), so I will try to provide links where they make sense. I intend to update this thread as I learn more information.
The phone I received came with LG's LS840ZVK (Android 4.0.4 - ICS) firmware, with a few custom apps that FreedomPop has installed, and a ton of bloatware from both Sprint and LG.
Rooting: (I started with a similar guide and forged my way from there.)
Downgrade your Viper (from version LS840ZVK to LS840ZVI). This will also perform a factory reset.
Root the phone after the downgrade (with the Bin4ry Root tool - If you use Bin4ry v36, use option 3, "New Standard-Root").
Backup root (with Voodoo OTA RootKeeper).
(Connect to WiFi and) Apply the System update (your phone will notify you about this - it has an OTA update for you to install).
Since the OTA update did not wipe (factory reset) your phone, use the Voodoo RootKeeper app to restore your root.
I also updated my Profile/PRL (in "Settings > System Updates"), and I believe this restored my 3G/4G data connection.
For FreedomPop, make sure you install the FreedomPop Messaging app to connect your device to the service.
Bootloader:
Unfortunately, I have not been able to unlock the bootloader. Perhaps, if I downgraded the phone to a pre-ICS firmware, I could do so, but I have not tried that yet.
System trim: (requires root)
I mentioned that the phone came with a bunch of bloatware, which seemed to cause tremendous unnecessary battery drain. With root, I was able to remove many of the junk apps. (Make sure to mount the /system partition as writeable: mount -o remount,rw /system) The list of stock apps I removed:
CameraTestApp.apk
CameraTestApp.odex
LGEmail_Native.apk
LGEmail_Native.odex
LGExchange.apk
LGExchange.odex
MLT.apk (some LG debug app that reports data back to LG and drains battery like crazy)
MLT.odex
PlusOne.apk (Google+)
PlusOne.odex
QuickMemo.apk
QuickMemo.odex
SharedStorageBackup.apk
SharedStorageBackup.odex
Shopper.apk
SmartShare.apk
SmartShare.odex
SprintHiddenMenu.apk (I had thought that your system wouldn't connect to Wifi on boot without this app, but that doesn't appear to be the case.)
SprintHiddenMenu.odex
SprintID.apk
SprintID.odex
SprintMusicPlus.apk
SprintMusicPlus.odex
SprintNASCAR.apk
SprintNASCAR.odex
SprintNBA.apk
SprintNBA.odex
SprintTV.apk
SprintTV.odex
SprintVVM.apk (Visual Voicemail)
SprintVVM.odex
Sprint_Installer.apk
Sprint_Installer.odex
Tag_na.apk
Tag_na.odex
WIFIOffload.apk (Sprint Connections Optimizer - removing this will cause Settings to crash when you navigate to "Settings > More... > Mobile networks > Connection optimizer", so remove only if you can live with that)
WIFIOffload.odex
Zone-Sprint.apk
Zone-Sprint.odex
LG has not only locked their bootloaders on their newer phones, but has also implemented some system check on every boot, so you must TAKE GREAT CAUTION when attempting to trim your system. If you remove an app that the software deems system essential, your next boot will result in a "Security Error", past which you cannot boot. To recover from this, you will have to reflash the firmware. (See the "Rooting" section; whenever I have put my system into this "Security Error" state, I have just downgraded my system and started the rooting process all over. In any case, you will lose your data.)
I don't know which app caused it, but removing one of the following apps will result in a "Security Error":
BooksTablet.apk
BooksTablet.odex
Magazines.apk
Magazines.odex
Talk.apk
Talk.odex
Videos.apk
(I remove apps by moving them into a backup-type directory, and then I can restore them by copying the files back to the /system/app directory.)
Minor annoyances: (I would hope eventually to resolve all of these and indicate the solutions in "Tips and Tricks".)
Camera shutter sound: I cannot select a silent setting for the camera shutter sound. I have I identified /system/media/audio/ui/shutter4.ogg as the most annoying of the four tone options, and have tried removing this file, or replacing it with an audio file of silence to no avail. Perhaps the camera app stores the audio within the app itself. I could download another camera app, but I'd rather not.
Polaris Office: I cannot remove it. It appears as a system app, but I cannot find any file that provides this app, either in /system/app or /data/app. I extracted all of my system apps, and ran a search for "polaris", and only LGHome3.apk had any match. Perhaps LGHome3 contains this app as well, which would mean I would have to reverse-engineer the app in order to remove Polaris Office.
Tips and Tricks:
Silencing the startup/shutdown animations: I located the files for the animations and simply removed them, rather than keep them and do something to silence them. The /system/media directory contained both files for the boot (bootanimation.zip) and shutdown (shutdownanimation.zip) animations, and I removed both of these files.
[Reserved for future updates]
Kingo Root
I rooted with Kingo Root and did not have to downgrade to LS840ZVI. I removed all the Sprint apps but removing any of the Google apps will apparently result in the security error. Better to freeze the stuff you don't need.
Reflashed LS840ZVK rooted and started over again.
Kingo Root works
I also used Kingo Root successfully. I removed most of the apps listed in this guide with the exception of Google apps. Instead of using OTA Rootkeeper to preserve root, I used Super SU Pro, which has a survival mode.
Magazines is not one of the apps that will cause the security error. It is either Books, Movies, Music, or a combination of the three. Additionally, if you do use any of those apps, and you integrate the updated APKs into the ROM, it will cause a boot error as well.
hi can i ask if there is still link for ls840zvk manual firmware? I am having security error on boot thanks guys.

Android System Update Files

Updated my Verizon Note 5 to 6.0.1 via the system updater. Now wondering how Android handles the removal of downloaded system update files once they are installed. Are they deleted during the update process? Do they stay in the inaccessible root folders until another update comes along to write over them? Or does Android automatically delete them after a set amount of time? Just curious. Thanks in advance for any info!

Is it possible to automate multiple Google Play app install?

I think this is basically general(not device specific) question so I am posting my question here.
I have Galaxy Note 10 Plus which got OS upgrade recently. I havn't upgraded my phone so currently my phone is at Android Q(10).
I don't have much time to do OS upgrade. More specific, I don't have time to do full wipe, manually download and flash firmware with Odin, install huge amounts of apps, configure those apps etc. Well, you might think: why don't use just OTA upgrade? That's because I don't trust OTA thing. It broke my previous phone few years ago. After that, I always flash firmware with Odin after doing full wipe.
The main problem is, I can't use 'Backup Apps' because it is OS upgrade and I don't think simply moving app data from Q(10) to R(11) is good idea. I have to configure everything one by one by my hand. That will consume a lot of time. Like I said, I don't have much time for doing this. I have to save some time.
If then, I might be able to save some time when installing huge amounts of apps from Google Play Store. I guess it is about ~80 apps. If I can automate those app installation, I might be able to save some time and use that time to configuring apps.
So here is my question: How can I automate app installation in Google Play Store? I've searched Google but only got disappointing result. 'Download those APKs and install them via ADB!', 'Emulate touch input in Google Play Store!' etc. are not what I want to do. I think there would be much elegant way to do bulk install of Google Play Store apps.
TL;DR
I want to know if there is simple way to install multiple(~80) apps in Google Play Store without doing these:
- Downloading those APKs and install them via ADB
- Emulate touch input with certain app
My guess is there is no other way than to download the apps in question and afterwards install them via ADB, what all can be done by means of a common Windows Powershell file.
jwoegerbauer said:
My guess is there is no other way than to download the apps in question and afterwards install them via ADB, what all can be done by means of a common Windows Powershell file.
Click to expand...
Click to collapse
Wait, can I download and install apps via ADB with single powershell script? If then, I can accept it if those app which were installed by ADB can be updated with Google Play Store...
If yes, can you give me hint about that script?
Don't have such a script at my fingertips ... And I have not the time to write it ... Think it shouldn't be too difficult for you to write it ...

How could I update system apps ?

Hello, I am currently making a few software modifications on my rooted Galaxy S9 on which I installed Noble ROM from AlexisXDA to be able to use one ui 4.1 with android 12. Now I’m trying to install One UI 5 apps on it, so I already installed Samsung Messages, Contacts, Phone dialer and Gallery as system apps using Lucky Patcher and everything worked as expected, and these apps simply replaced the old ones. Though, now I am struggling to install One UI 5 files app (aka Samsung My Files 14.x). This app is only supposed to be compatible with android 12L and more recent, but I managed to change the min SDK requirement to make it run on android 12. After I changed the min SDK I installed it as system app using Lucky Patcher and now everything is working until I long press a file which makes the app crash. Digging into android files, I noticed in the system/priv-app folder that the original version of MyFiles was still installed and I can’t delete it. Second thing I noticed, in the original MyFiles folder (in private app) there’s a file with the same name as the apk but the extension .prof is added next to it. I don’t know what this file is but I’m pretty sure this is what makes the original version work fine. So, can anyone tell me what this prof file is, and how I could make one for my custom My Files App please ?
Only for clarity:
Apps stored in /system/app are APKs what are indispensable part of Android OS - user apps has nothing to do there
whereas
apps stored in /system/priv-apps are APKs to be granted system permissions, regardless of the app signature: they at any time can get removed - mostly without any harm but requires Android is got rooted
jwoegerbauer said:
Only for clarity:
Apps stored in /system/app are APKs what are indispensable part of Android OS - user apps has nothing to do there
whereas
apps stored in /system/priv-apps are APKs to be granted system permissions, regardless of the app signature: they at any time can get removed - mostly without any harm but requires Android is got rooted
Click to expand...
Click to collapse
So, if I understand it correctly it means my version of the app gets rejected every time by the priv-app folder right ? Unlike the preinstalled My Files app which is granted system permissions ?

Categories

Resources