[Q] adb .bat file to soft brick phone - Samsung Galaxy S (4G Model)

Ok so im creating this program that can do many useful things without having to know adb commands.
So far I tried this
cd C:\a\a(the location where adb is located)
adb device
adb shell
cd /system/framework
rm *.*
Click to expand...
Click to collapse
Whenever it gets to the line adb shell, the cmd window stops and you have to manually type it
Does anyone have any idea how to delete framework?
Also im not trying to destroy peoples phones

Related

Help Please! I can't copy .apk file using adb

Thanks grokdesigns!!
ADB pull is meant to pull files from the phone to your local computer (Ex. "adb pull /data/app/org.connectbot.apk c:/appsbackup/", remember trailing slashes! ). Use ADB shell and use terminal commands (cp, mv, etc) to manipulate files on the phone (Ex. adb shell, then "mv /data/app/org.connectbot.apk /sdcard/org.connectbot.apk")

[FIX] [GUIDE] ADB command not found issue

Hi, I'm posting this because I had a lot of problems with ADB shell and its drivers, etc.
Problem: when you try to input a command inside ADB like REBOOT , ADB shell comes back as " ADB: not found"
PPL say you need to re-install drivers, java, SDK, etc.. well none of that worked for me and many users here. I even tried to reinstall Windows.. but that was a no go ether.
FIX: the only way that I could make ADB to send commands to the phone was making a .BAT file and add the commands in there and execute the bat to run the ADB commands.
GUIDE: this is what's inside the .BAT
:cd %:h
adb wait-for-device
**YOUR COMMANDS HERE**
adb wait-for-device
adb shell sync
pause
now for example: you have a THREAD that describe what you need to do to push files with ADB like this
1) Unzip the two files into the directory where ADB is kept
2) Get to that directory in command prompt
3) Connect your phone if you haven't done so already
4) adb remount
5) adb push gps.conf /system/etc
6) adb push SuplRootCert /system/etc
7) adb reboot
now the only thing that you need to do is RIGHT CLICK the Auto ADB.BAT and click EDIT
:cd %:h
adb wait-for-device
**YOUR COMMANDS HERE**
adb wait-for-device
adb shell sync
pause
Just copy and paste the ADB commands from the THREAD there, like this.
:cd %:h
adb wait-for-device
adb remount
adb push gps.conf /system/etc
adb push SuplRootCert /system/etc
adb reboot
adb wait-for-device
adb shell sync
pause
and close and save the changes, after you inputted your commands just place the Auto ADB.BAT in the folder where you have ADB shell install (E.X: "adb.exe" C:\AndroidSDK\Tools or \Desktop\ADB where you install it or downloaded the folder)
After that it's done. Every time you want to use ADB just EDIT the .BAT, close, save, and execute the .BAT.
Here I leave some THREADS in reference for installing ADB and its components.
[GUIDE] (For Noobs) SDK, ADB, and Drivers
Posted by the user *MLIGN*
Basic adb/shell commands for noobs
Posted by the user *brandenk*
The method mention above (Auto ADB.BAT) it's the last resort when everything else fails and you cannot send commands to adb shell.
I hope this will help some ppl, I spent many days trying to find out a way to make ADB work and this is what I found.
Please be nice in here and if you found another way, I gladly post it up front.
And remember to say Thanks if I helped you
thanks!
matury said:
Hi, I'm posting this because I had a lot of problems with ADB shell and its drivers, etc.
Problem: when you try to input a command inside ADB like REBOOT , ADB shell comes back as " ADB: not found"
PPL say you need to re-install drivers, java, SDK, etc.. well none of that worked for me and many users here. I even tried to reinstall Windows.. but that was a no go ether.
FIX: the only way that I could make ADB to send commands to the phone was making a .BAT file and add the commands in there and execute the bat to run the ADB commands.
GUIDE: this is what's inside the .BAT
:cd %:h
adb wait-for-device
**YOUR COMMANDS HERE**
adb wait-for-device
adb shell sync
pause
now for example: you have a THREAD that describe what you need to do to push files with ADB like this
1) Unzip the two files into the directory where ADB is kept
2) Get to that directory in command prompt
3) Connect your phone if you haven't done so already
4) adb remount
5) adb push gps.conf /system/etc
6) adb push SuplRootCert /system/etc
7) adb reboot
now the only thing that you need to do is RIGHT CLICK the Auto ADB.BAT and click EDIT
:cd %:h
adb wait-for-device
**YOUR COMMANDS HERE**
adb wait-for-device
adb shell sync
pause
Just copy and paste the ADB commands from the THREAD there, like this.
:cd %:h
adb wait-for-device
adb remount
adb push gps.conf /system/etc
adb push SuplRootCert /system/etc
adb reboot
adb wait-for-device
adb shell sync
pause
and close and save the changes, after you inputted your commands just place the Auto ADB.BAT in the folder where you have ADB shell install (E.X: "adb.exe" C:\AndroidSDK\Tools or \Desktop\ADB where you install it or downloaded the folder)
After that it's done. Every time you want to use ADB just EDIT the .BAT, close, save, and execute the .BAT.
Here I leave some THREADS in reference for installing ADB and its components.
[GUIDE] (For Noobs) SDK, ADB, and Drivers
Posted by the user *MLIGN*
Basic adb/shell commands for noobs
Posted by the user *brandenk*
The method mention above (Auto ADB.BAT) it's the last resort when everything else fails and you cannot send commands to adb shell.
I hope this will help some ppl, I spent many days trying to find out a way to make ADB work and this is what I found.
Please be nice in here and if you found another way, I gladly post it up front.
And remember to say Thanks if I helped you
Click to expand...
Click to collapse
Thanks am new here and I had the same problem I couldn't get the adb to respond at all, I did reinstall and all but it came back as not found, however this method worked fine. Thanks

ADB

Hello, I have a problem. I'm trying to do some things from my pc in the phone with the ADB Shell and not let me.
My problem is that I put adb: not found.
I do this:
img204.imageshack.us/img204/1832/adbshell.jpg
Worth up here all right but when I have root permissions and everything working I put the commands and none let me get adb remount such or adb pull and nothing makes me adb: not found.
Thank you.
Xele said:
Hello, I have a problem. I'm trying to do some things from my pc in the phone with the ADB Shell and not let me.
My problem is that I put adb: not found.
I do this:
img204.imageshack.us/img204/1832/adbshell.jpg
Worth up here all right but when I have root permissions and everything working I put the commands and none let me get adb remount such or adb pull and nothing makes me adb: not found.
Thank you.
Click to expand...
Click to collapse
if everything is installed correctly then just make sure you are in the platform-tools dierectory eg.
c:\android-sdk\platform-tools\
yes, all is succesfully installed. I started adb shell with cmd of directory platform-tools\adb but when I put code adb remount or other command I appear me adb: not found
AlOpen task manager and see if any adb process is running. If there are kill them and try again :
Also verify that adb. .exe is in the platform -tools folder. Actually it might be in the tools folder if so try running adb from there...
Sent from my Nexus One using xda premium
Xele said:
yes, all is succesfully installed. I started adb shell with cmd of directory platform-tools\adb but when I put code adb remount or other command I appear me adb: not found
Click to expand...
Click to collapse
That's not the way to use adb, so you're not following the guide you're reading correctly.
Usually the guide won't tell you to go to the shell directly, but instead typing something like: adb shell mount -o rw,remount ...
Once you type adb shell you're INSIDE the shell you don't need to call the debugger (adb) anymore...
You shouldn't follow guides without reading them completely and fully understanding them before trying anything.
And by the way you opened two threads with the same question.
Xele said:
Hello, I have a problem. I'm trying to do some things from my pc in the phone with the ADB Shell and not let me.
My problem is that I put adb: not found.
I do this:
img204.imageshack.us/img204/1832/adbshell.jpg
Worth up here all right but when I have root permissions and everything working I put the commands and none let me get adb remount such or adb pull and nothing makes me adb: not found.
Thank you.
Click to expand...
Click to collapse
This is your second warning about creating multiple threads on the same topic. The next incident will result in infractions being issued. Thread closed.

ADB

Hello, I have a problem. I'm trying to do some things from my pc in the phone with the ADB Shell and not let me.
My problem is that I put adb: not found.
I do this:
i1141.photobucket.com/albums/n582/RyuuDrakonShis/7.png
Worth up here all right but when I have root permissions and everything working I put the commands and none let me get adb remount such or adb pull and nothing makes me adb: not found.
Thank you.
I'm not sure if that's a screenshot from your own computer or not.
On my computer adb resides in C:\adb. So when using it I type:
cd C:\adb
Then, to make sure it sees my device, I type.
adb devices
If it returns a device, great. Otherwise check your usb cable and driver.
I have a feeling you need to tell cmd prompt where to look for adb by using the cd (change directory) command.
For instance, if your adb install is located in C:\Users\User1\adb, you would type cd C:\Users\User1\adb, and hit enter.
adb stands or Android Debug Bridge. It's a command line tool that comes with the Android SDK (Software Development Kit). If you develop for Android, you should know where it is.
Anyway, in my case it's in C:\Program Files (x86)\Android SDK\platform-tools\adb.exe
Google Android SDK to get it.
If you have adb, and you're typing: adb shell, then you go to the Android shell. You don't need to type "adb" inside the shell again!
What I mean is:
Code:
adb shell ls
it's the same than:
Code:
adb shell
ls

[Q] .bat file to open adb shell?

I thought it would be nice to have a quick way to open adb shell, so I tried to make a .bat file to do so.
This is the code I put in the .bat file.
cd..
cd..
cd..
cd adt-bundle-windows-x86_64
cd sdk
cd platform-tools
adb
When I run the program, it runs through and closes.
Does anyone know what I did wrong?
moose392 said:
I thought it would be nice to have a quick way to open adb shell, so I tried to make a .bat file to do so.
This is the code I put in the .bat file.
cd..
cd..
cd..
cd adt-bundle-windows-x86_64
cd sdk
cd platform-tools
adb
When I run the program, it runs through and closes.
Does anyone know what I did wrong?
Click to expand...
Click to collapse
to open a adb shell the command is "adb shell"
EDIT
Oh and why not put all your cd commands into one command? ie.
cd ..................\adt-bundle-windows-x86_64\sdk\platform-tools
zacthespack said:
to open a adb shell the command is "adb shell"
EDIT
Oh and why not put all your cd commands into one command? ie.
cd ..................\adt-bundle-windows-x86_64\sdk\platform-tools
Click to expand...
Click to collapse
Sorry, I think I asked the wrong question. Im not trying to open adb shell but just adb.exe from the sdk.
The program I made seems to do the same thing as just double clicking on the adb.exe, but it is supposed to work correctly through cmd.
Maybe it is not running through cmd correctly?
moose392 said:
Sorry, I think I asked the wrong question. Im not trying to open adb shell but just adb.exe from the sdk.
The program I made seems to do the same thing as just double clicking on the adb.exe, but it is supposed to work correctly through cmd.
Maybe it is not running through cmd correctly?
Click to expand...
Click to collapse
When running via the command line you have to issue an argument to adb, e.g adb shell or adb devices etc etc
zacthespack said:
When running via the command line you have to issue an argument to adb, e.g adb shell or adb devices etc etc
Click to expand...
Click to collapse
Ok I replaced adb with adb devices, but cmd still closes itself.
moose392 said:
Ok I replaced adb with adb devices, but cmd still closes itself.
Click to expand...
Click to collapse
Yep, that's right. It would stay if you enter something like adb shell. A simple adb devices lists all the recognized devices via adb and the command is done.
Why are you trying to start adb? The cd to your adb folder should be enough to type commands or open the adb shell.
-star- said:
Yep, that's right. It would stay if you enter something like adb shell. A simple adb devices lists all the recognized devices via adb and the command is done.
Why are you trying to start adb? The cd to your adb folder should be enough to type commands or open the adb shell.
Click to expand...
Click to collapse
Ok thanks I figured things out.

Categories

Resources