commands in file .bat change framework - Android Q&A, Help & Troubleshooting

Hi,
I want create a file .bat in windows hat change framework-res.apk
I write this
Code:
adb push frameworks-res.apk /sdcard/frameworks-res.apk
adb shell su
adb shell su
adb shell mount -r remount,rw /system
adb shell cp /sdcard/framework-res.apk /system/framework/framework-res.apk
adb reboot
after push file i see windows shell stops in adb shell and don't go next command
how can i exec all command?

Related

Dropbear/SSH binaries working

I found some dropbear binaries that work on the nook. I have included some scripts to start and stop it. I had to include a .profile to update $PATH to include the busybox binaries in the PATH.
Instructions:
Unzip the attached file to a directory
Change into the unzipped directory
Connect Nook via usb
adb shell mount -o rw,remount /system
adb push dropbear /system/bin
adb shell chmod 755 /system/bin/dropbear
adb push dropbearkey /system/bin
adb shell chmod 755 /system/bin/dropbearkey
adb push dropbear-start.sh /system/bin/dropbear-start.sh
adb shell chmod 755 /system/bin/dropbear-start.sh
adb push dropbear-stop.sh /system/bin/dropbear-stop.sh
adb shell chmod 755 /system/bin/dropbear-stop.sh
adb push .profile /data/local
adb shell chmod 644 /data/local/.profile
adb shell mount -o ro,remount /system
To start the server type:
dropbear-start.sh
To stop the server type:
dropbear-stop.sh
To find you ip address type:
ifconfig
To connect from another computer
ssh [email protected]{your ip address}
You password is password. (Edit dropbear-start.sh to change the password)
Thanks a lot!
Is this like some sort of Android server?
EDIT: Yeah, it is.
None of this is necessary in CM7, built in.. but for Stock rooted, yeah, good info.

Batch command - help needed

Need help to write batch script to run on windows. The command one by one goes smoothly. i`d like to have one *.bak file to run all these at once.
Here are basically commands that needs to be performed:
adb shell
su
mount -o remount,rw /dev/null /system
cd system/app
rm SprintZone.apk
rm Sprint_Installer.apk
rm W_Installer.apk
rm sprintextension.apk
cd /data/app/
rm com.sprint.widget.tutorial-1.apk
Thanks for help!
tigran80 said:
Need help to write batch script to run on windows. The command one by one goes smoothly. i`d like to have one *.bak file to run all these at once.
Here are basically commands that needs to be performed:
adb shell
su
mount -o remount,rw /dev/null /system
cd system/app
rm SprintZone.apk
rm Sprint_Installer.apk
rm W_Installer.apk
rm sprintextension.apk
cd /data/app/
rm com.sprint.widget.tutorial-1.apk
Thanks for help!
Click to expand...
Click to collapse
I have an easier solution for you that doesn't even require adb or a pc.
1. Download the shell script I from my dropbox here
2. Copy it to a folder on your phone where you can easily find it
3. Go to the market and download GScriptLite
4. Use GScriptLite to navigate to the folder where you put the script I attached
5. Use GScriptLite to run the script (If it asks for root allow to run as root)
6. Done
Hope this helps
shimp208 said:
I have an easier solution for you that doesn't even require adb or a pc.
1. Download the shell script I from my dropbox here
2. Copy it to a folder on your phone where you can easily find it
3. Go to the market and download GScriptLite
4. Use GScriptLite to navigate to the folder where you put the script I attached
5. Use GScriptLite to run the script (If it asks for root allow to run as root)
6. Done
Hope this helps
Click to expand...
Click to collapse
thanks for reply. but the point is to avoid using market and phone at all. just install required apps and apks with adb.
tigran80 said:
thanks for reply. but the point is to avoid using market and phone at all. just install required apps and apks with adb.
Click to expand...
Click to collapse
Wasn't aware of that in that case try this:
1. Create a new batch file with these commands in it
Code:
adb shell su -c
adb shell su -c "mount -o remount,rw /dev/null /system"
adb shell su -c cd system/app
adb shell su -c rm SprintZone.apk
adb shell su -c rm Sprint_Installer.apk
adb shell su -c rm W_Installer.apk
adb shell su -c rm sprintextension.apk
adb shell su -c cd /data/app/
adb shell su -c rm com.sprint.widget.tutorial-1.apk
adb shell su -c reboot
2. Save the batch file
3. Before running it open a terminal window where your sdk tools are located
4. Execute the script
script.sh
Code:
#!/system/bin/sh
su
mount -o remount,rw /dev/null /system
cd system/app
rm SprintZone.apk
rm Sprint_Installer.apk
rm W_Installer.apk
rm sprintextension.apk
cd /data/app/
rm com.sprint.widget.tutorial-1.apk
script.bat
Code:
@echo off
adb shell<script.sh
i have similar problem
fix.bat
Code:
::writable(mount writable)
adb shell < scripts/writeable.sh
::apps remower
adb shell < scripts/mdmkaldir.sh
::dnsconf change
::starting problem here file cant owerwrite.
adb push 20-dns.conf system/etc/dhcpcd/dhcpcd-hooks
::system readonly
adb shell < scripts/readonly.sh
::needed apks
::how i can isntall system app filemanager only
adb install apps/com.rhmsoft.fm-1.apk
adb install apps/com.buak.Link2SD.apk
adb install apps/uk.co.mytechie.setDNS.apk
::(root change)
adb install apps/eu.chainfire.supersu-minAPI7.apk
PAUSE
adb reboot
mdmkaldir.sh
Code:
su
cd system/app
rm EBAMarket.apk
rm EBA_SSO.apk
rm TR_Soft_Keyboard_default.apk
rm FatihMDM_ibnisina.apk
rm MpTest.apk
rm MpTest.odex
rm MpTestGps.apk
rm MpTestGps.odex
exit
exit
writable.sh
Code:
su
mount -o remount,rw /system
exit
exit
please help for this script
adb push 20-dns.conf system/etc/dhcpcd/dhcpcd-hooks
this line not work please help.
adb push 20-dns.conf system/etc/dhcpcd/dhcpcd-hooks
what is wrong please help

Batch Idea.. help :)

im trying to make a batch file which does the following,
using adb shell, i want to take a folder of apks from the pc and push them to system/app with a chmod 644
I have this for a single apk..
Code:
adb shell su -c "mount -o remount,rw /system"
adb shell su -c "cat /sdcard/external_sd/example.apk > /system/app/example.apk"
adb shell su -c "chmod 644 /system/app/example.apk"
but life would be much easier if i could just drop a bunch of .apks into a folder on the pc or sdcard and just execute said commands for each apk automatically
thanks!

Pulling build.prop with ADB

Hi,
Finally I can enter recovery mode after messing up with build.prop on Xperia Tablet S
tablet is visible in ADB as
C:\Users\Amiga\Desktop\adb>adb devices
List of devices attached
0123456789ABCDEF recovery
but rest of the commands doesn't work
C:\Users\Amiga\Desktop\adb>adb shell
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: closed
So I don't know how to pull out build.prop from Tablet
Amiga4ever123 said:
Hi,
Finally I can enter recovery mode after messing up with build.prop on Xperia Tablet S
tablet is visible in ADB as
C:\Users\Amiga\Desktop\adb>adb devices
List of devices attached
0123456789ABCDEF recovery
but rest of the commands doesn't work
C:\Users\Amiga\Desktop\adb>adb shell
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: closed
So I don't know how to pull out build.prop from Tablet
Click to expand...
Click to collapse
The reason you are getting the "error: closed" message is because the version of System Recovery installed on your tablet inhibits ADB from accessing the tablet's file system. You are not going to be able to pull or push the build.prop file.
Ok I can't use ADb so how can I replace faulty build.prop file or make recovery? Any ZIP file that I can put on SD card?
Amiga4ever123 said:
Ok I can't use ADb so how can I replace faulty build.prop file or make recovery? Any ZIP file that I can put on SD card?
Click to expand...
Click to collapse
You can try copying an OTA update file to an SD card and using System Recovery to install it, but I do not believe doing that will work. I believe you have bricked your tablet to the point where you have to send your tablet to Sony for repair.
Cat McGowan said:
You can try copying an OTA update file to an SD card and using System Recovery to install it, but I do not believe doing that will work. I believe you have bricked your tablet to the point where you have to send your tablet to Sony for repair.
Click to expand...
Click to collapse
So its very easy to brick this amazing sony device
Cat McGowan said:
The reason you are getting the "error: closed" message is because the version of System Recovery installed on your tablet inhibits ADB from accessing the tablet's file system. You are not going to be able to pull or push the build.prop file.
Click to expand...
Click to collapse
Hi cat tried to PM you but can?t do it...
Can you teach me how to copy/restore (pull and or push) the original build.prop in my cell (now bricked) i had the original file (buil.prop) inside it... i am learning about adb commands. thanksss. The main problem I have: An issue with ADB VCOM drivers (in windows) (tried in a couple of PCS, the device manager "see" the vcom preloader only a little moment (when connect the cell with usb cable) and then dissapear... then with command adb devices: no devices found... can you help me?
federimau said:
Hi cat tried to PM you but can?t do it...
Can you teach me how to copy/restore (pull and or push) the original build.prop in my cell (now bricked) i had the original file (buil.prop) inside it... i am learning about adb commands. thanksss. The main problem I have: An issue with ADB VCOM drivers (in windows) (tried in a couple of PCS, the device manager "see" the vcom preloader only a little moment (when connect the cell with usb cable) and then dissapear... then with command adb devices: no devices found... can you help me?
Click to expand...
Click to collapse
The reason ADB is reporting no devices are found may be because (1) your device is bricked, which probably means you are not going to be able to pull/push files from/to your device, (2) you do not have ADB drivers for your device properly installed on your PC, and/or (3) you do not have USB debugging enabled in your tablet's Developer options settings.
It's good you are learning how to use ADB and there are plenty of ADB tutorials to be found via Google, etc.; e.g., HERE.
Here is what you specifically ask for.
Pulling the build.prop file from your tablet to your PC is easy, just use these commands.
Code:
adb wait-for-device
adb pull /system/build.prop
adb kill-server
Pushing the build.prop file from your PC to your tablet is more complicated.
(1) Your tablet must have root access. If it doesn't, attempts at pushing the file to your tablet's /system directory will fail.
(2) Along with having root access, you must have SuperSU or Superuser, and Busybox installed on the tablet.
(3) You have to temporarily set your tablet's /system directory's properties from RO to RW, which must be done quickly because your tablet's OS monitors the /system directory's properties and will reboot the tablet if it detects the directory's properties have been changed from RO.
(4) To issue the ADB commands as quickly as possible, the commands must be put into a DOS batch command script file. For example, create and run a batch file named doit.bat containing the following commands.
Code:
adb wait-for-device
adb push build.prop /build.prop
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /'"
adb shell "su -c 'chmod 0440 /sbin/ric'"
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /system'"
adb shell "su -c 'busybox cp -af /build.prop /system/build.prop'"
adb shell "su -c 'chmod 0744 /system/build.prop'"
adb shell "su -c 'rm /build.prop'"
adb shell "exit"
adb kill-server
Good luck.
Cat McGowan said:
The reason ADB is reporting no devices are found may be because (1) your device is bricked, which probably means you are not going to be able to pull/push files from/to your device, (2) you do not have ADB drivers for your device properly installed on your PC, and/or (3) you do not have USB debugging enabled in your tablet's Developer options settings.
It's good you are learning how to use ADB and there are plenty of ADB tutorials to be found via Google, etc.; e.g., HERE.
Here is what you specifically ask for.
Pulling the build.prop file from your tablet to your PC is easy, just use these commands.
Code:
adb wait-for-device
adb pull /system/build.prop
adb kill-server
Pushing the build.prop file from your PC to your tablet is more complicated.
(1) Your tablet must have root access. If it doesn't, attempts at pushing the file to your tablet's /system directory will fail.
(2) Along with having root access, you must have SuperSU or Superuser, and Busybox installed on the tablet.
(3) You have to temporarily set your tablet's /system directory's properties from RO to RW, which must be done quickly because your tablet's OS monitors the /system directory's properties and will reboot the tablet if it detects the directory's properties have been changed from RO.
(4) To issue the ADB commands as quickly as possible, the commands must be put into a DOS batch command script file. For example, create and run a batch file named doit.bat containing the following commands.
Code:
adb wait-for-device
adb push build.prop /build.prop
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /'"
adb shell "su -c 'chmod 0440 /sbin/ric'"
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /system'"
adb shell "su -c 'busybox cp -af /build.prop /system/build.prop'"
adb shell "su -c 'chmod 0744 /system/build.prop'"
adb shell "su -c 'rm /build.prop'"
adb shell "exit"
adb kill-server
Good luck.
Click to expand...
Click to collapse
Wowww Cat, you are the one!! Thanks in Advance
The main problem I have: An issue with device recognition in windows PC... driver ADB VCOM MTK 6592 (tried in different PCS windows Xp and 8) (the device manager "see" the vcom preloader but only a little moment (in the first instant when connect the cell (cell off) with usb cable) and then dissapear (disconnect) the vcom preloader... I think If I can reach the way to get this connection running ok I can progress with this... will fight hard...
When I type the command adb devices, result: no devices found...
Tried to upgrade the vcom drivers (when i can catch it in the active state in device manager)... nothing
Tried to "on" the phone... nothing
Tried to flash a new ROM from Recovery (MIUI or Feelingme 078)... ERROR installation aborted
I can see this effect (with usbview): the usb is recognized in the PC (but just for a little moment at the instant when plug it), then disconnect...
I need to recover the original build.prop.bak from coolpad memory, rename it to build.prop and send it to coolpad again...
I think i can flash (from recovery) an original build. prop (packed as update.zip) doing the wipes and apply update from sdcard)... anyone can assist me on this?
This new 9976A item comes to me with 048 version, custom buid version 265 and rooted from factory...
Anyone can please help me?
Cat McGowan said:
The reason ADB is reporting no devices are found may be because (1) your device is bricked, which probably means you are not going to be able to pull/push files from/to your device, (2) you do not have ADB drivers for your device properly installed on your PC, and/or (3) you do not have USB debugging enabled in your tablet's Developer options settings.
It's good you are learning how to use ADB and there are plenty of ADB tutorials to be found via Google, etc.; e.g., HERE.
Here is what you specifically ask for.
Pulling the build.prop file from your tablet to your PC is easy, just use these commands.
Code:
adb wait-for-device
adb pull /system/build.prop
adb kill-server
Pushing the build.prop file from your PC to your tablet is more complicated.
(1) Your tablet must have root access. If it doesn't, attempts at pushing the file to your tablet's /system directory will fail.
(2) Along with having root access, you must have SuperSU or Superuser, and Busybox installed on the tablet.
(3) You have to temporarily set your tablet's /system directory's properties from RO to RW, which must be done quickly because your tablet's OS monitors the /system directory's properties and will reboot the tablet if it detects the directory's properties have been changed from RO.
(4) To issue the ADB commands as quickly as possible, the commands must be put into a DOS batch command script file. For example, create and run a batch file named doit.bat containing the following commands.
Code:
adb wait-for-device
adb push build.prop /build.prop
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /'"
adb shell "su -c 'chmod 0440 /sbin/ric'"
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /system'"
adb shell "su -c 'busybox cp -af /build.prop /system/build.prop'"
adb shell "su -c 'chmod 0744 /system/build.prop'"
adb shell "su -c 'rm /build.prop'"
adb shell "exit"
adb kill-server
Good luck.
Click to expand...
Click to collapse
Cat i will need to pull the backup file... then the code i need is... (please monitor it for me)
adb wait-for-device
adb pull /system/build.prop.bak
adb kill-server
and... when you push the correct and original file
adb wait-for-device
adb push build.prop /build.prop
is it ok? or the path is this?
adb push build.prop /system/build.prop
(if there are a build.prop in the device this will overwrite it?
federimau said:
Cat i will need to pull the backup file... then the code i need is... (please monitor it for me)
adb wait-for-device
adb pull /system/build.prop.bak
adb kill-server
and... when you push the correct and original file
adb wait-for-device
adb push build.prop /build.prop
is it ok? or the path is this?
adb push build.prop /system/build.prop
(if there are a build.prop in the device this will overwrite it?
Click to expand...
Click to collapse
adb push build.prop /system/build.prop
Cat McGowan said:
adb push build.prop /system/build.prop
Click to expand...
Click to collapse
Thanks cat, as i say, the main problem in this case is: i have a short window of time when the windows PC see the driver in the device manager... then disconnects... do you have any idea what can i do to establish this connection betweeen the android device and the computer without interruption?
---------- Post added at 05:22 PM ---------- Previous post was at 05:12 PM ----------
Cat McGowan said:
adb push build.prop /system/build.prop
Click to expand...
Click to collapse
cat, i´m doing 2 bat files (edited with notepad, is this correct?)
one file: pull.bat
with code
adb wait-for-device
adb pull /system/build.prop.bak
adb kill-server
another file: push.bat
with code
adb wait-for-device
adb push build.prop /system/build.prop
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /'"
adb shell "su -c 'chmod 0440 /sbin/ric'"
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /system'"
adb shell "su -c 'busybox cp -af /build.prop /system/build.prop'"
adb shell "su -c 'chmod 0744 /system/build.prop'"
adb shell "su -c 'rm /build.prop'"
adb shell "exit"
adb kill-server
what do you think?
---------- Post added at 05:51 PM ---------- Previous post was at 05:22 PM ----------
federimau said:
Thanks cat, as i say, the main problem in this case is: i have a short window of time when the windows PC see the driver in the device manager... then disconnects... do you have any idea what can i do to establish this connection betweeen the android device and the computer without interruption?
---------- Post added at 05:22 PM ---------- Previous post was at 05:12 PM ----------
cat, i´m doing 2 bat files (edited with notepad, is this correct?)
one file: pull.bat
with code
adb wait-for-device
adb pull /system/build.prop.bak
adb kill-server
another file: push.bat
with code
adb wait-for-device
adb push build.prop /system/build.prop
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /'"
adb shell "su -c 'chmod 0440 /sbin/ric'"
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /system'"
adb shell "su -c 'busybox cp -af /build.prop /system/build.prop'"
adb shell "su -c 'chmod 0744 /system/build.prop'"
adb shell "su -c 'rm /build.prop'"
adb shell "exit"
adb kill-server
what do you think?
Click to expand...
Click to collapse
I think need to remove the first line?
adb wait-for-device
federimau said:
Thanks cat, as i say, the main problem in this case is: i have a short window of time when the windows PC see the driver in the device manager... then disconnects... do you have any idea what can i do to establish this connection betweeen the android device and the computer without interruption?
Click to expand...
Click to collapse
You need to solve that problem before you can do anything else. Find an xda-developers forum that deals with your device and look there for fixes for your device's drivers. I am confident I can help you with Sony tablet drivers, but not your device's drivers. I don't even know the model of your device.
Create and use the following CheckDriver.bat file to help you troubleshoot the drivers. The script simply opens a DOS command window, starts the adb server, then lists the devices the adb server finds. The DOS command window will stay open until you press any key. If the script hangs, press ctrl+c to abort the script and close the DOS command window, then open another DOS command window and issue the "adb kill-server" command to stop the adb server.
Code:
@echo off
echo Starting ADB server and waiting for device.
echo.
adb wait-for-device
adb devices
pause
adb kill-server
federimau said:
cat, i´m doing 2 bat files (edited with notepad, is this correct?)
one file: pull.bat
with code
adb wait-for-device
adb pull /system/build.prop.bak
adb kill-server
another file: push.bat
with code
adb wait-for-device
adb push build.prop /system/build.prop
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /'"
adb shell "su -c 'chmod 0440 /sbin/ric'"
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /system'"
adb shell "su -c 'busybox cp -af /build.prop /system/build.prop'"
adb shell "su -c 'chmod 0744 /system/build.prop'"
adb shell "su -c 'rm /build.prop'"
adb shell "exit"
adb kill-server
what do you think?
Click to expand...
Click to collapse
Looks okay. Just keep in mind that the scripts are based on what is required for Sony tablets. Your device may require something a little different.
federimau said:
I think need to remove the first line?
adb wait-for-device
Click to expand...
Click to collapse
No. The "adb wait-for-device" command is what starts the adb server and causes the script to wait until the adb server detects a device before the next command in the script is issued.
Similar to the CheckDevice.bat file, you can insert the "@echo off" command at the beginning of your .bat files and the "pause" command just before the "adb kill-server" to cause the DOS command window stay open so you can see what is going on and the DOS command window will stay open until you press any key. Again, if the script hangs, press ctrl+c to abort the script and close the DOS command window, then open another DOS command window and issue the "adb kill-server" command to stop the adb server.
Cat McGowan said:
You need to solve that problem before you can do anything else. Find an xda-developers forum that deals with your device and look there for fixes for your device's drivers. I am confident I can help you with Sony tablet drivers, but not your device's drivers. I don't even know the model of your device.
Create and use the following CheckDriver.bat file to help you troubleshoot the drivers. The script simply opens a DOS command window, starts the adb server, then lists the devices the adb server finds. The DOS command window will stay open until you press any key. If the script hangs, press ctrl+c to abort the script and close the DOS command window, then open another DOS command window and issue the "adb kill-server" command to stop the adb server.
Code:
@echo off
echo Starting ADB server and waiting for device.
echo.
adb wait-for-device
adb devices
pause
adb kill-server
Looks okay. Just keep in mind that the scripts are based on what is required for Sony tablets. Your device may require something a little different.
No. The "adb wait-for-device" command is what starts the adb server and causes the script to wait until the adb server detects a device before the next command in the script is issued.
Similar to the CheckDevice.bat file, you can insert the "@echo off" command at the beginning of your .bat files and the "pause" command just before the "adb kill-server" to cause the DOS command window stay open so you can see what is going on and the DOS command window will stay open until you press any key. Again, if the script hangs, press ctrl+c to abort the script and close the DOS command window, then open another DOS command window and issue the "adb kill-server" command to stop the adb server.
Click to expand...
Click to collapse
I am working with all of you advices... i owe you a drink (if you agree!!!) Thanks
Cat McGowan said:
You need to solve that problem before you can do anything else. Find an xda-developers forum that deals with your device and look there for fixes for your device's drivers. I am confident I can help you with Sony tablet drivers, but not your device's drivers. I don't even know the model of your device.
Create and use the following CheckDriver.bat file to help you troubleshoot the drivers. The script simply opens a DOS command window, starts the adb server, then lists the devices the adb server finds. The DOS command window will stay open until you press any key. If the script hangs, press ctrl+c to abort the script and close the DOS command window, then open another DOS command window and issue the "adb kill-server" command to stop the adb server.
Code:
@echo off
echo Starting ADB server and waiting for device.
echo.
adb wait-for-device
adb devices
pause
adb kill-server
Looks okay. Just keep in mind that the scripts are based on what is required for Sony tablets. Your device may require something a little different.
No. The "adb wait-for-device" command is what starts the adb server and causes the script to wait until the adb server detects a device before the next command in the script is issued.
Similar to the CheckDevice.bat file, you can insert the "@echo off" command at the beginning of your .bat files and the "pause" command just before the "adb kill-server" to cause the DOS command window stay open so you can see what is going on and the DOS command window will stay open until you press any key. Again, if the script hangs, press ctrl+c to abort the script and close the DOS command window, then open another DOS command window and issue the "adb kill-server" command to stop the adb server.
Click to expand...
Click to collapse
Cat, i can not establish a stable and in-time connection between cell and PC...
type
adb wait-for-device
and never "see" the cell
i have the drivers upgraded
with usbview software i see the PC "see" the cell a short amount of time, then disconnects...
any advice??
federimau said:
Cat, i can not establish a stable and in-time connection between cell and PC...
type
adb wait-for-device
and never "see" the cell
i have the drivers upgraded
with usbview software i see the PC "see" the cell a short amount of time, then disconnects...
any advice??
Click to expand...
Click to collapse
Sounds to me your device simply is not responding to the adb server's attempt to connect. Again, my advice is for you to find an xda-developers forum that deals specifically with your device and look there for fixes for your device.
@Cat McGowan
Thank you for the info,
but it's not working on Recovery mode!
I try to backup and restore the build.prop file on cmd in recovery & in bootloop case.
working:
adb wait-for-device
adb pull /system/build.prop.bak or adb pull /system/build.prop
adb kill-server
not working push to the system: (even the cmd showing the opposite)
adb wait-for-device
adb push build.prop /system/build.prop
adb kill-server
I'm tring to resotre from PC or SD card...
(after changing the permission to system folder (instead only build.prop file) to 00644 the device keep get to Recovery mode! (with root browser app)
only flashing again the rom fix it.)
I got an error too:
- exec '/system/bin/sh' failed: Permission denied (13) -
by the way what Should to be on?
SuperSU or Superuser (ADB shell allow ?)
Developer Mode (Enable ADB ) +USB Debugging on
i'm worng what else?
I want to add some info:
I know the best way to edit this file only by : Notepad++ or EditPlus editor to preserve UNIX encoding
or Turbo Editor ( File Editor ) app.
read here:
http://forum.xda-developers.com/showpost.php?p=54970011&postcount=171
http://forum.xda-developers.com/showpost.php?p=55094822&postcount=203
and great script from user.
http://forum.xda-developers.com/showpost.php?p=55113422&postcount=208
will this work too on recovery or bootloops mode?
backup:
adb shell
su
mount -o remount,rw /system
cp /system/build.prop /system/build.prop.bak
mount -o ro,remount /system/ /system
----
restore:
adb shell
su
mount -o remount,rw /system
cp system/build.prop system/build.prop.bootloop
cp system/build.prop.bak system/build.prop
chmod 00644 system/build.prop
reboot

Any System Image pull out and find in Android

Before 4.0 and 4.0
* Need IT's Rooted Device *
1. adb shell su -c "mount"
2. adb shell su -c "cat /proc/mtd
Now show list of your system img where stay
example : boot.img = /dev/block/mtdblock7
so you can pull out from there .. here ..
3. adb shell su -c "chmod 777 /dev/block/mtdblock7"
4. adb shell su -c "dd if=/dev/block/mtdblock7 of=/storage/sdcard0/boot.img"
(of=/storage/sdcard0/ .. this location may b change you can look at "mount" )
-----------------------------------------------------------------------------------------
After 4.1 or mmc
1. adb shell su -c "mount"
2. adb shell su -c "cat /cache/recovery/last_log"
Now show list of your system img where stay
example : boot.img = /dev/block/mmcblk0p7"
so you can pull out from there .. here ..
3. adb shell su -c "chmod 777 /dev/block/mmcblk0p7"
4. adb shell su -c "dd if=/dev/block/mtdblock7 of=/storage/sdcard0/boot.img"
(of=/storage/sdcard0/ .. this location may b change you can look at "mount" )
For someone dont' know
thanks all ...

Categories

Resources