[Android Software/Hacking General [Developers Only]] ranchu-panchu:
Hello,

I wish to disable screen at startup, but still enable application to run in device.

I tried several methods:

1. tried to remove libsurfaceflinger, but is seems to result in some failures.

I can manage to connect with "adb shell" , but "su" fails

shell@mako:/ $ su

[-] Connection to ui timed out

shell@mako:/ $

I also see in logcat a lot of endlessly errors:

I/art (21092): Explicit concurrent mark sweep GC freed 956(105KB) AllocSpace objects, 0(0B) LOS objects, 55% free, 812KB/1836KB, paused 152us total 9.369ms

I/art (21092): Explicit concurrent mark sweep GC freed 597(42KB) AllocSpace objects, 0(0B) LOS objects, 55% free, 818KB/1842KB, paused 183us total 7.324ms

I/art (21092): Explicit concurrent mark sweep GC freed 265(20KB) AllocSpace objects, 0(0B) LOS objects, 54% free, 847KB/1871KB, paused 183us total 6.897ms

I/ServiceManager(21091): Waiting for service batterystats...

I/art (21092): WaitForGcToComplete blocked for 23.775ms for cause Explicit

I/art (21092): Explicit concurrent mark sweep GC freed 14(640B) AllocSpace objects, 0(0B) LOS objects, 45% free, 1226KB/2MB, paused 610us total 28.139ms

V/NatController(21090): runCmd(/system/bin/iptables -F natctrl_FORWARD) res=0

V/NatController(21090): runCmd(/system/bin/iptables -A natctrl_FORWARD -j DROP) res=0

V/NatController(21090): runCmd(/system/bin/iptables -t nat -F natctrl_nat_POSTROUTING) res=0

V/NatController(21090): runCmd(/system/bin/iptables -F natctrl_tether_counters) res=0

V/NatController(21090): runCmd(/system/bin/iptables -X natctrl_tether_counters) res=0

V/NatController(21090): runCmd(/system/bin/iptables -N natctrl_tether_counters) res=0

V/NatController(21090): runCmd(/system/bin/iptables -t mangle -A natctrl_mangle_FORWARD -p tcp --tcp-flags SYN SYN -j TCPMSS --clamp-mss-to-pmtu) res=0

I/art (21092): Explicit concurrent mark sweep GC freed 572(33KB) AllocSpace objects, 0(0B) LOS objects, 45% free, 1242KB/2MB, paused 610us total 28.933ms

I/art (21092): Explicit concurrent mark sweep GC freed 741(45KB) AllocSpace objects, 0(0B) LOS objects, 45% free, 1245KB/2MB, paused 213us total 8.637ms

I/System (21092): Loaded time zone names for "" in 89ms (86ms in ICU)

I/System (21092): Loaded time zone names for "en_US" in 59ms (54ms in ICU)

I/art (21092): Explicit concurrent mark sweep GC freed 2345(178KB) AllocSpace objects, 0(0B) LOS objects, 42% free, 1404KB/2MB, paused 213us total 9.613ms

I/art (21092): Explicit concurrent mark sweep GC freed 136(12KB) AllocSpace objects, 0(0B) LOS objects, 41% free, 1469KB/2MB, paused 213us total 9.034ms

I/art (21092): Explicit concurrent mark sweep GC freed 288(24KB) AllocSpace objects, 0(0B) LOS objects, 40% free, 1514KB/2MB, paused 213us total 9.888ms

I/art (21092): Explicit concurrent mark sweep GC freed 679(47KB) AllocSpace objects, 0(0B) LOS objects, 40% free, 1516KB/2MB, paused 183us total 9.369ms

I/Zygote (21092): ...preloaded 3005 classes in 1121ms.

I/art (21092): VMRuntime.preloadDexCaches starting

I/art (21092): VMRuntime.preloadDexCaches strings total=214618 before=38996 after=38996

I/art (21092): VMRuntime.preloadDexCaches types total=18345 before=6389 after=6425

I/art (21092): VMRuntime.preloadDexCaches fields total=85559 before=32261 after=32595

I/art (21092): VMRuntime.preloadDexCaches methods total=151780 before=66835 after=67736

I/art (21092): VMRuntime.preloadDexCaches finished

I/art (21092): Counter: 0

I/art (21092): Counter: 1

I/art (21092): Explicit concurrent mark sweep GC freed 61(15KB) AllocSpace objects, 0(0B) LOS objects, 40% free, 1502KB/2MB, paused 183us total 12.513ms

D/idmap (21292): error: no read access to /vendor/overlay: No such file or directory

I/Zygote (21092): Preloading resources...

I/art (21092): Explicit concurrent mark sweep GC freed 51(1952B) AllocSpace objects, 0(0B) LOS objects, 39% free, 1554KB/2MB, paused 640us total 34.243ms

I/art (21092): Explicit concurrent mark sweep GC freed 28(1264B) AllocSpace objects, 0(0B) LOS objects, 39% free, 1604KB/2MB, paused 213us total 22.615ms

I/art (21092): Explicit concurrent mark sweep GC freed 32(1456B) AllocSpace objects, 0(0B) LOS objects, 40% free, 1654KB/2MB, paused 183us total 8.789ms

I/art (21092): Explicit concurrent mark sweep GC freed 32(1456B) AllocSpace objects, 0(0B) LOS objects, 39% free, 1703KB/2MB, paused 213us total 9.430ms

I/art (21092): Explicit concurrent mark sweep GC freed 32(1456B) AllocSpace objects, 0(0B) LOS objects, 40% free, 1753KB/2MB, paused 213us total 10.468ms

I/art (21092): Explicit concurrent mark sweep GC freed 34(1584B) AllocSpace objects, 0(0B) LOS objects, 39% free, 1803KB/2MB, paused 213us total 10.407ms

I/art (21092): Explicit concurrent mark sweep GC freed 32(1456B) AllocSpace objects, 0(0B) LOS objects, 39% free, 1852KB/3MB, paused 183us total 10.621ms

I/art (21092): Explicit concurrent mark sweep GC freed 66(2960B) AllocSpace objects, 0(0B) LOS objects, 39% free, 1910KB/3MB, paused 213us total 10.529ms

I/art (21092): Explicit concurrent mark sweep GC freed 36(1648B) AllocSpace objects, 0(0B) LOS objects, 39% free, 1959KB/3MB, paused 244us total 10.651ms

I/art (21092): Explicit concurrent mark sweep GC freed 36(1968B) AllocSpace objects, 0(0B) LOS objects, 39% free, 2009KB/3MB, paused 244us total 11.353ms

I/art (21092): Explicit concurrent mark sweep GC freed 32(1456B) AllocSpace objects, 0(0B) LOS objects, 40% free, 2MB/3MB, paused 213us total 11.475ms

D/MDnsDS (21090): MDnsSdListener::Hander starting up

D/MDnsDS (21090): MDnsSdListener starting to monitor

D/MDnsDS (21090): Going to poll with pollCount 1

I/art (21092): Explicit concurrent mark sweep GC freed 32(1456B) AllocSpace objects, 0(0B) LOS objects, 39% free, 2MB/3MB, paused 213us total 10.773ms

.....

Is there any way to disable screen, but still run some application ?

2.

I also tried to change max_brightness, but I get no permission for that.

Changing brightness has strange effect. it change it for a short time, but then it has no effect, as if the control moved to somewhere else.

Thanks,

Ranchu