-
Notifications
You must be signed in to change notification settings - Fork 0
android
CCTools: https://play.google.com/store/apps/details?id=com.pdaxrom.cctools
With profile: gcc
With add-ones: binutils, git (https://www.dropbox.com/sh/wbduq756bvd2skc/cgPjv6iGOH just unzip in /data/data/com.pdaxrom.cctools/root)
You can login via dropbear server (port 22022) after dropbear add-one is installed.
Uninstall perl add-one if already installed.
cd /sdcard/CCTools/backup
wget --no-check-certificate https://dl.dropboxusercontent.com/s/wwsq0nfyxgazz6p/perl_5.18.2-30-ge7e507e_armel.zip
cd /data/data/com.pdaxrom.cctools/root
umask 0002
unzip /sdcard/CCTools/backup/perl_5.18.2-30-ge7e507e_armel.zip 'cctools/*'The source files should be on ext3 filesystem. If /data partition has too less free space, you can prepare the new one. In such case, root is required:
id # ie.: uid=10205 gid=10205 groups=1015,1028,3003
su
id # uid=0 gid=0
dd if=/dev/zero of=/sdcard/src.bin bs=1024 count=$((512*1024))
mke2fs -f /sdcard/src.bin
tune2fs -j /sdcard/src.bin
mknod /dev/block/loop8 b 7 8 # check if is it a free number before
losetup /dev/block/loop8 /sdcard/src.bin
mkdir -p /sdcard/src
mount -t ext3 /sdcard/src.bin /sdcard/src
chown -R 10205:10205 /sdcard/src # previous uid:gid
exitAndroid doesn't have global temporary directory. You should set up some environment variables:
mkdir -p /data/data/com.pdaxrom.cctools/root/cctools/tmp
chmod 1777 /data/data/com.pdaxrom.cctools/root/cctools/tmp
TMPDIR=/data/data/com.pdaxrom.cctools/root/cctools/tmp
export TMPDIRcd $HOME # or cd /sdcard/src
git clone https://github.com/dex4er/perl5-android -b dexter/android/v5.18.2 perlcd perl
sh Configure -des \
-Dlibpth='/system/lib /data/data/com.pdaxrom.cctools/root/cctools/lib' \
-Dusrinc=/data/data/com.pdaxrom.cctools/root/cctools/arm-linux-androideabi/include \
-Dprefix=/data/data/com.pdaxrom.cctools/root/cctools
make
make installperl -VShould be similar to https://gist.github.com/dex4er/8392148#file-perl-v-txt
The most critical is the newest version of version package. The previous version breaks cpanminus.
curl -kL http://git.io/-5gwAA | perl - versionThen we can install cpanminus itself:
curl -kL http://git.io/-5gwAA | perl - App::cpanminus
cpanm -vSome noticed issues:
cpanm --no-wget https://github.com/libwww-perl/uri/archive/master.tar.gzcpanm --no-wget https://github.com/plack/Plack/archive/master.tar.gz- LWP (libwww-perl) https://github.com/libwww-perl/libwww-perl/pull/53
cpanm --no-wget https://github.com/dex4er/libwww-perl/archive/master.tar.gzThere is a problem with DNS resolver for environment started from CCTools session:
$ lwp-request -m HEAD http://www.cpan.org
Can't connect to www.cpan.org:80 (Bad hostname)
But sessions started with adb shell does work:
$ lwp-request -m HEAD www.cpan.org
200 OK
You can also use ConnectBot (https://play.google.com/store/apps/details?id=org.connectbot) with local shell session.
- Doesn't support locale, so you shouldn't use "use locale" in your scripts because this pragma is broken on systems which doesn't provide setlocale() function