[Q] RESTORING Stock Apps - HTC Aria General

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.

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.

ADB vs. Root Explorer vs. Terminal on device

With certain files, SteelH describes using Root Explorer as "like trying to swap the engine of a car while it's running"
I experienced this as I tried to copy back a modified services.jar file with Root Explorer. I ended up using ADB and it worked fine.
Question 1: I did this while the phone was running/OS loaded, but ADB copy method worked while Root Explorer didn't. Why? Does ADB have higher authority in some way?
Question 2: How about using a terminal window on the phone to copy/replace files (if a computer is not handy)? Does it yield the same function/result as Root Explorer or ADB?
Question 3: If I simply want to back up the file, say services.jar or framework.apk, to be copied to SD, can I use Root Explorer for that?
Thanks.
snovvman said:
With certain files, SteelH describes using Root Explorer as "like trying to swap the engine of a car while it's running"
I experienced this as I tried to copy back a modified services.jar file with Root Explorer. I ended up using ADB and it worked fine.
Question 1: I did this while the phone was running/OS loaded, but ADB copy method worked while Root Explorer didn't. Why? Does ADB have higher authority in some way?
Question 2: How about using a terminal window on the phone to copy/replace files (if a computer is not handy)? Does it yield the same function/result as Root Explorer or ADB?
Question 3: If I simply want to back up the file, say services.jar or framework.apk, to be copied to SD, can I use Root Explorer for that?
Thanks.
Click to expand...
Click to collapse
i can't answer all of these authoritatively, but i will say
-i find adb to be the easiest way to do ANY modifications, as long as you know just a handful of commands and remember to remount. also remember to pull anything you are getting ready to mess with, just in case you bork it up. takes a lot less time to push an unmodified file than it does to do a complete restore. especially if you forgot to backup, lol
-if you have a terminal app mounted with rw privileges, you can move whatever you want wherever you want. however, referring back to my last point, adb is easier. i find that trying to type type type things out on a dinky little keyboard is a bigger pain in my butt than using my full size one, especially when i can use cut/paste from the intertubes.
-i think rooted explorere shouldn't have a problem copying a file from /system/ or /data/ to some folder on your sdcard
Thank you for the information. I just copied a file with terminal (on phone) and Root Explorer. Interesting thing: using the CP command, the file that was copied onto the SD showed the current date. The file that was copied using RE has the original date.

I get a Bootloop and how I Manage to Repair it.

Ok here's the story..i've download several framework-res.apk file and wanted to push it to my phone, but i dont know how..anyone in the theme thread will said push it through ADB and i know nothin about ADB which make me think a better way (and get me a bootloop) . I paste the framework-res.apk into the root of my sd card. Then open root explorer, navigate to sd card, copy the framework-res.apk then go to /system/framework mount r/w then paste it..guess what? my phone reboot and i just yess!! it workss!!
and here you go, I got a present which is stuck at "Sony Ericsson" text and freeze there and starting to panic like hell
Ok, Here how i manage to repair it without losing anything:
1. Get SuperOneClick. Extract it anywhere. (i extract it at desktop)
2. In your computer, navigate to C:/WINDOWS/SYSTEM32 and find cmd.exe and
copy it. Then paste in in SuperOneClick folder.
3. Now connect your phone to your computer and press the power button to
start the phone. You will get the bootloop which is "Sony Ericsson" text and
freeze there.
4. Now in SuperOneClick folder, open SuperOneClick.exe which you used to
rooted you phone. When superoneclick box come out, press "SHELL ROOT"
and leave superoneclick process it. A box will come out said:
"Device has a temporary ADB root!"
"Reboot your device to remove it"
5. Thats the trick! At this point your phone will still stuck at Sony Ericsson text.
6. Get original framework-res.apk. in superoneclick folder ealier make new folder
inside name it framework.
7. Now remember the cmd you paste earlier in superoneclick folder? click it.
At this point make sure ur X8 still connected to ur computer and already
do the step no 4.
8. cmd box will come out (black box). type in "adb remount" without quote.
you will see "remount succeeded" after you type command above.
9. Remount succeeded above mean, you already have full privilege whether to
copy and paste file in /system. At this time u still stuck at the
"Sony Ericsson" text.
10. Now remember the original framework-res.apk in framework folder earlier?
now we gonna push the original file into /system.
in the cmd box (black box) after u see the remount succeeded. type in
this command without quote:
"adb push framework /system/framework"
Explanation: "adb push" an order to adb to push the file.
"framework" folder [email protected] u made earlier in superoneclick
folder that contain orig framework-res.apk
"/system/framework" is the location of orig framework-res.apk
in ur phone.
11. After u type the command above..cmd will show the file been push and there
will be 1 push and 0 skipped. And if u successful doing all of the step above,
ur phone will reboot automatically and no more bootloop.
This is what happen to me and how i manage to repair my phone without losing anything and without pc companion. This tutor can be useless to the expert but very useful for beginner like me.
You can also push others file with this method too, like conversation.apk and bunch of others system file..you just have to know the exact location of original file in ur phone and change my command above to push the file onto /system according to the location.
*Every file needed for above process is included in my attachment.
<CREDIT TO SUPERONECLICK CREATOR>
PS: Made by beginner (noob)(which is me) for beginner . Feel free to ask anything, I will answer it if I know the answer
Nice info.
thanks for the original framework. I need it for my backup.
opexblue said:
Nice info.
thanks for the original framework. I need it for my backup.
Click to expand...
Click to collapse
no prob ..glad i can help you..most of beginner like us forgot to backup before messed with the file..

How to copy CWM backups to PC from /mnt/shell/emulated?

So, CWM saves its backups and blob directory in /mnt/shell/emulated which is not accessible via MTP. I've started using TWRP for all my new backups but I would like to copy the existing CWM backups to my PC before wiping the directory on my phone. It's currently using 8-9 GB. However, when I try to move the directory from /mnt/shell/emulated to a directory in a directory in /sdcard, the move operation ends instantly and nothing is copied. I'm wondering if the problem is that I don't have enough free space. I've got about 2.5 GB free.
EDIT: It appears that you need to have enough space to copy the entire directory before deleting it. The phone ran out of space halfway through a file copy using ES File Explorer. I guess that's why Root Explorer won't allow the move to begin.
Use adb to pull the directory to your computer, adb pull /mnt/shell/emulated
I would like to do this as well like I used to do with older versions of CWM on my Gnex. Then it was as easy as moving the large backup file found in /sdcard/clockworkmod/ folder.
I just tried that adb pull command mentioned in the post above and this starts to copy the entire contents of my phone to some unknown source on my PC (I can't find where?).
How would one go about simply backing up a CWM nandroid restore file onto a PC?
dralways said:
I just tried that adb pull command mentioned in the post above and this starts to copy the entire contents of my phone to some unknown source on my PC (I can't find where?).
Click to expand...
Click to collapse
It copies to the directory that you ran the adb command from, so if you run abd from c:\windows\apps\adb it'll copy the files there
peachpuff said:
Use adb to pull the directory to your computer, adb pull /mnt/shell/emulated
Click to expand...
Click to collapse
Thanks for the help. I don't know why I didn't think to do that myself.
Create a folder on your computer and open the command prompt from that directory. And then run adb pull /mnt/shell/emulated/clockworkmod/backup
This way only the backups will be copied to your pc, not the whole storage.
cmd prompt not working
dushan90 said:
Create a folder on your computer and open the command prompt from that directory. And then run adb pull /mnt/shell/emulated/clockworkmod/backup
This way only the backups will be copied to your pc, not the whole storage.
Click to expand...
Click to collapse
Hi, I just ran into this issue also. I tried the cmd prompt but it doesn't pull anything. It says 'adb' is not recognized as an internal or external command, operable program or batch file.
Any help would be greatly appreciated, I know it's been a while since the last post but thank you.
SlickJamesBtch said:
Hi, I just ran into this issue also. I tried the cmd prompt but it doesn't pull anything. It says 'adb' is not recognized as an internal or external command, operable program or batch file.
Any help would be greatly appreciated, I know it's been a while since the last post but thank you.
Click to expand...
Click to collapse
>Go to your android sdk folder/platform-tools.
>r.click an empty space while holding down the shift.
>Select Open Command Window here
>then run the adb command
This should work
dushan90 said:
Create a folder on your computer and open the command prompt from that directory. And then run adb pull /mnt/shell/emulated/clockworkmod/backup
This way only the backups will be copied to your pc, not the whole storage.
Click to expand...
Click to collapse
how if I want to put it back into CWM? is there any specific way to do that? or I just have to copy and paste the data to the "/mnt/shell/emulated/clockworkmod/backup" directory.
Haven't you tried this?

i managed to pull the nandroid. now i need to push it back.

so i had a thread about getting these files pulled off of my buddies busted n4. but the adb command given wouldnt work and i didnt figure out how to make a tarball untill after i pulled the files. anyways...
i managed to pull the nandroid using this command - adb pull /sdcard/clockworkmod/backup/2013-08-07.23.11.28/.
what i ended up with were all of the files separately on my pc.
so if i put all of the files back into its own folder with the same name on my pc, what would be the command to push it back onto the new phone that i am about to root. using cwm.
assuming i kept the folder in platform tools. C:\androiddev\sdk\platform-tools
and do i need to create directory in the phone first? .../clockworkmod/backup/2013-08-07.23.11.28
it seems like i remember these commands, or at least i could figure it out by the commands listed, in one of the original root unlock stickies. but they seem to have been replaced with one click dealios. i need to start using adb for all of my flashing and such just so i can stop looking like an idiot for not knowing the simple stuff. in other words i would experiment and figure it out.... but i am afraid that i will just litter his phone with files and still end up coming back here.
thank you.
A quick guide to the adb pull and adb push commands:
Code:
adb pull <remote> <local>
adb push <local> <remote>
Remote being folder location on phone, local being folder location on computer.
So the correct command to pull the backup and put it into a folder under platform-tools (let's use the folder name you are using) would be this:
Code:
adb pull /sdcard/clockworkmod/backup/2013-08-07.23.11.28/ 2013-08-07.23.11.28
All you have to do to put it into it's own folder is put a space after the remote location and type whatever name you want the folder to be.
Now on to your current question. You said you pulled the files onto the computer, but they weren't in their own folder. I would put them into their own folder (we'll use 2013-08-07.23.11.28 for now) and push the contents of that folder to a folder on your phone, that we will also call 2013-08-07.23.11.28 under the backup location (If you want to make sure you have only the files contained in the backup, try re-pulling them using the above pull command. If you're pretty sure you know which ones it pulled, I wouldn't worry about it). Try this:
Code:
adb push 2013-08-07.23.11.28 /mnt/shell/emulated/clockworkmod/backup/2013-08-07.23.11.28/
That'll push the contents of folder 2013-08-07.23.11.28 under platform-tools and put them in a folder called 2013-08-07.23.11.28 under /backup/. If it doesn't exist, it'll create the folder. Now you pulled the backups by using /sdcard/, I didn't know you could just do that, so I guess you could try pushing using that too:
Code:
adb push 2013-08-07.23.11.28 /sdcard/clockworkmod/backup/2013-08-07.23.11.28/
I'm pretty sure those should do the trick. Let me know if that helped.
Johmama said:
A quick guide to the adb pull and adb push commands:
Code:
adb pull <remote> <local>
adb push <local> <remote>
Remote being folder location on phone, local being folder location on computer.
So the correct command to pull the backup and put it into a folder under platform-tools (let's use the folder name you are using) would be this:
Code:
adb pull /sdcard/clockworkmod/backup/2013-08-07.23.11.28/ 2013-08-07.23.11.28
All you have to do to put it into it's own folder is put a space after the remote location and type whatever name you want the folder to be.
Now on to your current question. You said you pulled the files onto the computer, but they weren't in their own folder. I would put them into their own folder (we'll use 2013-08-07.23.11.28 for now) and push the contents of that folder to a folder on your phone, that we will also call 2013-08-07.23.11.28 under the backup location (If you want to make sure you have only the files contained in the backup, try re-pulling them using the above pull command. If you're pretty sure you know which ones it pulled, I wouldn't worry about it). Try this:
Code:
adb push 2013-08-07.23.11.28 /mnt/shell/emulated/clockworkmod/backup/2013-08-07.23.11.28/
That'll push the contents of folder 2013-08-07.23.11.28 under platform-tools and put them in a folder called 2013-08-07.23.11.28 under /backup/. If it doesn't exist, it'll create the folder. Now you pulled the backups by using /sdcard/, I didn't know you could just do that, so I guess you could try pushing using that too:
Code:
adb push 2013-08-07.23.11.28 /sdcard/clockworkmod/backup/2013-08-07.23.11.28/
I'm pretty sure those should do the trick. Let me know if that helped.
Click to expand...
Click to collapse
thanks a ton. it worked. i tried the first option. rebooted recovery. and it could not find the files. i rebooted the phone. and then went back into recovery. the files still were not there.
so then i did the second option. with the sdcard. it worked like a charm. his phone is back to aug 7th. and didnt lose a thing... other than the last four days of his new data.
phermey said:
thanks a ton. it worked. i tried the first option. rebooted recovery. and it could not find the files. i rebooted the phone. and then went back into recovery. the files still were not there.
so then i did the second option. with the sdcard. it worked like a charm. his phone is back to aug 7th. and didnt lose a thing... other than the last four days of his new data.
Click to expand...
Click to collapse
Well that's odd, I'm the exact opposite, I can't see the files in /sdcard/, only the path through /mnt/. I'm not too familiar with how the Nexus 4 handles the emulated sdcard, I just never had the reason to explore it.
Actually, I think the difference between where our recoveries saw the backups is because of a version difference. CWM has changed their backup location in the past, and I'm sure you are using a version that is looking for backups in the /sdcard/ directory, while mine was looking for them through /mnt/.
EDIT:
Oh btw, you might advise your friend to download a file explorer app (I use ES File Explorer) and erase those backups that he didn't use in the /mnt/ folder. I'm sure they are still there taking up space on his phone. You may or may not need root to see the correct folder though.

Categories

Resources