I want to edit shared preferences values from DDMS, if I double click the file it doen't saves the changes. Do I do something wrong or there is special plugin for that?
2 Answers
First, you should probably make sure your app isn't running before doing this.
You have to use the File Explorer option. Navigate to
data -> com.yourpackage -> shared_pref
Click the xml and at the top right click pull
.
Edit the xml on your computer.
Once you're done, click push
(also top right).
If you pushed the same file to the same device to the same directory, the next time you launch the app, you should see your updated values.

- 36,351
- 10
- 106
- 92
-
@NickF I'm pretty sure that this is the only way. If you don't like the GUI, you can also use `adb pull/push` along with the file path. – A--C Feb 16 '13 at 18:53
-
1@NickF also worth noting that DDMS' file explorer will definitely work for emulators, but if you're on a phone, your mileage may vary. From what I can recall, to get the files to show in DDMS, you need to do some permissions changes, which requires root. – A--C Feb 16 '13 at 19:04
-
What is file explorer? Can I do this using Ecplipse? – Buksy Mar 08 '14 at 22:01
-
1@Buksy This is all done using Eclipse. Open the `DDMS` perspective and there should be a tab called `File Explorer`. – A--C Mar 08 '14 at 22:06
Just follow the steps, it is easy.
Step 2: Open data/data/you package name/shared_prefs -> select your shared pref -> right click and give Save As.
Step 3: Save in your desired folder. I am saving in desktop folder. Dont change the name
Step 4: Now edit the needed values in the saved file.
Step 5: Upload the edited file to shared_pref directory
Finally close and open the app to make it work. That's all.

- 50,140
- 28
- 121
- 140

- 1,544
- 1
- 13
- 9