How change selinux from enforcing to permissive galaxy s10 lite sm-G770F rooted with - Samsung Galaxy S10 Lite Questions & Answers

Rooted with magis How can I do that im looking around for more then 30 days

Try this
Code:
adb devices
adb shell "su -c 'setenforce 0'"

jwoegerbauer said:
Try this
Code:
adb devices
adb shell "su -c 'setenforce 0'"
Click to expand...
Click to collapse
Thanks for this I had been looking for this and it worked!

What does someone gain from doing this? Just curious since I have the same phone rooted.

Related

[Q] Read partitions without rooting

I'm trying to find an universal way to read userdata partition(dump partition) without rooting the device.
Assumption :
the device can be boot in fastboot mode
Possible ways :
1. Using fastboot
I've looked into fastboot.c, it taking usb as a usb_handle pointer. I'm trying to move from that point. Fastboot is mostly to write or erase, but I assumed if writing and erasing are possible, reading should be possible as well.
2. Using nvflash, tftp...
It won't be the solution, since it's chip dependent but using chip vendor's download tool to dump partitions.
Go for it!
How does using adb dumping from /dev/mmcblk0p1 sounds?
can I unmount mmcblk0p1, and mount back to readable position?
what device? more info please.
dd if=dev/mmcblk0p? of=data.img bs= 8096 is usually the easiest. (<--just an example)
also this may be helpful:
http://forum.xda-developers.com/showthread.php?t=1247908
chrisrotolo said:
what device? more info please.
dd if=dev/mmcblk0p? of=data.img bs= 8096 is usually the easiest. (<--just an example)
also this may be helpful:
http://forum.xda-developers.com/showthread.php?t=1247908
Click to expand...
Click to collapse
Thanks for the link. using dd command is the exact way I used to dump mmc block as root. Or can it be run under not-rooted phones?
Rooting depends on the kernel version of devices, so when I have to dump various phones, it's very cumbersome to root different kinds of devices and dump.
So I'm finding a way to walk around the problem by using fastboot or if possible adb.
I think fastboot is my best bet so far.
How about adb?
adb shell
df -h
kkiqq1208 said:
How about adb?
adb shell
df -h
Click to expand...
Click to collapse
df -h will only show usage of storage medias. Is there anyway I can read off the actual data?
As already mentioned, dd, but via ADB. I believe that it functions at a low enough level that you should be able to dump mmcblk0 without having to be rooted. If dd can't be directly accessed via adb, you could extract a busybox install from a rooted phone and set it up in your adb directory and then run it from there with busybox (in theory).
Волк said:
As already mentioned, dd, but via ADB. I believe that it functions at a low enough level that you should be able to dump mmcblk0 without having to be rooted. If dd can't be directly accessed via adb, you could extract a busybox install from a rooted phone and set it up in your adb directory and then run it from there with busybox (in theory).
Click to expand...
Click to collapse
Question.
Feels like i'm on the different page from you. If i run dd for /dev/mmcblk0 it does give me an error message saying "Access Denied" of couse mmcblk0 is owned by root. And busybox too(I haven;t tried this), it's just a set of linux commnads, I'm not sure how it can access a file(in this case, a device) which does not have its ownership.
Please correct me if I'm wrong.
Hi All,
There is a way to dump any partition to SD card partition on unrooted device vi ADB.
Paste this couple of lines into the terminal :
adb kill-server
adb wait-for-device
adb shell "echo ro.kernel.qemu=1 > /data/local.prop"
adb reboot
adb wait-for-device
adb shell "mount -wo remount rootfs /"
adb shell "rm /data/local.prop"
adb shell dd if=/dev/block/mmcblk0p1 of=/sdcard/mmcp1.dump
The phone may reboot many time after that, so make sure the file /data/local.prop is deleted after this operation. or execute this :
adb reboot
adb wait-for-device
adb shell "rm /data/local.prop"
adb reboot
hope that helps
__________________
HTC One X (SFR)
Wissam said:
Hi All,
There is a way to dump any partition to SD card partition on unrooted device vi ADB.
Paste this couple of lines into the terminal :
adb kill-server
adb wait-for-device
adb shell "echo ro.kernel.qemu=1 > /data/local.prop"
adb reboot
adb wait-for-device
adb shell "mount -wo remount rootfs /"
adb shell "rm /data/local.prop"
adb shell dd if=/dev/block/mmcblk0p1 of=/sdcard/mmcp1.dump
The phone may reboot many time after that, so make sure the file /data/local.prop is deleted after this operation. or execute this :
adb reboot
adb wait-for-device
adb shell "rm /data/local.prop"
adb reboot
hope that helps
__________________
HTC One X (SFR)
Click to expand...
Click to collapse
Has anyone verified if this works for reading partitions on a non-rooted phone?
This doesn't work on an unrooted, locked device.
Code:
C:\Windows\System32>adb shell "echo ro.kernel.qemu=1 > /data/local.prop"
/system/bin/sh: can't create /data/local.prop: Permission denied
This did not work for my phone.
I got "permission denied" right after
adb shell "echo ro.kernel.qemu=1 > /data/local.prop"
Most of the above will only work on a rooted device with superuser.
The loop holes for shadow copies are mostly fixed since 6.0.
Partitions that can be accessed without root can be dumped with DD through ADB if ADB itself is supported and not internally limited to prevent just this.
Try
Code:
adb reboot recovery
adb root
adb shell
In my device, I can able to read those /data /dev without bootloader unlocking or root.
HemanthJabalpuri said:
Try
Code:
adb reboot recovery
adb root
adb shell
In my device, I can able to read those /data /dev without bootloader unlocking or root.
Click to expand...
Click to collapse
So, ... You are lucky. If I try these commands, I am getting "error: closed". And believe it or not, I have my bootloader UNlocked. It's a doomed chinese tablet, Allwinner 100 SOC.
observingman said:
So, ... You are lucky. If I try these commands, I am getting "error: closed". And believe it or not, I have my bootloader UNlocked. It's a doomed chinese tablet, Allwinner 100 SOC.
Click to expand...
Click to collapse
I found that it is common for many Realme devices to able to use `adb root` in recovery mode.
I have a Realme C12 which has Mediatek Helio G35 MT6765G SoC. So we can also able to `readback` partitions by using SP Flash Tool with the help of MTK-bypass.

[Q] dump boot.img?

So I'm trying to port CWM off of a CM7 repo, and I'm using this guide at xda-university: http://xda-university.com/as-a-developer/porting-clockworkmod-recovery-to-a-new-device
When i Try to dump the boot.img with the command:
Code:
adb shell dump_image boot /sdcard/boot.img
I get this in the terminal:
Code:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
dump_image: permission denied
BTW, I am running Ubuntu 12.04 LTS 32-Bit and I do have adb setup. Any help? :fingers-crossed:
try
Code:
adb shell su
dump_image boot /sdcard/boot.img
iurnait said:
try
Code:
adb shell su
dump_image boot /sdcard/boot.img
Click to expand...
Click to collapse
Did that and it says
Code:
dump_image: command not found
SerkTheTurk said:
Did that and it says
Code:
dump_image: command not found
Click to expand...
Click to collapse
Uhh same problem almost a year later, halp?
nebsif said:
Uhh same problem almost a year later, halp?
Click to expand...
Click to collapse
I actually figured it out a while ago but I can't remember, I'll try finding it and reply back
Sent from my YP-GI1 using Tapatalk 2
nebsif said:
Uhh same problem almost a year later, halp?
Click to expand...
Click to collapse
Try this in terminal (every 2 spaces is a new command)
adb shell
su
dd if=dev/block/mmcblk0p5 of=/mnt/sdcard/boot.img
exit
adb pull /mnt/sdcard/boot.img
Sent from my YP-GI1 using Tapatalk 2
SerkTheTurk said:
Try this in terminal (every 2 spaces is a new command)
adb shell
su
dd if=dev/block/mmcblk0p5 of=/mnt/sdcard/boot.img
exit
adb pull /mnt/sdcard/boot.img
Sent from my YP-GI1 using Tapatalk 2
Click to expand...
Click to collapse
thanks for the help!
If I do exit, it will not find device and wont let me pull, if I try to pull w/o doing exit, it will say device unauthorized (I did approve SU for ADB and confirmed that ADB dialog thing), i'll keep messing with it tomoro, gotta do some univ homework
EDIT: screw homework, downloaded terminal emulator:
su
dd if=dev/block/mmcblk0p5 of=/mnt/sdcard/boot.img
thanks again!

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

shell root

any way to shell root any android device to get root access "#" , may be this might have been discussed many times .. I tried lot of ways but none works ..
stiphen said:
any way to shell root any android device to get root access "#" , may be this might have been discussed many times .. I tried lot of ways but none works ..
Click to expand...
Click to collapse
Rooting Android Wear?
jellycoder said:
Rooting Android Wear?
Click to expand...
Click to collapse
i just want to get # instead of $
stiphen said:
i just want to get # instead of $
Click to expand...
Click to collapse
I don't understand what you are trying to say. Kindly define your problem.
stiphen said:
any way to shell root any android device to get root access "#" , may be this might have been discussed many times .. I tried lot of ways but none works ..
Click to expand...
Click to collapse
Sure it's called root, To get full time shell root you unpack your boot.img change the default.prop to insecure repack and flash.
Just like below.
Code:
[email protected]:~/Desktop$ adb shell
[email protected]:/ #
jellycoder said:
I don't understand what you are trying to say. Kindly define your problem.
Click to expand...
Click to collapse
i tried below commands , superuser.apk gets installed and even devices reboots but i still not get root access "#"
Code:
adb devices
adb push psneuter /data/local/tmp
adb shell
$ cd /data/local/tmp
$ chmod 777 psneuter
$ ./psneuter
adb kill-server
adb devices
adb shell
# mount -o remount,rw -t rfs /dev/block/st19 /system
# exit
adb push busybox /system/bin
adb push su /system/bin
adb install Superuser.apk
adb shell
# chmod 4755 /system/bin/busybox
# chmod 4755 /system/bin/su
# mount -o remount,ro -t rfs /dev/block/st19 /system
# exit
adb reboot
stiphen said:
i tried below commands , superuser.apk gets installed and even devices reboots but i still not get root access "#"
Code:
adb devices
adb push psneuter /data/local/tmp
adb shell
$ cd /data/local/tmp
$ chmod 777 psneuter
$ ./psneuter
adb kill-server
adb devices
adb shell
# mount -o remount,rw -t rfs /dev/block/st19 /system
# exit
adb push busybox /system/bin
adb push su /system/bin
adb install Superuser.apk
adb shell
# chmod 4755 /system/bin/busybox
# chmod 4755 /system/bin/su
# mount -o remount,ro -t rfs /dev/block/st19 /system
# exit
adb reboot
Click to expand...
Click to collapse
Try
adb shell
su
vampirefo said:
Try
adb shell
su
Click to expand...
Click to collapse
/system/bin/sh: su: not found
stiphen said:
/system/bin/sh: su: not found
Click to expand...
Click to collapse
you have to have su for # to work.
vampirefo said:
you have to have su for # to work.
Click to expand...
Click to collapse
ok thanks i rooted my device with Impactor
stiphen said:
ok thanks i rooted my device with Impactor
Click to expand...
Click to collapse
Adbd insecure app also works. In your shell, just type SU and accept the SuperSU/SuperUser prompt

Curious about Philz Touch Recovery files....

I have a question here. Recently the LG G PRO 2 android handphone received OTA update. If I let the OTA run. After OTA updated, if I still want to re-install Philz Touch Recovery, is that mean the latest newer file provided by OTA update will be overwrite when I re-install the recovery that released 1 yr ago?
Below is the command that will install the files if I re-install the recovery. I dont know if these file important or not if replaced by recovery installation. I have no idea the purpose of these files. Please advice.
What I hope is to make sure latest stable file running on my phone.
adb shell su -c "dd if=/sdcard/img/recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery"
adb shell su -c "dd if=/sdcard/img/aboot.img of=/dev/block/platform/msm_sdcc.1/by-name/aboot"
adb shell su -c "dd if=/sdcard/img/boot.img of=/dev/block/platform/msm_sdcc.1/by-name/boot"
adb shell su -c "dd if=/sdcard/img/dbi.img of=/dev/block/platform/msm_sdcc.1/by-name/dbi"
adb shell su -c "dd if=/sdcard/img/laf.img of=/dev/block/platform/msm_sdcc.1/by-name/laf"
adb shell su -c "dd if=/sdcard/img/persist.img of=/dev/block/platform/msm_sdcc.1/by-name/persist"
adb shell su -c "dd if=/sdcard/img/rpm.img of=/dev/block/platform/msm_sdcc.1/by-name/rpm"
adb shell su -c "dd if=/sdcard/img/sbl1.img of=/dev/block/platform/msm_sdcc.1/by-name/sbl1"
adb shell su -c "dd if=/sdcard/img/tz.img of=/dev/block/platform/msm_sdcc.1/by-name/tz"
adb shell su -c "dd if=/sdcard/img/modem.img of=/dev/block/platform/msm_sdcc.1/by-name/modem"

Categories

Resources