[Closed] Stuck in login-loop, trying to install com.android.settings via ADB - General Questions and Answers

Background:
On a Nokia G10 I have been using ADB to uninstall unwanted apps to make the phone child-safe, without root being required. I followed steps here using the command:
Code:
.\adb shell pm uninstall -k --user 0 <package_name>
and can reinstall any app using:
Code:
.\adb shell pm install-existing <package_name>
This has been very successful and I have been able to uninstall and reinstall many apps as needed. The final step I took was uninstalling the settings app (com.android.settings) to prevent the user from just enabling the play store and downloading everything again. Whenever I needed to update/change anything, I would connect via ADB and reinstall the settings app and do what I needed to do.
This has been working well for months, no problems, a very elegant and airtight solution.
Problem:
Today I restarted the phone and it got stuck in a loop at the lock screen. Not a boot loop.
It turns on, and loads the lock screen up, then there's about half a second before it freezes, the lock screen crashes (goes black for a second) and the reloads the lock screen.
During that half second I can interact with the screen normally (e.g. swipe down the notifications/settings menu at the top, or open the power options menu) but then it crashes and reloads the lock screen.
Aim:
I need to reinstall com.android.settings . I know this will fix the loop because I encountered this error while setting up the system earlier. However, I was already connected via ADB at that time and could just run the command to reinstall the settings app. This stopped it crashing, it loaded normally and I could login immediately.
But now I cannot connect via ADB for some reason. Running these commands gives the following errors:
Code:
.\adb shell pm install-existing com.android.settings adb.exe: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
.\adb devices
List of devices attached
PT996******************* unauthorized
I have tried the following with no success:
1)
Code:
adb kill-server
adb start-server
2) Starting in safe mode gives the same problem
3) Ideas listed here: https://stackoverflow.com/questions/23081263/adb-android-device-unauthorized/25546300#25546300
I don't get a new prompt to allow access.
4) Trying to start in FASTBOOT mode... I'm not sure I'm doing it right. Holding down the power and -vol key the screen displays "FASTBOOT mode..." but does not progress to a menu screen.
What I need:
A way to install com.android.settings, or, a way to get ADB access.
Any suggestions welcome
Thanks

Some progress trying FASTBOOT:
Using this guide: https://forum.xda-developers.com/t/how-to-enter-recovery-mode-on-nokia-g10-g20.4353903/
I have been able to boot into recovery mode.
Does anyone know how I can use the option "Apply update from ADB" to issue ADB commands like this?
Code:
.\adb shell pm install-existing com.android.settings
According to this thread: https://android.stackexchange.com/questions/94126/adb-shell-in-recovery-mode-errorclosed
adb shell is inaccessible with stock recovery.
Using FASTBOOT in the Windows powershell terminal, can I issue any similar command to install an existing package?
or, can I use adb sideload to reinstall com.android.settings?

as adb is unauthorized you simply have no adb access anymore. if you are using the same PC then RSA key is lost (otherwise check the previously known working PC and copy .android directory to current PC)
fastboot is unrelated to adb and of no use at all.

Related

Can't remove malicious app

I've installed a malicious app called "Game Launcher" which has forced my Galaxy s7 into secure mode.
I've tried every way of uninstalling it from inside the android system but nothing works.
Since my volume button is broken, I can't get into recovery mode to factory reset phone that way.
I thought about trying to remove the app or wiping/resetting the phone through ADB but it wouldn't recognize the device(probably because of the malware) even though it recognizes all other devices.
Does anyone have an idea how I could solve this?
Thanks for all replies!!
Enable usb debugging in developer options and
Dial *#0808# select DM+ACM+ADB.
Connect to adb and do:
adb shell pm uninstall packagenameofvirus
Done
kpwnApps said:
Enable usb debugging in developer options and
Dial *#0808# select DM+ACM+ADB.
Connect to adb and do:
adb shell pm uninstall packagenameofvirus
Done
Click to expand...
Click to collapse
Thanks for your help!
I've used "adb shell pm list packages -3 -f." to get all the installed packages and then I've removed them but the problem still persists. I was able to boot into recovery with adb intending to wipe the device that way, but then I couldn't navigate the recovery menu because my volume buttons are broken. Any ideas?
rekkio said:
Thanks for your help!
I've used "adb shell pm list packages -3 -f." to get all the installed packages and then I've removed them but the problem still persists. I was able to boot into recovery with adb intending to wipe the device that way, but then I couldn't navigate the recovery menu because my volume buttons are broken. Any ideas?
Click to expand...
Click to collapse
Connect to adb again while your phone is on and
Use adb shell am broadcast -a android.intent.action.MASTER_CLEAR
kpwnApps said:
Connect to adb again while your phone is on and
Use adb shell am broadcast -a android.intent.action.MASTER_CLEAR
Click to expand...
Click to collapse
When doing that, i get this output, "Broadcasting: Intent { act=android.intent.action.MASTER_CLEAR flg=0x400000 }
Broadcast completed: result=0" and nothing has changed.
I'm able to boot into download mode with adb so I'm thinking about downloading a stock rom and flashing it with Odin.
Read that it's supposed to wipe and reset when doing that.

Need help! Won't accept encryption password after OS upgrade. No access to GUI/home

I accepted the forced OS upgrade over the weekend (I think it was for Pie) on my Samsung Note 8. Upon restart, it is no longer accepting my encryption password and I can't get to my home screen. Yes, I know my password, and yes I'm freaking out (so any help would be appreciated!). I would like to not wipe the data off my phone.
So far he's what I've tried on my own:
Restarting/rebooting the device
Samsung Sync to try and back up
Find my mobile (both the android version and samsung version) to try and back up the device. No dice.
Load to bootloader (but device not recognized)
I'm down to three tries before the Factory Reset Protection (FRP) kicks in. (any way to extend number of tries is a separate, but equally important question.)
I finally started brushing up on adb and ran "adb devices". Server starts and it recognizes the device (whew!) but it's "unauthorized" which I assume it has to do with my encryption. Again, I have no access to the settings menu in order to enable USB debugging, so going into the GUI is not possible.
I also tried this:
[email protected]:~# adb backup -apk -shared -all -f ~/android/backup.ab
adb: unable to connect for backup: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
[email protected]:~# adb kill-server
[email protected]:~# adb start-server
* daemon not running; starting now at tcp:5037
* daemon started successfully
[email protected]:~# adb backup -apk -shared -all -f ~/android/backup.ab
adb: unable to connect for backup: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
Again, the fact that ADB is recognizing the device is a good sign in my opinion, just need to get past that so I can backup and pull the data off my phone. If there are any how-to's or steps that show what I can do to fix my actual problem and get my phone back to the way it was on Saturday, that would be AWESOME.
I haven't tried rebooting without the SIM inserted or wiping cache partition from the reset screen, but I'm willing to try that if anyone thinks that'll do it.
Please help.

Cant get ADB in recovery mode, but works in live mode, and so does fastboot

On my Rooted Pixel 4a, I can use:
Fastboot - I flashed the latest update firmware as well as the rooted boot image
ADB Over WiFi - This is the most comnon way I connect for ADB
ADB While the Android OS is running
What I cannoit get woirking is ADB while in recovery mode,
If I go to recovery and connect via a high quality cable, I can see the device with
Code:
adb devices
C:\Java\x86\Android\android-sdk\platform-tools>adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
091????????490 rescue
Click to expand...
Click to collapse
But none of the below works
Code:
>adb shell
error: closed
>adb connect 091XXXXXXXX490
cannot resolve host '091XXXXXXXX490' and port 5555: No such host is known. (11001)
>adv shell 091XXXXXXXX490
error: closed
What am I doing wrong? how can I connect in recovery?
Stock recovery?
WillisD said:
Stock recovery?
Click to expand...
Click to collapse
Yes.
DiamondJohn said:
What I cannoit get woirking is ADB while in recovery mode
Click to expand...
Click to collapse
I always thought that adb from recovery was a TWRP thing?
I did adb reboot recovery. My phone has an Android on its back, with "No command" on the screen.
Code:
$ adb devices
List of devices attached
xxx unauthorized
$ adb shell
adb: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
I got the same thing booting to recovery by holding Vol down at boot.
Booting to rescue (another option on the boot menu) got me the same thing on my screen and the same symptom you saw.
Code:
$ adb devices
List of devices attached
xxx rescue
$ adb shell
error: closed
Are you sure this is supposed to work with the stock recovery?
a1291762 said:
Are you sure this is supposed to work with the stock recovery?
Click to expand...
Click to collapse
Actually no, i guess it was an assumption, and the response to adb devices, gave me further hope.
However,, it does respnod to ADB. As is seen, it provides a list of devices. But, maybe one can't shell out while in stock recpvery. Which goves me an idea, maybe we can send commands from the command window in windows/linux. eg adb shell ls But it wouldn't make sense that it would allow root, which negates what I wanted to be able to do in the first place. ie recovery from a bootloop by selectively editing the data partition. in my previous case, it was to disable a single magisk module.
DiamondJohn said:
It wouldn't make sense that it would allow root, which negates what I wanted to be able to do in the first place. ie recovery from a bootloop by selectively editing the data partition. in my previous case, it was to disable a single magisk module.
Click to expand...
Click to collapse
Yeah, it certainly seems to be speaking adb...
I didn't think to try...but maybe adb push and pull work?

Trying to disable guest user using adb

I'm trying to disable the guest user on my phone, running android 10 and non rooted, using adb. I have been attempting this by using the command: adb shell settings put global guest_user_enabled 0. However when I type it in nothing happens. Adb does pick up my device and once entering the command, I get no message or any sort of output.

How to escape TWRP? Activate ADB w/ broken screen?

So my screen broke on my Note 10+, leaving only the top 15% with display and the bottom 60% with touch. I am trying to activate ADB on it so that I can backup my internal storage.
I booted into TWRP so that I could backup the rest of my system, which I did successfully, but because of the bad touch screen I am unable to hit the ADB side load button. I'd like to reboot into the system because I have ADB enabled there, however I also cannot click the reboot to system button, only reboot to download and shutdown. Since I can't see most of the screen, it is also not possible to access the terminal and work from there.
Anybody know how I can escape TWRP or otherwise activate ADB? Thanks for the help.
Once USB Debugging successfully got enabled on Android device, ADB is supported as soon as device successfully booted up.
To turn device into ADB Sideload mode you run commands
Code:
adb devices
adb reboot sideload
jwoegerbauer said:
Once USB Debugging successfully got enabled on Android device, ADB is supported as soon as device successfully booted up.
To turn device into ADB Sideload mode you run commands
Code:
adb devices
adb reboot sideload
Click to expand...
Click to collapse
Like I said, I'm unable to boot into the system right now because I am stuck in TWRP. ADB is not enabled in TWRP upon boot, you have to press the ADB side load button, which I am unable to do.
AllanRSS said:
Like I said, I'm unable to boot into the system right now because I am stuck in TWRP. ADB is not enabled in TWRP upon boot, you have to press the ADB side load button, which I am unable to do.
Click to expand...
Click to collapse
To boot into NORMAL mode ( i.e. ADB mode ) you enter on Windows command prompt these commands, one-by-one
Code:
adb devices
adb reboot
jwoegerbauer said:
To boot into NORMAL mode ( i.e. ADB mode ) you enter on Windows command prompt these commands, one-by-one
Code:
adb devices
adb reboot
Click to expand...
Click to collapse
I can not use ADB. It is for this very reason I am asking how to enable ADB. But thank you for these valuable ADB commands, I'll be sure to reboot my system once I enable ADB

Categories

Resources