Reputation: 2425
My boss hopes that there is no information leak when users use our android apps.
And I found even I set the android:debuggable="false"
it still can see my logs from Logcat or command line.
I searched android:debuggable someone also have the same problem.
I got some answers from internet, such as next:
There are a property called debugable of Avd. You can print by adb shell get prop. I don't (know) if it is the cause of your problem.
If you have a pre-production device, you can still debug an app that has debuggable set to false.
I just think, even I delete all my logs, there are also many logs about my app from OS.
My questions: 1.Is there a way I can do let my "android:debuggable" work well and 2.Is there any other way to hide all my logs except delete all my logs? 3.What does "android:debuggable" really mean? 4.What is "a pre-production device" when it goes on android device?
Thank you for your help. I will try some other ways, and try my best to share my information in here.
Upvotes: 0
Views: 639
Reputation: 2794
Is your code guaranteed to be bug-free? If not, why do you want to stop users having information that they might be able to use to shed light on bugs in your app?
Come back when you can write bug-free code, then we’ll talk.
Upvotes: -2
Reputation: 20309
I simply create wrapper functions around Log
that first check the value of a static boolean
called loggineEnabled
if it is set to true then log gets called otherwise the calls to log are ignored.
Then I simply set this variable to false before I compile a version of my app that I distribute.
void LogD(String msg){
if (loggingEnabled)
Log.d(MyTag, msg)
}
Upvotes: 2