File tree Expand file tree Collapse file tree
sebaubuntu_libs/libandroid/fstab Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99from pathlib import Path
1010from typing import List
1111
12+ from sebaubuntu_libs .libandroid .partitions .partition_model import PartitionModel
13+
1214FSTAB_HEADER = "#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>\n "
1315
1416class FstabEntry :
@@ -129,3 +131,14 @@ def get_logical_partitions(self):
129131
130132 def get_slotselect_partitions (self ):
131133 return [entry for entry in self .entries if entry .is_slotselect ()]
134+
135+ def get_ab_partitions_models (self ) -> List [PartitionModel ]:
136+ models = []
137+
138+ for entry in self .get_slotselect_partitions ():
139+ partition_model = PartitionModel .from_mount_point (entry .mount_point )
140+ if partition_model is None :
141+ continue
142+ models .append (partition_model )
143+
144+ return models
You can’t perform that action at this time.
0 commit comments