Showing posts with label ADB. Show all posts
Showing posts with label ADB. Show all posts

December 17, 2014

Android insufficient permissions for device

Hi Friends,

I was having an issue when connected my friend's Micromax Doodle to my Ubuntu with the following error
"insufficient permissions for device"

Resolution

  1. Open Terminal
  2. Kill the server by typing the following command
    • $ adb kill-server
  3. Now, start the server
    • $ adb start-server
  4. On your device, a pop-up might come asking for granting the permission
  5. Click on "Yes" for approving the access
  6. Now, check your device status with the following command
    • adb devices
  7. With the above command, you should be able to see devive IMEI and device name
Enjoy the Ubuntu and Android combination :)

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

August 15, 2014

Android L Preview on Nexus 7

Hi all,

Today I’ve finally loaded the Android L Developer Preview on my Nexus 7 Wi-Fi 32GB

 

Its so simple to load the Android L. Here is the procedure

 

Warning

All the device data will be erased. Please take backup of all your data before doing this upgrade.

Not all the applications will work since it’s just a developer preview OS version

 

Pre-requisites

  • Android SDK with latest update
  • Android L Preview OS image
  • Make sure that, your device has more than 60 to 70 percent of battery
  • Enable USB Debugging
  • Connect the device to computer with USB cable. Make sure that, it has detected by computer

 

If you don’t’ have the pre-requisites, please follow the below procedure

 

Android SDK Installation & Update

  1. Download the Android SDK from this link
  2. https://developer.android.com/sdk/index.html
  3. Open SDK Manager.exe
  4. Install Tools, Android L Preview, Extras
  5. Update latest version if available

 

Android L Preview OS Image Download

  1. Download the corresponding Android L OS image for your device from this below link

 

Installation Process

  1. Extract the downloaded image to a folder
  2. From Android SDK folder, navigate to “platform-tools” folder, copy adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll and fastboot.exe
  3. Paste in the Android L Preview extracted folder
  4. Finally the extracted folder should look like this
    • image
  5. The highlighted files has been copied from SDK->platform-tools folder
  6. Open the command prompt and navigate to OS extracted folder
    • Tip
      • Open the folder in explorer window. Hold “Shift” and right click on mouse
      • Select “Open command Window here” option
  7. Connect the device to computer
  8. Put device into “fastboot” mode by rebooting
    • cmd> adb reboot fastboot
  9. Device gets rebooted to fastboot
  10. If device is locked, then please unlock it
    • cmd> fastboot oem unlock
  11. Now, run the “flush-all” script
    • cmd> flush-all
  12. It takes some time to install the image
  13. After completing the installation process, it asks you to press “enter/return” button to exit
  14. Press enter/return button for confirmation
  15. Device gets restarted, Android L Preview will be displayed on the device
  16. To lock the device, execute following commands
    • cmd> adb reboot fastboot
    • cmd> fastboot oem lock
  17. Like a new device, enter all the details like your Gmail account, Wi-Fi connection etc.
  18. Enjoy the features of Android L Developer Preview OS

 

Please send your feedback and queries to psrdotcom@gmail.com
Blogger Labels: Android,Preview,Nexus,Developer,Here,procedure,device,data,version,requisites,Make,Enable,Connect,computer,Installation,Update,Download,index,Open,Manager,Install,Tools,Extras,Image,developers,Extract,folder,From,platform,AdbWinApi,AdbWinUsbApi,Paste,explorer,Hold,Shift,Select,option,mode,script,confirmation,account,connection,Enjoy,feedback,fastboot,Gmail

September 17, 2013

Android Virtual Device (AVD) Emulator Creation and Installing APK on Emulator Using Command Line

Dear friends,

Every time whenever we are using most of the Android developers are using Eclipse or some other IDE to create and start the AVD.

I was just thought of using it via command line in my Ubuntu because I was very lazy to start and wait for Eclipse to get ready. I just want to try some apk on Emulator.

Ubuntu Procedure


Open terminal
I was hoping that you had already included the Android tools, platform-tools in PATH. If not just do that else navigate to Android SDK directory

Create AVD:

Syntax: 
$ android create avd -n -t --abi

target-ids are based on the installed Android platforms. Its not the Android API Level.

abi(Application Binary Interface): The ABI is used to control which machine code will run on a given hardware device. For example, for an Android application to run on an x86 device, it is necessary to include x86 ABI support when compiling the application.

Example:
$ android avd -n MyJB -t 12 --abi armeabi-v7a

To view the target-ids list and supported ABI for target-id, execute the following command

$ android list targets

You might be getting some output similar to this

Available Android targets:
----------
id: 1 or "android-3"
     Name: Android 1.5
     Type: Platform
     API level: 3
     Revision: 4
     Skins: HVGA-P, QVGA-L, HVGA-L, HVGA (default), QVGA-P
     ABIs : armeabi
----------
id: 2 or "android-4"
     Name: Android 1.6
     Type: Platform
     API level: 4
     Revision: 3
     Skins: HVGA, QVGA, WVGA800 (default), WVGA854
     ABIs : armeabi
----------
id: 3 or "android-7"
     Name: Android 2.1
     Type: Platform
     API level: 7
     Revision: 3
     Skins: HVGA, QVGA, WQVGA432, WVGA800 (default), WQVGA400, WVGA854
     ABIs : armeabi
----------
id: 4 or "android-8"
     Name: Android 2.2
     Type: Platform
     API level: 8
     Revision: 3
     Skins: HVGA, QVGA, WQVGA432, WVGA800 (default), WQVGA400, WVGA854
     ABIs : armeabi
----------
id: 5 or "android-10"
     Name: Android 2.3.3
     Type: Platform
     API level: 10
     Revision: 2
     Skins: HVGA, QVGA, WQVGA432, WVGA800 (default), WQVGA400, WVGA854
     ABIs : armeabi, x86
----------
id: 6 or "android-11"
     Name: Android 3.0
     Type: Platform
     API level: 11
     Revision: 2
     Skins: WXGA (default)
     ABIs : armeabi
----------
id: 7 or "android-12"
     Name: Android 3.1
     Type: Platform
     API level: 12
     Revision: 3
     Skins: WXGA (default)
     ABIs : armeabi
----------
id: 8 or "android-13"
     Name: Android 3.2
     Type: Platform
     API level: 13
     Revision: 1
     Skins: WXGA (default)
     ABIs : armeabi
----------
id: 9 or "android-14"
     Name: Android 4.0
     Type: Platform
     API level: 14
     Revision: 3
     Skins: WXGA800, HVGA, QVGA, WQVGA432, WVGA800 (default), WSVGA, WXGA720, WQVGA400, WVGA854
     ABIs : armeabi-v7a
----------
id: 10 or "android-15"
     Name: Android 4.0.3
     Type: Platform
     API level: 15
     Revision: 3
     Skins: WXGA800, HVGA, QVGA, WQVGA432, WVGA800 (default), WSVGA, WXGA720, WQVGA400, WVGA854
     ABIs : armeabi-v7a, mips, x86
----------
id: 11 or "android-16"
     Name: Android 4.1.2
     Type: Platform
     API level: 16
     Revision: 4
     Skins: WXGA800, HVGA, QVGA, WQVGA432, WVGA800 (default), WSVGA, WXGA720, WXGA800-7in, WQVGA400, WVGA854
     ABIs : armeabi-v7a, mips, x86
----------
id: 12 or "android-17"
     Name: Android 4.2.2
     Type: Platform
     API level: 17
     Revision: 2
     Skins: WXGA800, HVGA, QVGA, WQVGA432, WVGA800 (default), WSVGA, WXGA720, WXGA800-7in, WQVGA400, WVGA854
     ABIs : armeabi-v7a, mips, x86

Start AVD

Syntax:
$ emulator -avd

Example:
$ emulator -avd MyJB

It will ask for you to customize, if you are interested and you have knowledge in the options then you can go ahead with custom emulator. Press "enter" to accept default options and your emulator will start within seconds.

Install APK on emulator

Syntax:
$ adb install

Example:
$ adb install MyApp.apk

It will install the apk on your emulator.
Go to apps and click on the installed app to view the installed application.

References:

http://developer.android.com/tools/help/android.html
http://developer.android.com/tools/help/adb.html
http://docs.xamarin.com/guides/android/advanced_thttp://en.wikipedia.org/wiki/Application_binary_interfaceopics/cpu_architecture



Featured Post

Java Introdcution

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