<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/26431">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">filesystem: actively probe applications<br><br>A profile can cover lots of different applications. Those applications<br>may not exist on all card models. To exclude applications that are not<br>installed on the particular card EF.DIR is evaluated. However, there may<br>be applications that are not registered in EF.DIR but supported by the<br>profile. To cover those as well, lets try to select the applications we<br>do not see in EF.DIR. If selecting works we know that the application<br>exists on the card and we can include them in the RuntimeState.<br><br>Change-Id: I3fa77a68664fe50d690a18adfb1ae1a88a189827<br>---<br>M pySim/filesystem.py<br>1 file changed, 12 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/31/26431/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/pySim/filesystem.py b/pySim/filesystem.py</span><br><span>index 4c3308c..c706131 100644</span><br><span>--- a/pySim/filesystem.py</span><br><span>+++ b/pySim/filesystem.py</span><br><span>@@ -1101,14 +1101,23 @@</span><br><span> for a in aids_card:</span><br><span> for f in apps_profile:</span><br><span> if f.aid in a:</span><br><span style="color: hsl(0, 100%, 40%);">- print(" %s: %s" % (f.name, a))</span><br><span style="color: hsl(120, 100%, 40%);">+ print(" %s: %s (EF.DIR)" % (f.name, a))</span><br><span> aids_taken.append(a)</span><br><span> apps_taken.append(f)</span><br><span> aids_unknown = set(aids_card) - set(aids_taken)</span><br><span> for a in aids_unknown:</span><br><span style="color: hsl(0, 100%, 40%);">- print(" unknown: %s" % a)</span><br><span style="color: hsl(120, 100%, 40%);">+ print(" unknown: %s (EF.DIR)" % a)</span><br><span> else:</span><br><span style="color: hsl(0, 100%, 40%);">- print("error: could not determine card applications")</span><br><span style="color: hsl(120, 100%, 40%);">+ print("warning: EF.DIR seems to be empty!")</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ # Some card applications may not be registered in EF.DIR, we will actively</span><br><span style="color: hsl(120, 100%, 40%);">+ # probe for those applications</span><br><span style="color: hsl(120, 100%, 40%);">+ for f in set(apps_profile) - set(apps_taken):</span><br><span style="color: hsl(120, 100%, 40%);">+ data, sw = self.card.select_adf_by_aid(f.aid)</span><br><span style="color: hsl(120, 100%, 40%);">+ if sw == "9000":</span><br><span style="color: hsl(120, 100%, 40%);">+ print(" %s: %s" % (f.name, a))</span><br><span style="color: hsl(120, 100%, 40%);">+ apps_taken.append(f)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> return apps_taken</span><br><span> </span><br><span> def reset(self, cmd_app=None) -> Hexstr:</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/26431">change 26431</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/pysim/+/26431"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: pysim </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I3fa77a68664fe50d690a18adfb1ae1a88a189827 </div>
<div style="display:none"> Gerrit-Change-Number: 26431 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>