Exporting a Space's GLB Mesh as ADB Command

Hello,

The GLB files are created when you finish mapping a space. The export button in the Spaces app just copies the file for you. You can use the adb pull command to retrieve them from the Spaces app's data directory- /sdcard/Android/data/com.magicleap.mappingtool/files

example -

PS C:\spacetest> adb shell

demophon:/ $ mlmapping -spaces
2 space(s) found
map id             :{452403ec-f574-7018-aab0-1ae55e811991}
map name           :Local Space 2546
map file path      :/data/misc/pwservice/maps/{452403ec-f574-7018-aab0-1ae55e811991}.map
created(timestamp) :1721651006
properties         :[]

map id             :{5fe4b24c-b8c4-7018-881c-3f2468e854ec}
map name           :Local Space 6370
map file path      :/data/misc/pwservice/maps/{5fe4b24c-b8c4-7018-881c-3f2468e854ec}.map
created(timestamp) :1724881597
properties         :[]

demophon:/ $ cd /sdcard/Android/data/com.magicleap.mappingtool/files

demophon:/sdcard/Android/data/com.magicleap.mappingtool/files $ ls
il2cpp mozc.data {452403ec-f574-7018-aab0-1ae55e811991}.glb {5fe4b24c-b8c4-7018-881c-3f2468e854ec}.glb

demophon:/sdcard/Android/data/com.magicleap.mappingtool/files $ exit

PS C:\spacetest> adb pull "/sdcard/Android/data/com.magicleap.mappingtool/files/{5fe4b24c-b8c4-7018-881c-3f2468e854ec}.glb"
/sdcard/Android/data/com.magicleap.mappingtool/files/{5fe4b24c-b8c4...}.glb: 1 file pulled, 0 skipped. 34.9 MB/s (396588 bytes in 0.011s)

Best,
Adam

2 Likes