http://androidmohan.blogspot.in/2012/06/android-concepts-and-code.html
Monday, June 11, 2012
Android Tools
Android Tools
Emulator –
-
Virtual Device
-
Can develop test and debug apps
-
Allows to run simultaneous apps
ADT – Android Development Tools
-
Plugin for eclipse integrated development
environment
-
Increases speed and efficiency for developing
android apps.
-
Allows the apps to access DDMS tool from
eclipse.
-
Gives the wizard for basic new project creation.
DDMS – Dalvik Debug Monitor Service
-
Works with the emulator or the mobile device
-
Gives the information about the virtual devices
and physical devices.
-
Thread and Heap tab for easy display.
-
Screen capture
-
Exploring the files
-
Causes Garbage collection
-
Running Log cat
ADB – Android Debug Bridge
-
Three core components
o
Client
o
Server
o
Daemon – A computer program that runs in the
background like a thread. Don’t have user control.
-
Used to manage
the state of an emulator or a device.
-
Used to install any application directly
from PC to mobile or emulator
-
To manage SQLite DB.
AAPT – Android Asset Packaging Tool
-
Used to package the .apk file
-
Developers can use it directly to view , create
and update .zip, .jar and .apk files.
AIDL – Android Interface Description Language
-
Used for Inter process communication.
-
Interface based. Saves developers time.
Sqlite3
-
Allows to access the SQLite data files created
and used by android apps
TraceView
-
Provides a graphical viewer for execution logs
saved by your app
MKSDCARD
-
Helps you to create a disk image that you can
use with the emulator
DX
-
Converts .class files to Android byte code.
ActivityCreator
-
Creates basic files that the developer needs,
when the developer not using Eclipse.
Hierarchy Viewer
-
Gives the user interface to the projects and
emulator
INSTALLATION
Required SWs
JDK 1.5 or higher
Eclipse
3.5 or higher
ADT
Plugin for Eclipse
Android
SDK.
Process
Install
JDK and set path up to bin in to environment variables.
Extract
Eclipse and open eclipse.exe file.
Then helpàinstall
new SW à
give path to ADT pluginàthen
install ADT plugin.
Install
Android SDK installer file. Then select the files and install.
Then go
to Windowsà
preferencesàAndroidà give path of Android
SDK, up to the root folder of tools folder.
Then go
to Windowsà
Android SDK and AVD managerà
Virtual Devicesà
Create a new Virtual Device.
Now the Set up is completed.
Generate map key steps in android
https://developers.google.com/maps/documentation/android/mapkey
c:\>keytool.exe -list -alias androiddebugkey -keystore "C:\android\debug.keystore" -storepass android -keypass android
MD5 Key .............................
https://developers.google.com/android/maps-api-signup?hl=en-US
c:\>keytool.exe -list -alias androiddebugkey -keystore "C:\android\debug.keystore" -storepass android -keypass android
MD5 Key .............................
https://developers.google.com/android/maps-api-signup?hl=en-US
Basic Android Terminal and ADB Shell Command List
While rooting your Android Phone or
installing custom ROM on your mobile or partitioning your android device to install applications, requires some android terminal command and ADB
(Android Debug Bridge) shell command knowledge. Below is the list of some
basic android commands that are being used on Android platform frequently and that every android user
must know.
Basic
Android Terminal and ADB Shell Command List
1. How to open a cmd in Android
Phone
Method 1: “Start” – “”Program”-” “Accessories” – “” Command Prompt ”
Method 2: “Start” – “” Run “, type cmd ENTER
Method 1: “Start” – “”Program”-” “Accessories” – “” Command Prompt ”
Method 2: “Start” – “” Run “, type cmd ENTER
2. How to restart Android Phone
When the phone and Computer is connected to the data cable, you can enter the following command
When the phone and Computer is connected to the data cable, you can enter the following command
1
|
adb shell reboot ===
ENTER
|
3. Restart Android into Recovery
Mode
With the data cable connected to your phone and computer, enter the following command
With the data cable connected to your phone and computer, enter the following command
1
|
adb shell reboot
recovery === ENTER
|
4. Convert back to ext2 partition
Restart the phone into Recovery mode, press “Alt + X” into the console. Open cmd and enter the following command
Restart the phone into Recovery mode, press “Alt + X” into the console. Open cmd and enter the following command
1
2
3
|
adb shell === ENTER
tune2fs-O ^ has_journal
/ dev/block/mmcblk0p2 === carriage return
e2fsck /
dev/block/mmcblk0p2 === carriage return
(optional, can be a
problem area in section 2, when used)
|
5. Pulling applications from Android
phone to computer
1
2
|
adb pull
/system/sd/app app
adb pull
/system/sd/app-private app-private
|
6. Pushing applications back to
android phone from the computer
1
2
|
adb push app
/system/sd/app
adb push app-private
/system/sd/app-private
|
7. Delete existing apps on Android
SD
1
2
|
adb shell rm -r
/system/sd/app
adb shell rm -r
/system/sd/app-private
|
8. Repair gravity System or switch
to screen
Sometimes frequent brushing of phone can cause gravity system or switch to screen failure. Just follow the steps below-
Restart the phone into Recovery mode, press “Alt + X” into the console
Open cmd and enter the following command
Sometimes frequent brushing of phone can cause gravity system or switch to screen failure. Just follow the steps below-
Restart the phone into Recovery mode, press “Alt + X” into the console
Open cmd and enter the following command
1
2
|
mount /
data === carriage return
rm /
data / misc / akmd * / data / misc / rild * === ENTER
|
9. Ext2/ext3/ext4 formatted
partition
Enter the following command in the cmd
Enter the following command in the cmd
1
2
3
|
adb remount ===
ENTER
adb shell === ENTER
rm-r / system / sd /
* === carriage return
|
10. Remove/ system / app under the
application
Under normal circumstances / system / app is not under an application. Use the following methods to remove these applications.
Open cmd and enter the following command
Under normal circumstances / system / app is not under an application. Use the following methods to remove these applications.
Open cmd and enter the following command
1
2
|
adb remount ===
ENTER
adb rm /
system / app / Stocks.apk === Enter
|
11. If the start Time is too Long
Just enter the following command in order to view the boot process.
Just enter the following command in order to view the boot process.
1
|
adb logcat === ENTER
|
12. Through Terminal Partition SD
card
It will erase everything on your SD card
It will erase everything on your SD card
1
2
3
4
5
|
$ su
# cd /data
# chmod 555 sdsplit
# /data/sdsplit -fs
*size* (add -nc to the end for JFv1.5ADP)
|
13. From the Recovery Screen, send
an update file to your SD card.
1
2
3
|
adb shell mount /sdcard
adb shell rm /sdcard/update.zip
adb push *filename*
/sdcard/update.zip
|
14. Restoring a nandroid backup via
Fastboot
Start command-prompt/terminal cd to the nandroid folder and enter following commands
Start command-prompt/terminal cd to the nandroid folder and enter following commands
1
2
3
4
5
6
7
|
fastboot erase boot
fastboot erase
recovery
fastboot flash
system system.img
fastboot flash boot
boot.img
fastboot flash
userdata data.img
fastboot flash
recovery recovery.img
fastboot reboot
|
15. Clear Search History in Android
Search History is accounted for
Mobile Memory. It can also leak your privacy information as well. Just follow
the steps below to clear android history.
Steps are as follows:
1. Make sure your mobile phone has
Root authority.
2. Open the super-terminal.
3. Enter the following command
2. Open the super-terminal.
3. Enter the following command
1
2
|
su
rm /
data / data / com.android.vending / databases / suggestions.db
|
4. Exit Hyper Terminal and restart
the phone.
If you have a good one to add please
post it in comment section
Subscribe to:
Posts (Atom)