Its 1:14 am and I though of jotting down all those steps which I have encountered in flashing the Custom images on the Samsung Nexus S in bringing it on the Card Emulation Mode.It is the mode in which the Phoen can emulate as a Card(Credit card ).Thanks tom0rtadelo on xda developer site and his post -> http://forum.xda-developers.com/showthread.php?t=1281946 ( i think his real name is Fernando Miguélez Palomo , I would be glad if I would be corrected here.)
![]() | gb-2_3_4_r1-patches_nfc-ce_bt-fd-20110929.zip |
Copy this patch in the /Android-2.3.4_r1 folder insid nfc-card-emu and unzip it using unzip gb-2_3_4_r1-patches_nfc-ce_bt-fd-20110929.zip
patching file external/libnfc-nxp/inc/phDbgTrace.h
patching file external/libnfc-nxp/inc/phNfcConfig.h
patching file external/libnfc-nxp/src/phHal4Nfc_Emulation.c
patching file external/libnfc-nxp/src/phLibNfc_initiator.c
patching file external/libnfc-nxp/src/phLibNfc_SE.c
patching file frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
patching file frameworks/base/core/java/android/server/BluetoothService.java
patching file packages/apps/Nfc/jni/com_android_nfc.h
patching file packages/apps/Nfc/jni/com_android_nfc_NativeNfcManager.cpp
patching file packages/apps/Nfc/src/com/android/nfc/NfcService.java
patching file packages/apps/Settings/AndroidManifest.xml
patching file packages/apps/Settings/res/values/strings.xml
patching file packages/apps/Settings/res/values-es/strings.xml
patching file packages/apps/Settings/res/xml/nfc_settings.xml
patching file packages/apps/Settings/res/xml/wireless_settings.xml
patching file packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothDiscoverableEnabler.java
patching file packages/apps/Settings/src/com/android/settings/nfc/NfcSettings.java
Do every thing as a root user .
Which would you like? [generic-eng] 4
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.4
TARGET_PRODUCT=full_crespo
TARGET_BUILD_VARIANT=userdebug
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GRJ22
============================================
Creating filesystem with parameters:
Size: 536870912
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 2048
Label:
Blocks: 131072
Block groups: 4
Reserved block group size: 31
Created filesystem with 540/32768 inodes and 26546/131072 blocks
Install system fs image: out/target/product/crespo/system.img
out/target/product/crespo/system.img+out/target/product/crespo/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p total size is 102413589
Installed file list: out/target/product/crespo/installed-files.txt
erasing 'userdata'...
OKAY [ 0.280s]
finished. total time: 0.280s
erasing 'cache'...
OKAY [ 2.018s]
finished. total time: 2.019s
OKAY [ 25.889s]
writing 'system'...
OKAY [ 12.442s]
finished. total time: 38.331s
sending 'userdata' (18796 KB)...
OKAY [ 4.861s]
writing 'userdata'...
OKAY [ 2.008s]
finished. total time: 6.869s
$ ./out/host/linux-x86/bin/fastboot flash boot out/target/product/crespo/boot.img
sending 'boot' (2904 KB)...
OKAY [ 0.754s]
writing 'boot'...
OKAY [ 0.385s]
finished. total time: 1.139s
rebooting...
finished. total time: 0.001s
Donwload the libpn544_fw.so from here.
There is an error after booting as libpn544_fw.so is not found in the /system/lib and it is unable to load this .so which is necessary for NFC operation.
so to avoid this do this on command prompt :
$ su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# cd system
# chmod 777 lib
# exit
$ adb push <pat to libpn544_fw.so> /system/lib
$adb shell
$su
# cd system
# chmod 755 lib
Once reboot is done you will get the options changed in the NFC Settings as told by Fernando Miguélez Palomo
In case you dont want to download the 2.3.4-r1 source Code , you cab take the images from here --> http://www.sendspace.com/filegroup/QrM1XZxbueqZMsC1bvJ7R%2BYO8SgCItUB
Note : Though the title says a hack but it is not.It was initially i thought that by doing this some one can actually hack the Google wallet.Any way I am not changing the subject line as the steps involved will definitely a step towards the subject of the post in near future.
Thanks Sandeep for Reviewing my blog and pointing out the typos :) !