Thursday, December 28, 2017

Paste copied text in emulator(in EditText)
How to paste text to emulator in edittext?
---------------------------------------------------
1. Open Terminal.
2. Go to sdk path e.g. D:\sdk\platform-tools
3. Type adb devices((it will list the device currently connected))
e.g.  D:\sdk\platform-tools>adb devices
4. Select Textbox where you want to write text
5. Write command: `adb shell input text 'Yourtext'` (make sure only one device is connected to run this command and that you can also use **Single Quotes**)
e.g. D:\sdk\platform-tools>adb shell input text ' भारत'6. Done!

Monday, January 16, 2017

Create Secure & zipalign apk for upload to playstore

Keystore-SSL Certificate as a Trusted Certificate



How To Get Your MD5 Fingerprint For Android Using Eclipse Keytool Plugin
---------------------------------------------------

1. Go to Help>Install New Software.
2. Now enter this website on the textbox: http://keytool.sourceforge.net/update
3. Wait until the word "Keytool" appears under the "Name" table then click on the checkbox before it.
4. Then click on "Next".
5. Continue clicking on the next choices until you're done with the installation.

http://www.icodeya.com/2011/04/how-to-get-your-md5-fingerprint-for.html


What is keytool?>
---------------------------------------------------

Keytool is an Eclipse plugin that maintains keystores and certificates.


Key features
  • Export certificate, with or without the private key.
  • Create certificate.
  • Create keystore.
  • Open existing keystore.
  • View all available information about every certificate.
  • Open existing certificate. Default with the extension .cer.
  • View list of certificates in a keystore.
  • Handles JKS and PKCS #12.
  • Show which certificate in a keystore where you have the private key.
  • Filemonitoring, to monitor changes in keystores.
  • Default opening a keystore every time Eclipse starts.
  • Generate CSR.
It allows you to create certificates and put them in a keystore.
You can from Eclipse, open and inspect certificates that are stored as .cer, or in a given keystore.



Create Zipalign apk>
---------------------------------------------------
  1. Right click on project
  2. Search & Click- Export Android Application
  3. Next
  4. Select project name
  5. Select keystore & enter password, if not existing keystore create keystore
  6. Next
  7. Select alias & password, if not exist then create
  8. Next
  9. Give destination path
  10. This page has certificate details
    • Certificate expires date
    • MD5
    • SHA1
  11. Finish (zipalign apk)

Important Note
>
---------------------------------------------------
  1. Check android_manifest.xml and verify that android:debuggable  attribute is set to false in your manifest file           
  2. Check the android:versionCode and android:versionName attributes. (if this is the first time you are uploading a apk, ignore, else if it is a new version of existing apk, make sure these       values are larger than previous apk)
  3. Export unsigned application package from Eclipse
  4. Sign the application using release key certificate(not debug key certificate)
  5. Zip align the package
  6. Upload in google play

Verify apk by zipalign>
---------------------------------------------------
  • Open cmd & go to path

    <sdk path>\sdk\tools>zipalign -c -v 4 <source apk path>

    e.g. E:\MyProject\adt-bundle-windows-x86\sdk\tools>zipalign -c -v 4 E:\MyPro
    ject\Sorghum\SorghumV3.0.apkA

    //all images/xml/assets folders
    14939764 res/drawable-xxhdpi/ic_plusone_tall_off_client.png (OK)
    14945782 classes.dex (OK - compressed)
    16127073 manifest (OK - compressed)
    16127212 META-INF/MANIFEST.MF (OK - compressed)
    16134980 META-INF/CERT.SF (OK - compressed)
    16143103 META-INF/CERT.RSA (OK - compressed)
    Verification successful

    **********************************
    Zip alignment utility
    Copyright (C) 2009 The Android Open Source Project
    Usage: zipalign [-f] [-v] <align> infile.zip outfile.zip
           zipalign -c [-v] <align> infile.zip

      <align>: alignment in bytes, e.g. '4' provides 32-bit alignment
      -c: check alignment only (does not modify file)
      -f: overwrite existing outfile.zip
      -v: verbose output

Tuesday, May 17, 2016

Import/Export Database in command line

Import mysql DB in command line
>
---------------------------------------------------


  • C:\wamp\bin\mysql\mysql5.6.12\bin>mysql -u(username) -p (database) < path
    Enter password: *******   
  • C:\wamp\bin\mysql\mysql5.6.12\bin>

  • e.g.
     C:\wamp\bin\mysql\mysql5.6.12\bin>mysql -u root -p db_avm < C:\wamp\www\AVMV1\db_avm.sql
    Enter password: *******



    C:\wamp\bin\mysql\mysql5.6.12\bin>



    Export mysql DB in command line>
    ---------------------------------------------------



  • C:\wamp\bin\mysql\mysql5.6.12\bin>mysqldump -u(username) -p (database) > path
    Enter password: *******   
  • C:\wamp\bin\mysql\mysql5.6.12\bin>

  • e.g.
     C:\wamp\bin\mysql\mysql5.6.12\bin>mysqldump -u root -p db_avm > C:\wamp\www\AVMV1\db_avm.sql
    Enter password: *******

    C:\wamp\bin\mysql\mysql5.6.12\bin>


    Tuesday, February 2, 2016

    Fix insufficient storage in android devices(mobile)

    Fix insufficient storage in android devices(mobile)


    If, for some reason, when you delete a few apps and still getting this error, then you need to do a dump state clearance.
    >Enter your Dialer
    >Dial *#9900#
    >This will access the SysDump menu

    Tuesday, June 23, 2015

    How to copy/push & delete file in sdcard(DDMS) by using commnad line in android?

    Push file to DDMS/File Explorer ->storage/sdcard/nature.jpg

    1. Go to commandline
    2. Type following path
           E:\MyProject\adt-bundle-windows-x86\sdk\platform-tools>
    3. Type
          adb push [your file]  /storage/sdcard

          adb push E:\Images\nature.jpg  /storage/sdcard

    if u get error msg

     failed to copy 'E:\Images\nature.jpg' to '/storage/sdcard/nature.jpg': Read-only file system

    then change read only mode to write/execute mode means give full permission to '/storage/sdcard'
    for this go to following command

    4. E:\MyProject\adt-bundle-windows-x86\sdk\platform-tools>adb shell
     a.   
    root@generic:/ # su
            su
     b.   
    root@generic:/ # mount -o rw,remount rootfs /
            mount -o rw,remount rootfs /
     c.   
    root@generic:/ # chmod 777 /storage/sdcard
            chmod 777 /storage/sdcard
     d.   
    root@generic:/ # exit
            exit
     e.  
    root@generic:/ # exit
           exit

    The folder has changed mode read to write/excute mode. Then push a file to '/storage/sdcard'
    5. Type
           E:\MyProject\adt-bundle-windows-x86\sdk\platform-tools>adb  push E:\Images\nature.jpg  /storage/sdcard

     1067 KB/s (11670528 bytes in 10.677s)

    You have sucessfully transfered nature.jpg to /storage/sdcard
    You can see file in DDMS/File Explorer ->storage/sdcard/nature.jpg

    Delete file from DDMS/File Explorer ->storage/sdcard/nature.jpg

    1. Go to commandline
    2. Type following path
           E:\MyProject\adt-bundle-windows-x86\sdk\platform-tools>
    3. Type
           E:\MyProject\adt-bundle-windows-x86\sdk\platform-tools>adb shell 

     a.  root@generic:/ # cd storage
           cd storage
     b.  root@generic:/storage # cd sdcard
           cd sdcard
     c.  root@generic:/storage/sdcard # rmdir nature.jpg
          rmdir nature.jpg


    Note : Make sure your dir should be empty.
    For non-empty directory use.

     d.  root@generic:/storage/sdcard # rm -r nature.jpg
          rmdir nature.jpg

    Create file/folder to DDMS/File Explorer ->storage/sdcard/test

    1. Go to commandline
    2. Type following path
           E:\MyProject\adt-bundle-windows-x86\sdk\platform-tools>
    3. Type
           E:\MyProject\adt-bundle-windows-x86\sdk\platform-tools>adb shell 

     a.  root@generic:/ # cd storage
           cd storage
     b.  root@generic:/storage # cd sdcard
           cd sdcard
     c.  root@generic:/storage/sdcard # mkdir test
          

    if u get error msg

    mkdir: 'test': Permission denied

    d.  root@generic:/storage/sdcard # su

    c.  root@generic:/storage/sdcard # mkdir test

    Done


    4. Go to in folder
    a. root@generic:/storage/sdcard # cd test
    b. root@generic:/storage/sdcard/test # 

    Tuesday, May 26, 2015

    Phonetic Typing

    Marathi/Hindi Typing Solution...


    aata marathitun lihine aagdi soppe jhaale aahe.

    आता मराठीतून लिहिणे आगदी सोप्पे झाले  आहे.


    You can write marathi/hindi easily. The solution is phonetic typing.


    Click Here to download  .


    The jar file is one click execute.
    You can write in english the translatrate in marathi.


    Suppose you want write in marathi. [ भारत  माझा देश आहे ]

    then you have to write in english [ bharat majha desh aahe ].


    In this application you can copy marathi text & use for your purpose.




    Please write here


    nitin.tkarale@gmail.com