APK Backup - Wear OS Q&A, Help & Troubleshooting

with which adb command can i backup installed apk file? WhatsApp app suddenly disappears.

Related

[SOLVED] Installed applications -> .apk?

Hey!
I have a lot of applications on my phone. I would like to collect all to my memory card in form of .apk-files, so I easily can install the programs I have now after I've flashed with another ROM.
How do I do this?
I have ADB Shell installed, my phone is rooted and so on and so forth.
I would like to avoid making a backup with Astro, since the installation probably won't come out clean (?).
EDIT: Solved it via ADB.
Wrote the following:
adb pull /data/app/ c:\"foldername"\
adb pull /data/app-private/ c:\"foldername"\
And all your installed applications will be copied to the folder you specify, as .apk-files.
After you backed up all your .apk files, did you have to manually re-install all your apps? or did you have a way to batch install them via adb? or is it possible to adb push those files back to /data/app/ and /data/app-private/ ?
Just push them. The directory is /system/sd/app/ if you have a2sd enabled.

[Q] RESTORING Stock Apps

So I deleted a few apps and am curious as to how I go about restoring them to the phone if I say, deleted them by accident. I made a backup of all of the apps on my pc in the SDK Tools subdirectory so they are all there. Also, will installing an .odex file be the same as an .apk file? Do I need to restore the .odex files or will they automatically be rebuilt?
How did you perform this backup? With adb? Then it will be easy to put the apps back. You should just be able to use adb with the install command. Just type in adb at the command prompt and read the help instructons for install. Not sure if the install command takes care of the .odex files. You could try it and then copy them over manually if they dont get copied. I am sure once you boot the phone the default .odex will be built, just a quess on that though.
anika200 said:
How did you perform this backup? With adb? Then it will be easy to put the apps back. You should just be able to use adb with the install command. Just type in adb at the command prompt and read the help instructons for install. Not sure if the install command takes care of the .odex files. You could try it and then copy them over manually if they dont get copied. I am sure once you boot the phone the default .odex will be built, just a quess on that though.
Click to expand...
Click to collapse
I would think that pushing the files back to the original location from recovery would be the safest bet. ADB install will install it to /data and I would think that the apps being system apps originally then they don't have the signatures anyway to allow an ADB install.
I think you're right
I believe I originally used ADB to put them in Android SDK Tools/Desktop/~ folder. When I tried installing them back I don't believe it worked. I specifically remember receiving an error when trying to install the .odex file about a database issue. Assuming it's a system file I'm trying to restore, does someone have the syntax for the push command or how I go about doing that?
If you have the .apk and .odex files on your computer, or really backed up anywhere, you can install them a few ways:
ADB Method
#Prerequisites:
Make sure you have the APK files in AndroidSDK/tools.
1. Connect the phone to your computer
2. Launch a command prompt and enter the following commands:
cd C:\AndroidSDK\tools
Replace "C:\AndroidSDK\tools" with the path to the tools folder in your SDK installation.
adb install filename.apk
Replace "filename.apk" with the name of the file you're trying to install.
Actually, **** it, the ADB method works anyway, why list a bunch lol
No wait, these are original files so you should probably put them back in their original location.
Just use "adb push filename.apk /system/app", replacing filename.apk with your filename, of course..
Push it
Okay, thanks for the tips. So I guess when you have files in the system/app directory on the phone it knows automatically to look there for program installs. This is good to know.

[SOLVED] Unable to save to user storage except Download, UID and perms appear ok

After doing a restore with CWM of 4.4.4 backup, I'm unable to save files to user storage. Owner is 0 root, GID is 1028 sdcard_r, permissions drwxrwx--x, same as on my N7 '13.
Drive can export a file to ./Downloads though. ?:| Other files can save to that folder.
Have tried with Nova Launcher backup (can save backup file to ./Download, but no other), ES File manager ("EACCES (Permission Denied)"), Total Commander file manager. Helium backup can't backup locally either.
Noticed yesterday that I couldn't delete folders or move files from folders (Alarms, Notifications, Pictures), so did it in Recovery with ADB shell. Think that's just another symptom.
Never encountered this before. Anyone ever see this, fixed this?
Oh, one note. During my 5.1.1 order, I did a fresh wiped boot of 4.4.4, set up accounts and basic apps, and did a CWM backup. Moved it off with adb (adb pull /sdcard/ ./sdcard/).
After flashing 4.4.4 completely, I used CWM and adb push to move the entire backed up /sdcard/ back to the device so I could do a restore (adb push /sdcard/ ./sdcard/). Restored in CWM.
Could this have been an issue? /sdcard/ created by adb ?
Solved. Did a CWM backup and was readying to pull that off, and checked on a hunch. After mounting /data/, I shelled in (adb shell) and checked permissions (ls -ald /sdcard/0/ ) and lo and behold -- many (not all) of the folders were owned by root:root, not media_rw:media_rw. /sdcard/0/Download/ was not.
Changed ownership of all under /sdcard/0 (chown -R media_rw:media:rw * ) rebooted, and can save in those folders again. Hopefully that didn't bork something else up.

Automatic/Multiple APK Installer Batch.

Here is a simple batch to simplify the process of installing apk backups via ADB (adb install name.apk)
This batch will read all apks listed on working folder and install them all in one simple automatic process. Just unzip file and place all apks you want to install in the folder where the batch resides and run the batch.
Remember:
1. You need to have Dev Option and adb debugging enabled.
2.. have device drivers installed.
3. If an app have in the name the & symbol edit name and remove it otherwise will not install.
Download (Mega): Automatic APK Installer.
Code:
for FILE in *.apk; do adb install "$FILE"; done

Accidently Deleted Contacts app, PLEASE HELP!

Hello Everyone,
So today I have flashed stock rom on my Samsung Galaxy S6 Edge (SM-G925T) for some reason. Installed twrp recovery and then rooted using cf-auto-root method and then i started to uninstall all useless apps using titanium backup.
But accidently i checked the samsung contacts app and now it's gone. I tried to reinstall it again (I have backed up all apps+data before uninstall using titanium bakcup) but it takes forever in titanium backup and nothing happens. I tried to install it using apk method but then it says \"The package conflicts with an existing package by the same name". I don't know why but if the app is uninstalled then why is there a conflicting package.
Anyway, I've found a method in one of XDA forums to install the app using adb recovery method through windows PC (booted into TWRP first).
Code:
adb remount
adb push Contacts.apk /system/app
adb shell chmod 644 /system/app/Contacts.apk
adb reboot[/HIDE]
It installs the app but not opens it. Every time when i tried to open, it just flashes for a moment and closes itself.
I'm so tired of this problem so any help would be appreciated. Thanks.:
Why don't you just use third party contacts app such as Google Contacts?
........one moment.....
enjoy

Categories

Resources