Skip to content Skip to sidebar Skip to footer

System Is Returning Error 127 When Called From C++ In Linux

The command 'am start -n packagename/.activityname' has to be run in adb shell and is to be included in C++ program I added the line system('am start -n packagename/.activityname')

Solution 1:

system() will not, in fact, work properly from programs with set-user-ID or set-group-ID privileges on systems on which /bin/sh is bash version 2, since bash 2 drops privileges on startup linux.die.net/man/3/system

Instead of system i used execl("/system/bin/sh","sh","test.sh")

where test.sh has am start -n packagename/.activityname and it works

Post a Comment for "System Is Returning Error 127 When Called From C++ In Linux"