Power & Source of Big Ideas

I can't debug HardwareControler App

Moderators: chensy, FATechsupport

Hello fellow developers!

At work we bought the RK3399DevKit2 because of all its interfaces. However, when I try to debug an app though USB, i get -1 return to all functions(getBoardType, exportGPIOPin, setGPIODirection, etc..). I'm trying with these lines and it's not working.

./adb root
./adb disable-verity
./adb reboot
#esperar
./adb root
./adb remount

Any guide about what should I try next? Thanks in advance!
They all have 0660 as the file permissions which means no access from user space.

There are 2 ways to get around this.

One way is to modify the source, add the permissions in the init.rc file and rebuild it. This has security issues but for embedded devices, this won't normally be a concern. This is how I have made access to GPIO, I2C, UART and SPI

The second option is to build your program and sign it with the platform keys. The FA way of doing this is quite messy but I came across this recently and someone offered a solution that I posted on my blog.

https://axonjakarta.wordpress.com/2020/ ... form-keys/
Thanks, ill try it!
I followed the steps and I got this error:
INSTALL_FAILED_SHARED_USER_INCOMPATIBLE
Can you explain in more detail what you did?

Is that an output error from the build or something esle?
Sure. I followed the stepes, I geenerated the signed APK. But when I press debug, the application doesn't get installed and throws that error. Here is my source code:

https://1drv.ms/u/s!AlylyhDZTn0whspye8K ... Q?e=fPNwEb

Attachments

rghuertaspaiva wrote:
Hello fellow developers!

At work we bought the RK3399DevKit2 because of all its interfaces. However, when I try to debug an app though USB, i get -1 return to all functions(getBoardType, exportGPIOPin, setGPIODirection, etc..). I'm trying with these lines and it's not working.

./adb root
./adb disable-verity
./adb reboot
#esperar
./adb root
./adb remount

Any guide about what should I try next? Thanks in advance!

I find that getting a second opinion is THE most effective way to do this. Talk to someone else, explain what it's supposed to do and how it went wrong and if you don't catch it by the time you're done explaining it, they usually catch it and usually it is the simplest, most trivial shit that I somehow glossed over for hours. The different perspective really helps.
v8dave wrote:
They all have 0660 as the file permissions which means no access from user space.

There are 2 ways to get around this.

One way is to modify the source, add the permissions in the init.rc file and rebuild it. This has security issues but for embedded devices, this won't normally be a concern. This is how I have made access to GPIO, I2C, UART and SPI

The second option is to build your program and sign it with the platform keys. The FA way of doing this is quite messy but I came across this recently and someone offered a solution that I posted on my blog.

https://axonjakarta.wordpress.com/2020/ ... form-keys/site


Thanks! Helped me too!
rghuertaspaiva wrote:
Hello fellow developers!

At work we bought the RK3399DevKit2 because of all its interfaces. However, when I try to debug an app though USB, i get -1 return to all functions(getBoardType, exportGPIOPin, setGPIODirection, etc..). I'm trying with these lines and it's not working.

./adb root
./adb disable-verity
./adb reboot
#esperar
./adb root
./adb remount

Any guide about what should I try next? Thanks in advance!

Are you facing a error?I have tried ,It's working.
GBWhatsapp94 wrote:
Hello fellow developers!

At work we bought the RK3399DevKit2 because of all its interfaces. However, when I try to debug an app though USB, i get -1 return to all functions(getBoardType, exportGPIOPin, setGPIODirection, etc..). I'm trying with these lines and it's not working.

./adb root
./adb disable-verity
./adb reboot
#esperar
./adb root
./adb remount

in which package you are trying to Debug the app?

Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 5 guests