cielavenir

proof that saurik found ctl.restart from init.rc

Jun 20th, 2013
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.19 KB | None | 0 0
  1. cielavenir >
  2. is saurik available? or sleeping?
  3. so... as I said several weeks ago, I needed to decompile substrate installer to see why I couldn't install substrate on my HTCJ (and I was able reproduce the failure using adb shell)
  4. very sorry about that
  5. now, the question is how you selected the rebooting method:
  6. setprop ctl.restart zygote
  7. I and homar found that this method is the most compatible around many devices
  8. some HTC device crashes in start;stop or killall zygote
  9. We have discussed about this on XDA and have found setprop is working
  10. so, you selected setprop by careful analysis?
  11. well, I think this finding should be credited, right?
  12.  
  13. saurik >
  14. so, let me get this straight: you are coming here to challenge me that I've somehow come up with something you came up with, and that I should be crediting you due to something you said on XDA? is that the idea here?
  15. here's why I use ctl.restart: on January 9th pulser was testing a beta version of Substrate, and complained that it failed on his Galaxy Note
  16. after a bunch of debugging with him, I determined that it was due to "onrestart write /proc/sysrq-trigger c"
  17. 6138 15:20:40 < saurik> ooooo
  18. 6139 15:21:29 < saurik> 'c' - Will perform a system crash by a NULL pointer dereference.
  19. 6140 15:21:29 < saurik> A crashdump will be taken if configured.
  20. 6141 15:21:33 < saurik> why the fuck would they do that
  21. 6142 15:23:28 < pulser_> who knows?
  22. 6143 15:32:50 < saurik> apparently android 2.2 added a ctl.restart control message, so I can use that instead
  23. 6144 15:37:27 < saurik> (maybe even only Android 2.3, but that just barely manages to cover my deployment target, so it works)
  24. 6145 15:38:14 < saurik> pulser_: so, I guess sanity check: `setprop ctl.restart zygote` does not reboot, right?
  25. 6147 15:38:32 < saurik> (I feel like it /should/, but I have reason to believe that it doesn't)
  26. 6148 15:38:41 < saurik> (like, I consider it a bug that it doesn't, but it is a bug that really is there)
  27. 6149 15:39:00 < saurik> (in essence, ctl.restart is considered stop/start, not "restart", so "onrestart" doesn't fire)
  28. 6150 15:49:51 < pulser_> saurik, let me test
  29. 6151 15:50:23 < pulser_> that gave me a "soft reboot", but without going back to bootloader
  30. 6152 15:50:25 < pulser_> basically a "stop start"
  31. 6153 15:51:23 < saurik> ok, great. next version of Substrate will do that
  32. 6154 15:51:34 < pulser_> :)
  33. so that's the path: pulser reported a bug, I tracked it down to a specific init.rc fragment and a corresponding codepath in init. I then looked for things in init that surrounded the restart code for one that wouldn't trigger that path, and came across ctl.restart. ctl.restart also just sounds better than doing a killall myself of zygote, and stop;start was off the table long before that due to race conditions. I later noticed that I was wrong about it being in 2.2: it was only added in 3.0, so I do the fallback based on API level
  34.  
  35. cielavenir >
  36. oh it was init.rc stuff...
  37. anyway we couldn't think of init.rc, so our works are really derivative lol
  38. ok thank you
  39. ah sorry now I understood the first the sentence
  40. well, it's opposite; our ExtraPowerMenu is substrates's derivative.
  41. sorry to have worried you
  42.  
  43. saurik >
  44. ah, ok
Advertisement
Add Comment
Please, Sign In to add comment