Skip to content
Snippets Groups Projects
  1. Nov 22, 2023
  2. Nov 21, 2023
    • Harry Cutts's avatar
      uinput: support evemu recordings · 4ec6969f
      Harry Cutts authored
      evemu [0] is a system used by the wider Linux community to record
      sequences of evdev events and descriptions of the device that created
      them. Together with the evemu-record implementation added to
      frameworks/native, implementing support for evemu recordings in uinput
      gives us a system for event recording and replay that's compatible with
      other Linux systems.
      
      Since the format looks quite different from the existing JSON-style one,
      we can automatically detect which type of data is being passed in,
      instead of having to change the command-line interface.
      
      As part of the implementation, the Event.Bus enum is replaced with plain
      integers. This allows the tool to support new bus IDs that are added to
      Linux's input.h without code changes, at least for evemu files.
      
      [0]: https://gitlab.freedesktop.org/libevdev/evemu
      
      Bug: 302297266
      Test: replay recordings made using Android and FreeDesktop
            evemu-record implementations
      Change-Id: Ie2f969da24db9aa04037335d5b697cdc0db0b3ca
      4ec6969f
    • Pascal Muetschard's avatar
      Move counter producer off of vendor partition. · 342e37d2
      Pascal Muetschard authored
      Although the binary looks for a vendor provided shared library,
      it is an otherwise vendor agnostic tool. Moving it off the
      vendor partition also has the added benefit of it not requiring
      root to be run.
      
      Bug: b/273907878
      Test: manual
      Change-Id: I81726ffb7d96acef69b7b77c864be254be9a74c5
      342e37d2
  3. Nov 16, 2023
    • Harry Cutts's avatar
      uinput: pass Commands to Event.Builder.setCommand · 766ff01f
      Harry Cutts authored
      Parsing strings into enum values should be done by the parser, not the
      builder, and this means that the evemu parser will be able to pass
      properly typed values to setCommand rather than "magic" strings.
      
      Bug: 302297266
      Test: m uinput
      Change-Id: Icac5764a66025412c87c326280d1895f3da78cac
      766ff01f
    • Harry Cutts's avatar
      uinput: crash if device creation fails · e28db5f1
      Harry Cutts authored
      Previously the tool just carried on, with event injections being
      silently dropped, which isn't very obvious behaviour.
      
      Bug: 302297266
      Test: cause device creation to fail somehow, check the tool exits
      Change-Id: I94e931729339bff0f6fc7ab5b591f062043a1d7a
      e28db5f1
    • Harry Cutts's avatar
      uinput: report errors from configuration ioctls · 2bec9191
      Harry Cutts authored
      This came in useful when debugging the evemu support, and seems like
      something we should be checking anyway.
      
      Bug: 302297266
      Test: pass some invalid arguments (e.g. large numbers that aren't valid
            event codes) to the ioctls, check errors are logged
      Change-Id: Id3e32dad96c9db8819009b815ee2574ef63e96f7
      2bec9191
  4. Nov 15, 2023
  5. Nov 14, 2023
    • Harry Cutts's avatar
      uinput: improve Event.Builder API · 822e9c80
      Harry Cutts authored
      Rename setDuration and associated identifiers to make the units clearer,
      fix a typo in setInputport, and add some JavaDoc to clarify the
      structure of configuration arrays.
      
      Bug: 302297266
      Test: m uinput
      Change-Id: I9b9ae8970389da3cdfe06738883ef02ebf07ff77
      822e9c80
    • Harry Cutts's avatar
      uinput: use enum valueOf method · 55a23758
      Harry Cutts authored
      This makes the Command and UinputControlCode enums and the code to look
      up their values a little tidier.
      
      Bug: 302297266
      Test: atest CtsInputHostTestCases
      Change-Id: Iad98088b93dc1e1b72df1efbeb9010f78c6962e9
      55a23758
    • Harry Cutts's avatar
      uinput: move Event.Reader to its own file · 37e7df39
      Harry Cutts authored
      We'll shortly be adding a parser for a different file format (evemu),
      and having the different parsers in separate files will make the code
      nicer to navigate.
      
      In addition to moving it to a separate file, this CL renames Reader to
      JsonStyleParser to avoid confusion with Java's Reader classes, and
      replaces some switch statements with the new-style switch syntax to
      improve readability.
      
      Bug: 302297266
      Test: atest CtsInputHostTestCases
      Change-Id: Id6c7536a2caea3b61fac615dce071129bf4dc1e4
      37e7df39
  6. Nov 08, 2023
  7. Oct 24, 2023
  8. Oct 23, 2023
  9. Oct 20, 2023
  10. Sep 28, 2023
  11. Sep 22, 2023
    • Pawan Wagh's avatar
      Use readUniqueFileDescriptor in incidentd service · eb695e1f
      Pawan Wagh authored
      readFileDescriptor doesn't provide ownership of the fds. fdopen
      needs ownership of the fds. Fds read from parcel should be duped
      in this scenario and readUniqueFileDescriptor dups fds internally.
      
      Test: m incidentd_service_fuzzer && adb sync data && adb shell /data/fuzz/x86_64/incidentd_service_fuzzer/incidentd_service_fuzzer
      Test: atest incidentd_test
      Bug: 286931110
      Bug: 283699145
      
      Merged-In: Ibe03a17dee91ac5bf25d123d4fd9c0bdd3c7d80e
      Change-Id: Ibe03a17dee91ac5bf25d123d4fd9c0bdd3c7d80e
      (cherry picked from commit ba78ef27)
      eb695e1f
    • Pawan Wagh's avatar
      Use readUniqueFileDescriptor in incidentd service · 5ae8b810
      Pawan Wagh authored
      readFileDescriptor doesn't provide ownership of the fds. fdopen
      needs ownership of the fds. Fds read from parcel should be duped
      in this scenario and readUniqueFileDescriptor dups fds internally.
      
      Test: m incidentd_service_fuzzer && adb sync data && adb shell /data/fuzz/x86_64/incidentd_service_fuzzer/incidentd_service_fuzzer
      Test: atest incidentd_test
      Bug: 286931110
      Bug: 283699145
      
      Merged-In: Ibe03a17dee91ac5bf25d123d4fd9c0bdd3c7d80e
      Change-Id: Ibe03a17dee91ac5bf25d123d4fd9c0bdd3c7d80e
      (cherry picked from commit ba78ef27)
      5ae8b810
    • Pawan Wagh's avatar
      Use readUniqueFileDescriptor in incidentd service · 3904fb61
      Pawan Wagh authored
      readFileDescriptor doesn't provide ownership of the fds. fdopen
      needs ownership of the fds. Fds read from parcel should be duped
      in this scenario and readUniqueFileDescriptor dups fds internally.
      
      Test: m incidentd_service_fuzzer && adb sync data && adb shell /data/fuzz/x86_64/incidentd_service_fuzzer/incidentd_service_fuzzer
      Test: atest incidentd_test
      Bug: 286931110
      Bug: 283699145
      
      Merged-In: Ibe03a17dee91ac5bf25d123d4fd9c0bdd3c7d80e
      Change-Id: Ibe03a17dee91ac5bf25d123d4fd9c0bdd3c7d80e
      (cherry picked from commit ba78ef27)
      3904fb61
    • Pawan Wagh's avatar
      Use readUniqueFileDescriptor in incidentd service · 6fe75d9d
      Pawan Wagh authored
      readFileDescriptor doesn't provide ownership of the fds. fdopen
      needs ownership of the fds. Fds read from parcel should be duped
      in this scenario and readUniqueFileDescriptor dups fds internally.
      
      Test: m incidentd_service_fuzzer && adb sync data && adb shell /data/fuzz/x86_64/incidentd_service_fuzzer/incidentd_service_fuzzer
      Test: atest incidentd_test
      Bug: 286931110
      Bug: 283699145
      
      Merged-In: Ibe03a17dee91ac5bf25d123d4fd9c0bdd3c7d80e
      Change-Id: Ibe03a17dee91ac5bf25d123d4fd9c0bdd3c7d80e
      (cherry picked from commit ba78ef27)
      6fe75d9d
    • Pawan Wagh's avatar
      Use readUniqueFileDescriptor in incidentd service · db60b2f5
      Pawan Wagh authored
      readFileDescriptor doesn't provide ownership of the fds. fdopen
      needs ownership of the fds. Fds read from parcel should be duped
      in this scenario and readUniqueFileDescriptor dups fds internally.
      
      Test: m incidentd_service_fuzzer && adb sync data && adb shell /data/fuzz/x86_64/incidentd_service_fuzzer/incidentd_service_fuzzer
      Test: atest incidentd_test
      Bug: 286931110
      Bug: 283699145
      
      Merged-In: Ibe03a17dee91ac5bf25d123d4fd9c0bdd3c7d80e
      Change-Id: Ibe03a17dee91ac5bf25d123d4fd9c0bdd3c7d80e
      (cherry picked from commit ba78ef27)
      db60b2f5
    • Pawan Wagh's avatar
      Use readUniqueFileDescriptor in incidentd service · d28f10d8
      Pawan Wagh authored
      readFileDescriptor doesn't provide ownership of the fds. fdopen
      needs ownership of the fds. Fds read from parcel should be duped
      in this scenario and readUniqueFileDescriptor dups fds internally.
      
      Test: m incidentd_service_fuzzer && adb sync data && adb shell /data/fuzz/x86_64/incidentd_service_fuzzer/incidentd_service_fuzzer
      Test: atest incidentd_test
      Bug: 286931110
      Bug: 283699145
      
      Merged-In: Ibe03a17dee91ac5bf25d123d4fd9c0bdd3c7d80e
      Change-Id: Ibe03a17dee91ac5bf25d123d4fd9c0bdd3c7d80e
      (cherry picked from commit ba78ef27)
      d28f10d8
    • Pawan Wagh's avatar
      Use readUniqueFileDescriptor in incidentd service · 598dc664
      Pawan Wagh authored
      readFileDescriptor doesn't provide ownership of the fds. fdopen
      needs ownership of the fds. Fds read from parcel should be duped
      in this scenario and readUniqueFileDescriptor dups fds internally.
      
      Test: m incidentd_service_fuzzer && adb sync data && adb shell /data/fuzz/x86_64/incidentd_service_fuzzer/incidentd_service_fuzzer
      Test: atest incidentd_test
      Bug: 286931110
      Bug: 283699145
      
      Merged-In: Ibe03a17dee91ac5bf25d123d4fd9c0bdd3c7d80e
      Change-Id: Ibe03a17dee91ac5bf25d123d4fd9c0bdd3c7d80e
      (cherry picked from commit ba78ef27)
      598dc664
    • Pawan Wagh's avatar
      Use readUniqueFileDescriptor in incidentd service · 6fe53e86
      Pawan Wagh authored
      readFileDescriptor doesn't provide ownership of the fds. fdopen
      needs ownership of the fds. Fds read from parcel should be duped
      in this scenario and readUniqueFileDescriptor dups fds internally.
      
      Test: m incidentd_service_fuzzer && adb sync data && adb shell /data/fuzz/x86_64/incidentd_service_fuzzer/incidentd_service_fuzzer
      Test: atest incidentd_test
      Bug: 286931110
      Bug: 283699145
      
      Merged-In: Ibe03a17dee91ac5bf25d123d4fd9c0bdd3c7d80e
      Change-Id: Ibe03a17dee91ac5bf25d123d4fd9c0bdd3c7d80e
      (cherry picked from commit ba78ef27)
      6fe53e86
    • Pawan Wagh's avatar
      Use readUniqueFileDescriptor in incidentd service · b4aaf180
      Pawan Wagh authored
      readFileDescriptor doesn't provide ownership of the fds. fdopen
      needs ownership of the fds. Fds read from parcel should be duped
      in this scenario and readUniqueFileDescriptor dups fds internally.
      
      Test: m incidentd_service_fuzzer && adb sync data && adb shell /data/fuzz/x86_64/incidentd_service_fuzzer/incidentd_service_fuzzer
      Test: atest incidentd_test
      Bug: 286931110
      Bug: 283699145
      Merged-In: Ibe03a17dee91ac5bf25d123d4fd9c0bdd3c7d80e
      Change-Id: Ibe03a17dee91ac5bf25d123d4fd9c0bdd3c7d80e
      (cherry picked from commit ba78ef27)
      b4aaf180
  12. Sep 21, 2023
    • beatricemarch's avatar
      Add more BackupManagerMonitor events to PerformUnifiedRestoreTask. · 501eeee2
      beatricemarch authored
      In particular
      add events to cover
      -If this is KV or Full restore
      -For each package, when the restore started and when it ended
      -When a restore operation starts, if it is system restore or restore at install
      -Any errors
      
      Test: manual testing. Run `adb shell bmgr restore 1` and verify that the
      new restore events are added to the dumpsys
      atest CtsBackupHostTestCases, GtsBackupHostTestCases
      atest BackupManagerMonitorDumpsysUtilsTest,
      BackupManagerMonitorEventSenderTest, UserBackupManagerServiceTest,
      PerformUnifiedRestoreTaskTest, BmgrTest
      Bug: 290747920
      
      Change-Id: I0d221f10932fea3e8fb90a1827c7f1b5bf21d25d
      501eeee2
  13. Sep 12, 2023
  14. Sep 07, 2023
  15. Sep 06, 2023
  16. Sep 05, 2023
  17. Sep 01, 2023
  18. Aug 30, 2023
    • Yurii Zubrytskyi's avatar
      Clean up the attribute searching func · e7de40d9
      Yurii Zubrytskyi authored
      Don't convert each attribute name but instead only
      do it once for the string they're compared to
      
      Bug: 282215580
      Test: build + atest idmap2_tests
      Change-Id: I09f6d0f90f6c09632ceac8cdde7c20801f41524e
      e7de40d9
  19. Aug 28, 2023
  20. Aug 24, 2023
  21. Aug 23, 2023
  22. Aug 22, 2023
Loading