Usb Device Id

MacroDroidDev

Administrator
Staff member
It's not possible to access the serial number of a device any more I'm afraid as it's hidden behind a permission that apps cannot get.

I have added magic text for a device hash which will hopefully be different per device. (I have removed the old device id as it was not really useful).
 

dhj49er

Well-known member
It's not possible to access the serial number of a device any more I'm afraid as it's hidden behind a permission that apps cannot get.

I have added magic text for a device hash which will hopefully be different per device. (I have removed the old device id as it was not really useful).
I have tried 3 different usb drives and the device hash is the same number for each drive - 264350515

The device manufacturer_name magic text does change and correctly shows Kingston and Samsung. The 3rd drive returns 6 spaces, but it's always the same and so far is unique!

Fortunately I can use the manufacturer_name to identify my usb drives.
 

esteven

New member
Best regards, I am new in this world, Macrodroid seems very powerful to me.

Sorry for my English, but I'm using Google translate.
I have a question about this topic, although it is a little different from what was raised above.

What I want is that when connecting any USB Macrodroid copies a file with a specific name to a specific path.
The problem I'm having is that when I change the USB stick or format it, Macrodroid tells me the following "Reset the file path to an accessible location on your device".

I want to know if there is any possibility to give permissions to Macrodroid so that it can copy the files it needs from any USB without asking me for the permissions every time I format or change the USB.
Probe in Android 9.0 Macrodroid works well connect any USB memory and copy the files that I tell you, I suppose it is a problem of Android 12 and I have Root on my device, thanks for the attention....


I'm sorry if this question doesn't fit in this forum, if necessary I'll do it where appropriate, thanks...
 

Endercraft

Moderator (& bug finder :D)
Best regards, I am new in this world, Macrodroid seems very powerful to me.

Sorry for my English, but I'm using Google translate.
I have a question about this topic, although it is a little different from what was raised above.

What I want is that when connecting any USB Macrodroid copies a file with a specific name to a specific path.
The problem I'm having is that when I change the USB stick or format it, Macrodroid tells me the following "Reset the file path to an accessible location on your device".

I want to know if there is any possibility to give permissions to Macrodroid so that it can copy the files it needs from any USB without asking me for the permissions every time I format or change the USB.
Probe in Android 9.0 Macrodroid works well connect any USB memory and copy the files that I tell you, I suppose it is a problem of Android 12 and I have Root on my device, thanks for the attention....


I'm sorry if this question doesn't fit in this forum, if necessary I'll do it where appropriate, thanks...
Indeed Android 12.
You should use a shell script with the 'cp' command, the path you want to copy from and the path you want to copy to. Example : cp /sdcard/1 /sdcard/2
 

esteven

New member
Indeed Android 12.
You should use a shell script with the 'cp' command, the path you want to copy from and the path you want to copy to. Example : cp /sdcard/1 /sdcard/2
Excuse me, could you tell me how I can do this?
or if you know of any tutorial on how I can do it, since I'm new to macrodroid and there are things I don't have...
 

Mcrazy

Member
It's not possible to access the serial number of a device any more I'm afraid as it's hidden behind a permission that apps cannot get.

I have added magic text for a device hash which will hopefully be different per device. (I have removed the old device id as it was not really useful).
Yes, unfortunately on the newer systems (Android 12,13...) Autotools no longer has access to the Serial Number.
I tried it on Android 9 and 13 and I found that in all cases, whatever usb drive is connected to the phone, the USB device hash code always increases by one. This is independent of whether you have the same or a different drive connected.
Can you fix this?

Screenshot_20230901_203533_2_MacroDroid.jpg
 
Top