Showing posts with label Windows XP. Show all posts
Showing posts with label Windows XP. Show all posts

January 19, 2015

Windows: Copy all file names in a folder

Hi friends,

I’ve got a requirement like, I want to copy all the file names from a folder in Windows.

After searching from Google, I’ve got one of the quick solution which is being described below

Procedure:

Navigate to the folder where you want to copy all the file name in “Windows Explorer”

Select all the files (Key Board (KB) Shortcut: Ctrl + a)

Press and hold the “Shift” key on your keyboard

Right click your mouse by pointing to any one of the selected file

From the context menu, select the option “Copy as path”

Now, open “Notepad”

Paste the content (KB Shortcut: Ctrl + v)

Now, you will be able to see all the file name with full path

You can remove the folder path, if you don’t want the full path

Enjoy guys Smile

Send your comments and feedback to psrdotcom@gmail.com

Blogger Labels: Windows,Copy,folder,requirement,Google,solution,Procedure,Navigate,Explorer,Select,Board,Shortcut,Ctrl,Shift,From,context,menu,option,path,Notepad,Paste,Enjoy,Send,feedback

January 25, 2012

Successfully Jailbroken the iPhone 4 with iOS 4.3.3 in Windows XP

Hi friends,

I have successfully jailbroken the iPhone 4 with iOS 4.3.3 of my friend. After watching lot of videos from Youtube, I followed these steps.


Pre-Requisites:
Download and install latest iTunes on PC
Download Apple iOS 4.3.3 firmware IPSW file
Download latest RedSn0w for Windows

Procedure:
  • Unzip the RedSn0w file and execute the "redsn0w.exe" file (Better to run the exe as "Run as Administrator")
  • Click on "Browse" and select the downloaded iOS 4.3.3 firmware file "iPhone3,1_4.3.3_8J2_Restore.ipsw"
  • Click on "Next"
  • The "iPhone3,1_4.3.3_8J2_Restore.ipsw" file will get processed and patches will be applied to iOS kernel
  • Select the "Install Cydia" option, if it hasn't selected
  • Click "Next"
  • Please see the instructions carefully
  • In this step, you need to switch off the device and iPhone should be connected to PC
  • Now, we need perform very important step of the jailbreaking, i.e. putting iPhone in DFU mode
  • Press and hold the "Power Button" for 3 seconds
  • Now, without leaving the "Power Button", press and hold the "Home" button of the iPhone for 10 Seconds
  • Final step, Leave the "Power Button" but hold the "Home" button of the iPhone device for 15 Seconds
  • You can see on PC that it was successfully entered into DFU mode
  • You can see some commands are running on the iPhone 4 (Don't get scared, no issue with your device)
  • After successfully jailbreak the device, iPhone will get rebooted.

Jailbreak Verification Step:
  • If the device is Jailbreaked then the Cydia app will be installed on your iPhone
  • You can browse the iOS filesystem from it

Problems and Solution:
  • If you have problems in entering into DFU mode, then the iPhone will move to "Restore" mode
  • To come out of "Restore" mode, Press and hold the both "Power Button" and "Home Button" for 10 Seconds
  • Again do the procedure from start

References:
http://www.iphone4jailbreak.org/redsn0w-jailbreak-4-3-3-redsnow-un-tethered-jailbreak.html
https://sites.google.com/a/iphone-dev.com/files/home/

December 30, 2011

Android NDK JNI Windows xp/7 with 32/64 bit Installation Problems with Solutions in Eclipse without C/C++ CDT Plugin

Hi all,

I spent 2 days on configuring this. I read lot of blogs and instrutction steps from various sites. I would like share my experience on installing Android NDK and Working with Eclipse.

Objective:
Using JNI Technology in Eclipse with Android NDK r6/r7 on Windows xp/7 Professional

Pre-requirements:
  1. Java SE SDK -- Java Development Kit
  2. Eclipse Helios/Indigo -- IDE to work with Java, Android, C/C++ etc.
  3. Android SDK -- Android Applications Development Kit
  4. Android ADT Plugin for Eclipse -- Download the latest Android SDK Platform Tools
  5. C/C++ Plugin for Eclipse (Optional) -- Make sure that .c, .cpp, .h files opening from Eclipse
  6. Android NDK (r6/r7) -- Native development i.e. Running c libraries in Android
  7. Cygwin 1.7.x or above -- Makefile creation, Library file creation tools, Compiling C files

Installation:
  1. Install the Java Development Kit
  2. Install the Android SDK and ADT Plugin with Eclipse
  3. [Optional] Install CDT plugin for Eclipse
  4. Download and extract the Android NDK
  5. Install Cygwin 1.7.x or above
Note: Don't extract in a folder where folder name is having spaces in between words.
Example:
"Program Files" -- Don't Use
"ProgramFiles" -- Use

Configuration:
Please make sure that you have set the environment variables like
  • JAVA_HOME -- Java Home Directory
  • NDK_HOME -- Android NDK Home Directory
  • Update Path Variable with JDK Bin folder
Creating Android Application
  • In Eclipse, Select File->New->Android Project
  • Enter the Project Name and Click on "Next" button
  • Select the "Build Target", I opted for Android 2.2, SDK 8 Version and Click on "Next" button
  • In Application Info dialog, enter the "Package Name" and Select "Finish" button
  • Now, you can see the newly created SampleNDK project in the eclipse project explorer window

Example:
  • Eclipse Workspace Folder: D:\Workspace
  • Android Application Name: SampleNDK
  • Android Application Working Folder: D:\Workspace\SampleNDK
  • Package Name: com.samplendk
  • Android Application Source Folder: D:\Workspace\SampleNDK\src

Source of AndroidNDKActivity.java
package com.samplendk;

import android.app.Activity;
import android.app.AlertDialog;
import android.os.Bundle;

public class SampleNDKActivity extends Activity {
   
    //Declare the native method
    private native String invokeNativeFunction();
   
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
       
        //Call the native methods
        String hello = invokeNativeFunction();
        new AlertDialog.Builder(this).setMessage(hello).show();
    }
   
}

  • Create a folder named "jni" in the project
    • Right click on the "SampleNDK" project-> Select "New"-> Select "Folder"->Type "jni"
  • Create files "Android.mk" and "native.c" in Jni folder
    • Right click on the "jni" folder-> Select "New"-> Select "File"->Type "Android.mk"
    • Right click on the "jni" folder-> Select "New"-> Select "File"->Type "native.c"
  • After Creating those folder and files, the project explorer window look like this
  • Do some continuous steps.
    • Build, Refresh, and Clean project
      • Right Click on the "SampleNDK" project and Select the "Build Project"
      • Select "Sample NDK" project and Click "F5" button on keyboard
      • Select "Project" menu and Select "Clean" option

  • Create header file of the java file
    • In windows command prompt, change to project source directory
    • Syntax:
      • cmd>
      • cmd> cd ProjectDir/src

    • Example:
      • cmd> D:
      • D:\> cd SampleNDK/src
    • Run the Javah command to create header file
    • Syntax:
      • cmd> javah -jni .javafile_without_.java_extension // JDK 1.7
      • cmd> javah -classpath ..\bin\classes .javafile_without_.java_extension //JDK1.6
    • Example:
      • D:\SampleNDK\src> javah -jni com.samplendk.SampleNDKActivity //JDK1.7
      • D:\SampleNDK\src> javah -classpath ..\bin\classes com.samplendk.SampleNDKActivity //JDK1.6
    • Note:
      • Don't include the .java at the end of javah command

  • Copy the created java header file to jni folder
    • D:\SampleNDK\src> copy com_samplendk_SampleNDKActivity.h ..\jni

  • Go to Eclipse and Refresh the project by pressing "F5" on keyboard.
  • Open the header file from jni folder
  • Copy the function created by javah as shown below
  • Paste the code in native.c and change the code similar to this
Source of native.c
#include <string.h>
#include "com_samplendk_SampleNDKActivity.h"

jstring JNICALL Java_com_samplendk_SampleNDKActivity_invokeNativeFunction
  (JNIEnv *env, jobject obj)
{
    return (*env)->NewStringUTF(env, "Hello from native function !!");
}

Source of Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# Here we give our module name and source file(s)
LOCAL_MODULE := SampleNDK
LOCAL_SRC_FILES := native.c

include $(BUILD_SHARED_LIBRARY)

  • Run Cygwin.bat file in the Cygwin installed directory
  • It will open the cygwin command prompt
  • Change the directory to SampleNDK project directory
    • Note: All the drives in your systems are mounted to some directory in the cygwin.
    • To see your drive mount points type mount
    • # mount
  • # cd /cygdrive/d/SampleNDK/
  • Run the ndk-build command from the android ndk directory
    • # /cygdrive/d/android-ndk-r7/ndk-build

  • Error(Only in Android-ndk-r7):
  • You may get some error like the following
    • /awk.exe: can't open file check-awk.awk
    • Andoid NDK: Host 'awk' tool is outdated. Please define
    • HOST-Awk to Point to Gawk or Nawk !
  • Resolution:
    • Goto the android-ndk/prebuilt/windows/bin/
    • Change the awk.exe to awk_.exe

  • Now you may see the following output after successful execution
  • After successful creating libSampleNDK.so file, refresh your Eclipse project
  • You can see the updated "Project Explorer" with "libs" folder in the tree hierarchy
  • Update the java source code now by adding this library to it
Source code of SampleNDKActivity.java
package com.samplendk;

import android.app.Activity;
import android.app.AlertDialog;
import android.os.Bundle;

public class SampleNDKActivity extends Activity {
   
    static
    {
        System.loadLibrary("SampleNDK");
    }

   
    //Declare the native method
    private native String invokeNativeFunction();
   
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
       
        //Call the native methods
        String hello = invokeNativeFunction();
        new AlertDialog.Builder(this).setMessage(hello).show();
    }
   
}

  • Clean the project by Selecting "Project"->"Clean"
  • Run the application as "Android Application"
  • Note:
    • Error:
      • java.lang.unsatisfiedLinkError Library -- not found
    • Resolution:
      • Please see if you have added the "lib" in java source before adding the library in System.loadLibrary() method
  • Please find the screenshot of above running program in emulator


If you have queries, please mail to psrdotcom@gmail.com

October 26, 2011

Convert/Print File in PDF

Hi all,

Today I have come across one useful thing, which is PDF Printer.

If you want to print your file(s) or convert your file(s) to PDF then you can use this method.


Ex: IRCTC Ticket, you can directly save in PDF file format.

Download Bullzip PDF Printer and install it.

While installing it will ask us to install ghostscript dependencies. Please allow it to download and finish the installation.

After successful installation, you can see the bullzip printer from printers from control panel.
While printing you can select bullzip printer to save/convert into PDF file format.

For further queries, contact psrdotcom@gmail.com

Featured Post

Java Introdcution

Please send your review and feedback to psrdotcom@gmail.com