Exporting a Space's GLB Mesh as ADB Command

Hello! I am working on an app that requires meshes to be synced to multiple ML2s. I see that as of the 1.8.0 OS Release I can export a space's mesh as a GLB. I also know that I can run various commands via ADB from a host machine to manage spaces, which includes export/import capability as a zip file.

However, I have not been able to find any mention of exporting a space's GLB mesh through ADB. Is this functionality available somewhere that I am missing, or could it perhaps be a planned feature in the roadmap somewhere? Ultimately, I hope to be able to import the space's mesh into Unity so that I would not have to do meshing within the app itself.

Thanks!

Hi @steeve.rooney,

I have reached out to our team to find out if this is possible through ADB. I will let you know as soon as I learn more.

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

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.