update_device.py: use the appid from request. am: 144f9f8a49
am: fbe7ff52b8

Change-Id: I45880bf2ffba4d7dc3a1f71b4e93312aea7307dc