Skip to content
Snippets Groups Projects
  1. Apr 17, 2024
    • Yan Yan's avatar
      Check the existence of IpSecTransformState API with try catch · 0346207e
      Yan Yan authored
      IpSecTransformState is a new API that exposed from a mainline module.
      Ideally before SDK finalization, platform should check the API flag
      com.android.net.flags.ipsec_transform_state before calling the API.
      However the flag is defined in mainline module is not accessible from
      the platform. Thus previously a placeholder flag was used.
      
      This patch removes the usage of the placeholder flag. Instead the
      code will check the availability of the API with a try catch block
      
      Bug: 328844044
      Test: atest FrameworksVcnTests && atest CtsVcnTestCases
      Flag: NONE mainline API flag not accessible; using try catch
            block to gate the behavior
      Change-Id: Ibbcb14817a6d714cdc99cf0894f1fc935a602a2c
      0346207e
  2. Apr 12, 2024
  3. Apr 11, 2024
    • Treehugger Robot's avatar
    • 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
    • Yiming Pan's avatar
    • Pawan Wagh's avatar
      Merge changes from topic "punch_shared_libs" into main · 114bff10
      Pawan Wagh authored
      * changes:
        Adding FileSystemUtils test
        Punch holes in 64 bit native libs
        Add method to return Zip file name
      114bff10
    • Paul Duffin's avatar
    • 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
    • Pawan Wagh's avatar
      Add method to return Zip file name · 38d8f72e
      Pawan Wagh authored
      Test: m libandroidfw
      Bug: 301631861
      Change-Id: If6d0ddf6e3465f984209325406cfeaffc44f9d6a
      38d8f72e
  4. Apr 10, 2024
  5. Apr 09, 2024
  6. Apr 08, 2024
  7. Apr 05, 2024
Loading