cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Install cURL in Android using binary

From: Ralph Mitchell <ralphmitchell_at_gmail.com>
Date: Wed, 17 Oct 2012 13:36:02 -0400

On Wed, Oct 17, 2012 at 1:24 PM, Joe Cabezas <joe.cabezas_at_gmail.com> wrote:

> ~ $ 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 :) ?
>

If your intention is to write some kind of script, you can put curl
somewhere like /data/local/bin, then set PATH in your script, like this:

        #!/system/bin/sh
        export PATH=$PATH:/data/local/bin
        curl http://www.google.com

This works. I just tried it on my phone, as the regular user.

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
Received on 2012-10-17