

Here is the working Skype for Milestone 3 / Droid 3
http://www.mediafire.com/?my50anhr2lp7ueq
This is my blog on the development of
iPhone & Android in ChromeOS, Mac, Windows & Linux.
#back up K48AP.plist
cp -p /System/Library/CoreServices/SpringBoard.app/K48AP.plist /System/Library/CoreServices/SpringBoard.app/K48AP.plist.bak
#patch
plutil -key capabilities -key display-mirroring -yes /System/Library/CoreServices/SpringBoard.app/K48AP.plist
#check
plutil -key capabilities /System/Library/CoreServices/SpringBoard.app/K48AP.plist
~/android-sdk-mac_x86 and ~/android-ndk-r5c
export PATH=${PATH}:~/android-sdk-mac_x86/tools:~/android-ndk-r5c
cd ~/android-ndk-r5c/samples/hello-jni
ndk-build
android list target
android update project -t 1 -p .
android list avd
emulator -avd AVD4G -scale 0.5 &
#if you have Samsung Galaxy skin (download here)
emulator -avd AVD4G -skin GALAXY_Tab -scale 0.5 &
ant debug
ant debug install
# location of the keystore. This is used by ant release
key.store= /my-path-to-mykey/my.keystore
key.alias=mykeystore
keytool -genkey -v -keystore /my-path-to-mykey/my.keystore -alias mykeystore -keyalg RSA -keysize 2048 -validity 10000
ant release
cd ~/android-ndk-r5c/samples/test-libstdc++
#include <iostream>
using namespace std;
int main() {
cout << "hello, world\n";
return 0;
}
APP_STL := stlport_static
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := test-libstl
LOCAL_SRC_FILES := test-libstl.cpp
LOCAL_LDLIBS := -llog
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_EXECUTABLE := test-libstl
run:
~/android-sdk-mac_x86/platform-tools/adb push libs/armeabi/$(LOCAL_MODULE) /data/local/bin/$(LOCAL_MODULE)
~/android-sdk-mac_x86/platform-tools/adb shell chmod 755 /data/local/bin/$(LOCAL_MODULE)
~/android-sdk-mac_x86/platform-tools/adb shell /data/local/bin/$(LOCAL_MODULE)
# makefile requires the use of tab for the indented spaces above
cd ~/android-ndk-r5c/samples/test-libstdc++
ndk-build clean && ndk-build
ndk-build run
char *(bstrstr)(const char *s1, size_t l1, const char *s2, size_t l2) {
/* find first occurrence of s2[] in s1[] for length l1*/
const char *ss1 = s1;
const char *ss2 = s2;
/* handle special case */
if (l1 == 0)
return (NULL);
if (l2 == 0)
return ((char *)s1);
/* match prefix */
for (; (s1 = bstrchr(s1, *s2, ss1-s1+l1)) != NULL && ss1-s1+l1!=0; ++s1) {
/* match rest of prefix */
const char *sc1, *sc2;
for (sc1 = s1, sc2 = s2; ;)
if (++sc2 >= ss2+l2)
return ((char *)s1);
else if (*++sc1 != *sc2)
break;
}
return (NULL);
}
char *(bstrchr) (const char *s, int c, size_t l) {
/* find first occurrence of c in char s[] for length l*/
const char ch = c;
/* handle special case */
if (l == 0)
return (NULL);
for (; *s != ch; ++s, --l)
if (l == 0)
return (NULL);
return ((char*)s);
}
/* bstsrstr test */
#include <stdio.h>
#include <string.h>
#include <ctype.h>
char *(bstrchr) (const char *s, int c, size_t l) {
/* find first occurrence of c in char s[] for length l*/
const char ch = c;
/* handle special case */
if (l == 0)
return (NULL);
for (; *s != ch; ++s, --l)
if (l == 0)
return (NULL);
return ((char*)s);
}
char *(bstrstr)(const char *s1, size_t l1, const char *s2, size_t l2) {
/* find first occurrence of s2[] in s1[] for length l1*/
const char *ss1 = s1;
const char *ss2 = s2;
/* handle special case */
if (l1 == 0)
return (NULL);
if (l2 == 0)
return ((char *)s1);
/* match prefix */
for (; (s1 = bstrchr(s1, *s2, ss1-s1+l1)) != NULL && ss1-s1+l1!=0; ++s1) {
/* match rest of prefix */
const char *sc1, *sc2;
for (sc1 = s1, sc2 = s2; ;)
if (++sc2 >= ss2+l2)
return ((char *)s1);
else if (*++sc1 != *sc2)
break;
}
return (NULL);
}
void printbstr(const char *s, size_t l) {
for (; l!=0 ; --l) {
printf("%c", isprint(*(s))?*(s):'.');
s++;
}
printf("\n");
}
void test(const char *s1, size_t l1, const char *s2, size_t l2) {
printf("\n");
printbstr(s1, l1);
printf("locate ");
printbstr(s2, l2);
const char *r = bstrstr(s1,l1,s2,l2);
if (!r)
printf("not found\n");
else {
printf("result ");
printbstr(r, l1-(size_t)(r-s1));
}
}
int main () {
char *s1 = "I\0am a\0manz";
size_t l1 = 11;
printf("bstrstr test\n------\n");
printbstr(s1, l1);
printf("locate \\%c:%s\n", '0', bstrchr(s1,'\0',l1));
printf("locate %c:%s\n", 'I', bstrchr(s1,'I',l1));
printf("locate %c:%s\n", 'a', bstrchr(s1,'a',l1));
printf("locate %c:%s\n", 'n', bstrchr(s1,'n',l1));
printf("locate %c:%s\n", 'i', bstrchr(s1,'i',l1));
printf("locate %c:%s\n", 'z', bstrchr(s1,'z',l1));
test(s1, l1, "a\0m", 3);
test(s1, l1, "z", 1);
test(s1, l1, "I", 1);
test(s1, l1, "am a", 4);
test(s1, l1, "anz", 3);
test(s1, l1, "ax", 2);
test(s1, l1, "\0x", 2);
test(s1, l1, " x", 2);
test(s1, l1, "\0a", 2);
test(s1, l1, "a\0m", 3);
test(s1, l1, "x", 1);
test(s1, l1, "z", 1);
return 0;
}
ssh root@192.168.0.10
mkdir -p /ffp/pkg
cd /ffp/pkg
rsync -av inreto.de::dns323/fun-plug/0.5/packages .
cd packages
funpkg -i *.tgz
funpkg -r dns323-utils-0.7.176-2.tgz
cd /ffp/pkg
wget http://www.inreto.de/dns323/fun-plug/0.5/extra-packages/perl/perl-5.10-2.tgz
wget http://www.plord.co.uk/funplug/0.5/python-2.6.4-1.tgz
funpkg -i python-2.6.4-1.tgz perl-5.10-2.tgz
mkdir -p /i-data/md0/ffpbuildenv
cd /i-data/md0/ffpbuildenv
svn co svn://inreto.de/svn/dns323/funplug/trunk .
#!/ffp/bin/sh
set -x
CWD=$(pwd)
ffp=$(readlink -f /ffp)
root=/ffp-chroot
if [ -d "$root" ]; then
echo "$root exists"
exit 1
fi
mkdir -p $root
cd $root
mkdir -p ffp dev etc proc sys mnt i-data/md0
mount -t proc proc proc
mount -t sysfs sysfs sys
mount --bind /dev dev
mount --bind /etc etc
mount --bind $ffp ffp
mount --bind /i-data/md0 i-data/md0
ln -s ffp/bin bin
ln -s ffp/lib lib
ln -s ffp/sbin sbin
ln -s ffp usr
ln -s i-data/md0/ffproot/home home
chroot . $SHELL
umount i-data/md0
umount ffp
umount etc
umount dev
umount sys
umount proc
rm bin lib sbin usr home
rmdir ffp dev etc proc sys i-data/md0 mnt
rmdir i-data
cd ..
rmdir $root
cd /i-data/md0/ffpbuildenv
sh chroot.sh
cd i-data/md0/ffpbuildenv/source
wget http://kernel.org/pub/software/scm/git/git-1.7.6.tar.bz2
tar xjvf git-1.7.6.tar.bz2
cd git-1.7.6
./configure --prefix=/ffp
NO_NSEC=YesPlease make install
exit
ssh root@192.168.0.10 "mkdir -p /home/root/git/yourproject.git; cd /home/root/git/yourproject.git; git --bare init; touch git-daemon-export-ok"
cd ~/yourprojectdir
git init
git add . # include everything below ./ in the first commit;
# if you want to remove use git rm -r --cache xxx
git commit
git remote add origin ssh://root@192.168.0.10/home/root/git/yourproject.git
git push origin master
su
apt-get install xfonts-intl-chinese xfonts-base unifont
apt-get install ttf-arphic-bkai00mp ttf-arphic-bsmi00lp
apt-get install ttf-arphic-gbsn00lp ttf-arphic-gkai00mp
su
apt-get install gkdebconf
su
/usr/sbin/dpkg-reconfigure locales
cd usbmuxd-1.0.6/python-client
python tcprelay.py -t 22:2222 &
ssh -p 2222 root@localhost dd if=/dev/rdisk0s2s1 bs=1M | dd of=iphone-user.img
ssh -p 2222 root@localhost dd if=/dev/rdisk0s1 bs=1M | dd of=iphone-root.img
tar -zxvf scalpel-1.60.tar.gz
cd scalpel-1.60
make bsd
sudo mkdir -p /usr/local/bin /usr/local/etc
sudo cp -p scalpel /usr/local/bin
sudo cp -p scalpel.conf /usr/local/etc
scalpel -c scalpel.conf iphone-root.img