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?
How putting setprop in init.$hardware.rc affects the display but not in kernel command line.
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?
In android framework there is a file called
that contains default dpi if none is specified.
This file have this setting,
public static final int DENSITY_MEDIUM = 160;
Which is used if no dpi is specified.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.