Troubleshooting sudo Permissions and Booting Issues on Orin AGX

While modifying file permissions, I accidentally changed the permissions of sudo, resulting in the error: ‘/usr/bin/sudo must be owned by uid 0 and have the setuid bit set.’

As far as I know, there seems to be no direct solution to resolve this issue on a Jetson board.

Therefore, I want to back up all the data and restore to a version where this problem is fixed. Is there a way to do this?

Additionally, it might be due to this issue, but upon booting, the logo appears followed by a black screen.

How do you restore it when you don’t currently have a backup?
It doesn’t make sense.

Or you can flash the device so it boots from some external storage device like NVMe and USB, and you boot the device with it so you can access data inside eMMC.

Cloning would give you a loopback mountable image you can either (A) edit and use to flash with, or (B) use as backup. I’m not sure if there is any difference in clone for the latest L4T R36.x release, but if this runs R35.x, you’d just need time and a lot of disk space. I don’t know your details, but it might go something like this, and make sure you have about 100 GB of free space on the host PC:
sudo ./flash.sh -r -k APP -G my_backup.img jetson-agx-orin-devkit mmcblk0p1
(this produces my_backup.img, a sparse clone, and my_backup.img.raw, a raw clone)

The above assumes you are using an R35.x release on the AGX Orin dev kit. I don’t know if there are changes to cloning of eMMC for R36.x. All of this would be from the “Linux_for_Tegra/” directory of the flash software. This clone is specific for eMMC only, and if you have an initrd situation, or other external device, this probably won’t do what you want.