ykagan / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

WriteMinidump fails for non-debuggable applications on recent versions of Android #602

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Include 'android:debuggable="false"' in the 'application' tag of the app's 
AndroidManifest.xml file.
2. Call google_breakpad::WriteMinidump()

What is the expected output? What do you see instead?

Expected output: A minidump file is written
Actual result: Call to LinuxDumper::ReadAuxv() fails. This causes 
WriteMinidump() to return false without writing a minidump file.

What version of the product are you using? On what operating system?

Version: r1348
OS: Android version 4.2.2

Please provide any additional information below.

Cause seems to be the same as: 
https://code.google.com/p/android/issues/detail?id=43055

That is, /proc/[pid]/auxv has root permissions for non-debuggable apps. This 
causes the call to sys_open to fail in LinuxDumper::ReadAuxv() with errno == 
EACCES.

Modifying LinuxDumper::Init() to ignore the return value from 
LinuxDumper::ReadAuxv() works around the issue and a useable minidump is still 
generated.

Original issue reported on code.google.com by ste...@pocketgems.com on 22 Jul 2014 at 10:33