-1

I want to edit an entry of a sharedPreference file that is in my emulator: /data/data/package_name/shared_prefs/file_name.xml and make this change be applicable to the running app, not recompile it again:

<map>
    <string name="orderKey">79160317</string>
    <string name="userId">3103842</string>
    <string name="userToken">eyJhbGciOiJIUeTR1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7InVzZXJJZCI6IjMxMDM5NDIifSwiaWF0IjoxNTQ0MDE0MzU5qwJleHAiOjE1NDQ4NzgzN7l9.gmqUlMzAUv2rCsGoYBZDTZ3aoYdYnDssdregrEJ&</string>

</map>

I have already tried this: Edit shared preferences from DDMS, but it requires me to run the app again, i.e. that's not dynamic.

Roni Castro
  • 1,968
  • 21
  • 40
  • 1
    Your question isn't making sense. If you're asking how to edit a shred preference programmatically, there's dozens of answers on that. If you're asking how to write a preferences screen, there's lots of answers/tutorials for that as well. If you're asking something else, please be more explicit. – Gabe Sechan Dec 05 '18 at 14:07

1 Answers1

2

You need a debug library like Pandora, Android-Debug-Database or Hyperion-Android

Dewey Reed
  • 4,353
  • 2
  • 27
  • 41