otautil: Clean up obsolete includes.

external/zlib and external/safe-iop/include were used by Zip.c, which
became obsolete after [1].

Removing
 - <assert.h>: we no longer call assert(3);
 - <limits.h>: we no longer use PATH_MAX;
 - <stdio.h>: we don't need FILE anymore;
 - <stdlib.h>: no more malloc(3)/calloc(3);
 - <unistd.h>: was once needed for lseek(2);
 - <string.h>: no more memset(3).

Adding
 - <stdint.h> for SIZE_MAX.

[1] commit 8cf5c8f60f51049278b08ae4cbc31df397b651fd: "Replace minzip
with libziparchive".

Test: `mmma bootable/recovery`
Change-Id: I349e909ba83d0f6ade5f92856ce3934f29fdca6c
(cherry picked from commit 14b61e7b961bb49787ec9ec8f8f7a95c8d12b71c)
2 files changed
tree: cf879d64bd8c4137b2dc8529e262eeee2d4ca42c
  1. applypatch/
  2. bootloader_message/
  3. edify/
  4. etc/
  5. fonts/
  6. minadbd/
  7. minui/
  8. otafault/
  9. otautil/
  10. res-hdpi/
  11. res-mdpi/
  12. res-xhdpi/
  13. res-xxhdpi/
  14. res-xxxhdpi/
  15. tests/
  16. tools/
  17. uncrypt/
  18. update_verifier/
  19. updater/
  20. adb_install.cpp
  21. adb_install.h
  22. Android.mk
  23. asn1_decoder.cpp
  24. asn1_decoder.h
  25. bootloader.h
  26. CleanSpec.mk
  27. common.h
  28. default_device.cpp
  29. device.cpp
  30. device.h
  31. error_code.h
  32. fuse_sdcard_provider.cpp
  33. fuse_sdcard_provider.h
  34. fuse_sideload.cpp
  35. fuse_sideload.h
  36. install.cpp
  37. install.h
  38. interlace-frames.py
  39. mounts.cpp
  40. mounts.h
  41. NOTICE
  42. print_sha1.h
  43. README.md
  44. recovery-persist.cpp
  45. recovery-persist.rc
  46. recovery-refresh.cpp
  47. recovery-refresh.rc
  48. recovery.cpp
  49. roots.cpp
  50. roots.h
  51. rotate_logs.cpp
  52. rotate_logs.h
  53. screen_ui.cpp
  54. screen_ui.h
  55. ui.cpp
  56. ui.h
  57. verifier.cpp
  58. verifier.h
  59. wear_touch.cpp
  60. wear_touch.h
  61. wear_ui.cpp
  62. wear_ui.h
README.md

The Recovery Image

Quick turn-around testing

mm -j && m ramdisk-nodeps && m recoveryimage-nodeps

# To boot into the new recovery image
# without flashing the recovery partition:
adb reboot bootloader
fastboot boot $ANDROID_PRODUCT_OUT/recovery.img

Running the tests

# After setting up environment and lunch.
mmma -j bootable/recovery

# Running the tests on device.
adb root
adb sync data

# 32-bit device
adb shell /data/nativetest/recovery_unit_test/recovery_unit_test
adb shell /data/nativetest/recovery_component_test/recovery_component_test

# Or 64-bit device
adb shell /data/nativetest64/recovery_unit_test/recovery_unit_test
adb shell /data/nativetest64/recovery_component_test/recovery_component_test

Running the manual tests

recovery-refresh and recovery-persist executables exist only on systems without /cache partition. And we need to follow special steps to run tests for them.

  • Execute the test on an A/B device first. The test should fail but it will log some contents to pmsg.

  • Reboot the device immediately and run the test again. The test should save the contents of pmsg buffer into /data/misc/recovery/inject.txt. Test will pass if this file has expected contents.