How to access the data from computer to TX2

Hi:
My Tx2 was crashed because I purged the stuff all about arm64.
I restarted the TX2, it shows the command windows. => tegra-ubuntu login:
So I can’t enter the desktop to access my source code. I didn’t backup.

Is there any solution to access data ?
Or any better suggestion?
Thanks!

If you have SD card or USB storage, attach that to your Tx2, mount it with “mount” command, then copy your data.
If your Tx2 is connect to your PC and your Tx2 still have ssh server, login to your Tx2 using your PC, and copy your data to your PC using scp or sshfs.
If your Tx2 is connect to internet and you have github or other source code hosting service account, git push your source code.
There are command line tools to use google drive or dropbox(Google “google drive” or “dropbox” with “cli”). I dont know whether they really works, they might be able to backup your data from your Tx2.

The rescue SD card would probably work, but I’d be afraid of exactly what got deleted being out of sync with what any sample rootfs replacement might provide. An example would be that if something in the dpkg database in “/var” got erased, and then you copied from the host, then any changes made in packages would not be visible anymore…the database would show none of the extra packages, yet they would already be there.

You could clone the Jetson and have a safe backup before trying that. Or you could even loopback mount the backup on the host (using a copy instead of your original clone) and experiment…then you could flash that rootfs as many times as you want with as many tests as you want and never worry about losing anything if it goes bad. Clone details depend on release, and we don’t know what release it is, nor do we know what you mean by having deleted arm64 files (e.g., with “rm”, or “dpkg”, or “apt”).

Thanks for your responses!
More detail, I can’t turn on TX2 successfully. After I typed the command : sudo apt-get purge “.*:arm64”.
And the desktop get into a mess. Then, I restart the TX2.
It stuck in “login” terminal, I typed account name and press enter key. It did not show the “password:”.
Like this:
tegra-ubuntu login: nvidia
_

So, I even can’t use ssh to connect into TX2.

Now, I am trying the following method:

Let the TX2 enter the force USB recovery mode, the host(ubuntu 16.04) connect to TX2 via USB to mirco USB.
So that, It can detect the TX2 device on host.
It shows "Bus 001 Device 006: ID 0955:7c18 NVidia Corp.".
I have no idea how to access the data in TX2's eMMC.

BTW, I am not familiar with Linux system. And thanks for solving the problem.

Beware that purging arm64 only does the right thing on a PC host. On a PC (x86_64/amd64 architecture) this is a foreign architecture, but on the Jetson this is the native architecture (arm64/aarch64/ARMv8-a). The package removal would have removed almost the entire operating system (scripts, such as init, are architecture independent and will remain in place). Some of your data will be intact, but other than cloning to save a copy I think you will have to flash again.

Perhaps one of the best things to save (and doesn’t require a full clone) would be the platform and individual ssh keys. This would mean saving (with permissions preserved) “/etc/ssh/” along with each user’s “~/.ssh/”. If you have any adjustments to individual users you could save their home directories as well (removing the arm64 packages won’t remove home directories). If you had any code of your own somewhere, then you could save that. Once you start flashing though you won’t have any chance to back out if you forgot something, so the longer/slower path of first cloning is still advised if you have anything important there.

For a Jetson to show up as a device the “gadget” framework needs to be correctly set up. Your system isn’t operating correctly, and I’m not sure if “gadget” is set up to allow complete access anyway (I have not tried). In recovery mode there is no access except through the flash software (recovery turns the Jetson into a custom USB device which the driver package understands…it isn’t a mass storage mode).