Monday, September 23, 2013

Android command

Android command
Press shift + right click in adb.exe containing folder
adb reboot recovery     ßto enter recovery mode for the android device with usb debugging  on
adb reboot               ßreboot or restart your android device with  usb debugging  on
adb reboot fastboot ßto enter fastboot mode while usb debugging  on
adb push  ß pushing file from computer to your android device eg; adb push D:\Data\file.zip /mnt/sdcard 
or  adb push (drag and drop your file here)  /mnt/sdcard
adb pullß pulling or copying files from your android devices,eg; adb pull /mnt/sdcard
(copying all data from sdcard)
fastboot reboot      ßto escape from fastboot
fastboot flash recovery recovery.img    ßto put recovery.img from fastboot to recovery partition of your android system
fastboot flash boot boot.img       ßto put boot.img from fastboot to partition of your android system
fastboot boot boot.img     ßsony and htc has no recovery partition unlike huawei and samsung and other.so we have to put in boot partition instead of recovery partition,recovery installation in these type  of phone needs to put in boot partition.
fastboot erase recovery     ßerasing or cleaning or deleting recovery img file from fastboot
fastboot -w ßto make factory reset from fastboot for rooted android phone only
from adb mode ,you can check whether your device is rooted or unrooted
type  adb shell
type su        then it will show u#”this sign.so your device is rooted.
Rooted device you can do factory reset or other so many…
For factory reset
Type wipe data  from adb shell
I will show you some of my command using this above features
adb copy external extsd card all data.bat   save in your adb.exe containing folder
How to make a ph call from adb.
adb shell am start -a android.intent.action.CALL -d tel:5555555
-----------------------------------------------------------
@echo off
cls
title: susutun toolß(type your desire name here)eg ; your name tool
color 0a
echo  checking your device
echo.
adb devices
echo  adb is copying files from your  extsd  card
adb pull mnt/extsd/
echo.
pause
exit
 -----------------------------------------------------------
adb copy internal sdcard and extsd  data all.bat    see below red link(this command will copy all data of your internal and external sd card)     
 -----------------------------------------------------------
 @echo off
cls
title: susutun tool
color 0a
echo  checking your device
echo.
adb devices
echo  adb is copying files from your sdcard and extsd  card
adb pull mnt/
echo.
pause
exit    
 -----------------------------------------------------------
You can use wisely if you have
 -----------------------------------------------------------
@echo off
cls
title: susutun tool
color 0a
echo  checking your device
echo.
adb devices
echo  adb is copying files from your sdcard
adb pull mnt/sdcard
echo.
pause
exit
 -----------------------------------------------------------
@echo off
cls
title: susutun tool
color 0a
echo  checking your device
echo.
adb devices
echo  adb is copying system application from your rom
adb pull data/app
echo.
pause
exit
 -----------------------------------------------------------
@echo off
cls
title: susutun tool
color 4a
echo  Boot animation is backing up or copying from your device
echo.
adb pull /system/media/bootanimation.zip
echo.
Pause
 -----------------------------------------------------------
@echo off
cls
title: susutun tool
color 0a
echo  checking your device
echo.
adb devices
echo  adb is copying data/system  files
adb pull data/system

echo.
pause
exit
 -----------------------------------------------------------
For adb command
 -----------------------------------------------------------
@echo off
cls
title: susutun tool
color 0a
echo  checking your device
echo.
adb devices
echo.
pause
cmd
 -----------------------------------------------------------
For adb devices  just checking your device is working or not
 -----------------------------------------------------------
@echo off
cls
title: susutun tool
color 4a
echo  checking your device
echo.
adb devices
echo.
Pause
 -----------------------------------------------------------
Kill adb for conflict with other adb or if u have adb error
 -----------------------------------------------------------
@echo off
cls
title: susutun tool
color 4a
echo  kill adb
echo.
adb kill-server
echo.
Pause
 -----------------------------------------------------------
Reboot your system
 -----------------------------------------------------------
@echo off
cls
title: susutun tool
color 4a
echo  system has been rebooted now ........
echo.
adb reboot
echo.
Pause
 -----------------------------------------------------------
adb remove data system accounts gmail  (remove your gmail account)
 -----------------------------------------------------------
@echo off
cls
title: susutun tool
color 0a
echo  checking your device
echo.
adb devices
echo.
pause
color 4a
echo   ----this tool is developed by susutun
echo   ----adb will remove your gmail accounts
echo   ----press yes or enter to continue
echo   ----this will  remove data/system/accounts.db   file
echo.
pause
color 5a
echo    adb is removing  accounts.db
adb shell "su -c 'rm /data/system/accounts.db'"

echo  ----if remove success,all are go with no fail
echo  ----if fail,you will see fail signature and sign
echo  ----then restart your device
echo.
pause

echo   press enter or any key to restart your device
echo.
pause
adb reboot
 -----------------------------------------------------------
adb removing your password setting(removing your pin lock ,pattern lock or password lock for android rooted device only)
 -----------------------------------------------------------
@echo off
cls
title: susutun tool
color 0a
echo  checking your device
echo.
adb devices
echo.
pause
color 4a
echo   ----this tool is developed by susutun
echo   ----adb will remove your gmail accounts
echo   ----press yes or enter to continue
echo   ----this will  remove data/system/accounts.db   file
echo.
pause
color 5a
echo    adb is removing  accounts.db
adb shell "su -c 'rm /data/system/accounts.db'"

echo  ----if remove success,all are go with no fail
echo  ----if fail,you will see fail signature and sign
echo  ----then restart your device
echo.
pause

echo   press enter or any key to restart your device
echo.
pause
adb reboot
 -----------------------------------------------------------
adb shell(easy calling adb shell from bat file)
 -----------------------------------------------------------
@echo off
cls
title: susutun tool
color 0a
echo  adb shell
echo.
adb shell
echo.
Pause
 -----------------------------------------------------------
boot animation back up  bat file
 -----------------------------------------------------------
@echo off
cls
title: susutun tool
color 4a
echo  Boot animation is backing up or copying from your device
echo.
adb pull /system/media/bootanimation.zip
echo.
Pause
 -----------------------------------------------------------
bootanimation adding   bat file
 -----------------------------------------------------------

@echo off
cls
title: susutun tool
color 4a
echo  Boot animation added
echo.
adb push bootanimation.zip /system/media/
echo.
Pause
 -----------------------------------------------------------
Boot animation remove bat file
 -----------------------------------------------------------
@echo off
cls
title: susutun tool
color 4a
echo   Boot animation removed successfully
echo.
adb shell "rm /system/media/bootanimation.zip"
echo.
Pause
 -----------------------------------------------------------
  to see cpu information for your android rooted devices  bat file
 -----------------------------------------------------------
@echo off
cls
title: susutun tool
color 4a
echo   to see cpu informations
echo.
adb shell "cat proc/cpuinfo"
echo.
Pause
adb shell getprop ro.secure
 -----------------------------------------------------------
going to fastboot or bootloader mode  bat file
 -----------------------------------------------------------
@echo off
cls
title: susutun tool
color 0a
echo  now your system is going to fastboot or bootloader mode
echo.
adb reboot bootloader
echo.
Pause
 -----------------------------------------------------------
To see partitions of your android rooted devices
 -----------------------------------------------------------
@echo off
cls
title: susutun tool
color 3a
echo   to see partitions
echo.
adb shell "cat proc/partitions"
echo.
Pause
 -----------------------------------------------------------
going to recovery mode  bat file
 -----------------------------------------------------------
@echo off
cls
title: susutun tool
color 4a
echo  now your system is going to recovery mode
echo.
adb reboot recovery
echo.
pause
 -----------------------------------------------------------
@echo off
cls
title: susutun tool
color 0a
echo   to push sh file to system bin
echo.
adb remount
adb push sh system/bin/sh
echo.
Pause
 -----------------------------------------------------------
Factory reset your device bat (when you feel your device is looping at boot logo, you can do this)
 -----------------------------------------------------------
@echo off
cls
title: susutun tool for Factory reset
color 4a
echo  factory reset is doing
echo.
adb shell "wipe data"
adb shell "wipe cache"
echo  factory reset done
echo.
pause

color a4
echo  if you want to reboot your device   ,just press enter to continue
echo.
pause

color b1
adb reboot
 -----------------------------------------------------------
Factory reset 2
 -----------------------------------------------------------
@echo off
cls
title: susutun tool
color 4a
echo  factory reset is doing
echo.
adb shell su -c "mount -o remount,rw mount system"
adb shell su -c "wipe data"
echo  factory reset done
echo.
pause
adb reboot
 -----------------------------------------------------------
Factory reset 3
 -----------------------------------------------------------
@ECHO OFF
CLS
MODE CON: COLS=56 LINES=4
SET TITLE=ANDROID A10-A13 WIPE ROM.
SET VERSION=2.0
SET AUTHOR=By mrko su
SET MODIFY_LAST=01/9/2012

:STARTUP
COLOR 03
TITLE %TITLE% v%VERSION% %AUTHOR%
cls
@echo off
echo.
echo Please unplug your Android device before continuing!
echo.
pause
if exist "%userprofile%\.android\adb_usb.ini" echo You do not need to have the file created!
IF NOT EXIST "%USERPROFILE%\.android\" md "%USERPROFILE%\.android"
echo 0x2080 >> "%USERPROFILE%\.android\adb_usb.ini"
find "0x2080" "%USERPROFILE%\.android\adb_usb.ini"
if errorlevel==0 goto drivers
if errorlevel==1 goto usb

:usb
cls
echo 0x2080 >> "%USERPROFILE%\.android\adb_usb.ini"
@ECHO OFF
CLS
MODE CON: COLS=78 LINES=10
SET TITLE=ANDROID A10-A13 WIPE ROM.
SET VERSION=2.0
SET AUTHOR=By mrko su
SET MODIFY_LAST=09/7/2012
echo success!
echo ** now plug the device tablet back in.
echo ** now install the drivers - instructions in the thread and below
echo **************************************************************
echo * Install "Device" with the drivers I provided in this pack. *
echo * You can find the fixed drivers in the "usbdrivers" folder. *
echo **************************************************************
devmgmt.msc
pause
cls
@ECHO OFF
CLS
MODE CON: COLS=56 LINES=3
SET TITLE=ANDROID A10-A13 WIPE ROM.
SET VERSION=2.0
SET AUTHOR=By mrko su
SET MODIFY_LAST=01/9/2012

@call adb devices
cls
@call adb shell wipe data
cls
@call adb shell wipe cache
cls
@call adb reboot

cls
echo.
echo "Wait for Reboot WIPE ROM."
ping 1.1.1.1 -n 1 -w 4000 > NUL
exit
:drivers
@ECHO OFF
CLS
MODE CON: COLS=96 LINES=10
SET TITLE=ANDROID A10 - A13 WIPE ROM.
SET VERSION=2.0
SET AUTHOR=By mrko su
SET MODIFY_LAST=01/9/2012
cls
echo You already have the proper usb vendor ID. Now you should install drivers if you havent already.
echo ** now plug the device tablet back in.
echo ** now install the drivers - instructions in the thread and below
echo **************************************************************
echo * Install "Device" with the drivers I provided in this pack. *
echo * You can find the fixed drivers in the "usbdrivers" folder. *
echo **************************************************************
devmgmt.msc
pause
cls
@ECHO OFF
CLS
MODE CON: COLS=56 LINES=3
SET TITLE=ANDROID A10 - A13 WIPE ROM.
SET VERSION=2.0
SET MODIFY_LAST=01/9/2012

@call adb devices
cls
@call adb shell wipe data
cls
@call adb shell wipe cache
cls
@call adb reboot
cls
echo.
echo "Wait for Reboot WIPE ROM."
ping 1.1.1.1 -n 1 -w 4000 > NUL
 -----------------------------------------------------------
Sony boot loader unlock
-------------------------------------------------------------------------
@echo off
echo.
set /p unlockcode=Please Enter Your Unlock Code (16):
fastboot.exe -i 0x0fce getvar version
echo.
echo. Please Wait Your Unlocking
pause >nul
fastboot.exe -i 0x0fce oem unlock 0x%unlockcode%
echo. Finishing
echo.
GOTO exit

:exit
Exit
 -----------------------------------------------------------
Huawei boot loader unlock
 -----------------------------------------------------------
@echo off
echo.
set /p unlockcode=Please Enter Your Unlock Code (16):
fastboot devices
echo.
echo. Please Wait Your Unlocking
pause >nul
fastboot oem unlock %unlockcode%
echo. Finishing
echo.
GOTO exit

:exit
Exit
 -----------------------------------------------------------
Nexus And Other Devices Unlocking Bootloader Process
 -----------------------------------------------------------
@echo off
echo.
echo.===========================================================
echo.  Nexus And Other Devices Unlocking Bootloader Process
echo.===========================================================
echo.
pause
fastboot oem unlock
echo.
echo. Finishing !!!!
goto exit

:exit
goto exit
 -----------------------------------------------------------
Request token  for htc to unlock boot loader
 -----------------------------------------------------------
@echo off
echo.
echo.**************************
echo.*Request Identifier Token*
echo.**************************
echo.
pause
fastboot oem get_identifier_token
pause
GOTO exit

:exit
Exit
 -----------------------------------------------------------
I think you can make better bat file by learning my pretty small bat file .i am glad if you can make better than me …….welcome to you ,please comments if you know more, share your education here. and help the other people to improve like you…..
 -----------------------------------------------------------
https://www.facebook.com/mrko.su  (learning new things from Google and YouTube)I am just a learner and distributing and helping others without getting any money. And I enjoy helping……..
 -----------------------------------------------------------
If my learning guide useful for you, just like my page https://www.facebook.com/MusicSoftwareMedical (free education like page for new update Korea, japan, china, English musics and updated software, and updated medical news for international)
Thank you in advance
 -----------------------------------------------------------

No comments:

Post a Comment

300 250