cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Install cURL in Android using binary

From: Joe Cabezas <joe.cabezas_at_gmail.com>
Date: Wed, 17 Oct 2012 14:24:20 -0300

~ $ mount | grep sdcard0
/dev/block/vold/259:3 on /storage/sdcard0 type vfat
(rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /storage/sdcard0/.android_secure type tmpfs
(ro,relatime,size=0k,mode=000)

exactly, wow, I didn't know that... i'll try to drop somewhere else, but i
have this problem now:

1|root_at_android:/storage/sdcard0/0Joe # echo $PATH
/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin

root_at_android:/storage/sdcard0/0Joe # mv curl /sbin/

mv: can't create '/sbin/curl': Read-only file system

1|root_at_android:/storage/sdcard0/0Joe # mv curl /vendor/bin

mv: can't create '/vendor/bin': Read-only file system

1|root_at_android:/storage/sdcard0/0Joe # mv curl /system/sbin

mv: can't create '/system/sbin': Read-only file system

1|root_at_android:/storage/sdcard0/0Joe # mv curl /system/bin/

mv: can't create '/system/bin/curl': Read-only file system

1|root_at_android:/storage/sdcard0/0Joe # mv curl /system/xbin/

mv: can't create '/system/xbin/curl': Read-only file system

this is my mount output:

1|root_at_android:/storage/sdcard0/0Joe # mount
rootfs on / type rootfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /dev type tmpfs (rw,nosuid,noatime,mode=755)
devpts on /dev/pts type devpts (rw,noatime,mode=600)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt/asec type tmpfs (rw,noatime,mode=755,gid=1000)
tmpfs on /mnt/obb type tmpfs (rw,noatime,mode=755,gid=1000)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
/res/dev/system on /system type ext4 (ro,relatime,barrier=1,data=ordered)
tmpfs on /system/lib/modules type tmpfs (rw,noatime)
/res/dev/cache on /cache type ext4
(rw,nosuid,nodev,noatime,barrier=1,data=ordered)
/res/dev/data on /data type ext4
(rw,nosuid,nodev,noatime,barrier=1,data=ordered,noauto_da_alloc)
/dev/block/mmcblk0p1 on /efs type ext4
(rw,nosuid,nodev,noatime,barrier=1,data=ordered)
/dev/block/mmcblk0p4 on /mnt/.lfs type j4fs (rw,noatime)
/sys/kernel/debug on /sys/kernel/debug type debugfs (rw,noatime)
tmpfs on /mnt/ntfs type tmpfs (rw,noatime)
/dev/block/vold/179:25 on /storage/sdcard1 type vfat
(rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/vold/259:3 on /storage/sdcard0 type vfat
(rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/vold/259:3 on /mnt/secure/asec type vfat
(rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /storage/sdcard0/.android_secure type tmpfs
(ro,relatime,size=0k,mode=000)
/dev/block/dm-0 on /mnt/asec/com.gameloft.android.ANMP.GloftA7HM-1 type
ext4 (ro,dirsync,nosuid,nodev,noatime,barrier=1)
/dev/block/dm-1 on /mnt/asec/com.rovio.BadPiggies-1 type ext4
(ro,dirsync,nosuid,nodev,noatime,barrier=1)
/dev/block/dm-2 on /mnt/asec/com.square_enix.android_googleplay.FFIII_GP-1
type ext4 (ro,dirsync,nosuid,nodev,noatime,barrier=1)
/dev/block/dm-3 on
/mnt/asec/com.com2us.magictree.normal.freefull.google.global.android.common-1
type ext4 (ro,dirsync,nosuid,nodev,noatime,barrier=1)
/dev/block/dm-4 on /mnt/asec/com.touchtype.swiftkey-1 type ext4
(ro,dirsync,nosuid,nodev,noatime,barrier=1)

what can I do now :) ?

2012/10/17 Ralph Mitchell <ralphmitchell_at_gmail.com>

> On Wed, Oct 17, 2012 at 12:57 PM, Joe Cabezas <joe.cabezas_at_gmail.com>wrote:
>
>> not working :(
>>
>> here's what i did
>>
>> /storage/sdcard0/0Joe $ ./curl www.google.cl
>> /sbin/sh: ./curl: Permission denied
>>
>> /storage/sdcard0/0Joe $ chmod +x curl
>> chmod: curl: Operation not permitted
>>
>> /storage/sdcard0/0Joe $ chmod 755 curl
>> chmod: curl: Operation not permitted
>>
>> /storage/sdcard0/0Joe $ su -
>> root_at_android:/storage/sdcard0/0Joe # chmod +x curl
>>
>> root_at_android:/storage/sdcard0/0Joe # ./curl www.google.cl
>>
>> sh: ./curl: can't execute: Permission denied
>>
>> 126|root_at_android:/storage/sdcard0/0Joe # chmod 755 curl
>>
>> root_at_android:/storage/sdcard0/0Joe # ./curl www.google.cl
>>
>> sh: ./curl: can't execute: Permission denied
>>
>> 2012/10/17 Ralph Mitchell <ralphmitchell_at_gmail.com>
>>
>>> missions: chmod 755 /some/fol
>>
>>
> It's probably your mount point. I just tried this on my phone:
>
> mount | grep sdcard0
>
> and got this back:
> /dev/block/vold/179:18 /storage/sdcard0 vfat rw,dirsync,nosuid,nodev,
> *noexec*,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro
> 0 0
>
> See that "noexec" in the flags? The OS stops you executing any binary on
> the card. This is a security measure, to slow down any virus that might be
> downloaded. You could drop the binary into somewhere under /data. Be
> aware that it will probably go away if you do a reset or data wipe.
>
> Ralph Mitchell
>
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-users
> FAQ: http://curl.haxx.se/docs/faq.html
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-10-17