Skip to content
Snippets Groups Projects
  1. May 20, 2024
  2. May 15, 2024
    • Suprabh Shukla's avatar
      Use metered firewalls for metered uid policy · 68e9bc59
      Suprabh Shukla authored
      Since the underlying code in connectivity manager is moving to metered
      firewalls to denote the uid policy for metered restrictions, NPMS can
      start using them now.
      Rather than having a single PENALTY_BOX, we have separate firewalls for
      user and admin imposed restrictions. Once NPMS uses the appropriate
      firewalls for these, it does not need to separately convey the blocked
      reasons for metered restrictions on uids to the ConnectivityManager.
      
      Flag: com.android.server.net.use_metered_firewall_chains
      
      Test: atest FrameworksServicesTests:NetworkManagementServiceTest
      Test: atest FrameworksServicesTests:NetworkPolicyManagerTest
      Test: atest CtsHostsideNetworkPolicyTests
      
      Bug: 336693007
      Change-Id: I8da11ff663257d3dafcb5e22ae3313a9255ef0a6
      Merged-In: I8da11ff663257d3dafcb5e22ae3313a9255ef0a6
      68e9bc59
  3. May 14, 2024
  4. May 13, 2024
  5. May 10, 2024
  6. May 09, 2024
  7. May 07, 2024
    • Yan Yan's avatar
      Make VCN HSUM compatible · 43ee23b0
      Yan Yan authored
      Require VCN to be used by a "main user" instead of a "system user"
      since "system user" will no longer be a full user on HSUM devices
      
      Bug: 310310661
      Test: FrameworksVcnTests, CtsVcnTestCases on non-hsum and hsum devices
      Flag: android.net.vcn.enforce_main_user
      Change-Id: I5abfa7ba82055cd953083b1ab3f83e61bafd8a55
      43ee23b0
  8. May 06, 2024
    • Juan Yescas's avatar
      Consume consecutive delimiters at beginning of refilled buffer · dc0a5b1f
      Juan Yescas authored
      This change makes sure that the consecutive delimiters at the
      beginning of the just refilled buffer are consumed.
      
      Previously, if there were consecutive delimiters at the beginning
      of the just refilled buffer, they were not being consumed and were
      causing parsing errors. This was also causing fatal exceptions.
      
      ```
      04-22 12:37:53.077   607   707 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: CachedAppOptimizerThread
      04-22 12:37:53.077   607   707 E AndroidRuntime: java.lang.NumberFormatException: invalid long: READ
      04-22 12:37:53.077   607   707 E AndroidRuntime: 	at com.android.internal.util.ProcFileReader.invalidLong(ProcFileReader.java:238)
      04-22 12:37:53.077   607   707 E AndroidRuntime: 	at com.android.internal.util.ProcFileReader.parseAndConsumeLong(ProcFileReader.java:220)
      04-22 12:37:53.077   607   707 E AndroidRuntime: 	at com.android.internal.util.ProcFileReader.nextLong(ProcFileReader.java:183)
      04-22 12:37:53.077   607   707 E AndroidRuntime: 	at com.android.internal.util.ProcFileReader.nextLong(ProcFileReader.java:172)
      04-22 12:37:53.077   607   707 E AndroidRuntime: 	at com.android.internal.util.ProcFileReader.nextInt(ProcFileReader.java:246)
      04-22 12:37:53.077   607   707 E AndroidRuntime: 	at com.android.internal.os.ProcLocksReader.handleBlockingFileLocks(ProcLocksReader.java:111)
      04-22 12:37:53.077   607   707 E AndroidRuntime: 	at com.android.server.am.CachedAppOptimizer$FreezeHandler.handleMessage(CachedAppOptimizer.java:2267)
      04-22 12:37:53.077   607   707 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:107)
      04-22 12
      ```
      
      Bug: 336208153
      Bug: 338416108
      Bug: 331988929
      Test: atest --host-unit-test-only -c  ProcFileReaderTest
      Change-Id: I12813fa204d53d53687ffe6e8e3c0a85595b7e25
      dc0a5b1f
    • Yan Yan's avatar
      Support disabling IPsec packet loss detector · ec173dea
      Yan Yan authored
      Allow disabling detector for better configurability
      
      Bug: 336638836
      Test: atest FrameworksVcnTests(new tests) && atest CtsVcnTestCases
      Flag: android.net.vcn.allow_disable_ipsec_loss_detector
      Change-Id: Icd7183d12fb287399a500ea9c0ee4125c749275c
      ec173dea
    • Kangping Dong's avatar
      [Thread] add Thread icon · a1df9d2a
      Kangping Dong authored
      This is imported from material icon at https://fonts.corp.google.com/icons?selected=Google%20Symbols%3Athread_logo%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4024
      
      But system notifications and settings also need to use this icon. For
      example, it will be used in Settings > Connected devices > Connection preferences.
      
      Bug: 327583301
      Change-Id: I08ef9c90b7d4085f9b901b3d9c41b57258aa9680
      a1df9d2a
    • Fredrik Ryden's avatar
      Fixed graphical glitch in lockpattern view · 52098a13
      Fredrik Ryden authored
      Fixed end point correctional animation for cell to cell animations
      during lock pattern drawing.
      
      In the lock pattern view, cells have an area of slop around them to
      allow for drawing the pattern without hitting the exact center of cells.
      
      When a cell is hit, the end point of the line drawn between that cell
      and the previous is adjusted with an animation from the hit coordinate
      and the exact center of the cell.
      
      With LockPatternView_keepDotActivated set to true, cell animations for
      the previous cell are recreated when a new cell is hit to allow changing
      how a cells color is updated as the pattern is drawn.
      
      This caused a glitch where the starting position of the end point
      correcting animation for said previous cell would be recreated with the
      current finger position coordinate, making it jump ahead to be closer to
      the current latest cell, and animating back towards the target.
      
      This fix makes the animation instead continue from where it was last, in
      the case where the animation is recreated.
      
      Test: manual, set a short, tight lock pattern, and try it in rapid
      motion.
      Bug: 328088937
      
      Change-Id: Id445266cbc834fec7a514dbb227557f2ceae9dba
      52098a13
  9. May 03, 2024
  10. May 02, 2024
  11. Apr 30, 2024
  12. Apr 29, 2024
  13. Apr 26, 2024
    • Ellen Arteca's avatar
      Add API flag for storage area API · 842a6656
      Ellen Arteca authored
      Adds a flag behind which we add the new storage area API.
      
      Bug: 325129836
      Test: atest StorageAreaTest
      Change-Id: I974477213015b215e60d2e23392638d674cc14c0
      842a6656
    • Steven Moreland's avatar
      ParceledListSlice: warn on large elements · e220b578
      Steven Moreland authored
      The implementation of ParceledListSlice allows
      it to send pretty large transactions if elements are
      large, so introduce a warning to aid debugging.
      
      Bug: 333508026
      Test: boot cf, no logs from this
      Change-Id: I71acfafb1c3e79e1ba3bcd6459977adfa3309cb3
      e220b578
  14. Apr 25, 2024
    • Ellen Arteca's avatar
      Add a finalizer to LockscreenCredential to wipe the LSKF on GC · 08d389fc
      Ellen Arteca authored
      Adds a finalizer to the `LockscreenCredential` class, which calls
      the `zeroize` method to zeroize the LSKF `byte[]`. This ensures that
      `LockscreenCredential` objects that were not closed still have their
      data wiped when they are garbage collected.
      
      This is part of an effort to remove instances of the LSKF available
      in a RAMdump.
      
      Bug: 320392352
      Test: atest com.android.server.locksettings
      Change-Id: Id7f1f102cdaa182659e2632bdaf81bd2c46d0f86
      08d389fc
    • Matt Buckley's avatar
      Add ADPF ownership for relevant files · b832763a
      Matt Buckley authored
      Test: manual
      Change-Id: Idd27c2b79455e0895aa73f268113a8aa873fd022
      b832763a
  15. Apr 23, 2024
  16. Apr 22, 2024
  17. Apr 20, 2024
    • Pawan Wagh's avatar
      Block align start and length while punching holes · a56245f3
      Pawan Wagh authored
      If hole punching offset is within block, kernel will write
      zeros forcefully. Block align offset and length used for punching
      to avoid unnecessary write to the disk while punching.
      
      Test: acloud delete --all && m && acloud create --local-instance --local-image && adb logcat -c && m FileSystemUtilsTests && atest -c FileSystemUtilsTests
      Bug: 301631861
      Change-Id: Ib65e4fb9419125e89e9253bec769fce53304649a
      a56245f3
  18. Apr 17, 2024
  19. Apr 15, 2024
  20. Apr 13, 2024
    • Yan Yan's avatar
      VCN: Handle sequence number leap in packet loss detector · 6bc811da
      Yan Yan authored
      This pacth enables IPsec packet loss detector to handle the case when
      there is an intentional sequence number leap on the server's downlink.
      
      Previously the detector assumes that sequence number will always
      increase consecutively, which is not true. During load balancing the
      server might add a big leap on the sequence number intentionally. In
      such case a high packet loss rate does not always indicate a lossy
      network. At the same time, a low loss rate does mean the network is
      not lossy
      
      Bug: 332598276
      Test: atest FrameworksVcnTests (new tests) && atest CtsVcnTestCases
      Change-Id: I163cb274d293a305499fd60f7ad6eed394af5a4d
      6bc811da
  21. Apr 12, 2024
    • Pawan Wagh's avatar
      Punch extracted ELF64 files · 2724e0f6
      Pawan Wagh authored
      Punch holes in extracted elf files in same manner as apks and embedded
      shared libs. fallocate may not work on file systems which  don't allow
      punching compressed files like f2fs. But that shouldn't hamper any
      functionality.
      
      Test: acloud delete --all && m && acloud create --local-instance --local-image && adb logcat -c && m FileSystemUtilsTests && atest -c FileSystemUtilsTests
      Bug: 301631861
      Change-Id: I45a153459a8cfa715a7298562dad9f1f3080b8b4
      2724e0f6
    • Pawan Wagh's avatar
      Punch holes in extra field in local headers inside apk · 4b1184df
      Pawan Wagh authored
      Apk files are essentially zip files. Zip files contain
      central directory which has local file header offsets.
      Local file header contains 'extra' field and its length info.
      
      This info can be seen with zipinfo -v <apk_name>
      
      Example zip entry:
      
      Central directory entry #3:
      ---------------------------
      
        lib/x86_64/libpunchtest.so
      
        offset of local header from start of archive:   202
                                                        (00000000000000CAh) bytes
        file system or operating system of origin:      Unix
        version of encoding software:                   1.0
        minimum file system compatibility required:     MS-DOS, OS/2 or NT FAT
        minimum software version required to extract:   1.0
        compression method:                             none (stored)
        file security status:                           not encrypted
        extended local header:                          no
        file last modified on (DOS date/time):          2009 Jan 1 00:00:00
        32-bit CRC value (hex):                         1f180260
        compressed size:                                133376 bytes
        uncompressed size:                              133376 bytes
        length of filename:                             26 characters
        length of extra field:                          16126 bytes
        length of file comment:                         0 characters
      
      Note the length of extra field which is 16126.
      
      Extra field is followed by actual content of the zip entry.
      When aligning Apks, Alignment tool add padding inside extra field so that
      uncompressed shared libs are page aligned. ZipFileRO already provides
      offset to content of a zip entry. For uncompressed libs, padding can be found
      by going to the start of the extra field and looking for zero ranges.
      
      This ranges are punched with help of fallocate(2)
      Size before punching holes st_blocks: 1832, st_blksize: 4096, st_size: 1058429
      Size after punching holes st_blocks: 1808, st_blksize: 4096, st_size: 1058429
      
      Test: acloud delete --all && m && acloud create --local-instance --local-image && adb logcat -c && m FileSystemUtilsTests && atest -c FileSystemUtilsTests
      Bug: 301631861
      
      Change-Id: I35ac4a061828d84401d6f2d38ceb5b1a6907c00a
      4b1184df
  22. Apr 11, 2024
    • Fabien Sanglard's avatar
      Add Framework and VM capabilities to am · 18e4fdc2
      Fabien Sanglard authored
      DDM is set to be deprecated soon. We need another venue to discover
      the capabilities of the VM and Framework we used to get from FEAT and
      HELO packets.
      
      Test: NA
      Bug: 333926583
      Change-Id: I4743e2e840b6f87f9eb41a51e36ef0b6cab3ebe1
      18e4fdc2
    • Pawan Wagh's avatar
      Flag punch hole changes with build time flag · 8948d071
      Pawan Wagh authored
      Adding ENABLE_PUNCH_HOLES flag to enable punch hole changes in
      JNI.
      
      Test: acloud delete --all && m && acloud create --local-instance --local-image && adb logcat -c && m FileSystemUtilsTests && atest -c FileSystemUtilsTests
      Bug: 301631861
      Change-Id: I611893e3171e0a2334e4d49b195768cdfb57fb96
      8948d071
    • Pawan Wagh's avatar
      Adding FileSystemUtils test · 1ad068f5
      Pawan Wagh authored
      Adding tests to check whether apps can be launched after
      loading the punched libs. One app has uncompressed shared lib which
      will be directly loaded from apk and other will extract it.
      
      Test: acloud delete --all && m && acloud create --local-instance --local-image && adb logcat -c && m FileSystemUtilsTests && atest -c FileSystemUtilsTests
      Bug: 301631861
      Change-Id: I4f7b38902f2e02e83a350cd1cc907f8edaa20c81
      1ad068f5
    • Pawan Wagh's avatar
      Punch holes in 64 bit native libs · 5f47f060
      Pawan Wagh authored
      Extra padding at the end of LOAD segments is being introduced when libraries are being
      aligned to 64KB. This increases space used by shared libraries.
      
      This change deallocates space used by zero padding at the end of LOAD segments in given
      uncompressed ELF file. Zero padding can be detected by reading ELF headers. Executable header
      gives out the position of program headers. LOAD segments can be identified from program headers.
      FileSiz specifies the size of the data in corresponding LOAD segment.
      
      Ex. ELF header format for libpunchtest.so
      
      Program Headers:
        Type           Offset   VirtAddr           PhysAddr           FileSiz  MemSiz   Flg Align
        PHDR           0x000040 0x0000000000000040 0x0000000000000040 0x0001f8 0x0001f8 R   0x8
        LOAD           0x000000 0x0000000000000000 0x0000000000000000 0x0003e8 0x0003e8 R   0x10000
        LOAD           0x010000 0x0000000000010000 0x0000000000010000 0x000050 0x000050 R E 0x10000
        LOAD           0x020000 0x0000000000020000 0x0000000000020000 0x0001b8 0x0001b8 RW  0x10000
        DYNAMIC        0x020018 0x0000000000020018 0x0000000000020018 0x000180 0x000180 RW  0x8
        GNU_RELRO      0x020000 0x0000000000020000 0x0000000000020000 0x0001b8 0x001000 R   0x1
        GNU_EH_FRAME   0x000368 0x0000000000000368 0x0000000000000368 0x000024 0x000024 R   0x4
        GNU_STACK      0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW  0
        NOTE           0x000238 0x0000000000000238 0x0000000000000238 0x000050 0x000050 R   0x4
      
      Zero padding can be found as :
      Padding Length = Offset of LOAD SEGMENT 2 - (Offset of LOAD SEGMENT 1 + FileSiz of LOAD SEGMENT 1)
      
      This padding is present at position = (Offset of LOAD SEGMENT 1 + FileSiz of LOAD SEGMENT 1)
      
      [fallocate(2)](http://man7.org/linux/man-pages/man2/fallocate.2.html) is used to deallocate the
      zero ranges at the end of LOAD segments. It is called with above padding length and position.
      If ELF file is present inside of ApK/Zip file, offset to the start of the ELF file should be added
      to the position.
      
      From test logs, stats for installation embedded_native_libs_test_app.apk. Note: ELF was 64bit aligned during tests.
      
      Size before punching holes st_blocks: 2072, st_blksize: 4096, st_size: 1058429
      Size after punching holes st_blocks: 1832, st_blksize: 4096, st_size: 1058429
      
      Punching will be skipped for content which is less than 4096 bytes in
      size.
      
      Test: acloud delete --all && m && acloud create --local-instance --local-image && adb logcat -c && m FileSystemUtilsTests && atest -c FileSystemUtilsTests
      Bug: 301631861
      Change-Id: I86060f877f90e98c103e884cf6d303f0bdfa4d12
      5f47f060
  23. Apr 10, 2024
Loading