kurtgn
kurtgn

Reputation: 8732

Android setprop: failed to set property

I found the following command in the Firebase docs:

adb shell setprop debug.firebase.analytics.app com.securitycentery

This will enable Firebase debug events for my app, and they will get shown in the Debug View of Firebase console.

And this is a nice way to debug an app, so I thought I'd use the same tool to add debug functionality to my app. I decided to setprop something and then access this property from my app.

However when I do setprop, it fails:

adb shell setprop someprop xyz


setprop: failed to set property 'someprop' to 'xyz'

Why is that? Do I have to declare my properties to be able to set them? If so, how is this done?

My phone is not rooted. The Firebase setprop command works without any extra setup. I want the same for my properties.

Upvotes: 3

Views: 8647

Answers (1)

sklott
sklott

Reputation: 2859

There are only small subset of prefixes that can be set without rooting device. I don't remember exactly all list, but "debug.someprop" should work.

Upvotes: 3

Related Questions