12
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MacでAndroid開発中にsqliteの中身を見る

Posted at

MacでAndroid開発中にsqliteの中身を見る

開発中にアプリ内のデータを読みたい時がある。
adb pullでは直接pullできないが、以下のように run-as で catすれば大体のファイルは見られるはず。

adb shell run-as [package name] cat /data/data/[package name]/databases/[database name] > ~/Desktop/[database name]

しかしデータがこわれていて読めない。
そこで以下のようにCRLFをLFに置換するとよいらしい。

adb shell run-as [package name] cat /data/data/[package name]/databases/[database name] | perl -pe 's/\x0D\x0A/\x0A/g' > ~/Desktop/[database name]

参考

12
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?