Skip to content
Snippets Groups Projects

main/anbox-image: make the workaround to #480 more reliable

Closed Imported Administrator requested to merge anbox-image-second-network-fix into master
3 unresolved threads

The downside of this version is that it will "phone home" with a single ping to postmarketos.org each time anbox is started. On the other hand, Android does the same thing with google.com constantly, so well.

This also upgrades the version of FDroid used.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Administrator resolved all threads · Imported

    resolved all threads

    By Antoine Fontaine on 2020-06-19T11:45:16

  • 1 1 --- a/anbox-init.sh
    2 2 +++ b/anbox-init.sh
    3 @@ -36,5 +36,11 @@ prepare_filesystem &
    3 @@ -36,5 +36,12 @@ prepare_filesystem &
    4 4 echo "Waiting for filesystem being prepared ..."
    5 5 wait $!
    6 6
    7 7 +(
    8 +while ip route add default via 192.168.250.1; do
    8 +while ! ping postmarketos.org -c 1; do
    • Author Owner

      how about... "while true"? Then the workaround should work most reliably, even if network goes down and comes up again. I don't think it costs that many resources, also you could increase the sleep to 3.

      Maybe replace it with a small C program that does the same thing with a syscall, so you don't even need to spawn processes. Then keep that C program running in the background instead of these shell commands.

      By Oliver Smith on 2020-06-20T09:39:44

    • Administrator changed this line in version 4 of the diff · Imported

      changed this line in version 4 of the diff

      By Antoine Fontaine on 2020-06-20T09:47:17

    • Author Owner

      @afontain: why not "while true", see above?

      By Oliver Smith on 2020-07-02T13:05:08

    • Author Owner

      ^ this is still unanswered

      By Oliver Smith on 2020-08-31T08:19:58

    • Please register or sign in to reply
  • Administrator added 12 commits · Imported

    added 12 commits

    Compare with previous version

    By Antoine Fontaine on 2020-06-20T09:47:18

  • added backport-to-v20.05 label

  • Author Owner

    Any progress on this @afontain?

    By Bart Ribbers on 2020-08-22T20:50:02

  • Administrator
  • 1 1 --- a/anbox-init.sh
    2 2 +++ b/anbox-init.sh
    3 @@ -36,5 +36,11 @@ prepare_filesystem &
    3 @@ -36,5 +36,12 @@ prepare_filesystem &
    4 4 echo "Waiting for filesystem being prepared ..."
    5 5 wait $!
    6 6
    7 7 +(
    8 +while ip route add default via 192.168.250.1; do
    8 +while ! ping 192.168.250.1 -c 1; do
    • Author Owner
      Suggested change
      8 +while ! ping 192.168.250.1 -c 1; do
      8 +while ! ping -c 1 192.168.250.1; do

      Otherwise: ping: unknown host -c

      By Danct12 on 2020-08-29T12:33:34

    • Author Owner

      Can't reproduce with either iputils ping on Arch Linux:

      $ ping 1.1.1.1 -c 1
      PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
      64 bytes from 1.1.1.1: icmp_seq=1 ttl=59 time=6.20 ms
      
      --- 1.1.1.1 ping statistics ---
      1 packets transmitted, 1 received, 0% packet loss, time 0ms
      rtt min/avg/max/mdev = 6.199/6.199/6.199/0.000 ms

      Or busybox ping in pmbootstrap chroot:

      / # ping 1.1.1.1 -c 1
      PING 1.1.1.1 (1.1.1.1): 56 data bytes
      64 bytes from 1.1.1.1: seq=0 ttl=59 time=6.305 ms
      
      --- 1.1.1.1 ping statistics ---
      1 packets transmitted, 1 packets received, 0% packet loss
      round-trip min/avg/max = 6.305/6.305/6.305 ms
      / # apk info --who-owns $(which ping)
      /bin/ping symlink target is owned by busybox-1.32.0-r2

      By Luca Weiss on 2020-08-29T12:53:33

    • Author Owner

      Ah does Android toybox ping get used here maybe? I have no context where this is used

      By Luca Weiss on 2020-08-29T12:53:58

    • Author Owner

      This is for Android toybox, I've tested this with anbox-shell.

      By Danct12 on 2020-08-29T12:56:10

    • Please register or sign in to reply
  • Administrator
  • 1 1 --- a/anbox-init.sh
  • Author Owner

    @afontain: can you take another look at this?

    By Oliver Smith on 2020-09-23T09:17:02

  • Author Owner

    replaced by !1798 (closed) and postmarketOS/pmbootstrap!2005

    By Antoine Fontaine on 2020-12-14T15:31:16

  • Administrator closed · Imported

    closed

  • Administrator mentioned in issue #1356 · Imported

    mentioned in issue #1356

    By Caleb Connolly on 2021-12-26T16:57:25

  • Please register or sign in to reply
    Loading