Quest2: How to Install SidequestApps from Inside the HMD + Ondevice ADB Shell + WifiDebug shutdown "fix" - Oculus Quest

hi there,
i got a method to install sidequeststore apps from inside the headset, disable wifi shutdown and have an ondevice-shell for the Oculus Quest2.
first:
you have to use an ADB Host after every reboot via USB (PC, Smartphone)
you have to be on Quest FW v31.
you have to know the ip from your quest2
as i experienced: this is a bit buggy sometimes after disconnect(whyever), but i think thats a firmware problem (the guardian goes crazy and the controllers too and you have to reboot. many people are complaining about that)
you need following apks:
Remote ADB Shell (you cant use another shell, the most just broke the keyboard and this one has adb bins with shell onboard)
SideQuest APK from Playstore (use Total Commander to extract from your installed apps)
lets go:
on adb host: (a smartphone with adb binaries which can be installed via magisk module or desktop adb)
connect quest via usb to adb host
open CMD:
adb tcpip 5555
(on HMD: grant access if you havent already)
disconnect usb from adb host
adb connect QUESTIP:5555
adb shell setprop service.adb.tcp.port 5555
adb install -r Remote ADB Shell. APK
adb install -r SideQuest.APK
inside the headset:
open Remote ADB Shell
type the QUESTIP:5555 or LOCALHOST:5555(?not testet?) and click connect
grant access
setprop service.adb.tcp.port 5555
DONT close Remote ADB Shell now (that holds up the wifidebug)
just switch to sidequest (via app roster) if you want to perform commands, just switch back to the adb shell
click on the wifi button on the leftbottom
type in the Quest IP adress in the lowest field (which is also Shown as "Host" ip on this screen)
click connect
(when first connect doesnt work, click again. you'll get a message if success and the middle icon becomes green)
congratz you have now a working SideQuestStore with ondevice app sideloading/installation, ondevice shell and wifidebugging which never shuts down (4+ Days UP)
for exchanging files wireless i recommend the app "SSH Server" (green icon, playstore). it sets up a SFTP connection on the Quest so you can connect from your desktop and have acess to the internal filesystem via sFTP, but its a payed app and another apps just doesnt work.
ps:
maybe the holdup from the wifi is just settet up by the setprop command and not the adb shell.
pps:
maybe sidequest ondevice sideloading works with the internal external-connection method from the app somehow, without this workaround, but at my quest the store didnt work ondevice, without this workaround.
SideQuest ( BETA ) – Apps bei Google Play
Ein sicherer Weg, um innovative Inhalte in VR zu genießen, denen VR-Entwickler vertrauen.
play.google.com
Remote ADB Shell – Apps bei Google Play
Eine Verbindung mit ADB auf einem anderen Android-Gerät läuft über das Netzwerk
play.google.com
SSH Server – Apps bei Google Play
Ein leistungsstarker SSH / SFTP-Server zum Öffnen des Terminals (SFTP) ermöglicht die Portweiterleitung
play.google.com

Related

adbd in TCP listen mode by default?

At my university, the lab computers are locked down and won't allow the installation of Android's USB drivers. This prevents adb from connecting to the ADP1 via USB, but I can use another computer which does have USB permissions and use
Code:
adb tcpip 2222
to restart adbd in TCP listen mode on port 2222. Then, on a lab computer I can connect to the ADP1 using
Code:
adb connect <IP>:2222
and install packages, open a shell, etc.
My question is, how can adbd be preconfigured on the ADP1 to listen on a specified port on boot, instead of waiting for a USB connection and the above two commands?
This is "insecure" but it doesn't matter because the lab computers and wireless network are private, and the ADP1 has no SIM card and connects to the internet only via WiFi.
It seems that one way to do this involves editing the boot image to modify init.rc --- I'm prepared to do that, but I'm hesitant to spend the time trying it because I can't find any documentation saying what port adbd will listen on by default, or if it will listen on TCP at all.
tl;dr: Instructions on how to start adbd on boot in TCP listen mode? Thanks.
Did you find any answer to this? anybody knows how to enable it directly on phone without usb cable?
http://nookdevs.com/ADB_Over_USB
"By default, you won't be able to use adb over wifi, using this module/adbd. But if you set the persist.adb.tcp.port system property setprop persist.adb.tcp.port 5555 it will cause adbd to listen on the specified port so you can use adb over both usb and wifi. Note that adb over wifi is insecure and not recommended. Anyone on the same local network could potentially connect to your nook."
Maybe this will help you?
Not working
Gerdal said:
http://nookdevs.com/ADB_Over_USB
"By default, you won't be able to use adb over wifi, using this module/adbd. But if you set the persist.adb.tcp.port system property setprop persist.adb.tcp.port 5555 it will cause adbd to listen on the specified port so you can use adb over both usb and wifi. Note that adb over wifi is insecure and not recommended. Anyone on the same local network could potentially connect to your nook."
Maybe this will help you?
Click to expand...
Click to collapse
Thanks, but it didnt work. I tried the command in su mode, even restarted the adb service with stop/start command, no error but still can't connect to device over wifi. I can ping the device, so the connection is there. Any idea?
Solved
I finally solved the problem. these are the commands to enable adb over wifi:
Code:
setprop service.adb.tcp.port 5555
stop adbd
start adbd
and to disable it:
Code:
setprop service.adb.tcp.port -1
stop adbd
start adbd
I assume you need su access to run it. I tested it and its working.
bohlool said:
I finally solved the problem. these are the commands to enable adb over wifi:
setprop service.adb.tcp.port 5555
[/CODE]
setprop has sucefully executed - no problem
how to restart this service ?
stop/start shows bad command or filename - which means command not found what is true since there is no shell command named start or stop
Click to expand...
Click to collapse
Worked for me
m32 said:
bohlool said:
I finally solved the problem. these are the commands to enable adb over wifi:
setprop service.adb.tcp.port 5555
[/CODE]
setprop has sucefully executed - no problem
how to restart this service ?
stop/start shows bad command or filename - which means command not found what is true since there is no shell command named start or stop
Click to expand...
Click to collapse
It worked for me. you can use my Widget to do it and see if it work or not, search market for "ADB over Wifi"
Click to expand...
Click to collapse
Hy!
I found my way of doing the same thing...
You have to enable dropbear ssh server on your device, and then you can forward the port 5037 (where adb listens by default on localhost only) to your computer trough ssh from your computer.
From your linux box, you can do this with this command:
ssh [email protected] -L 5555:localhost:5037
and then (but keep the ssh session open):
adb connect localhost
that's it
(note that you have to enable usb debugging for this to work!)
u-foka said:
Hy!
I found my way of doing the same thing...
You have to enable dropbear ssh server on your device, and then you can forward the port 5037 (where adb listens by default on localhost only) to your computer trough ssh from your computer.
From your linux box, you can do this with this command:
ssh [email protected] -L 5555:localhost:5037
and then (but keep the ssh session open):
adb connect localhost
that's it
(note that you have to enable usb debugging for this to work!)
Click to expand...
Click to collapse
that's pretty convenient. thanks.
Thanks and this works for me!!!
bohlool said:
Code:
setprop service.adb.tcp.port 5555
stop adbd
start adbd
Click to expand...
Click to collapse

[Q] LG Thrill 4G new ROM Help

I have a LG Thrill 4G. I rooted the phone using superonelick, root checker says it is rooted. Downloaded ROM Manger and flashed clockworkmod. I cannot click boot into recovery, it just restarts the phone. I have tried to reboot into recovery by pressing 3d button, down volume, and power and it boots me into the android recovery but not clockworkmod, so I can not find anyway in to download the new rom from the zip file. Has had any other people had trouble with this? I have spent over 2 days searching the internet but I cannot find any similar problems, is there anyway to get into the recovery mode to install the new ROM without it just restarting the phone?
LG Thrill 4G ClockworkMod Installation (correct method)
1) You need to have ROOT access at the least (see link below)
It will also be good to have ADB (and hence LG Thrill drivers) installed properly
http://forum.pandaapp.com/thread/2/11/20110919/4e77f603d22632913-1.html
2) Get the recovery image from here and keep it on your PC in a folder accessible by ADB.
OR (if no ADB then) directly put it on your LG Thrill SDCard root
http://forum.xda-developers.com/showthread.php?t=1257588
4) If you have ADB then follow the instructions in the first link above to push the recovery image to your phone.
OR
if no ADB then open Terminal Emulator (install it from Market) and type su and click allow if the prompt comes up
5) Now you can follow instructions in the first link (far above) again, starting from the 'dd if=...' step. But instead of rebooting you could just power off
6) Clockwork recovery should now be flashed. To enter recovery, keep the 3D button, Vol-down and Power button pressed until you see the LG logo
Thank you for getting back with me. I tried to follow these steps and when I am in the Terminal Emulator and type adb push recovery.img /data it comes back with adb: not found. I have redownloaded the recovery file that you have attached to the SD card, same error, and then I tried to copy to the phone itself and same error. I can do any of the other prompts for the emulator but nothing that has to do with the recovery file it will not work. I am guessing maybe this is the problem because if it cannot find the recovery file, I cant do much of anything else. Do you have any suggestions of why the file still cannot be found on my phone?
connect adb through tcp
Try this:
1. If you are using terminal emulator to access adb then try downloading the app called remote adb. This tool will allow you to connect your device via tcp. Take note of the ip adress and port number. Usually the default port is fine.
2. Now open sshdroid, connectbot, terminal emulator and start an ssh session with the adb shell. You must have the correct public ip and port entered in to access the adb via tcp.
3. Once you have made the ssh connection between what ever emulator you are using and remote adb, start a shell as su.
4. Type the commands mentioned earlier.
This should let you run the whole thing from within your phone.
Alternatively...
1. start remote adb on your device.
2. start a terminal or cmd prompt on your cpu.
3. cd to androidSDK\platform-tools
4. type ---> adb start-server
The server then sets up connections to all running emulator/device instances. It locates emulator/device instances by scanning odd-numbered ports in the range 5555 to 5585, the range used by emulators/devices. Where the server finds an adb daemon, it sets up a connection to that port.
Note that each emulator/device instance acquires a pair of sequential ports — an even-numbered port for console connections and an odd-numbered port for adb connections. For example:
Emulator 1, console: 5554
Emulator 1, adb: 5555
Emulator 2, console: 5556
Emulator 2, adb: 5557 ...
As shown, the emulator instance connected to adb on port 5555 is the same as the instance whose console listens on port 5554.
Once the server has set up connections to all emulator instances, you can use adb commands to control and access those instances. Because the server manages connections to emulator/device instances and handles commands from multiple adb clients, you can control any emulator/device instance from any client (or from a script).
5. type --> adb forward tcp:5554 tcp:5555
5. type ---> adb devices. In response, adb prints this status information for your device. If there is no emulator/device running, adb returns no device, and you have not made a tcp connection.
6. Take note of the serial number listed. You will use it later to direct commands to device.
7. Type --> adb shell
8. Type --> su
9. Use commands from other post to achieve whatever you need.
10. once finished with shell, type --> exit twice to leave the shell
11. Finally, type --> adb server-kill
Hope that helps. Seems like you were having issues making the connection from device to adb, so that is what I focused on. If I can help anymore, just ask. We are all continually learning and the only stupid question is the one never asked.
B^)

adb from smartphone to android wear with just bluetooth (no cables needed)

Hey folks,
Just wanted to share something I found that might be useful from time to time: how to send adb commands to android wear directly from your phone without any cables nor an extra PC.
This is a combination from different tutorials, made for different goals, so almost all credit goes to them
This worked from my Nexus 5 (4.4.4 stock, rooted) to a LG G Watch R (5.0.1)... but it should work with any combination as long as, your smartphone is rooted (but this is XDA so it has to be rooted )
First thing first, start bluetooth debugging in your android wear device (from the developer menu)
Now from your smartphone, start USB debugging (developer menu too)
At the bottom of the settings in the android wear app you should see a new option "Debugging over bluetooth", turn it on. You should get a message just below:
Host: disconnected
Target: connected
You will also get a permanent notification to remind you that debugging over bluetooth is active.
Disclaimer: su commands are powerful and with great powers comes great responsibility... so pay attention to what you do. In any case, I'm not responsable for any damage incurred to your phone, your android wear device, your cat, your home, your neighborhood, etc...
Open a terminal emulator in the smartphone paired to your wear device, where you can do "su" stuff, and run the following commands:
> su
> export HOME=/sdcard
> setprop service.adb.tcp.port 5555
> stop adbd
> start adbd
> adb devices <--- this should show you your own smartphone (with a emulator-5554, in my case)... you can actually shell into it if you like recursions .
SECURITY NOTE: This will allow the adb daemon to listen for tcp/ip connections from other machines connected to your wifi hotspot... I guess it will also allow machines sharing the same 4G cellular network you are using to connect, but what are the odds... In any case, and if I'm not wrong, any android version since 4.3 should give you a message telling you to accept the connection or not.... maybe in airplane mode with just bluetooth activated it would work and it would also be safer.
Continuing in terminal (the typical stuff we know already):
> adb forward tcp:4444 localabstract:/adb-hub
> adb connect localhost:4444
At this point your smartphone should buzz and ask you to allow a connection from your own phone. This time is the real deal, but just in case read carefully the message. It should say "Allow Wear Debugging?", so accept the connection and optionally mark the always accept option.
You will now have two emulated devices:
> adb devices
emulator-5554 device <--- the smartphone
localhost:4444 device <--- the android wear device
you need to specify for now on the target of your adb commands. For instance if you want to have a shell in the android wear device:
> adb -s localhost:4444 shell
That's it. Hope it works for everyone.
Ah! just one thing the value service.adb.tcp.port we set before disappears with a reboot (you can replace the word service with persist if you prefer to have it surviving the reboot... but I do not recommend it).
If you do not want to reboot but you want to disable it, run, as root:
> setprop service.adb.tcp.port -1
> stop adbd
> start adbd
to clean-up, from the terminal and as root:
> adb kill-server
You can also disable the adb debugging from the developer menu.
N.B. 1 . I guess the easiest thing to do would be to put all those commands in a script file and then just run as root:
> sh script_to_adb_wear.sh
N.B.2. I have not tried with fastboot... but that would surprise me if it works.... In any case, and IMHO, fastboot should only be used with the device connected to a computer via usb.
This isnt working for me on my OPO running CM12 unofficial... Running the commands gives me a blank adb devices window, any advice?
Hi,
I guess you get the empty device list after the "start adbd" command, right?
Just to be sure, before running the adb devices commad do "adb kill-server"
If adb devices still gives you an empty list of devices try with:
> adb connect localhost:5555
And check again. Usually, what should happen, the adb server detects a adbd listening in the port 5555 and it considers it is an android emulator and it connects to it automatically. Maybe in your case it is not connecting, so the connect command might help. Once you hace at least your phone showing you can run the other commands to access the watch.
Let me know if this helps
gusano38 said:
Hi,
I guess you get the empty device list after the "start adbd" command, right?
Just to be sure, before running the adb devices commad do "adb kill-server"
If adb devices still gives you an empty list of devices try with:
> adb connect localhost:5555
And check again. Usually, what should happen, the adb server detects a adbd listening in the port 5555 and it considers it is an android emulator and it connects to it automatically. Maybe in your case it is not connecting, so the connect command might help. Once you hace at least your phone showing you can run the other commands to access the watch.
Let me know if this helps
Click to expand...
Click to collapse
Works like a charm thanks for the help
Where is the adb binary? Adb isn't a recognized command
My binary is in /system/bin/adb
Sideloading...
Really great, all works... until I try to sideload an APK. I keep getting invalid apk file. I'm doing it by:
adb -s _____ install ____.apk
but it's not working. Any suggestions?
gusano38 said:
Hey folks,
Just wanted to share something I found that might be useful from time to time: how to send adb commands to android wear directly from your phone without any cables nor an extra PC.
This is a combination from different tutorials, made for different goals, so almost all credit goes to them
This worked from my Nexus 5 (4.4.4 stock, rooted) to a LG G Watch R (5.0.1)... but it should work with any combination as long as, your smartphone is rooted (but this is XDA so it has to be rooted )
First thing first, start bluetooth debugging in your android wear device (from the developer menu)
Now from your smartphone, start USB debugging (developer menu too)
At the bottom of the settings in the android wear app you should see a new option "Debugging over bluetooth", turn it on. You should get a message just below:
Host: disconnected
Target: connected
You will also get a permanent notification to remind you that debugging over bluetooth is active.
Disclaimer: su commands are powerful and with great powers comes great responsibility... so pay attention to what you do. In any case, I'm not responsable for any damage incurred to your phone, your android wear device, your cat, your home, your neighborhood, etc...
Open a terminal emulator in the smartphone paired to your wear device, where you can do "su" stuff, and run the following commands:
> su
> export HOME=/sdcard
> setprop service.adb.tcp.port 5555
> stop adbd
> start adbd
> adb devices <--- this should show you your own smartphone (with a emulator-5554, in my case)... you can actually shell into it if you like recursions .
SECURITY NOTE: This will allow the adb daemon to listen for tcp/ip connections from other machines connected to your wifi hotspot... I guess it will also allow machines sharing the same 4G cellular network you are using to connect, but what are the odds... In any case, and if I'm not wrong, any android version since 4.3 should give you a message telling you to accept the connection or not.... maybe in airplane mode with just bluetooth activated it would work and it would also be safer.
Continuing in terminal (the typical stuff we know already):
> adb forward tcp:4444 localabstract:/adb-hub
> adb connect localhost:4444
At this point your smartphone should buzz and ask you to allow a connection from your own phone. This time is the real deal, but just in case read carefully the message. It should say "Allow Wear Debugging?", so accept the connection and optionally mark the always accept option.
You will now have two emulated devices:
> adb devices
emulator-5554 device <--- the smartphone
localhost:4444 device <--- the android wear device
you need to specify for now on the target of your adb commands. For instance if you want to have a shell in the android wear device:
> adb -s localhost:4444 shell
That's it. Hope it works for everyone.
Ah! just one thing the value service.adb.tcp.port we set before disappears with a reboot (you can replace the word service with persist if you prefer to have it surviving the reboot... but I do not recommend it).
If you do not want to reboot but you want to disable it, run, as root:
> setprop service.adb.tcp.port -1
> stop adbd
> start adbd
to clean-up, from the terminal and as root:
> adb kill-server
You can also disable the adb debugging from the developer menu.
N.B. 1 . I guess the easiest thing to do would be to put all those commands in a script file and then just run as root:
> sh script_to_adb_wear.sh
N.B.2. I have not tried with fastboot... but that would surprise me if it works.... In any case, and IMHO, fastboot should only be used with the device connected to a computer via usb.
Click to expand...
Click to collapse
AJWizkid said:
Really great, all works... until I try to sideload an APK. I keep getting invalid apk file. I'm doing it by:
adb -s _____ install ____.apk
but it's not working. Any suggestions?
Click to expand...
Click to collapse
Adb -s localhost:4444 install my.apk
Where can I download the script?
¯\_(ツ)_/¯
thegrim11 said:
Where can I download the script?
¯\_(ツ)_/¯
Click to expand...
Click to collapse
Here's the script.
Using Root Explorer:
Create a folder under /system and copy adbgwrbt.sh there
Set permissions to 100 (execute for owner)
Tap script and hit execute
Profit
No credit. Just copied and pasted from OP. Thank you so much for this gusano!! Always find myself needing this . Now if you could just figure out fastboot [emoji57]
Oh my, thank you very much, I've been trying to do this ever since I got my watch but just didn't have the skills (still managed to fins an other way to send files from the phone to the watch and even install apk's), you're great man!
hatefuel19 said:
Now if you could just figure out fastboot [emoji57]
Click to expand...
Click to collapse
I'm pretty sure that in fastboot mode (bootloader) the bluetooth driver is not loaded, so I guess having fastboot with bluetooth is not possible. Furthermore, I would not trust a bluetooth connection to do things that could brick your watch... of course, the pogo pins is not what I call a super trustable connection either
The sarcasm was lost apparently ?
Grr. Got a replacement phone from insurance and the binary isn't there. Can someone please pm me the adb from system/bin?
Sent from my XT1060 using Tapatalk
gusano38 said:
Hey folks,
Just wanted to share something I found that might be useful from time to time: how to send adb commands to android wear directly from your phone without any cables nor an extra PC.
This is a combination from different tutorials, made for different goals, so almost all credit goes to them
This worked from my Nexus 5 (4.4.4 stock, rooted) to a LG G Watch R (5.0.1)... but it should work with any combination as long as, your smartphone is rooted (but this is XDA so it has to be rooted )
First thing first, start bluetooth debugging in your android wear device (from the developer menu)
Now from your smartphone, start USB debugging (developer menu too)
At the bottom of the settings in the android wear app you should see a new option "Debugging over bluetooth", turn it on. You should get a message just below:
Host: disconnected
Target: connected
You will also get a permanent notification to remind you that debugging over bluetooth is active.
Disclaimer: su commands are powerful and with great powers comes great responsibility... so pay attention to what you do. In any case, I'm not responsable for any damage incurred to your phone, your android wear device, your cat, your home, your neighborhood, etc...
Open a terminal emulator in the smartphone paired to your wear device, where you can do "su" stuff, and run the following commands:
> su
> export HOME=/sdcard
> setprop service.adb.tcp.port 5555
> stop adbd
> start adbd
> adb devices <--- this should show you your own smartphone (with a emulator-5554, in my case)... you can actually shell into it if you like recursions .
SECURITY NOTE: This will allow the adb daemon to listen for tcp/ip connections from other machines connected to your wifi hotspot... I guess it will also allow machines sharing the same 4G cellular network you are using to connect, but what are the odds... In any case, and if I'm not wrong, any android version since 4.3 should give you a message telling you to accept the connection or not.... maybe in airplane mode with just bluetooth activated it would work and it would also be safer.
Continuing in terminal (the typical stuff we know already):
> adb forward tcp:4444 localabstract:/adb-hub
> adb connect localhost:4444
At this point your smartphone should buzz and ask you to allow a connection from your own phone. This time is the real deal, but just in case read carefully the message. It should say "Allow Wear Debugging?", so accept the connection and optionally mark the always accept option.
You will now have two emulated devices:
> adb devices
emulator-5554 device <--- the smartphone
localhost:4444 device <--- the android wear device
you need to specify for now on the target of your adb commands. For instance if you want to have a shell in the android wear device:
> adb -s localhost:4444 shell
That's it. Hope it works for everyone.
Ah! just one thing the value service.adb.tcp.port we set before disappears with a reboot (you can replace the word service with persist if you prefer to have it surviving the reboot... but I do not recommend it).
If you do not want to reboot but you want to disable it, run, as root:
> setprop service.adb.tcp.port -1
> stop adbd
> start adbd
to clean-up, from the terminal and as root:
> adb kill-server
You can also disable the adb debugging from the developer menu.
N.B. 1 . I guess the easiest thing to do would be to put all those commands in a script file and then just run as root:
> sh script_to_adb_wear.sh
N.B.2. I have not tried with fastboot... but that would surprise me if it works.... In any case, and IMHO, fastboot should only be used with the device connected to a computer via usb.
Click to expand...
Click to collapse
Loved your post!
Thing is I get an error each time I try the script.
I own a rooted LG G3 ChupaChups 4.2 ROM and a LG G Watch R
Thanx in advance to your help.
setprop service.adb.tcp.port 5555
Sent from my HTC One_M8 using Tapatalk
Unauthorized
ADB tells me that my device has not authorized itself as an adb connection. The problem is since it's not actually a standard USB debugging connection I don't get a popup to mark my device as trusted. Is there anyway to work around this?
I always get the error from the pictures
N4 Android 6.0 Frank rooted xposed
LG g watch wear 5.1.1 rooted (no idea what adventages)
Gesendet von meinem Nexus 4 mit Tapatalk
---------- Post added at 07:10 AM ---------- Previous post was at 07:09 AM ----------
J0SH1X said:
I always get the error from the pictures
N4 Android 6.0 Frank rooted xposed
LG g watch wear 5.1.1 rooted (no idea what adventages)
Gesendet von meinem Nexus 4 mit Tapatalk
Click to expand...
Click to collapse
And yes I did enable all debugging setting in companion app on phone on wear
Gesendet von meinem Nexus 4 mit Tapatalk
i have this problem not connect to localhost 4444. i have cm13
adb commands won't work for me.

execute "adb tcpip <port_no>" command without using usb

NON ROOTED PHONE
I am trying to create to backup of all application in android but I don't want the users to connect to USB even for the first time.
okay let me first explain what happens when we connect our phone with USB to ADB client
0. USB Debugging mode is enabled in the phone.
1. The phone is connected to PC using a USB cord.
2. We run
Code:
adb tcpip 9999
command from cmd with ADB already installed.
The above command helps now switched the abd demon (adbd) inside the android phone to listen through TCP-IP protocol
3. now we can disconnect the phone from the PC
4. using a terminal emulator application we can now fire the commands
a)
Code:
adb connect localhost:999
b)
Code:
backup -all -f /sdcard/dev/bck.ab
now a backup pop-up will open up, you can simply click backup button.
Now we can anytime execute the command in 4.a and 4.b util the user restarts the phone or
but the problem is I wish to execute
Code:
adb tcpip 9999
without PC. Can someone suggest me how to approach this problem. From where should I start reading or there is some existing application that can do this on a non-root phone.

How to recycle a smartphone with no screen

Hi,
I have a Xiaomi Mi 9 with no screen (it is broken). I do not plan to replace the screen but I would like to know how to recycle that smartphone to use at least as Linux server.
Is there a way to boot using USB or fastboot a ROM that provides me a Linux shell (SSH... dropbear... )?
I do not want to drop to the bin a Snapdragon 855 with 6GB RAM.
If USB Debugging got enabled on this phone then you can access it by means of ADB, means you even can run any Android's shell command
Code:
adb devices
adb shell "<YOUR-SHELL-COMMAND-HERE>"
and also run complete shell scripts on the phone
Code:
adb devices
adb shell "mkdir -p -m666 /data/local/tmp"
adb push <YOUR-SHELL-SCRIPT-HERE> /data/local/tmp/
adb shell "chmod +x /data/local/tmp/<YOUR-SHELL-SCRIPT-HERE>"
adb shell "$(cat /data/local/tmp/<YOUR-SHELL-SCRIPT-HERE>); echo $?"
you can write script to get screenshot from your phone by adb (if adb was enabled before)
adb shell screencap -p /sdcard/screenshot[i].png
to download image to your pc
adb pull /sdcard/screenshot[i].png ~/Desktop/screenshot[i].png
then by using "scrpy app" to share you phone screen to your computer
GitHub - Genymobile/scrcpy: Display and control your Android device
Display and control your Android device. Contribute to Genymobile/scrcpy development by creating an account on GitHub.
github.com
You can also use wifi connection to share your screen (with adb wirless) [see link]
you can even unlock bootloader and enable usb-debugging with broken screen.
scrcpy requires special setting in MIUI developer options which is only available with bonded MI account, so you can just mirror the screen but don't control the phone. so once you got adb connected, enable adb over wifi for scrcpy and connect mouse via usb-otg. you can now fully control device. setup mi account, disable the security setting and use scrcpy via usb...

Categories

Resources