anestisb / android-prepare-vendor

Set of scripts to automate AOSP compatible vendor blobs generation from factory images
348 stars 155 forks source link

404 causes download-nexus-image.sh to always report ToS accept failure #170

Closed TravisWhitehead closed 4 years ago

TravisWhitehead commented 5 years ago

The ToS agreement functionality in scripts/download-nexus-image.sh is broken. To reproduce you can do:

mkdir output
scripts/download-nexus-image.sh -d bonito -b QP1A.190711.020 -o output -y

If you uncomment set -x # debug at the top of the file you will see that this is due to a URL returning 404:

++ curl -b /tmp/android_img_download.tvaSFE/g_cookies.txt -X POST -d notification_id=wall-nexus-image-tos -H 'X_XSRFToken: ' --write-out '%{http_code}' --output /dev/null --silent https://developers.google.com/profile/acknowledgeNotification
+ response=404
+ [[ 404 != \2\0\0 ]]
+ echo '[-] Nexus ToS accept request failed'

As a workaround, you can just comment out the abort 1 line in the script and the images should download just fine.

anestisb commented 4 years ago

Should be fixed with https://github.com/anestisb/android-prepare-vendor/pull/171. Please try again and if issue still there reopen.