Skip to content

Commit

Permalink
g4: init: init.qcom.post_boot.sh RIL workaround
Browse files Browse the repository at this point in the history
Enhanced the workaround:

- catch all other states (e.g. UNKNOWN)
- special handler for PIN_REQUIRED:
   sometimes this state is set but no prompt happens.
   a trigger will be set + reset which ensures a RIL restart on every second run.
   handler will wait 30s for user input between each run/test
- increase the number of tries to 20 (10 is too less - especially when 3 are
   happen almost always directly on boot due to the date/time corrections!)
- increase the wait time for RIL initialization from 10 to 30 (makes no sense to
   kill too fast)
- logging

example run:

> RIL restart - try 1 of 20
> restarted RIL daemon as gsm.sim.state was ><
> RIL restart - try 2 of 20
> restarted RIL daemon as gsm.sim.state was ><
> PIN_REQUIRED detected. waiting 30s for user input..
> RIL restart - try 4 of 20
> restarted RIL daemon as gsm.sim.state was >PIN_REQUIRED<
> PIN_REQUIRED detected. waiting 30s for user input..
>
> [USER ENTERS THE PIN]
>
> gsm.sim.state >READY<
> ended

(related issue Suicide-Squirrel/issues_oreo#6 )

Change-Id: I1f6a1aeb2eaff0432a8b0d1082522def1ddcd69a
(cherry picked from commit 53c4185)
  • Loading branch information
steadfasterX authored and aoleary committed Nov 25, 2018
1 parent 114baab commit 8389db9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rootdir/etc/init.qcom.post_boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ x=1
PRTRIGGER=0
REQRESTART=$(getprop gsm.sim.state)
while [ "$REQRESTART" != "READY" ];do

# PIN_REQUIRED means usually the user get prompted - unfortunately
# sometimes there is no prompt.
# this will restart RIL not on the first but every second run only (which should be safe) and
Expand All @@ -234,4 +234,3 @@ done
echo "$0: gsm.sim.state >$REQRESTART<" >> /dev/kmsg
echo "$0: ended" >> /dev/kmsg
# < END workaround

0 comments on commit 8389db9

Please sign in to comment.