I'm trying to write a script that does a few things, first, starts a program on my phone called Tetherbot, then clicks a button on the application (to start the proxy). Then runs a few ADB commands. Problem is that I can't figure out how to launch a program with ADB or how to simulate clicks on a button in ADB.
In addition, I need to know how to kill an application with ADB (for when I'm done).
EDIT: Got everything I need...
Start:
adb shell am start -a android.intent.action.MAIN -n graha.ms.tunnel/graha.ms.tunnel.TunnelConfig ##start new instance of tetherbot or bring current one to front
adb shell input keyevent 19 ###press up
adb shell input keyevent 66 ###press enter
adb shell am start -a android.intent.category.HOME -n com.fede.launcher/.Launcher
adb forward tcp:1080 tcp:1080
Stop:
adb shell am start -a android.intent.action.MAIN -n graha.ms.tunnel/graha.ms.tunnel.TunnelConfig ##start new instance of tetherbot or bring current one to front
adb shell input keyevent 19 ###press up
adb shell input keyevent 22 ###press right
adb shell input keyevent 66 ###press enter
adb shell am start -a android.intent.category.HOME -n com.fede.launcher/.Launcher
How can I disable this command:
Code:
setprop persist.sys.usb.config mass_storage
?
Buddy39914 said:
How can I disable this command:
Code:
setprop persist.sys.usb.config mass_storage
?
Click to expand...
Click to collapse
nevermind, found it.
Incase anybody is wondering:
Code:
setprop persist.sys.usb.config mtp
I'm trying to disable encryption and my usual method of typing this into adb in recovery isn't working. Is it possible?
Code:
adb shell recovery --wipe_data --set_filesystem_encryption=off
Qpst 2.7 460 build
Qualcomm usb driver 1.00.37 install
Reboot
Unlock rooting
Cmd
Adb shell
SU
setprop sys.usb.config diag,adb
getprop sys.usb.config
diag,adb
Qpst post I do not recognize it.
Laptop windows10 RS3 64bit..
나의 Pixel 2 XL 의 Tapatalk에서 보냄
https://forum.xda-developers.com/pi...vation-pixel-2-xl-t3884967/page6#post78663139
I'd like to root and install GCam, Viper and XLua, but after all the hassle with A2 Lite I'm just tired of all the issues this device has. I also don't want to set up everything again or giving up the encryption.
Is there a way to root the phone smoothly and keep OTA support?
I thought about the way GCam has to be installed, like holding Vol- down while unlocking bootloader. Has anyone tried it with rooting while keeping all the stuff?
I'm on 10.0.4.0 Pie.
Ok, since there is still no answer I want to try something different but I need help with testing and/or suggestions.
My phone isn't rooted, it's encrypted, it has stock recovery and locked bootloader. Just nothing's been done to mess with the integrity of the system (except this) and I would like to keep it that way. I don't want to lose my data and would like to keep plain simple OTA support without the need of going through this inconvenient method when having Magisk root.
-------------------------------------------------------------------------------
What I want to do is to edit build.prop entries:
[ro.debuggable]: [0] to [ro.debuggable]: [1]
[ro.secure]: [1] to [ro.secure]: [0]
for root
and:
[persist.camera.HAL3.enabled]: [1]
[persist.camera.eis.enabled]: [1]
for GCam-------------------------------------------------------------------------------
Since build.prop can be edited with root only and root itself can be applied with patched boot image... Let's say we have:
Mi A2 Lite 10.0.4.0 Stock Boot -> stock-boot-daisy-10040.img
Mi A2 Lite 10.0.4.0 Patched Boot -> patched-boot-daisy-10040.img
Then:
Download Patched Boot image.
Reboot phone in Fastboot mode (Vol- + Power). Keep Vol- pressed.
While keeping the Vol- pressed type:
Code:
fastboot oem unlock
Enter the following:
Code:
fastboot boot patched-boot-daisy-10040.img
Release Vol- after the phone starts to reboot.
Boot to OS, unlock and type:
Code:
adb shell
su
setprop ro.debuggable 1
setprop ro.secure 0
setprop persist.camera.HAL3.enabled 1
setprop persist.vendor.camera.HAL3.enabled 1
setprop persist.camera.eis.enabled 1
setprop persist.vendor.camera.eis.enabled 1
setprop persist.camera.stats.test 5
setprop persist.vendor.camera.stats.test 5
Reboot phone in Fastboot mode (Vol- + Power) again. Keep Vol- pressed.
Replace patched boot image back with the stock one by typing:
Code:
fastboot boot stock-boot-daisy-10040.img
While keeping the Vol- pressed type:
Code:
fastboot oem lock
fastboot reboot
Release Vol- after the phone starts to reboot.
As build.prop is stored on /system, I think replacing back boot images shouldn't affect edited file.
Is it going to work preserving what I need to preserve?
Ok, I've search a little and found out that persist props aren't stored in /system, but in /data/property, therefore the need to split point 6 to:
6a. Edit build.prop by:
Code:
adb pull /system/build.prop <path to save file>
Change values:
[ro.debuggable]: [0] to [ro.debuggable]: [1]
[ro.secure]: [1] to [ro.secure]: [0]
Save the file and type:
Code:
adb push <path to your file> /system/build.prop
chmod 644 /system/build.prop
6b. Enable Camera2 support:
Code:
adb shell
su
setprop persist.camera.HAL3.enabled 1
setprop persist.vendor.camera.HAL3.enabled 1
setprop persist.camera.eis.enabled 1
setprop persist.vendor.camera.eis.enabled 1
setprop persist.camera.stats.test 5
setprop persist.vendor.camera.stats.test 5
11. Install GCam.12. Open GCam settings and enable camera.enable_hwhdr in Developer Settings.
I've added setprop persist.vendor.camera.blabla since it's required in Pie.
I don't know if I'm not overthinking this
Following this - let us know about your progress