BACKUP AND RESTORE LOCALE (the program) - G1 General

So I just successfully figured out how to backup and restore all Locale (THE PROGRAM) settings/preferences/profiles/etc.
TO BACKUP:
adb pull /data/data/edu.mit.locale /locale
TO RESTORE (after wipe):
adb push /locale /data/data/edu.mit.locale
Please don't ask how to setup ADB...SEARCH if you have problems such as that.
I take no responsibility if this messes up your phone (but I have no idea how it would).

Sweet! Will the same technique work for Open Home (or whatever)?

probably! i'm not really good with this stuff so i was really proud when this worked. but yeah you could just do
adb shell
ls /data/data
find the open home (or another programs') folder (probably looks like com.something.something)
that's to get the PATH to that folder. then do:
exit
adb pull /data/data/com.something.something /TheFolderOnYourComputer
and finally:
adb push /TheFolderOnYourComputer /data/data/com.something.something

cboy007 said:
probably! i'm not really good with this stuff so i was really proud when this worked. but yeah you could just do
adb shell
ls /data/data
find the open home (or another programs') folder (probably looks like com.something.something)
that's to get the PATH to that folder. then do:
exit
adb pull /data/data/com.something.something /TheFolderOnYourComputer
and finally:
adb push /TheFolderOnYourComputer /data/data/com.something.something
Click to expand...
Click to collapse
Openhome2 = com.betterandroid.openhome2

Not that much of a discovery but still a valid one.
You just copy the contents of /data/data and replace/add it after you update/wipe your phone

cboy007 said:
So I just successfully figured out how to backup and restore all Locale (THE PROGRAM) settings/preferences/profiles/etc.
TO BACKUP:
adb pull /data/data/edu.mit.locale /locale
TO RESTORE (after wipe):
adb push /locale /data/data/edu.mit.locale
Please don't ask how to setup ADB...SEARCH if you have problems such as that.
I take no responsibility if this messes up your phone (but I have no idea how it would).
Click to expand...
Click to collapse
Thank you so much for that discovery!! Might not seem so impressive to one person, but this will be a hand saver for me. One less thing to set up after each wipe. Thank you so much again!!

Related

preserving market "my downloads" list between wipes/rom installs

I've wiped and installed a lot of roms lately, and generally when I go to 'my downloads' in the market, only my paid apps are there. So, I have to go though the process of searching the installing each app again. It's just easier when they are all in a list.
I figured it would be a good idea to backup all my apps and then reinstall them afterward with adb in linux as such:
for a in `ls *.apk`; do adb install $a; done
this works, but of course they don't show up under 'my downloads' and I don't get update notifications.
Is there a way around this?
gsgleason said:
I've wiped and installed a lot of roms lately, and generally when I go to 'my downloads' in the market, only my paid apps are there. So, I have to go though the process of searching the installing each app again. It's just easier when they are all in a list.
I figured it would be a good idea to backup all my apps and then reinstall them afterward with adb in linux as such:
for a in `ls *.apk`; do adb install $a; done
this works, but of course they don't show up under 'my downloads' and I don't get update notifications.
Is there a way around this?
Click to expand...
Click to collapse
You need to backup and restore the database file located in the market folder....it should be here...
Code:
/data/data/com.android.vending/databases
I'm assuming since you can backup and restore your apps thru adb then you can figure out how to pull and push this to your phone
I assume you would want to do this to get update notifications. If so you can grab "aTrackDog" from the market. It will list all you apps and when you refresh it will tell you when updates are available and give you a link to get the update from the market.
AdrianK said:
I assume you would want to do this to get update notifications. If so you can grab "aTrackDog" from the market. It will list all you apps and when you refresh it will tell you when updates are available and give you a link to get the update from the market.
Click to expand...
Click to collapse
will it only work for software installed through the market or will manually installed software show up as well?
DirectMatrix said:
You need to backup and restore the database file located in the market folder....it should be here...
Code:
/data/data/com.android.vending/databases
I'm assuming since you can backup and restore your apps thru adb then you can figure out how to pull and push this to your phone
Click to expand...
Click to collapse
Awesome. I'll do this next time I wipe and reflash with the latest coolest rom. =)
gsgleason said:
will it only work for software installed through the market or will manually installed software show up as well?
Click to expand...
Click to collapse
nope, works for the apps on my ext3 even after switching builds several times, works great.
DirectMatrix said:
You need to backup and restore the database file located in the market folder....it should be here...
Code:
/data/data/com.android.vending/databases
I'm assuming since you can backup and restore your apps thru adb then you can figure out how to pull and push this to your phone
Click to expand...
Click to collapse
For those of us who are not that familiar with adb, can you give a short tutorial on how to pull and then push that database folder?
well i just wiped and installed the latest cyanogen mod and when i went to the "my downloads" section of the store all the apps i had downloaded before were all there (paid and free)
I also thought it didnt do that, apperently it does
Gilliland12 said:
For those of us who are not that familiar with adb, can you give a short tutorial on how to pull and then push that database folder?
Click to expand...
Click to collapse
You don't need ADB, you can use the terminal emulator from the market or the recovery console.
To pull the database, open terminal or recovery and type:
Code:
su
cd /data/data/com.android.vending/
cp databases /sdcard
that will copy that database file to the root of your sdcard.
When pushing it back it is probably best to do it while the phone isn't running, so only use the recovery console:
Code:
cd sdcard
cp databases /data/data/com.android.vending/
reboot
I haven't tested this, but it will have the same results as the ADB method.
AdrianK said:
You don't need ADB, you can use the terminal emulator from the market or the recovery console.
To pull the database, open terminal or recovery and type:
Code:
su
cd /data/data/com.android.vending/
cp databases /sdcard
that will copy that database file to the root of your sdcard.
When pushing it back it is probably best to do it while the phone isn't running, so only use the recovery console:
Code:
cd sdcard
cp databases /data/data/com.android.vending/
reboot
I haven't tested this, but it will have the same results as the ADB method.
Click to expand...
Click to collapse
Many thanks.
Backup for Root works perfectly for me
if you got a paid app through adb and got a refund, can you still get updates for that app if you have it installed?
opasha said:
if you got a paid app through adb and got a refund, can you still get updates for that app if you have it installed?
Click to expand...
Click to collapse
No, you will not get updates without re-purchasing the app. And talking about ripping off app developers on this forum is frowned up so please stop discussing it.
opasha said:
if you got a paid app through adb and got a refund, can you still get updates for that app if you have it installed?
Click to expand...
Click to collapse
If you got a refund, then you shouldn't have the app. That's stealing and it's not nice. Most apps are cheap (a couple of bucks at most), stop being a cheapskate.
Originally Posted by AdrianK View Post
You don't need ADB, you can use the terminal emulator from the market or the recovery console.
To pull the database, open terminal or recovery and type:
Code:
su
cd /data/data/com.android.vending/
cp databases /sdcard
that will copy that database file to the root of your sdcard.
When pushing it back it is probably best to do it while the phone isn't running, so only use the recovery console:
Code:
cd sdcard
cp databases /data/data/com.android.vending/
reboot
I haven't tested this, but it will have the same results as the ADB method.
i tried this but it dodnt work.
when I did the first command it said ommiting databases. so I thought it worked.
flashed to the new cyanogen 4.0 rom (which is amazing btw!) did the second command and it said cannot stat file "databases" no such file or folder.
what gives??
Id say the databases were open and couldnt be backed up.
You should try to copy them from the recovery.
Also, after copying why didnt you check if the database files were in your sdcard (or the path you specified for the copy) before wiping? If the file is not there its obvious that it cant be restored after the wipe..
thought it might have been hidden or on my ext2 partition! never mind i got atrackdog!
addiosamigo said:
thought it might have been hidden or on my ext2 partition! never mind i got atrackdog!
Click to expand...
Click to collapse
Seems you can only copy each of the four db files individually... but copying the entire folder doesn't work.
All that is needed is assets.db
Open the terminal and enter
$ su
# cp /data/data/com.android.vending/databases/assets.db /sdcard
Wipe, flash, reboot.
YOU MUST OPEN THE MARKET AND AGREE TO THE TOS BEFORE RESTORING!!!!
Open the market, agree to the TOS, and close the market. Open the terminal and enter
$ su
# cp /sdcard/assets.db /data/data/com.android.vending/databases/assets.db
# reboot

Replacing HTC apps with ANDROID ones

Hi,
After reading this thread and learning that you CAN replace HTC's apps with stock Android ones, I have started messing around to see what other apps I can / should change. I'll use this thread as kind of a log, so if I mess things up I can come back and see where I went wrong. Fellow noobs can surely use it too!
I am using SDK in Ubuntu, but the procedure should be pretty similar in Windows.
First, follow the Unlockr's method to root your phone.
Download a stock Android rom and extract its /system/apps folder inside /sdk/tools. I named the folder "Apps-stock
Check if Ubuntu recognises your phone:
Code:
./fastboot devices
Load the recovery image and mount the system:
Code:
./fastboot boot cm-hero-recovery.img
./adb shell mount /system
Replacing HTC's calendar:
Code:
./adb shell rm /system/app/Calendar.apk
./adb shell rm /system/app/Calendar.odex
./adb push Apps-stock/Calendar.apk /system/app/
I'll edit the thread, add details as I go on
Nice one!
Please keep us informed!
Thanks for this thread.
Post moved to a more appropriate topic :
http://forum.xda-developers.com/showthread.php?p=4477971#post4477971
Thanks for setting this thread up!
Firstly, you should probably say in the first post that everyone should do a Nandroid backup first - it's saved my bacon. Might be an idea to link to the files, too?
Second, I've got a problem trying to run this method. I removed the original calendar.apk and .odex without any problems, and copied the new one over, but on rebooting, it wasn't in the list of applications anywhere. I browsed there in Astro and opened the file, which gave me an option to install it - which then gave an error of "Calendar could not be installed on this device".
I'm running the MoDaCo 2.1 custom ROM and using the calendar.apk from this thread.
Thanks for your time!
fastboot
can you tell me where this fastboot command is located? I am using Ubuntu too, but can not find fastboot. What is it for by the way?
dragonflyFZX said:
can you tell me where this fastboot command is located? I am using Ubuntu too, but can not find fastboot. What is it for by the way?
Click to expand...
Click to collapse
fastboot and adb are executables you get from the Android SDK - see here.
This thread does require your phone to be rooted, though, which would require you to have already used adb at least once....
frandavid100 said:
........
Replacing HTC's calendar:
Code:
./adb shell rm /system/app/Calendar.apk
./adb shell rm /system/app/Calendar.odex
./adb push Apps-stock/Calendar.apk /system/app/
I'll edit the thread, add details as I go on
Click to expand...
Click to collapse
how about simply replacing those files using a file explorer (like linda)? possible, or would that screw up my system?

ADB Push

I searched around and couldn't get a clear answer. I'm a noob at anything command prompt/terminal related.
I was screwing around with adb last night after figuring out that I can remove program .apks with the rm <com.whatever.program> command. I got a little trigger happy and removed things that I don't use, just to test it out. I made a nandroid backup before I started. The phone runs fine, but now the Market won't download anything. It just sits on the Starting download... screen.
One of the .apks I removed was GmailProvider.apk. Whether this is the problem or not, I'd like to reinstall it for practice. I can always nand restore later.
So my question is... How can I use adb push to reinstall an apk?
I tried:
Code:
adb push C:\GmailProvider.apk
adb install C:\GmailProvider.apk
adb install C:\GmailProvider.apk \system\app
And about every variation of the 3, in and out of the adb shell.
It didn't work, and I'm at a loss to do anything else. So does anyone have any suggestions?
You have to push it abs then give it permissions.
So after pushing the apk give it permissions by doing this.
Code:
Adb push C:/gmailprovider.apk /system/app/gmailprovider.apk
adb shell
Chmod 775 /system/nameofapp.apk
Exit
Adb reboot
Your phone needs to be rebooted so I added the adb reboot, but you can just turn it off and on like you would normally or use that command.hope it helps.
Sent from my Eris using XDA App
Code:
# Chmod 775 /system/GmailProvider.apk
Chmod: not found
What's Chmod do, anyway?
EDIT: Forgot to cd to the directory...lemme try again.
EDIT2: Same error.
Okay, I tried:
Code:
# install /system/app/GmailProvider.apk [-cdDsp]
With no errors. Lemme see if it worked.
EDIT: I can see it, but the Market still isn't downloading apps. Lemme try an actual program.
Raikalo said:
Code:
# Chmod 775 /system/GmailProvider.apk
Chmod: not found
What's Chmod do, anyway?
EDIT: Forgot to cd to the directory...lemme try again.
EDIT2: Same error.
Click to expand...
Click to collapse
Ok I see two things that might be wrong with what you did.
Try not capatalizing the first letter(Not sure if this is a big deal but better to make sure.) and fix your path, GmailProvider.apk should be in the system/app folder.
Code:
adb shell
chmod 775 /system/app/GmailProvider.apk
adb reboot
The chmod command (abbreviated from change mode) is a shell command and C language function in Unix and Unix-like environments. When executed, it can change file system modes of files and directories. The modes include permissions and special modes
EDIt:
Raikalo said:
Okay, I tried:
Code:
# install /system/app/GmailProvider.apk [-cdDsp]
With no errors. Lemme see if it worked.
EDIT: I can see it, but the Market still isn't downloading apps. Lemme try an actual program.
Click to expand...
Click to collapse
Yea you might be able to see it but the app might not have the right permissions to be used. Therefore it might be the reason why you can't download apps from market.
Excellent.
Code:
adb push C:/GmailProvider.apk /system/app/GmailProvider.apk
adb shell
chmod 775 /system/app/GmailProvider.apk
adb reboot
Worked like a charm. The capitalization was required; it gave an error without it. I installed Gmail.apk again using the same method and ran the program, and it worked. Thanks!
EDIT: GASP! Market works.
You're a lifesaver. Well, ROMsaver. I guess this means that GmailProvider.apk and gtalkservice.apk can't be removed from the phone.
Raikalo said:
However, the Market still won't download. Hm.
Click to expand...
Click to collapse
I just want to take this moment to make a Public Service Announcement: Everyone please remember to do a Nandroid backup before making any changes to your /system area.
Raikalo said:
Excellent.
Code:
adb push C:/GmailProvider.apk /system/app/GmailProvider.apk
adb shell
chmod 775 /system/app/GmailProvider.apk
adb reboot
Worked like a charm. The capitalization was required; it gave an error without it. I installed Gmail.apk again using the same method and ran the program, and it worked. Thanks!
However, the Market still won't download. Hm.
Click to expand...
Click to collapse
Don't know what to tell ya, you can start adding back the apks you deleted or do that nand restore since you already know how to install back a system apk, so you learned what you wanted
EDIT: I see you got it to work so that's good news, but like Nestor pointed out always use nand backup before you do any changes to the system area, I've learned to do this the hard way lol.
It's a good reminder
Thanks a ton guys I'll nand backup in a few to have a better restore point.
Learning android-related things ftw!
Oh, one more thing.
I saw something about adding an Environmental Variable to windows that involved adb? Could someone explain that?
- Also, Mikey1022 has reminded me to add the "ADB" directory path as a system variable in windows...
To do this right-click on "My Computer" and select Properties. Next select the Advanced tab(Advanced Settings in Vista) then select Environment Variables.
Click "New" under System Variables and add the following:
Variable: adb
Value: C:\android-sdk-windows-1.1_r1\tools
Click to expand...
Click to collapse
There's an example. I tried this and it didn't do anything.
Raikalo said:
Oh, one more thing.
I saw something about adding an Environmental Variable to windows that involved adb? Could someone explain that?
There's an example. I tried this and it didn't do anything.
Click to expand...
Click to collapse
i think Thefuzz4.net explained this better
To make life easier, lets add a global path to the android SDK tools. Right-click My Computer > Properties,
click on Advanced, then click on Environment Variables.
Doubleclick on PATH, then at the end of the Variable value, add a semi colon ";" and then c:\AndroidSDK\tools
Doing The above ^^ will let you run adb from anywhere on your computer, like your desktop. You won't have to change to the directory and the run adb anymore, you can just run adb from anywhere on the command prompt. Its basically a little trick for us lazy people that hate having to "cd C:/android/tools" before running adb.
Does anyone know of a good resourse for adb and/or shell commands. Every time i try to goole it i just get links to different forums with just basic stuff, push, pull, ect. Id like to find something much more complete including chmod and the like
Sent from my Eris using XDA App
Thanks t2. Makes sense now. I hate CDing to the directory, so shortcuts are also ftw.
@above -- couldn't find a real resource so I resorted to asking specific questions on xda. if you find a resource lemme know.
ALSO -- chmod 775 /system/app/RandomProgram.apk.....what does the "775" do?
Raikalo said:
Thanks t2. Makes sense now. I hate CDing to the directory, so shortcuts are also ftw.
@above -- couldn't find a real resource so I resorted to asking specific questions on xda. if you find a resource lemme know.
ALSO -- chmod 775 /system/app/RandomProgram.apk.....what does the "775" do?
Click to expand...
Click to collapse
the different numbers are different permission settings. I forgot the other numbers, but their are others that set the applications for different permissions in the system. Someone correct me if I am mistaken though.
Finally found some explanation of chmod at catcode.com/teachmod/ . not sure if it directly applies to andriod, but seems to make sense to me now
Sent from my Eris using XDA App
wrong thread

ADB Push

I searched around and couldn't get a clear answer. I'm a noob at anything command prompt/terminal related.
I was screwing around with adb last night after figuring out that I can remove program .apks with the rm <com.whatever.program> command. I got a little trigger happy and removed things that I don't use, just to test it out. I made a nandroid backup before I started. The phone runs fine, but now the Market won't download anything. It just sits on the Starting download... screen.
One of the .apks I removed was GmailProvider.apk. Whether this is the problem or not, I'd like to reinstall it for practice. I can always nand restore later.
So my question is... How can I use adb push to reinstall an apk?
I tried:
Code:
adb push C:\GmailProvider.apk
adb install C:\GmailProvider.apk
adb install C:\GmailProvider.apk \system\app
And about every variation of the 3, in and out of the adb shell.
It didn't work, and I'm at a loss to do anything else. So does anyone have any suggestions?
EDIT: I think my "\" should be "/". I got this
Code:
BusyBox v1.15.2 <2009-12-02 TIME EST> multi-call binary
Usage: install [-cdDsp] [-o USER] [-g GRP] [-m MODE] [source] dest|directory
Copy files and set attributes
Options:
Then some usage stuff here.
Then I looked at the command prompt and made a face like .
Suggestions?
It might help to say that I'm using EvilEris 2.0.1, Windows 7.
Just reflash your ROM after doing a titanium backup. Easiest fix.
try this after putting GmailProvider.apk in your sdk\tools dir:
Code:
adb remount
adb push GmailProvider.apk /system/app
remount marks the system directory as read/write
silverramsrt said:
try this after putting GmailProvider.apk in your sdk\tools dir:
Code:
adb remount
adb push GmailProvider.apk /system/app
remount marks the system directory as read/write
Click to expand...
Click to collapse
Beat me to it. ADB is powerful and pretty cool if you know some good commands, but you can really mess up your phone if you know what I mean. Not mess up like brick (unless you really try) but more like phone won't load gmail now, phone won't get past the htc screen. As long as you have a nandroid backup you SHOULD be fine, the push, pull and rm commands are really the first step of rom building. If you know what files you pushed and rm'd you can make your dream rom.
CPCookieMan said:
Beat me to it. ADB is powerful and pretty cool if you know some good commands, but you can really mess up your phone if you know what I mean. Not mess up like brick (unless you really try) but more like phone won't load gmail now, phone won't get past the htc screen. As long as you have a nandroid backup you SHOULD be fine, the push, pull and rm commands are really the first step of rom building. If you know what files you pushed and rm'd you can make your dream rom.[/QUOTE
i am installing htc facebook.apk on a rom that has had all the Bloat removed.do i need to do something after i have pushed a apk file into system/app?? i have tried rebooting the phone and the program isnt there,ive tried going in the phone with root explorer and tried installing while having it in r/w and r/o and still cant get it to install.im not sure what im doing wrong.any help is apreciated
Click to expand...
Click to collapse
i am installing htc facebook.apk on a rom that has had all the Bloat removed.do i need to do something after i have pushed a apk file into system/app?? i have tried rebooting the phone and the program isnt there,ive tried going in the phone with root explorer and tried installing while having it in r/w and r/o and still cant get it to install.im not sure what im doing wrong.any help is apreciated
Click to expand...
Click to collapse
You do not have to do anything after an adb push.
What rom? Some roms have been modified to the point some htc apps will not work. Addionally a copy of the htcfacebook.apk from an eris build may not work on a sprint based or g1 based roms do to signature variations
Sent from my Eris using XDA App
zach.xtr said:
You do not have to do anything after an adb push.
What rom? Some roms have been modified to the point some htc apps will not work. Addionally a copy of the htcfacebook.apk from an eris build may not work on a sprint based or g1 based roms do to signature variations
Sent from my Eris using XDA App
Click to expand...
Click to collapse
im running xtrom 3.0.......i just went ahead and installed the social app flash and deleted what the ones i dont uses,but thanks for the help anyways.i was looking into pushing friendstream into it but found out its only works in sprint base builds

[q] urgent help is needed, too many pattern attempts

Hi, i need a fix for this and fast !!! I've tried all that is listed on xda about this issue, but to no avail. Anyway, i forgot my pattern and went to the forgot pattern menu. My wifi was off, so i figured it would give a prompt of some kind to turn on the wifi and then log on to my google account. But nooooo, google supposes that everyone's wifi is on all the time. Please help, what do i do ? I rebooted to recovery, i made a nandroid and currently i am adb pulling the twrp folder from my N7. I would have just factory reseted it, no probs, but i remembered i have some EXTREMELY important works in colornote that i can't afford to lose. Please help, what do i do ?????
Looks like you answered your own question. Unless your Android isn't encrypted, just boot into TWRP and backup your data using adb:
adb pull /data/data C:\backup
Click to expand...
Click to collapse
The main thing you will have to concern about is restoring those data and make it readable by the app. There are several ways, but you can either:
adb push C:\backup\colornotes /data/data/colornotes
Click to expand...
Click to collapse
Don't forget some devices you need to give it write permission first: adb remount rw, though should not be needed with TWRP. Or just copy the folder back using a rooted file manager.
Then go into adb shell and fix permission of the files so the app can get access to them:
adb shell
su - (again shouldn't be needed wile in TWRP)
chmod -R 644 /data/data/colornotes (or 777 for full access)
Click to expand...
Click to collapse
Tips while in adb shell:
Check permissions of files by typing: ls -la
Check what partition is mounted and whether you have write privilege to it by typing: cat /etc/fstab
Also, if you use a custom rom like CyanogenMod or AOKP, there is an option to enable all widgets on the lockscreen. Just put the Power Control widget on the lockscreen, then you can toggle WiFi on and off. (Can't remember if this is also possible with stock.)
Have fun.
OR have a look here.
Looks like either of the two methods suggested would be feasible with only a recovery running, but the 2nd one is easiest (as a custom recovery wouldn't necessarily provide a statically-linked sqlite3 utility).
if it works it doesn't require any wiping.
BTW guess how I found this.... wait for it .... wait for it.... wait for it.... I used google search.
Hi, i forgot to mention that i made the twrp backup while i was locked out and whenever i try to restore from the backup after a factory reset, it goes back to square one... And when i did a full wipe and hoped to use titanium backup to extract stuff from the nandroid, it just gives me and empty list, but the backup is there, all 5gb of it
iAndroidOS said:
Hi, i forgot to mention that i made the twrp backup while i was locked out and whenever i try to restore from the backup after a factory reset, it goes back to square one...
Click to expand...
Click to collapse
Well, that is to be expected, is it not? You are restoring exactly what is already there - effectively a no-op.
OK, I just booted into TWRP (2.4.1.0) and confirmed that the (equivalent of the) following disabled my pattern lock on the next boot:
cd /data/system
mkdir foo
mv locksettings.* foo
mv gesture.key foo
I did all of the above (the 'cd' command is implicit) using TWRPs touch interface - didn't even need adb.
ymmv as I am using jdq39/4.2.2 and my tablet was not in a "locked-out" state, but its an easy thing to try.

Categories

Resources