ADB debugging not working on reboot - Fire TV Q&A, Help & Troubleshooting

I am running lineageOS on a rooted firestick. I am using ADB on the Firestick to control it via Homeassistant. The problem is that the adb debugging does not automatically work on reboot. Everytime i reboot i have to manually go to the menu turn off the ADB debugging and then turn in back on. After doing this i am able to reconnect adb via network (i.e, on homeassistant).
I want to ask is there any way i can use a script to automatically do this on restart of firestick. I have tried creating a script in init.d with the following contents but it doesn't seem to work.
adb tcpip 5555
I have added the following line to build.prop but this doesn't seem to work too
service.adb.tcp.port=5555
On restart the adb debugging is on in the developer tools but somehow it doesn't connect (either to Homeassistant or to my laptop), what seems to make it work is toggling it off and then back on.

Have you tried persist, so that the setting sticks between reboots?
Code:
ADB shell setprop persist.adb.tcp.port 5555

Just tried it. Still not working after reboot.
I there any command i can use to toggle the adb debugging via a startup script or crontab?

symbiansucks said:
Just tried it. Still not working after reboot.
I there any command i can use to toggle the adb debugging via a startup script or crontab?
Click to expand...
Click to collapse
Be sure you are running the above command as root user. Type su at the shell prompt, then type whoami to confirm you are root.
I guess you could make a script to run the following on each boot if the above doesn't work:
Code:
settings put global adb_enabled 1
setprop service.adb.tcp.port 5555
stop adbd
start adbd
exit 0
But I don't think this should be necessary.

Finnzz said:
Be sure you are running the above command as root user. Type su at the shell prompt, then type whoami to confirm you are root.
I guess you could make a script to run the following on each boot if the above doesn't work:
Code:
settings put global adb_enabled 1
setprop service.adb.tcp.port 5555
stop adbd
start adbd
exit 0
But I don't think this should be necessary.
Click to expand...
Click to collapse
Thanks. yes the command was run as root. Can i ask you one more thing, whats the best place to put the startup scripts in? I have tried init.d/ directory but the scripts don't get loaded from there i believe?
I have set permissions to chmod 755 for the script.

You can follow this guide,
Android (LineageOS 16) Execute Script on Start Up | sqall's blog
but it seems like there should be a much easier way to make ADB tcpip persist between reboots. I don't want to steer you wrong. @Sus_i would know better, he uses your build of LineageOS, and may have a cleaner solution.

Related

How to enable USB debugging on a broken screen using ADB (Permission & Root Issue)

How to enable USB debugging on a broken screen using ADB (Permission & Root Issue)
I have a Samsung Note 2 with a Broken screen/digitizer. So no haptic feedback's. Anyway the USB Debugging is already on and I could use the Remote tools like SideSync, Mobizen & other software's on my old machine before the screen broke. But now with new laptop I need to re-enable usb debugging or accept the fingerprint thing that pops up but I can't see what's on my screen. Also I don't know how to force this.
I've tried following several guides on how to enable through build.prop and adding lines - http://forum.xda-developers.com/showthread.php?t=2652564
but when trying to push the file back -
Code:
failed to copy c:\android\build.prop /system/build.prop : permission denied.
I've tried
Code:
adb remount
&
Code:
adb shell
su
mount -o remount, rw /system
and for both I get remount failed : operation not permitted.
I've tried using
Code:
adb usb & adb root
adb root shows error -- adbd cannot run as root in production builds.
adb usb - is just stuck nothing happens.
I've tried googling the above errors but any solutions don't seem to be working.
Reason why I use this phone is because I have kodi installed and everything was working up until now. I had wifi on the device - Do you think I could just enable or rename my wifi name to the same one? Problem would be what password I used. I still have my old router.
Any advice?
Thanks
I believe the devices isn't rooted. I tried using ADB Shell and typed in captials SU but got not found however typing it in lowercase nothing happens. just goes to the next line

[ROOT] Navigation keys back light control

I've been looking for a way how to have navigation keys back light always on while screen on (I was distracted by blinking caused by short timeout value) and at the same time always off for ebook reading and video watching and the solution should be simple and future proof (working on Nougat and Oreo as well). It is partially possible with Xposed and Gravitybox, but I am preparing myself for Oreo update, so I want to replace as many of its functions as possible. Long story short, use Tasker with following:
1. Event, display on, task:
run shell command as root, "chmod 644 /sys/class/leds/button-backlight/brightness"
run shell command as root, "echo 10 > /sys/class/leds/button-backlight/brightness"
run shell command as root, "chmod 444 /sys/class/leds/button-backlight/brightness"
2. Event, display off, task:
run shell command as root, "chmod 644 /sys/class/leds/button-backlight/brightness"
run shell command as root, "echo 0 > /sys/class/leds/button-backlight/brightness"
run shell command as root, "chmod 444 /sys/class/leds/button-backlight/brightness"
3. Application, ebook reader, youtube,..
Enter task
run shell command as root, "chmod 644 /sys/class/leds/button-backlight/brightness"
run shell command as root, "echo 0 > /sys/class/leds/button-backlight/brightness"
run shell command as root, "chmod 444 /sys/class/leds/button-backlight/brightness"
Exit task
run shell command as root, "chmod 644 /sys/class/leds/button-backlight/brightness"
run shell command as root, "echo 10 > /sys/class/leds/button-backlight/brightness"
run shell command as root, "chmod 444 /sys/class/leds/button-backlight/brightness"
Hi.
Is this working?
I really hate buttons light and would like to shut them off for good.
I guess that running this script after booting should work (if yours is working)
echo 0 > /sys/class/leds/button-backlight/brightness
What do you think?
Thanks in advance.
pantezuma said:
Hi.
Is this working?
I really hate buttons light and would like to shut them off for good.
I guess that running this script after booting should work (if yours is working)
echo 0 > /sys/class/leds/button-backlight/brightness
What do you think?
Thanks in advance.
Click to expand...
Click to collapse
I am still using this method without any issues. I even enhanced it with lowering the keys back light intensity during night, quite handy in total darkness
To disable back light permanently after boot use this:
1. run shell command as root, "chmod 644 /sys/class/leds/button-backlight/brightness"
2. run shell command as root, "echo 0 > /sys/class/leds/button-backlight/brightness"
3. run shell command as root, "chmod 444 /sys/class/leds/button-backlight/brightness"
Explanation:
1. make sure that we have RW configuration rights (I would say that this is optional in your case, but it won't hurt anything)
2. disable brightness
3. remove RW configuration rights (otherwise system apps can and will enable the back light again when you turn screen off and on)
Thanks for you fast reply.
I'm still trying to understand how magisk works with scripting (and the permissions you mention that I didn't know were required).
I come from an old S2 running custom Jelly Bean and all this systemless stuff is new to me as previously I used to put scripts in init.d and that was all I needed, but now I don't want to modify system partition.
I am using Magisk for root and few build.prop tweaks, not sure how init.d works with it. In the past I had luck with Script manager - it was enough to create a script file, open it with Script manager and set it as "run as root and at boot time". Or you can still use an automation app which can run shell commands (Tasker has this feature for sure).
_mysiak_ said:
I am using Magisk for root and few build.prop tweaks, not sure how init.d works with it. In the past I had luck with Script manager - it was enough to create a script file, open it with Script manager and set it as "run as root and at boot time". Or you can still use an automation app which can run shell commands (Tasker has this feature for sure).
Click to expand...
Click to collapse
As far as I know, anything you put under /magisk/.core/post-fs-data.d would be ran as a script after boot.
But as I said before, just starting with this and may be talking nonsense.
I really wouldn't like to install tasker or anything else as I just want them off for the rest of my life!
Thanks!
PD: Sorry for my english.
_mysiak_ said:
I am using Magisk for root and few build.prop tweaks, not sure how init.d works with it. In the past I had luck with Script manager - it was enough to create a script file, open it with Script manager and set it as "run as root and at boot time". Or you can still use an automation app which can run shell commands (Tasker has this feature for sure).
Click to expand...
Click to collapse
Hey!
I was able to run your commands via ADB and everything is working perfect (I don't know why but they didn't work via terminal emulator)
Only issue is that whenever I reboot my phone everything is lost.
My problem is that I'm unable to make a script that runs at boot time (I'm pretty ignorant in scripting and where to put that script).
Any help or suggestions will be highly appreciated!
pantezuma said:
Hey!
I was able to run your commands via ADB and everything is working perfect (I don't know why but they didn't work via terminal emulator)
Only issue is that whenever I reboot my phone everything is lost.
My problem is that I'm unable to make a script that runs at boot time (I'm pretty ignorant in scripting and where to put that script).
Any help or suggestions will be highly appreciated!
Click to expand...
Click to collapse
Don't forget to add "su" as a first command if you are running it from terminal emulator. Try Script manager mentioned before, it can do what you want quite easily - just put all commands in a file, save it somewhere on the internal SD, open it from SM, set as run at boot and run as root and that's it. You can run your scripts on demand as well, so you can check quickly if it's working fine.
I remembered that had bought Tasker a few years ago (but never really used it) so I created a task to perform the above mentioned commands at boot.
Anyway, I'm still unable to make a script and run it via terminal emulator, and that's really annoying!
I'll keep investigating.
Thanks a lot!
pantezuma said:
Anyway, I'm still unable to make a script and run it via terminal emulator, and that's really annoying!
Click to expand...
Click to collapse
What is the exact content of the script file, what are the file permissions and how do you try to run it?
_mysiak_ said:
What is the exact content of the script file, what are the file permissions and how do you try to run it?
Click to expand...
Click to collapse
Hi!
This script is something like this:
#!/bin/sh
su
chmod 644 /sys/class/leds/button-backlight/brightness
echo 0 > /sys/class/leds/button-backlight/brightness
chmod 444 /sys/class/leds/button-backlight/brightness
Named it "lights sh" and put in on my internal SD card,
Then, with terminal emulator browsed to its location and tried to run it via "./lights sh"
I got "Permission denied" and also some errors like "backlight not found".
Couldn't find the way to change permissions (Reading a little more found that internal SD card is mounted as non executable. Is that correct?
Later I moved the file to DATA and changed permissions to 755 obtaining the same results.
As you may notice I'm a complete noob regarding scripting and permissions and I apologize for that!
Thanks in advance!
pantezuma said:
Hi!
This script is something like this:
#!/bin/sh
su
chmod 644 /sys/class/leds/button-backlight/brightness
echo 0 > /sys/class/leds/button-backlight/brightness
chmod 444 /sys/class/leds/button-backlight/brightness
Named it "lights sh" and put in on my internal SD card,
Then, with terminal emulator browsed to its location and tried to run it via "./lights sh"
I got "Permission denied" and also some errors like "backlight not found".
Couldn't find the way to change permissions (Reading a little more found that internal SD card is mounted as non executable. Is that correct?
Later I moved the file to DATA and changed permissions to 755 obtaining the same results.
As you may notice I'm a complete noob regarding scripting and permissions and I apologize for that!
Thanks in advance!
Click to expand...
Click to collapse
I've just made a very simple script:
1.
#!/bin/sh
echo hello world!
2. saved it to the internal sd card as "script.sh"
3. chmod 755 script.sh
4. running it as "./script.sh" gives the permission denied error, but "sh script.sh" works fine
In your case, remove "su" command from the script file itself, but run it in terminal before calling the script instead. Or just use script manager
Thanks, working great Tasker profiles...
how to lower the brightness of thw buttons? on night the light is so bright and on the white variant looks horrible xD
deewfrank said:
how to lower the brightness of thw buttons? on night the light is so bright and on the white variant looks horrible xD
Click to expand...
Click to collapse
If you have tasker:
Code:
run shell command as root, "chmod 644 /sys/class/leds/button-backlight/brightness"
if %LIGHT > 3
run shell command as root, "echo 10 > /sys/class/leds/button-backlight/brightness"
else
run shell command as root, "echo 1 > /sys/class/leds/button-backlight/brightness"
end if
run shell command as root, "chmod 444 /sys/class/leds/button-backlight/brightness"
It will set brightness based on the surrounding light level.

[ROOT] Disable charging LED

If anyone wants to disable charging LED, here's an easy way via Tasker.
Note: notifications will not cause LED to blink while charging
State, power, power any
Enter task:
1. run shell as root, "chmod 644 /sys/class/leds/red/brightness"
2. run shell as root, "echo 0 > /sys/class/leds/red/brightness"
3. run shell as root, "chmod 444 /sys/class/leds/red/brightness"
Exit task:
1. run shell as root, "chmod 644 /sys/class/leds/red/brightness"
2. run shell as root, "echo 0 > /sys/class/leds/red/brightness"
Hi! Thanks for sharing. I am getting the following error:
23.21.58/E Run Shell: ->
23.21.58/E Run Shell: ->
23.21.58/E Run Shell: ->
23.21.58/Shell runBackground "chmod 644 /sys/class/leds/red/brigthness" root: true timeout: -1
23.21.58/Shell start process-thread ID 725
23.21.58/E add wait type Shell1 time 2147483647
23.21.58/E add wait type Shell1 done
23.21.58/E add wait task
23.21.58/E Error: 127
Am I doing something wrong?
Thanks!
Dj Telo said:
Hi! Thanks for sharing. I am getting the following error:
23.21.58/E Run Shell: ->
23.21.58/E Run Shell: ->
23.21.58/E Run Shell: ->
23.21.58/Shell runBackground "chmod 644 /sys/class/leds/red/brigthness" root: true timeout: -1
23.21.58/Shell start process-thread ID 725
23.21.58/E add wait type Shell1 time 2147483647
23.21.58/E add wait type Shell1 done
23.21.58/E add wait task
23.21.58/E Error: 127
Am I doing something wrong?
Thanks!
Click to expand...
Click to collapse
Does Tasker have root access? Check it in Magisk/superuser section.
_mysiak_ said:
Does Tasker have root access? Check it in Magisk/superuser section.
Click to expand...
Click to collapse
Yes it does. I can even execute other shell commands with root without problem. Is the command you are giving maybe only valid with Nougat and not Oreo?
Thanks!
Dj Telo said:
Yes it does. I can even execute other shell commands with root without problem. Is the command you are giving maybe only valid with Nougat and not Oreo?
Thanks!
Click to expand...
Click to collapse
Oups, my bad, sorry for the typo in the instructions. It has to be brigHTness, not brigTHness.
Will this work on the Mi A3 too?
And will the notification led still blink when not charging the phone?
Thank you
DBuffon said:
Will this work on the Mi A3 too?
And will the notification led still blink when not charging the phone?
Thank you
Click to expand...
Click to collapse
I don't have rooted A3 at hand, so can't try it. It might work, there is no harm in sending those commands over adb shell as root user. You will see the result immediately.
Sent from my Mi A1 using Tapatalk
_mysiak_ said:
I don't have rooted A3 at hand, so can't try it. It might work, there is no harm in sending those commands over adb shell as root user. You will see the result immediately.
Click to expand...
Click to collapse
Ok, I'll try but I don't understand the following:
_mysiak_ said:
State, power, power any
Enter task:
1. run shell as root, "chmod 644 /sys/class/leds/red/brightness"
2. run shell as root, "echo 0 > /sys/class/leds/red/brightness"
3. run shell as root, "chmod 444 /sys/class/leds/red/brightness"
Exit task:
1. run shell as root, "chmod 644 /sys/class/leds/red/brightness"
2. run shell as root, "echo 0 > /sys/class/leds/red/brightness"
Click to expand...
Click to collapse
Are the "Enter task" the code that should be run when the charging cable connects to the phone and the "Exit task" the one that runs when unplugging the cable?
I don't understand what this code does, and I don't want to mess up the led (that is: before I proceed, I want to know how to revert if things don't go as they should). Thank you.
DBuffon said:
Ok, I'll try but I don't understand the following:
Are the "Enter task" the code that should be run when the charging cable connects to the phone and the "Exit task" the one that runs when unplugging the cable?
I don't understand what this code does, and I don't want to mess up the led (that is: before I proceed, I want to know how to revert if things don't go as they should). Thank you.
Click to expand...
Click to collapse
Enter and exit tasks are for Tasker. If you want to try the commands from adb shell, enter those mentioned in "entry task" first and check if LED stopped glowing. To restore the original state enter commands from "exit task" (or just reboot the phone). Changes are not permanent.
Commands do the following - enable RW access to LED control, set intensity to 0%, disable RW access.
_mysiak_ said:
Enter and exit tasks are for Tasker. If you want to try the commands from adb shell, enter those mentioned in "entry task" first and check if LED stopped glowing. To restore the original state enter commands from "exit task" (or just reboot the phone). Changes are not permanent.
Commands do the following - enable RW access to LED control, set intensity to 0%, disable RW access.
Click to expand...
Click to collapse
Great, thanks for the information.
Unfortunately I can't issue the commands (sorry, I'm new to the adb shell):
Code:
[email protected]:~$ adb shell chmod 644 /sys/class/leds/red/brightness
chmod: /sys/class/leds/red/brightness: Permission denied
[email protected]:~$ adb root
adbd cannot run as root in production builds
DBuffon said:
Great, thanks for the information.
Unfortunately I can't issue the commands (sorry, I'm new to the adb shell):
Code:
[email protected]:~$ adb shell chmod 644 /sys/class/leds/red/brightness
chmod: /sys/class/leds/red/brightness: Permission denied
[email protected]:~$ adb root
adbd cannot run as root in production builds
Click to expand...
Click to collapse
adb shell
su
chmod ....
It works on the A3 too. Thanks!
In my mi A1, revengeos android 9, in enter task, 2th step go in error
d_borghi said:
In my mi A1, revengeos android 9, in enter task, 2th step go in error
Click to expand...
Click to collapse
What kind of error..?
_mysiak_ said:
What kind of error..?
Click to expand...
Click to collapse
Allego
d_borghi said:
Allego
Click to expand...
Click to collapse
Try to run that command from terminal on the phone (or via ADB) as root. Alternatively, store the error message in some variable in Tasker and display it, so we know why exactly does it fail. On my phone it still works fine (Mi A3 now).
how can i try by an emulator terminal app in my phone directly?
d_borghi said:
how can i try by an emulator terminal app in my phone directly?
Click to expand...
Click to collapse
Install and run for example this app https://play.google.com/store/apps/details?id=yarolegovich.materialterminal&hl=en
_mysiak_ said:
Install and run for example this app https://play.google.com/store/apps/details?id=yarolegovich.materialterminal&hl=en
Click to expand...
Click to collapse
Finally, I try the app.
By this terminal I receive no error, look at the screenshot.
Why tasker goes in error?
d_borghi said:
Finally, I try the app.
By this terminal I receive no error, look at the screenshot.
Why tasker goes in error?
Click to expand...
Click to collapse
Could you take a screenshot of the details in Tasker for that one task which gives you an error? Maybe you have a typo there.

[GUIDE] Access color-filter through command shell

I'm running on the 10.5.10.IN11BA build.
Just get a command shell to your OnePlus 8 Pro through adb, no need for the device to be rooted or anything.
Once you get there, just type:
Code:
am start -n com.oneplus.factorymode/.camera.manualtest.CameraManualTest
It will launch the FactoryMode app and get you directly to the manual camera test view.
Just press the bottom right icon until you get to the color filter.
I have no doubt there is easier and quicker ways to get the same result, maybe through an apk.
Edit:
As far as I know, this workaround could work on any OnePlus 8 Pro model.
Also, as pointed out by ster88, you also can take videos with the filter, which was not possible with the camera app.
I tried not working. I used th terminal app from google playstore.
Can u specifically provide which app and where.
And anything to enable on developer mode.
sajjadhussaini said:
I tried not working. I used th terminal app from google playstore.
Can u specifically provide which app and where.
And anything to enable on developer mode.
Click to expand...
Click to collapse
Sure !
To enable developper mode, go to "Settings > About phone" and tap the "Build number" until they tell you have developper mode enabled.
Then go to "Settings > System > Developper options" and under "Debugging" enable "USB Debugging" and "Wireless ADB Debugging".
Once that is done, on your computer, download the platform-tools, containing adb here :
Code:
https://developer.android.com/studio/releases/platform-tools
Once it is downloaded, go inside it with your command line.
If you are doing this wirelessly, get your phone IP address and type:
Code:
adb connect <your-phone-ip-address>
Then if it worked, to know what the transport id of our device is, type :
Code:
adb devices -l
Once you have the transport id, type this to get a shell to your phone:
Code:
adb -t <transport-id> shell
You can get more details on how adb works here:
Code:
https://developer.android.com/studio/command-line/adb
Then when you have access to the shell, just type:
Code:
am start -n com.oneplus.factorymode/.camera.manualtest.CameraManualTest
If everything went fine, you should get access to the camera !
I could not use a terminal app to run the command, usually because the terminal app doesn't want to let the camera application to take over the view, or something like that, not sure.
The ideal would be to have a dedicated apk to run the command, at least for the time being.
Tried to launch using an app called Activity launcher and it didn't work.
play.google.com/store/apps/details?id=de.szalkowski.activitylauncher
imgur.com/a/BS9Wqzc
I'm not rooted, are you sure this works for non rooted devices? I'll try later with adb to see what happens.
Here is the error from Termux. Hope it can be loaded via apk, not sure if it suffers same restrictions:
$ am start -n com.oneplus.factorymode/.camera.manualtest.CameraManualTest
Starting: Intent { cmp=com.oneplus.factorymode/.camera.manualtest.CameraManualTest }
Warning: Activity not started because the current activity is being kept for the user.
From what I understood, you need to run the command from an adb shell. You cannot run it from within the phone as far as I know.
You can still run it from adb and "lock" the application so it stays in the background.
And I tried with multiple Terminal apps, the command works with none of them (Termux, Terminal Emulator, Material Terminal, etc...)
Apparently, you have some rights on the adb command shell that you don't get as a simple user on the phone.
You man are genius. I found easy way also to keep it running if needed. After getting the camera test to run, you can lock the app so phone will not close it and always return to it. Thanks, finally I can enjoy my camera
Launched it without a computer by using ADB from temux
--no root required
https://github.com/MasterDevX/Termux-ADB
*Enable wireless debugging (wireless doesn't actually need to be on)
Note wireless debugging --takes some time to take effect, sometimes up to 3-5 minutes for me.
*Run the installer above in termux,
*Type adb devices
*Type adb connect 127.0.0.1
*Accept the trusted key
*type adb shell
Troubleshooting:
*If you get an error about multiple devices type adb kill-server
*type adb devices
*type adb shell
*Accept the trusted key
*then paste in: am start -n com.oneplus.factorymode/.camera.manualtest.CameraManualTest
lllsondowlll said:
Here is the error from Termux. Hope it can be loaded via apk, not sure if it suffers same restrictions:
$ am start -n com.oneplus.factorymode/.camera.manualtest.CameraManualTest
Starting: Intent { cmp=com.oneplus.factorymode/.camera.manualtest.CameraManualTest }
Warning: Activity not started because the current activity is being kept for the user.
Click to expand...
Click to collapse
Did you get any solution for this ?
aishkumar said:
Did you get any solution for this ?
Click to expand...
Click to collapse
...
lllsondowlll said:
Launched it without a computer by using ADB from temux
--no root required
https://github.com/MasterDevX/Termux-ADB
*Enable wireless debugging (wireless doesn't actually need to be on)
Note wireless debugging --takes some time to take effect, sometimes up to 3-5 minutes for me.
*Run the installer above in termux,
*Type adb devices
*Type adb connect 127.0.0.1
*Accept the trusted key
*type adb shell
Troubleshooting:
*If you get an error about multiple devices type adb kill-server
*type adb devices
*type adb shell
*Accept the trusted key
*then paste in: am start -n com.oneplus.factorymode/.camera.manualtest.CameraManualTest
Click to expand...
Click to collapse
I've made a script that allows you to launch the Camera from your phone by just typing ./camera in Termux. No root needed. It can be found here: https://github.com/lllsondowlll/OP8_Camera/blob/master/README.md
can u make a video on this how u used termux and what to do whole process screen recording will be helpful coz i am new to this and i dnt wanna mess up with my phone if i lost some files or smthing please make a video i really want to play with IR camera
It works but not really required
It's working, but have few questions to myself.
1. Does it really needed?
Ans: No, you won't keep clicking pics of plastic material to see inside.
2. Is it handy?
Ans: yes, once opened you can pin/lock it in recent app and open whenever required.
It is just a IR camera and nothing wrong in it, I believe OP will enable it in future, because it really doesn't show through the clothes and even if you want to see for some black thin clothes, you need to go near.
So if you are thinking to click the nude people and go closure you will be slapped.
Few images I have taken.
babsvsphudi said:
can u make a video on this how u used termux and what to do whole process screen recording will be helpful coz i am new to this and i dnt wanna mess up with my phone if i lost some files or smthing please make a video i really want to play with IR camera
Click to expand...
Click to collapse
https://youtu.be/iVQYu-CeN24
You can't hurt anything. Just follow the instructions.
lllsondowlll said:
You can't hurt anything. Just follow the instructions.
Click to expand...
Click to collapse
thanks man you are awesome love n respect for u brother
Starting: Intent { cmp=com.oneplus.factorymode/.camera.manualtest.CameraManualTest }
Error type 3
Error: Activity class {com.oneplus.factorymode/com.oneplus.factorymode.camera.manualtest.CameraManualTest} does not exist.
connected to localhost:5555
error: more than one device/emulator
I ran it as the video shows. But I got an error like above.
Is there any way to solve this problem or is it not possible with IN2020? Please forgive me for using a translator.
pcningen said:
Starting: Intent { cmp=com.oneplus.factorymode/.camera.manualtest.CameraManualTest }
Error type 3
Error: Activity class {com.oneplus.factorymode/com.oneplus.factorymode.camera.manualtest.CameraManualTest} does not exist.
connected to localhost:5555
error: more than one device/emulator
I ran it as the video shows. But I got an error like above.
Is there any way to solve this problem or is it not possible with IN2020? Please forgive me for using a translator.
Click to expand...
Click to collapse
I was able to resolve this issue by reinstalling factory mode. I apologize to you for a fuss over. Many thanks to the developers of this method.
Since I can't get termux to work for now, another idea if you want to have it accessible all the time(*), is to run this (beautiful) command with an adb shell from a computer and then lock the app so you can't accidentally close it.
After that you can always go back to it whenever you want it!
*App won't remain locked after reboot, obviously.
lllsondowlll said:
Launched it without a computer by using ADB from temux
--no root required
https://github.com/MasterDevX/Termux-ADB
*Enable wireless debugging (wireless doesn't actually need to be on)
Note wireless debugging --takes some time to take effect, sometimes up to 3-5 minutes for me.
*Run the installer above in termux,
*Type adb devices
*Type adb connect 127.0.0.1
*Accept the trusted key
*type adb shell
Troubleshooting:
*If you get an error about multiple devices type adb kill-server
*type adb devices
*type adb shell
*Accept the trusted key
*then paste in: am start -n com.oneplus.factorymode/.camera.manualtest.CameraManualTest
Click to expand...
Click to collapse
I wanna piggyback on this some, since this is similar to the process I just did.
So while this works for nonroot users (I didn't actually test the nonroot version myself), if you are rooted, AND using magisk, I personally install ADB and fastboot binaries from the repo from zackptg5(?) And then just told termux to run an elevated shell (su) and then pasted in the command linked in OP:
Code:
am start -n com.oneplus.factorymode/.camera.manualtest.CameraManualTest
It then loaded the testmode camera app, and (xXx caused it to crash, I had to disable it but I don't know if it's a setting with my config) voila. It worked! Thank you.
Edit: I wanna say just running termux in root would solve the issue either way still, but, my point still is there.

Help enabling adb from recovery (broken screen)

The purpose of this is to use my phone via scrcpy for my sms verification and stuff.
So far I've tried these methods of editing default.prop/prop.default, and setprop persist.sys.usb.config etc etc
but still undetected from "adb devices"
Any workaround? thanks
I'm using OrangeFox recovery.
VanGreat said:
The purpose of this is to use my phone via scrcpy for my sms verification and stuff.
So far I've tried these methods of editing default.prop/prop.default, and setprop persist.sys.usb.config etc etc
but still undetected from "adb devices"
Any workaround? thanks
I'm using OrangeFox recovery.
Click to expand...
Click to collapse
Orange Fox has enabled ADB by default. Your screen is broken? How do you know OF has been booted?
VanGreat said:
So far I've tried these methods of editing default.prop/prop.default, and setprop persist.sys.usb.config etc etc
but still undetected from "adb devices"
Click to expand...
Click to collapse
How did you edit these files? Did you un-/repack the recovery.img inside the downloaded zip?
The prop.default in your ramdisk.img shows:
ro.adb.secure=0
persist.sys.usb.config=adb
Everything seems to be correctly from device's site. No need to edit sth.
No. Somehow I need to access to adb on OS and those settings has been disabled on new rom. As I said i need to access to my sms app
You'd like to patch the setting files via recovery to gain access with ADB in system? USB-debugging is toggled off? Are there already the adb_keys of your PC in /data/misc/adb to allow access?
Yes I need to enable usb debugging through recovery.
I think i have to enable adb first before authorizing my device on /data/misc/adb
We do both via OF:
First you should find the needed setting file and check its permissions for restoring it correctly afterwards (assuming you're already in the device's shell by entering 'adb shell'):
Code:
ls -al /data/system/users/0/settings_global.xml
Note the permissions.
Then leave the device's shell and pull the file:
Code:
exit
adb pull /data/system/users/0/settings_global.xml
Open setting_global.xml with an editor and set the line
Code:
package="com.android.settings" defaultValue="0" defaultSysSet="true" /> <setting id="7676" name="adb_enabled"
to value=1
Push the file back:
Code:
adb push settings_global.xml /data/system/users/0
and check the permissions:
Code:
ls -al /data/system/users/0/settings_global.xml
Authorizing:
On your PC search for
Code:
C:\Users\<USER>\.android\adbkey.pub
copy that file into your ADB folder. Then push it to:
Code:
adb push adbkey.pub /data/misc/adb_keys
and set the permissions:
Code:
adb shell chmod 0640 /data/misc/adb_keys
adb shell chown system:shell /data/misc/adb_keys
okay i'm now on your authorizing part, it now says something but it still says unauthorized on "adb devices"
what i actually did was to flash aosp rom and edit build.prop there and set the adb variables
USB debugging seems to be active. But I don't know why it says unauthorized. Maybe there is another setting related to ADB in settings_global.xml that needs to be activated for Xiaomi devices like yours.
VanGreat said:
what i actually did was to flash aosp rom and edit build.prop there and set the adb variables
Click to expand...
Click to collapse
Do not edit any file but the setting file. You must not change the props.
something wrong with /data encryption. I for sure pushed the adb_keys on /data/misc/adb but when I rebooted at the recovery or system it goes back nothing.
some say this was aosp system as they won't allow /data modification?
Are you able to open /data in OF and do you see the folders/files in there? With the correct names?
If yes, you don't have any problems with encryption
WoKoschekk said:
Are you able to open /data in OF and do you see the folders/files in there? With the correct names?
Click to expand...
Click to collapse
i only saw recovery folder. also gave me "cant mount /data (invalid argument)" when i try to mount it first.
VanGreat said:
i only saw recovery folder. also gave me "cant mount /data (invalid argument)" when i try to mount it first.
Click to expand...
Click to collapse
Then you have no chance to activate ADB and get access to your SMS.
assuming encryption is healthy in boot mode, you can enable usb-debugging and authorize RSA key from either /system or boot, no access to /data needed.
this is for custom ROM by modifying /system
[OTA] ADB-Enabler - Flashable UPDATE.ZIP File
This tool is not meant to be used on Android devices with dm-verify or Android Verify Boot (AVB) enabled Every Android device has a stock recovery installed. That default recovery typically at least offers you the 4 options reboot system now...
forum.xda-developers.com
this is for stock ROM by modifying boot
Accessing my phone with a dead screen
So my phone screen connector was liquid damaged. No touch or display. It's an Essential Phone which supports HDMI output, however I can't unlock it because I don't see the lock screen on the monitor I just see a lock icon. I have...
forum.xda-developers.com
take note (on stock MIUI only) scrcpy won't work on xiaomi devices, com.miui.securitycenter prevents that. unless you have bonded mi account, you can't enable USB debugging (Security settings) in developer options.

Categories

Resources