scrayne
scrayne

Reputation: 718

Android -- Is there anywhere I can write a log file so that I can look at it without having root?

I have a very intermittent bug and need to do some logging to figure it out. I am trying to create an error log file that I can look at on my device. I can't seem to create a file anywhere other than data/data/com.myapp/files or data/data/com.myapp/databases. I understand that I can't root my device using towelroot and I don't want to use something more risky (device is Motorola XT907, Droid Razr M, System Version 182.46.15, OS 4.4.2). Any ideas would be appreciated.

Upvotes: 0

Views: 191

Answers (1)

Johnathon Havens
Johnathon Havens

Reputation: 730

You could output to logcat and filter your process via ADB.

adb logcat

Or use DDMS, I use DDMS from within Eclipse with it's ADT plugin.

Also you could write and read from external storage, you'll need to add the permissions to your manifest:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

Then follow the guide here to write and read to external storage

http://developer.android.com/training/basics/data-storage/files.html

Upvotes: 2

Related Questions