AnsweredAssumed Answered

How init.rc setprop works

Question asked by mrigendra chaubey on Oct 24, 2018
Latest reply on Nov 2, 2018 by Diego Adrian Cuevas

I have android 8 from nxp and using it on sabresd board.
I am trying to change dpi settings through setprop settings
So I have put this iside init.${hardware}.rc on boot event

 

# Set the density to 160dpi, default 128dpi is not good
# Set the density to 128 dpi for 480x800, 7 inch.
setprop ro.sf.lcd_density 128

The device works fine and if I do this

wm density
Physical density:128

Now I put this dpi setting in kernel command line

androidboot.sf.lcd_density=128

but I do not see device to be in 128 dpi setting. Also

wm density
Physical density:160

Now this baffles me.Who gave 160dpi settings?

1. How putting setprop in init.$hardware.rc affects the display but not in kernel command line.

2. Who really processes setprop.
I tried putting prints like this

on boot
exec /system/bin/echo "Trigger test E"

I saw nothing, so does that mean boot event never happened?

Outcomes