Ankit Arora
Ankit Arora

Reputation: 519

How to run executable binaries on an android OS where chmod +x doesn't work?

I built an rsync android application for syncing stuff from a linux computer to the android and the application is working fine on my phone which allows you to use chmod +x in the application folders. But the chmod +x command is not working on an android tablet i have, the chmod +x returns bad mode. And some of the partitions are in noexec mode plus when i remounted all of them to exec mode then it still wouldn't work and chmod +x is still giving me bad mode. I need to chmod +x those binaries to use them as executables, is there any other way i can do that?


root@rk3188:/ # mount
rootfs / rootfs rw,relatime 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,mode=750,gid=1000 0 0
none /sys/fs/cgroup/memory cgroup rw,relatime,memory 0 0
tmpfs /mnt/secure tmpfs rw,seclabel,relatime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/platform/emmc/by-name/system /system ext4 ro,seclabel,noatime,nodiratime,user_xattr,barrier=1,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/platform/emmc/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,nodiratime,user_xattr,barrier=1,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/platform/emmc/by-name/metadata /metadata ext4 rw,seclabel,nosuid,nodev,noatime,nodiratime,user_xattr,barrier=1,noauto_da_alloc,discard 0 0
/dev/block/platform/emmc/by-name/userdata /data ext4 rw,seclabel,relatime,user_xattr,barrier=1,data=ordered,noauto_da_alloc,discard 0 0
none /proc/bus/usb usbfs rw,relatime,devmode=666 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/vold/179:11 /mnt/internal_sd vfat rw,dirsync,relatime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:11 /mnt/secure/asec vfat rw,dirsync,relatime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

Results of mount command

When i try to run chmod 777 this happens

so am using chmod 777 rsync on the terminal
1|root@rk3188:/data/data/com.ankit.sync/execute # chmod 777 rsync 
and the result is
root@rk3188:/data/data/com.ankit.sync/execute # ./rsync               
CANNOT LINK EXECUTABLE: cannot locate symbol "sigemptyset" referenced by "./rsync"...

Upvotes: 0

Views: 1014

Answers (1)

Sergio
Sergio

Reputation: 8209

CANNOT LINK EXECUTABLE: cannot locate symbol "sigemptyset" referenced by "./rsync"...

Probably you are trying to launch binary that was built for android-21 or above on older device. Try to rebuilt it for target platform android-19.

Upvotes: 1

Related Questions