How to examine SharedPreferences from adb shell?

前端 未结 8 695
傲寒
傲寒 2021-01-30 10:30

Now that we can Examining sqlite3 Databases from a Remote Shell, is it possible to examine SharedPreferences from adb shell? Since it would be much more convenient to examine an

8条回答
  •  囚心锁ツ
    2021-01-30 11:22

    Helper bash function

    function adb-pull-prefs {
        # ${1} - app package
        # ${2} - prefs name
        adb exec-out run-as ${1} cat /data/data/${1}/shared_prefs/${2}.xml
    }
    

提交回复
热议问题