Use XCode 4.5.2 to run your app on jailbroken iDevice without CodeSigning

Well of course it s ire rewritten from the previous post (here).

Well first, simply create a certificate :
Open the Keychain app from the LaunchPad > Utilities > Keychain Access

From the menus, choose “Certificate Assistant” > create a certificate
From the window, choose Certificate Type => Code Signing
and from the Text Input above, choose a name for our certificate such as JailbreakTests (You need to remember the name ;))

Now the fun part updated !!
Open a terminal and type (or cmd+c/cmd+v)
cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/
now
sudo cp Info.plist ~/Desktop
open ~/Desktop/Info.plist

(it will launch XCode) now replace every XCiPhoneOSCodeSignContext => XCCodeSignContext
sudo cp ~/Desktop/Info.plist Info.plist

Now the third part,
from the current directory change to ./Developer/SDKs/iPhoneOSX.Y.sdk with X.Y egal to 5.1 for example
so

cd Developer/SDKs/iPhoneOS5.1.sdk/
and then :
sudo cp SDKSettings.plist ~/Desktop
open ~/Desktop/SDKSettings.plist

sudo cp ~/Desktop/SDKSettings.plist SDKSettings.plist

and replace every YES from every *_REQUIRED to NO

And finally,
cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/PrivatePlugIns
cd iPhoneOS\ Build\ System\ Support.xcplugin/Contents/MacOS/
sudo nano create.sh

and copy/paste this code to this the nano which opened :
dd if=iPhoneOS\ Build\ System\ Support of=working bs=500 count=255
printf “\xc3\x26\x00\x00” >> working
/bin/mv -n iPhoneOS\ Build\ System\ Support iPhoneOS\ Build\ System\ Support.original
/bin/mv working iPhoneOS\ Build\ System\ Support
chmod a+x iPhoneOS\ Build\ System\ Support

type ctrl+o and ctrl+x

now, type:
sudo chmod +x create.sh
sudo ./create.sh

You will se something like
55+1 … in
55+1 … out
27712 bytes transfered

Restart Xcode if it was open, if not, just launch it !

Open your project and change the build configuration from every Code Signing to “Don’t Code Sign”
This step will make Xcode not code signing the code

Now, we will code sign ourself the code, to enable it we execute this code :

mkdir -p /Developer/iphoneentitlements
cd /Developer/iphoneentitlements
curl -O http://www.alexwhittemore.com/iphone/gen_entitlements.txt
mv gen_entitlements.txt gen_entitlements.py
chmod 777 gen_entitlements.py

and now, in the project, on the target add a new custom build phase to run script:
and copy/paste this code and replace iPhone Developer to the name you choose when you made your certificate:

export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
if [ “${PLATFORM_NAME}” == “iphoneos” ]; then
/Developer/iphoneentitlements/gen_entitlements.py “my.company.${PROJECT_NAME}” “${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent”;
codesign -f -s “iPhone Developer” –entitlements “${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent” “${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/”
fi

This code will auto sign the application

If your iDevices was not configure to do development, you need to open the Organizer and select your iDevice. Then choose “Use for development”

That’s it, you can now choose the iDevice instead of the emulators

Android : external sdcard to the internal one !

Here we are! The Galaxy S3 is a great device but … the external sd (up to 64GB) IS NOT used per default to store Android/data when you want to use external storage to store data. It is here that the application I developed can help you!

If your device is rooted, you can now swap the internal and external sdcard forever (in fact at every boot) or until the phone reboot

Does it work with every devices? In fact, it was made to be installed and used on a Galaxy S3 but the trick used in the app can be modify to work with … every devices which embed 2 sdcard (internal & external)

To manage these features :

  1. you can update the configuration list directly from the internet
  2. you can set your own configuration (only 1 at this time)
  3. you do not know what device represent your physical sdcard? no problem, you can directly from the application check every device on the phone/tablet and choose the correct one and it will edit the custom paramter !
  4. you do not know what to do? you can send the list provided, and/or your build.prop (the build.prop will help me to create new configuration for everyone when they download the updated configuration list)

You can download and install directly from this link (the store one will soon arrive)

http://www.codlab.eu/Internal2External.apk

Launch an Android Application/Activity when URL are read from NFC tag

What a long title to a simple and really easy system.

But It took me some minutes to find how to manage to open my application activity when a nfc tag is read with a particular url.

Here is the trick :
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<data
android:host="google.com"
android:scheme="http" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>

put this between <activity></activity> to tell to the system that the activity can hold the http://*.google.com/* and should start it by default

It will also override the internet browser 😉

Men In Black Neuralyzer on Android

Just a post about a new application I just released on the Android Market. This time, it is a neuralyzer free to download which can operate as a neuralyzer (erf on/ neuralyser? neuraliser? neuralizer? /erf off)

How it works? It simply use the flash torch mode to start and stop the flash. You can simply use it this way through java code to handle Android’s Camera Flash

Camera cam = Camera.open();
Parameters cam_parameters = cam.getParameters();

cam_parameters.setFlashMode(Parameters.FLASH_MODE_TORCH);
cam.setParameters(cam_parameters);
… time
cam_parameters.setFlashMode(Parameters.FLASH_MODE_OFF);
cam.setParameters(cam_parameters);

cam.release()

Use Xcode 4.3.2 to build and run app on jailbroken iDevices

If you have jailbroken iDevices like me and no Apple Developer Certificates (quite expensive and I did not have finish my apps :p)

It is very easy to configure Xcode to do so.

Simply follow these steps :

First of all, we need a certificate.
Open the Keychain app from the LaunchPad > Utilities > Keychain Access

From the menus, choose “Certificate Assistant” > create a certificate
From the window, choose Certificate Type => Code Signing
and from the Text Input above, choose a name for our certificate such as JailbreakTests (You need to remember the name 😉 )

Now open a shell and type the following command

cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/

edit the Info.plist with nano

sudo nano Info.plist

and replace every XCiPhoneOSCodeSignContext => XCCodeSignContext

The third part is to remove code signing requirement :
from the current directory change to ./Developer/SDKs/iPhoneOSX.Y.sdk with X.Y egal to 5.1 for example
so

cd Developer/SDKs/iPhoneOS5.1.sdk/

and then

sudo nano SDKSettings.plist

and replace …_REQUIRED > NO to YES (SIGN_REQUIRED, etc…)

Now, we have to binary patch the
App :

cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/PrivatePlugIns

cd iPhoneOS\ Build\ System\ Support.xcplugin/Contents/MacOS/
sudo nano create.sh

copy and paste the following code in it :

dd if=iPhoneOS\ Build\ System\ Support of=working bs=500 count=255
printf "\xc3\x26\x00\x00" >> working
/bin/mv -n iPhoneOS\ Build\ System\ Support iPhoneOS\ Build\ System\ Support.original
/bin/mv working iPhoneOS\ Build\ System\ Support
chmod a+x iPhoneOS\ Build\ System\ Support

now press ctrl+o and ctrl+x
and use

sudo chmod +x create.sh
sudo ./create.sh

You will se something like
55+1 … in
55+1 … out
27712 bytes transfered

Restart Xcode if it was open, if not, just launch it !

Open your project and change the build configuration from every Code Signing to “Don’t Code Sign”
This step will make Xcode not code signing the code

Now, we will code sign ourself the code, to enable it we execute this code :

mkdir -p /Developer/iphoneentitlements51
cd /Developer/iphoneentitlements51
curl -O http://www.alexwhittemore.com/iphone/gen_entitlements.txt
mv gen_entitlements.txt gen_entitlements.py
chmod 777 gen_entitlements.py

and now, in the project, on the target add a new custom build phase to run script:
and copy/paste this code and replace iPhone Developer to the name you choose when you made your certificate:

export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
if [ "${PLATFORM_NAME}" == "iphoneos" ]; then
/Developer/iphoneentitlements401/gen_entitlements.py "my.company.${PROJECT_NAME}" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent";
codesign -f -s "iPhone Developer" --entitlements "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/"
fi

This code will auto sign the application

If your iDevices was not configure to do development, you need to open the Organizer and select your iDevice. Then choose “Use for development”

That’s it, you can now choose the iDevice instead of the emulators

Source : http://stackoverflow.com/questions/246422/how-can-i-deploy-an-iphone-application-from-xcode-to-a-real-iphone-device

Pokemon TCG Manager arrives on iOS !

You will be soon able to manage all your pokemon card on the iOS with your favorite device such as iPad or iPhone. I am currently finishing to develop the Pokemon TCG Manager available on the Android Market to put it on the App Store

An other article will also deal with “how to test apps from xcode 4.3 or 4.3.2 to a jailbroken idevice”. Quite usefull when we do not have certificates right now 😉

ZTE and Android : a major flaw discovered

A flaw has been discovered on ZTE Score and ZTE Skate. It enables root very easily with a plain text password stored in the device. The following command line can enable root :
I did not have test this myself as I do not have one but it is very interesting to unlock the device ! or .. dangerous according to malwares….

found here : http://pastebin.com/wamYsqTV
The plain text :

The ZTE Score M is an Android 2.3.4 (Gingerbread) phone available in the United States on MetroPCS, made by Chinese telecom ZTE Corporation.

There is a setuid-root application at /system/bin/sync_agent that serves no function besides providing a root shell backdoor on the device. Just give the magic, hard-coded password to get a root shell:

$ sync_agent ztex1609523
# id
uid=0(root) gid=0(root)

Nice backdoor, ZTE.

3DS Hack ? Homebrew? www.3dshomebrewchannel.com

Hi there,

I recently viewed a video about a possible port from the homebrew channel to the 3DS and finally… it is a hoax but not the usual way.

In fact the www.3dshomebrewchannel.com is only a website based where apps are html-apps.

Then it is not really hack in the proper way : we CAN NOT launch homebrew as game where you can adress the hardware or network etc… but you CAN create web application designed for the 3ds.

I copied the code associate with the www.3dshomebrewchannel.com source code and it is available here >> www.codlab.eu/3ds/

I will certainly release in somedays an api to provide a little market to the 3ds : you will be able to create application and send to the market the url, the icon and description, etc… and then the homescreen will show your app in the market and FREE

Projects, Software, glitchs, security and much more !