Page 1 of 1

I can't debug HardwareControler App

Posted: Sun May 31, 2020 6:14 pm
by rghuertaspaiva
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!

Re: I can't debug HardwareControler App

Posted: Tue Jun 02, 2020 2:05 am
by v8dave
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/

Re: I can't debug HardwareControler App

Posted: Mon Jun 08, 2020 5:53 pm
by rghuertaspaiva
Thanks, ill try it!

Re: I can't debug HardwareControler App

Posted: Mon Jun 08, 2020 9:33 pm
by rghuertaspaiva
I followed the steps and I got this error:
INSTALL_FAILED_SHARED_USER_INCOMPATIBLE

Re: I can't debug HardwareControler App

Posted: Tue Jun 09, 2020 2:09 am
by v8dave
Can you explain in more detail what you did?

Is that an output error from the build or something esle?

Re: I can't debug HardwareControler App

Posted: Tue Jun 09, 2020 5:52 am
by rghuertaspaiva
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

Re: I can't debug HardwareControler App

Posted: Sat Dec 26, 2020 6:49 am
by Briggs
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.

Re: I can't debug HardwareControler App

Posted: Sun Dec 12, 2021 11:25 pm
by alexpennsilvania
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!

Re: I can't debug HardwareControler App

Posted: Wed Feb 16, 2022 5:45 am
by praak
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.

Re: I can't debug HardwareControler App

Posted: Thu Jun 15, 2023 12:39 pm
by Jorgy
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?