frida-java-bridge 6.3.1 → 6.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/android.js CHANGED
@@ -591,8 +591,9 @@ function _getArtRuntimeSpec (api) {
591
591
  * gc::Heap* heap_; <-- we need to find this
592
592
  * std::unique_ptr<ArenaPool> jit_arena_pool_; <----- API level >= 24
593
593
  * std::unique_ptr<ArenaPool> arena_pool_; __
594
- * std::unique_ptr<ArenaPool> low_4gb_arena_pool_; <--|__ API level >= 23
594
+ * std::unique_ptr<ArenaPool> low_4gb_arena_pool_/linear_alloc_arena_pool_; <--|__ API level >= 23
595
595
  * std::unique_ptr<LinearAlloc> linear_alloc_; \_
596
+ * std::atomic<LinearAlloc*> startup_linear_alloc_;<----- API level >= 34
596
597
  * size_t max_spins_before_thin_lock_inflation_;
597
598
  * MonitorList* monitor_list_;
598
599
  * MonitorPool* monitor_pool_;
@@ -644,7 +645,9 @@ function _getArtRuntimeSpec (api) {
644
645
  const threadListOffset = internTableOffset - pointerSize;
645
646
 
646
647
  let heapOffset;
647
- if (apiLevel >= 24) {
648
+ if (apiLevel >= 34) {
649
+ heapOffset = threadListOffset - (9 * pointerSize);
650
+ } else if (apiLevel >= 24) {
648
651
  heapOffset = threadListOffset - (8 * pointerSize);
649
652
  } else if (apiLevel >= 23) {
650
653
  heapOffset = threadListOffset - (7 * pointerSize);
@@ -1890,6 +1893,11 @@ function ensureArtKnowsHowToHandleReplacementMethods (vm) {
1890
1893
 
1891
1894
  if (exportName !== null) {
1892
1895
  Interceptor.attach(Module.getExportByName('libart.so', exportName), artController.hooks.Gc.copyingPhase);
1896
+
1897
+ const collectorCMC = Module.findExportByName('libart.so', '_ZN3art2gc9collector11MarkCompact15CompactionPhaseEv');
1898
+ if (collectorCMC !== null) {
1899
+ Interceptor.attach(collectorCMC, artController.hooks.Gc.copyingPhase);
1900
+ }
1893
1901
  }
1894
1902
  }
1895
1903
 
package/lib/mkdex.js CHANGED
@@ -655,6 +655,7 @@ function computeModel (classes) {
655
655
  stringToIndex[fieldName]
656
656
  ];
657
657
  });
658
+ fieldItems.sort(compareFieldItems);
658
659
 
659
660
  const methodItems = methods.map(method => {
660
661
  const [klass, protoId, name, annotationsId] = method;
@@ -744,7 +745,7 @@ function computeModel (classes) {
744
745
  const instanceFields = fieldItems.reduce((result, field, index) => {
745
746
  const [holder] = field;
746
747
  if (holder === classIndex) {
747
- result.push([index, kAccPublic]);
748
+ result.push([index > 0 ? 1 : 0, kAccPublic]);
748
749
  }
749
750
  return result;
750
751
  }, []);
@@ -848,6 +849,21 @@ function compareProtoItems (a, b) {
848
849
  return 0;
849
850
  }
850
851
 
852
+ function compareFieldItems (a, b) {
853
+ const [aClass, aType, aName] = a;
854
+ const [bClass, bType, bName] = b;
855
+
856
+ if (aClass !== bClass) {
857
+ return aClass - bClass;
858
+ }
859
+
860
+ if (aName !== bName) {
861
+ return aName - bName;
862
+ }
863
+
864
+ return aType - bType;
865
+ }
866
+
851
867
  function compareMethodItems (a, b) {
852
868
  const [aClass, aProto, aName] = a;
853
869
  const [bClass, bProto, bName] = b;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frida-java-bridge",
3
- "version": "6.3.1",
3
+ "version": "6.3.3",
4
4
  "description": "Java runtime interop from Frida",
5
5
  "main": "index.js",
6
6
  "files": [