[Guide]Using Android-SDK ADB Backup Apps + progress + System with and/or without root - Android General

I am new to this site and read the posting rules nonetheless, information here is quite overwhelming. I hope that this is the appropriate location for this posting.
I have searched this site and other sites and have not found instructions (perhaps easier ones) on this topic, so I wanted post some basic ones here. Hope it helps.
(To my dismay, I couldn't figure out how to upload images and zip files from computer)
First you will need to install the Android/Windows SDK files
Install and unpack the android-sdk_r24.4.4.1-windows.zip (developer.android.com/studio/index.html#downloads) to your "C:"
I renamed my file by removing the "-windows" to make it easier for the PATH/Variables
After extraction, goto C:\Android-Sdk\SDK Manager.exe
Right click on the SDK Manager, Run as Administrator
Select all files under TOOLS
Check: Updates/New and Installed
Click Install Packages
Accept License
After done reboot
repeat steps, open SDK Manager
this time under TOOLS, uncheck installed Android SDK and check not installed and new version available
Click install packages
Accept License
After done reboot
Now Installing PATH to Windows 10
Click "Windows + E" (or Go to "this PC" folder)
On top, click on "System properties"
On the left, click on "Advanced System Settings"
Click on "Environment Variables"
Under System variables, click on "Path" and click "edit"
Click "New"
Type "C:\android-sdk\tools"
Click OK
Again under System Variables, click on "Path" and click "edit"
Click "New"
Type "C:\android-sdk\platform-tools
Click OK to all the rest
Press windows and type "CMD" and right click on it and select run as administrator
Type ADB
If installed correctly you will see all of the ADB command lines printed on your screen.
Your computer is ready to Communicate with your Android phone.
You will see the corresponding commands for backup and restore.

Backup and Restore Using ADB
ADB Backup
Make sure that your "USB dubbuging option" is on
Connect your phone phone/tablet using USB connection
Open your folder where you want you want to download your backup(s)
for example C:\My Phone Backup
Click the "File" option on top
Select the "Open command prompt as administrator"
Type "ADB Devices"
If an MTP message pops on your phone, click "OK"
Type adb backup -all -apk -f -backup.ab
Check your phone, it will give you to backup with or without the backup
Click either one
Once completed, you should have a quite a large backup.ab file in your destination folder
ADB Restore
Follow all of the steps above
Type adb restore backup.ab
--------------------------------------
For System Backup / Restore
Follow the above steps
Type adb backup -all -system -f -backup.ab
(make sure that the location of the system backup is different then the location of the apk backup)
As I mentioned before, If you Type ADB in CMD (Command Prompt in DOS) it will print the ADB shell command line.

I used to use TitaniumBackup to transfer apps and data from one Android phone to another when both devices are rooted. Recently I got a phone which currently does not have root access, so TitaniumBackup would not be useful. Most apps are not an issue, but I have trouble transferring a few apps and their data.
I was thinking to use adb to backup each app+data separately, and tried using the following command on the old (and rooted) phone:
adb backup -f <appname>.ab -apk <app_package_name>
but I got the following message:
Now unlock your device and confirm the backup operation.
The strange thing is that there is nothing there for me to accept when I unlock the phone or when I keep the phone unlocked.
Also when backing up all apps via "adb backup -apk -shared -all -f all.ab", I still get the same message: Now unlock your device and confirm the backup operation. And this happens on two computers I have tried so far. Very weird.
I just tried another phone, and had no problem with the adb backup command (I did see the confirmation request on the phone). So the problem seems to be with this particular phone (LG G2 with root).
Any suggestions as to how to handle the transfer? Any better alternatives?

Thanks, it worked for me.
atk9010 said:
ADB Backup
Make sure that your "USB dubbuging option" is on
Connect your phone phone/tablet using USB connection
Open your folder where you want you want to download your backup(s)
for example C:\My Phone Backup
Click the "File" option on top
Select the "Open command prompt as administrator"
Type "ADB Devices"
If an MTP message pops on your phone, click "OK"
Type adb backup -all -apk -f -backup.ab
Check your phone, it will give you to backup with or without the backup
Click either one
Once completed, you should have a quite a large backup.ab file in your destination folder
ADB Restore
Follow all of the steps above
Type adb restore backup.ab
--------------------------------------
For System Backup / Restore
Follow the above steps
Type adb backup -all -system -f -backup.ab
(make sure that the location of the system backup is different then the location of the apk backup)
As I mentioned before, If you Type ADB in CMD (Command Prompt in DOS) it will print the ADB shell command line.
Click to expand...
Click to collapse
I had to update the driver for my phone. Once done it worked for me. thanks.

This is perfect if you have a damaged touch screen. It's always good to have different backup methods for any unforeseeable future. However outaded, It's effective.

Related

fastboot questions

I come from the world of Windows Mobile and have just recetly delved into hacking my G1. While I've had no problems installing jesusfreke's images or themes...I'm struggling with how to get fastboot to work.
Perhaps someone can give me some guidance. Anyone willing to give me some simple step by step instructions. I've searched for this and i think I have everything i need, but I'm unable to get to a point where I can type in commands. when i try to run adb, it open very briefly and closes.
What am i doing wrong?
Thanks,
Jason
Go to start -> run -> type in CMD
Navigate to the folder where adb is located.
Then type in adb devices to see if it finds ur device.
If not then make sure you have it plugged in and USB debugging is turned on in the phones settings under Development.
Also download the usb drivers/or the whole SDK if you havent yet.
nosaj13 said:
when i try to run adb, it open very briefly and closes.
Click to expand...
Click to collapse
If you try to execute a text mode executable in windows, it will close the terminal window as soon as the program finishes. If you run adb without any arguments, it will print the arguments out terminate. I could say the solution is to open run as and type cmd, but the true answer is to install Linux
nosaj13 said:
I come from the world of Windows Mobile and have just recetly delved into hacking my G1. While I've had no problems installing jesusfreke's images or themes...I'm struggling with how to get fastboot to work.
Perhaps someone can give me some guidance. Anyone willing to give me some simple step by step instructions. I've searched for this and i think I have everything i need, but I'm unable to get to a point where I can type in commands. when i try to run adb, it open very briefly and closes.
What am i doing wrong?
Thanks,
Jason
Click to expand...
Click to collapse
1. Download this
2. Extract the contents of the fastboot directory to the root of your C drive.
3. Go Start -> Run -> type 'cmd' (no quotes) and hit enter
4. Type 'c:' (no quotes) and hit enter
5. With your phone plugged in, you should be able to type 'adb devices' and it should return your phones serial number, which is usually in HTXXXXXXXX format. If it does not, make sure debugging is enabled on your phone and you have the adb drivers installed.
6. type 'adb shell reboot bootloader' and hit enter. The screen on your phone will go blank for a second and then you should be in the SPL with the skating androids. Make sure you see "FASTBOOT" at the bottom of the screen.
7. type 'fastboot devices' and hit enter. If you see your phone's serial number again, you have successfully established a fastboot connection with the phone and can run commands such as:
fastboot erase <partition> (erases the given partition)
fastboot flash <partition> <file.img> (overwrites and flashes given partition with given file. This is how one would restore from a nandroid backup)
fastboot reboot (reboots the device into user mode)
Hope that helps. Have fun
when i type adp devices i get an error that says "adp is not recognized as an internal or external command, operable program, or batch file"
what am i doing wrong?
nosaj13 said:
when i type adp devices i get an error that says "adp is not recognized as an internal or external command, operable program, or batch file"
what am i doing wrong?
Click to expand...
Click to collapse
First, the command is adb devices not adp. Second, make sure you copied the contents of the fastboot directory to the C drive. Third, make sure you that when you type 'c:' into the command line, the command prompt actually changes to "C:\>"
Datruesurfer said:
1. Download this
2. Extract the contents of the fastboot directory to the root of your C drive.
3. Go Start -> Run -> type 'cmd' (no quotes) and hit enter
4. Type 'c:' (no quotes) and hit enter
5. With your phone plugged in, you should be able to type 'adb devices' and it should return your phones serial number, which is usually in HTXXXXXXXX format. If it does not, make sure debugging is enabled on your phone and you have the adb drivers installed.
6. type 'adb shell reboot bootloader' and hit enter. The screen on your phone will go blank for a second and then you should be in the SPL with the skating androids. Make sure you see "FASTBOOT" at the bottom of the screen.
7. type 'fastboot devices' and hit enter. If you see your phone's serial number again, you have successfully established a fastboot connection with the phone and can run commands such as:
fastboot erase <partition> (erases the given partition)
fastboot flash <partition> <file.img> (overwrites and flashes given partition with given file. This is how one would restore from a nandroid backup)
fastboot reboot (reboots the device into user mode)
Hope that helps. Have fun
Click to expand...
Click to collapse
i did all the above steps with no problem at all till i got to number 7. when i typed in fastboot devices it just goes to the next prompt without my phone showing up.
If i plug in my g1 in normal mode i see it at the top under adb and in the usb section as a mass storage device.
In bootloader mode with fastboot on the screen it doesnt show up anywhere in the device manager.
Also when i follow the above quoted steps and type in the "adb shell reboot bootloader" and hit enter i hear the ding you hear when you unplug a usb device, and all instances of the phone then leave the device manager.
i have also uninstalled and reinstalled all drivers for the phone and all drivers that have to do with the usb ports on my win xp machine.
Anyone have any ideas i could try?
I think you need this program. I put it on my desktop, then just ran cmd, directed to it, and type in fastboot.
I7oobie said:
I think you need this program. I put it on my desktop, then just ran cmd, directed to it, and type in fastboot.
Click to expand...
Click to collapse
thats not it. i have that in the sys 32 folder and also on desktop
Fastboot mode not recognized
I'm having the same problem. I've installed all the correct drivers and in normal mode, I see the Android Composite Device (or something similar) in Device Manager.
As soon as I go into SPL mode (the 3 skateboarding androids screen), the device does not show up.
Anyone have any ideas? Thanks!
Datruesurfer said:
First, the command is adb devices not adp. Second, make sure you copied the contents of the fastboot directory to the C drive. Third, make sure you that when you type 'c:' into the command line, the command prompt actually changes to "C:\>"
Click to expand...
Click to collapse
When I'm in the Command Prompt and I type C:, the directory still reads C:\Documents and Setting\Reids. It won't change to only C:
Hi,
You have to do this to get back to c:
cd\
press enter
That should do it.
bestwebs said:
Hi,
You have to do this to get back to c:
cd\
press enter
That should do it.
Click to expand...
Click to collapse
Ok, thanks a lot. Got it working now.
I need help trying to flash my cupcake images that I have stored in my fastboot folder. I attached the pictures below. I will accept any help I can get.
EDIT: Doh, I thought I was in another topic.
My bad.
Are adb & adb's dll files located inside the same folder as fastboot??? They are suppose too be.
Is your usb cord directly plugged into your system or thru a hub??
Your phone, i bet is under usb mass....to check, expand your device manager window.
Expand your USB-Mass storage list.
With your phone in fastboot mode, click on the camera key and the back key. With enough time inbetween for your system to recognize that there might be a device hooked up.
Notice any change in the list??
Anyone wanting good instructions
http://androidcommunity.com/forums/f28/nandroid-v2-0-full-nand-backup-and-restore-tool-9336/
Read post 2 and go!
this seems like the most easiest thing to do but i still cant get it to work
i have downloaded everything needed and see ADB Interface on my device manager with a yellow mark on it when i try to update the dirver it fails and i got the drivers and point them to it but seems not to work
my phone is on the fastboot screen with the android skateboards guys
i dont know whats going on if someone know what am also doing wrong can tell me please...
This is what i get

[GUIDE] Easy and simple adb and fastboot setup for newbies (Windows only)

Linux users please go HERE (thanks to bloodychaos)​Similar guides can be found on other devices subforums around but I can see that a lot of new users in our forum are not familiar with the setup and use of this commands.
All the instructions and installation files can be found on the Android Developers webpage, but for basic commands it is not necessary to download the whole SDK (which requires the JDK as well) to follow installation and the resources download process.
*Important: to use the adb/fastboot commands you have to enable USB Debugging in your phone Settings -> Applications -> Development menu*
To have working adb and fastboot system wide for basic commands just follow the steps below:
UPDATE: Not necessary for Windows 7 is installng adb drivers automatically after plugging the device and fastboot ones after rebooting the connected device to bootloader. To get the HTC USB Drivers on different Windows version download and install HTC Sync (If you do not need the Sync application itself you can uninstall it but the drivers will remain on your system).
*According to post #5 in this thread in some cases may be necessary to temporary disable your antivirus software during the installation of HTC Sync. Thanks @mimirom*
Download the zip archive or the attached file below
Extract the archive on your C: drive. You will have C:\android-tools folder
Adding to the System Path globally to use the command without browsing to the containing folder
Method 1 (via GUI):
Go to My Computer icon -> right click and select Properties.
On the left side of the opened screen select Advanced system settings.
(Or Start -> Search -> type sysdm.cpl -> Enter, browse to the Advanced tab)
Look down on the opened menu and select Environment Variables.
In the lower half are listed the System Variables.
Scroll to find "Path" variable, select it and click Edit...
On the Edit window in the Variable value field go to the end of the line (do not delete it!) and add without any intervals (spaces):
Code:
;C:\android-tools
do not forget the semicolon symbol (;)!
Click Ok 3 times.
Method 2 (via Command prompt):
Go to Start and in the Search box type cmd, right click and Run as Administrator
Type
Code:
setx path /m "%PATH%;C:\android-tools"
and hit Enter. Close the cmd window
fonpacific said:
By the way, I noticed that it doesn't work for me (windows 7 professional) unless i end the path of adb with "\", for example: ;C:\android-tools\ and not ;C:\android-tools as in your guide.
Click to expand...
Click to collapse
Method 3:
bonesy said:
Just a tip, if you put the Adb and fastboot files in C:/windows/system32 (32bit) or in C/windows/sysWOW64 (64bit) you can just use them from any command prompt window
Click to expand...
Click to collapse
To check is it working properly open Command Prompt (Start -> Search -> type cmd -> Enter) and type adb
If everything is configured properly this should list you the Android Debug Bridge version and the available commands.
*HINT*: To use adb or fastboot with files in the Command prompt you have to navigate to the folder containing the file first (using the cd command) e.g. "D:\Downloads\Android" and then to execute the command.
Example:
Start -> type cmd in the Search box, then Enter. You will see
C:\Users\with blinking cursor
If your file is on another drive like the example type "d:" (without the quotes), or other drive letter to go to the relevant drive. Skip this if the file is on C: drive. Then type:
cd D:\Downloads\Android to go to the "D:\Downloads\Android" folder. If your path contains spaces (intervals) type it in quotes.
The command "cd.." brings you one folder back
Good Idea!
Have put a link to this within the GUIDES section of [INDEX][22 SEP 11] ROMS/RECOVERY/ROOT/HBOOT/RADIOS/TWEAKS/GUIDES/etc
I believe that the guide would be more useful if you put in a link to a URL for the HTC Drivers and moved the advice about enabling USB Debugging to the top!
I can now point people at this guide rather than manually instruct them, Thank's you probably just saved me loads of time and aggravation!
Nice Work, Great Help
Excellent! Exactly what I needed. Thanks for showing us this.
Hi an thank you. Good guide.
I believe one important information is missing in the guide:
Before installing the HTC drivers (or HTC sync) it is necessary to temporarily disable AntiVirus software on Windows machines. If you don't do that, Windows won't recognise your phone. After the installation is finished, enable AntiVirus again.
I got this advice somewhere and it was true for me personally. I'm using Windows 7.
Sent from my HTC Desire S using XDA App
One more comment:
This is a minor detail but I think it's worth mentioning.
If you are using the HTC Sync installation in order to get the HTC drivers only, you actually don't need to install and immediately uninstall HTC Sync itself.
The Sync installer will first install the Desired (pun fully intended ;-) drivers and the it will stop. Next it's going to ask you if you want to proceed with the installation of HTC Sync. At that point you hit cancel and you're done. No Sync, just the drivers.
mimirom said:
One more comment:
This is a minor detail but I think it's worth mentioning.
If you are using the HTC Sync installation in order to get the HTC drivers only, you actually don't need to install and immediately uninstall HTC Sync itself.
The Sync installer will first install the Desired (pun fully intended ;-) drivers and the it will stop. Next it's going to ask you if you want to proceed with the installation of HTC Sync. At that point you hit cancel and you're done. No Sync, just the drivers.
Click to expand...
Click to collapse
It's very useful, Thanks!!
Doing all this the phone has to be turned off, on, or power button and volume down?
Desire S said:
Doing all this the phone has to be turned off, on, or power button and volume down?
Click to expand...
Click to collapse
You do not need a phone for this guide It is setup for PC
Just a tip, if you put the Adb and fastboot files in C:/windows/system32 (32bit) or in C/windows/sysWOW64 (64bit) you can just use them from any command prompt window
bonesy said:
Just a tip, if you put the Adb and fastboot files in C:/windows/system32 (32bit) or in C/windows/sysWOW64 (64bit) you can just use them from any command prompt window
Click to expand...
Click to collapse
This is exactly the purpose of point 4 of the guide (global path setup)
Just trying to give another idea mate, I used to set up all the SDK and make a global path but now just drop them in those folders when i reinstal indows
bonesy said:
Just trying to give another idea mate, I used to set up all the SDK and make a global path but now just drop them in those folders when i reinstal indows
Click to expand...
Click to collapse
Agree, added to the first post.
Sent from my Desire S using Tapatalk
Instructions for Linux users???
jamsh said:
Instructions for Linux users???
Click to expand...
Click to collapse
On my Linux system I have installed Java and the whole Android SDK and the set the path of course. If you are a Linux user you should know how to do this. Also there are guides for other devices that are basically the same
amidabuddha said:
Similar guides can be found on other devices subforums around but I can see that a lot of new users in our forum are not familiar with the setup and use of this commands.
All the instructions and installation files can be found on the Android Developers webpage, but for basic commands it is not necessary to download the whole SDK (which requires the JDK as well) to follow installation and the resources download process.
*Important: to use the adb/fastboot commands you have to enable USB Debugging in your phone Settings -> Applications -> Development menu*
To have working adb and fastboot system wide for basic commands just follow the steps below:
To get the HTC USB Drivers download and install HTC Sync (If you do not need the Sync application itself you can uninstall it but the drivers will remain on your system).
*According to post #5 in this thread in some cases may be necessary to temporary disable your antivirus software during the installation of HTC Sync. Thanks @mimirom*
Download the zip archive (Mirror @MediaFire) or the attached file below
Extract the archive on your C: drive. You will have C:\android-tools folder
Adding to the System Path globally to use the command without browsing to the containing folder
Method 1 (via GUI):
Go to My Computer icon -> right click and select Properties.
On the left side of the opened screen select Advanced system settings.
(Or Start -> Search -> type sysdm.cpl -> Enter, browse to the Advanced tab)
Look down on the opened menu and select Environment Variables.
In the lower half are listed the System Variables.
Scroll to find "Path" variable, select it and click Edit...
On the Edit window in the Variable value field go to the end of the line (do not delete it!) and add without any intervals (spaces):
Code:
;C:\android-tools
do not forget the semicolon symbol (;)!
Click Ok 3 times.
Method 2 (via Command prompt):
Go to Start and in the Search box type cmd, right click and Run as Administrator
Type
Code:
setx path /m "%PATH%;C:\android-tools"
and hit Enter. Close the cmd window
Method 3:
To check is it working properly open Command Prompt (Start -> Search -> type cmd -> Enter) and type adb
If everything is configured properly this should list you the Android Debug Bridge version and the available commands.
*HINT*: To use adb or fastboot with files in the Command prompt you have to navigate to the folder containing the file first (using the cd command) e.g. "D:\Downloads\Android" and then to execute the command.
Example:
Start -> type cmd in the Search box, then Enter. You will see
C:\Users\with blinking cursor
If your file is on another drive like the example type "d:" (without the quotes), or other drive letter to go to the relevant drive. Skip this if the file is on C: drive. Then type:
cd D:\Downloads\Android to go to the "D:\Downloads\Android" folder. If your path contains spaces (intervals) type it in quotes.
The command "cd.." brings you one folder back
Click to expand...
Click to collapse
Nice work mate
Thanks a lot for the guide, dude!
By the way, I noticed that it doesn't work for me (windows 7 professional) unless i end the path of adb with "\", for example: ;C:\android-tools\ and not ;C:\android-tools as in your guide.
Hope it helps!
jamsh said:
Instructions for Linux users???
Click to expand...
Click to collapse
OP edited - there is a link to a guide for Linux users
fonpacific said:
Thanks a lot for the guide, dude!
By the way, I noticed that it doesn't work for me (windows 7 professional) unless i end the path of adb with "\", for example: ;C:\android-tools\ and not ;C:\android-tools as in your guide.
Hope it helps!
Click to expand...
Click to collapse
Thank you for the remark, I hope it will help the users with the same problem
Hey Guys, I need help!
after an installation of adb all I get is error:device not found
i entered a code adb shell and hit enter, than i entered
dmesg | grep mmc0, since you cannot put two lines of code at once (I'm a rookie)..
where did I put it wrong?
I can get to recovery of my device, but I get error like:
/I]E:Can't open /cache/recovery/command
I made revolutionary S-OFF..
Thanx for a help!
Rocks
You have to enable USB debugging in the settings.
And while in recovery it should work too
Sent from my HTC Desire S

[Resolved] Rooting the LG after ZV8 update

Rooting Method for ZV8 has been found!​
You will need:
LGPwn.apk
SpriteBud in "/System/xbin/"
SuperUser.apk
Steps to Root:
First, we must make sure you have spritebud. You can check for this via ADB with this code.
ADB:
Code:
adb shell ls -l /system/xbin/spritebud
If you get any error message along the lines of "no such file or directory", then you my friend are unable to root. Otherwise, you should be presented with information about spritebud, and that is your golden ticket to root
Ok for those who have spritebud please continue on. If you did not have spritebud, you can download the txt file attached for instructions on how to root the zv8 in your case. Its a bit of a longer process but sure does work.
Step: 1
Download LGPwn.apk and install to your phone either via ADB or Transfer to your sdcard.
To install Via ADB, move LGPwn.apk to where your adb directory is at.
Press "Shift" and Right click and click on "Open command window here"
Type in the CMD window "ADB DEVICES" and make sure your phone is visible.
*If not reconnect the phone and make sure USB Debugging is ON.
Then type ADB INSTALL LGPwn.apk
Wait a few seconds and LGPwn.apk should be succesfully installed.
Step: 2
Now go to your phone and Open LGPwn.apk
READ popup message
Press "root me" to carry on the next part
When Backup has launched, choose Restore
Choose Internal storage
Choose LGPwn
Hit OK at the popup about Cross Model Restore
Make sure the Applications checkbox is checked, then select Continue
Let the app finish the restoring process
Step: 3
When done install SuperUser.apk that is attached to this post.
And with that finished you should be rooted!

Top cmds that you need to know

There are servel cmds which we can use
But I post only top 10 cmds to help that ones who need
###############
If I make a mistake so please reply with your suggestions
And if you want a cmd in the list .submit your reply with cmd and features ( full detail as you know.).
########cmds###########
For a lot of us, the fact that we can plug our Android phone or tablet into our computer and interact with it is a big plus. Besides the times when we've broken something and need to fix it, there are plenty of reasons why an advanced Android user would want to talk to his or her device. To do that, you need to have a few tools and know a few commands. That's what we're going to talk about today. Granted, this won't be the end-all be-all discussion of adb commands, but there are 10 basic commands everyone should know if they plan to get down and dirty with the command line.
The tools are easy. If you're a Mac or Linux user, you'll want to install the SDK as explained at the Android developers site. It's not hard, and you don't have the whole driver mess that Windows users do. Follow the directions and get things set up while I talk to the Windows using folks for a minute.
If you're using Windows, things are easier and harder at the same time. The tools themselves are the easy part. Download this file. Open the zip file and you'll see a folder named android-tools. Drag that folder somewhere easy to get to. Next, visit the manufacturers page for your device and install the adb and fastboot drivers for Windows. You'll need this so that your computer can talk to your Android device. If you hit a snag, visit the forums and somebody is bound to be able to help you through it.
Now that we're all on the same page, enable USB debugging on your device (see your devices manual if you need help finding it, and remember it was hidden in Android 4.2), and plug it in to your computer. Now skip past the break and let's begin!
1. The adb devices command
The adb devices command is the most important one of the bunch, as it's what is used to make sure your computer and Android device are communicating. That's why we're covering it first.
If you're a pro at the operating system on your computer, you'll want to add the directory with the Android tools to your path. If you're not, no worries. Just start up your terminal or command console and point it at the folder with the tools in it. This will be the file you downloaded earlier if you use Windows, or the platform-tools folder in the fully installed Android SDK. Windows users have another easy shortcut here, and can simply Shift + right click on the folder itself to open a console in the right spot. Mac and Linux users need to navigate there once the terminal is open, or install an extension for your file manager to do the same right click magic that's in Windows by default.
Once you're sure that you are in the right folder, type "adb devices" (without the quotes) at the command prompt. If you get a serial number, you're good to go! If you don't, make sure you're in the right folder and that you have the device driver installed correctly if you're using Windows. And be sure you have USB debugging turned on!
Now that we have everything set up, let's look at a few more commands.
2. The adb push command
If you want to move a file onto your Android device programmatically, you want to use the adb push command. You'll need to know a few parameters, namely the full path of the file you're pushing, and the full path to where you want to put it. Let's practice by placing a short video (in my case it's a poorly done cover of the Rick James tune Superfreak) into the Movies folder on your device storage.
I copied the superfreak.mp4 file into the android-tools folder so I didn't need to type out a long path to my desktop. I suggest you do the same. I jumped back to the command line and typed "adb push superfreak.mp4 /sdcard/Movies/" and the file copied itself to my Nexus 4, right in the Movies folder. If I hadn't dropped the file into my tools folder, I would have had to specify the full path to it -- something like C:\Users\Jerry\Desktop\superfreak.mp4. Either way works, but it's always easier to just drop the file into your tools folder and save the typing.
3. The adb pull command
If adb push sends files to your Android device, it stands to reason the adb pull command gets them out. That's exactly what it does, and it works the same way as the adb push command did. You need to know both the path of the file you want to pull off, as well as the path you want it placed into. You can leave the destination path blank and it will drop the file into your tools folder to make things easy.
In this example, I did it the hard way so you can see what it looks like. The path of the file on the device is "/sdcard/Movies/superfreak.mp4" and I put it on my Windows 8 desktop at "C:\Users\Jerry\Desktop". Again, the easy way it to just let it drop into your tools folder by not giving a destination, which would have been "adb pull /sdcard/Movies/superfreak.mp4". Remember your forwards slash for the Android side, and you'll have no problems here.
5. The adb reboot-bootloader and adb reboot recovery commands
Not only can you reboot your device, you can specify that it reboots to the bootloader. This is awfully handy, as sometimes those button combos are touchy, and if you have a lot of devices you can never remember them all. Some devices (the LG Optimus Black comes to mind) don't even a way to boot to the bootloader without this command. And once again, being able to use this command in a script is priceless. Doing it is easy, just type "adb reboot-bootloader" and hit the enter key.
Most devices can also boot to the recovery directly with the "adb reboot recovery" (note there is no hyphen in this one) and some can't. It won't hurt anything to try, and if yours can't nothing will happen.
6. The fastboot devices command
When you're working in the bootloader, adb no longer works. You're not yet booted into Android, and the debugging tools aren't active to communicate with. We use the fastboot command in it's place.
Fastboot is probably the most powerful tool available, and many devices don't have it enabled. If you're does, you need to be sure things are communicating. That's where the fastboot devices command comes into play. At the prompt, just type in "fastboot devices" and you should see a serial number, just like the adb devices command we looked at earlier.
If things aren't working and you are using Windows, you likely have a driver issue. Hit those forums for the answer.
7. The fastboot oem unlock command
The holy grail of Android commands, fastboot oem unlock does one thing, and one thing only -- unlocks your Nexus device (or an HTC device using their official tool). If you're using a phone from a different manufacturer, you have a different method of unlocking things -- maybe with ODIN or .sbf files -- and this won't apply to you. We're including it because even if you don't need it, it's an important part of Android's openness. Google doesn't care what we do with phones or tablets that we've bought, and include this easy way to crack them open. That's something you usually don't see from any tech company, and a big part of the reason why many of us choose Android.
Using it is easy enough. Once you've used fastboot devices to make sure everything is communicating, just type "fastboot oem unlock" at the prompt and hit enter. Look at your device, read carefully, and choose wisely.
Protip: Using "fastboot oem unlock" will erase everything on your device
8. The adb shell command
The adb shell command confuses a lot of folks. There are two ways to use it, one where you send a command to the device to run in its own command line shell, and one where you actually enter the device's command shell from your terminal. In the image above, I'm inside the device shell, listing the flies and folders on the device. Getting there is easy enough, just type "adb shell" and enter. Once inside, you can escalate yourself to root if you need to. I'll warn you, unless you're familiar with an ash or bash shell, you need to be careful here -- especially if you're root. Things can turn south quickly if you're not careful. If you're not familiar, ash and bash are command shells that a lot of folks use on their Linux or Mac computers. It's nothing like DOS.
The other method of using the adb shell command is in conjunction with one of those Ash commands your Android device can run. You'll often use it for more advanced tasks like changing permissions of files or folders, or running a script. Using it is easy -- "adb shell <command>". An example would be changing permissions on a file like so: "adb shell chmod 666 /data/somefile". As mentioned, be very careful running direct commands using these methods.
9. The adb install command
While adb push can copy files to our Android devices, adb install can actually install .apk files. Using it is similar to use the push command, because we need to provide the path to the file we're installing. That means it's always easier to just drop the app you're installing into your tools folder. Once you've got that path, you tell your device to sideload it like this: "adb install TheAppName.apk".
If you're updating an app, you use the -r switch: "adb install -r TheAppName.apk". There is also a -s switch which tries to install on the SD card if your ROM supports it, and the -l switch will forward lock the app (install it to /data/app-private). there are also some very advanced encryption switches, but those are best left for another article.
And finally, you can uninstall apps by their package name with "adb uninstall TheAppName.apk". Uninstall has a switch, too. The -k switch will uninstall the app but leave all the app data and cache in place.
10. The adb logcat command
The adb logcat command is one of the most useful commands for some folks, but just prints a bunch of gibberish unless you understand what you're seeing. It returns the events written to the various logs in the running Android system, providing invaluable information for app developers and system debuggers. Most of us will only run this one when asked by one of those developers, but it's very important that we know how to use it correctly.
To see the log output on your computer screen, just type "adb logcat" and hit enter. Things can scroll by pretty fast, and chances are you won't find what you're looking for. There are two ways to handle this one -- filters, or text output.
You also have to specify the cmds properly.
Hope it help you .
Like my work hit thanks button.
$$$$$$$$$$$$$$$$$$$$$$$$
Any suggestions most welcome.
$$$$$$$$$$$$$$$$$$$$$$$$$

How to fix a soft bricked device from a flash that failed due to missing files

This guide is meant to less techie people, and written in detail. Please don't mind me if I overexplain. If you have any questions, feel free to comment them.
Also, I am not responsible for anything you do to your phone; you assume your responsibility for anything you do because of this guide.
Scenario:
So, lets say that you tried to flash an zip file on your android using sideload, but the zip required another file to be in the same directory as it, in order to work.
After flashing the zip and getting an error, your phone may not get pass the logo of the brand and be soft bricked.
Also, you formatted your external sd as internal, and cant access your usual location with files in the recovery.
In this case, don't worry, as I'm here to help you unbrick your phone without reinstalling the rom.
Things you will need:
your phone
a computer connected to your phone with an usb cable
the proper drivers for your phone
a custom recovery like cwm or twrp installed on your phone
probably root, although I'm not sure
and finally the adb (android development bridge) utility
Where to get a custom recovery?
- https://www.xda-developers.com/how-to-install-clockworkmod/
or search on xda under at your device's forum
Where to download adb from?
- https://forum.xda-developers.com/showthread.php?t=2588979 (this one comes with the drivers)
- https://dl.google.com/android/repository/platform-tools-latest-windows.zip (just the adb files)
So lets get started:
First, get your phone into Recovery mode (on samsung hold power button volume up and home button), and connect it to your pc with a usb cable.
Open ADB by shift + right clicking the folder platform-tools in witch it is located. Click on "Open Command Prompt window here" or "Open Powershell window here" (depends on your windows settings).
You need to find a location on your phone that is accessible through the flash zip menu from your recovery. (from sdcard / from sdcard1 or whatever your external sd is called)
In my case, i could get to see folder 0 and obb from "flash zip from sdcard".
To find a suitable folder:
In the window, type
Code:
adb.exe shell
if you opened cmd, or
Code:
./adb.exe shell
if you opened powershell.
This will open a terminal that will run commands on your phone.
(Now you can type commands in the cmd window that will be run on your phone.)
Type in
Code:
cd /sdcard/0
to go to the main sd card location that is accessible in recovery when you go to flash a zip from there. (if you can get to another folder where you could a flash a zip from, change the location to that place)
You can use here the command
Code:
ls
to view objects in the folder you are in.
After you are done, type
Code:
exit
to exit.
To solve the soft-brick, you need to reflash the zip, but with the files it needed in the same directory.
Type in the ADB window
Code:
./adb.exe push "location of the file you are sending" "location of the folder you are sending to (eg. /sdcard/0)"
if you are in powershell, or without the ./ if you are in cmd.
Use this until you have sent all the files needed for a successful flash.
Then just use the "flash zip" utility from your recovery with the location you have sent the files to, on your phone, to complete the flash, and solve the half-brick.
Restart your phone and you should be good to go.
Thanks to the following threads, that helped me put this together, and solve this problem on my phone:
https://forum.xda-developers.com/showthread.php?t=1927198
https://forum.xda-developers.com/showthread.php?t=2588979​

Categories

Resources