ADB commands - Samsung Galaxy S8+ Questions & Answers

So recently I saw a post on galaxy s8 that use ADB to make the phone immersive...
I created this post so that if people find cool ADB commands that would improve our experience using s8....
So feel free to share any ADB commands that work on s8
E.g immersive mode or setting up GSAM etc....
Scripts ?
Here is a guide to enable immersive mode: By Rashad83
https://forum.xda-developers.com/ne...tion-bar-status-bar-app-t3509747/post69855521
Working System Ui Tuner: By Zacharee1
https://labs.xda-developers.com/store/app/com.zacharee1.systemuituner
Enable "Mobile data" icon on status bar for locked carriers: By Tnick84
https://forum.xda-developers.com/galaxy-s8+/help/adb-commands-t3598553/post72102222
[ROOT] Set up automatic nandroid backup using TWRP/Tasker:
By RuggedHunter
https://forum.xda-developers.com/galaxy-s8+/help/adb-commands-t3598553/post72096116

Love the idea of this thread! I use a ton of shell scripts you might find interesting and am always looking for new ones. I'll share some here over the next few days/weeks. Hopefully there are lots of useful contributions to your thread!
One suggestion I might make? Use your OP post #1 as a "table of contents" and link to individual posts in your thread with valuable information.

So here's an adb command I use with TWRP:
backup BDSOM
But what makes it useful is taking advantage of TWRP's openrecoveryscript feature so that the command can be written while the system is booted and executed when recovery boots. Many commands can be executed this way.
Using Tasker, I automate nandroid backups every night while I sleep. In the middle of the night it deletes the oldest backup, writes the command "backup BDSOM" to /cache/recovery/openrecoveryscript , and reboots to recovery. As soon as TWRP boots it runs the command and creates a compressed nandroid, then reboots system...So my alarm still wakes me up in the morning.
Of course using Tasker and openrecoveryscript isn't required. You can just use this command with adb while in TWRP to create a backup.
---------- Post added at 09:47 PM ---------- Previous post was at 09:43 PM ----------
Here's another:
dumpsys deviceidle
Run in an emulator this will print a list of commands and parameters you can use to manually control Doze. You can force doze on when the screen is on, or switch to any of the various "stages" of doze, or add/remove packages from the whitelist.
Examples:
dumpsys deviceidle force-idle
dumpsys deviceidle whitelist +com.package.name
dumpsys deviceidle whitelist -com.package.name
dumpsys deviceidle step

RuggedHunter said:
So here's an adb command I use with TWRP:
backup BDSOM
But what makes it useful is taking advantage of TWRP's openrecoveryscript feature so that the command can be written while the system is booted and executed when recovery boots. Many commands can be executed this way.
Using Tasker, I automate nandroid backups every night while I sleep. In the middle of the night it deletes the oldest backup, writes the command "backup BDSOM" to /cache/recovery/openrecoveryscript , and reboots to recovery. As soon as TWRP boots it runs the command and creates a compressed nandroid, then reboots system...So my alarm still wakes me up in the morning.
Of course using Tasker and openrecoveryscript isn't required. You can just use this command with adb while in TWRP to create a backup.
---------- Post added at 09:47 PM ---------- Previous post was at 09:43 PM ----------
Here's another:
dumpsys deviceidle
Run in an emulator this will print a list of commands and parameters you can use to manually control Doze. You can force doze on when the screen is on, or switch to any of the various "stages" of doze, or add/remove packages from the whitelist.
Examples:
dumpsys deviceidle force-idle
dumpsys deviceidle whitelist +com.package.name
dumpsys deviceidle whitelist -com.package.name
dumpsys deviceidle step
Click to expand...
Click to collapse
I was talking about adb scripts without rooting, but that's fine maybe somebody else will need this

Ah, sorry I missed that.

RuggedHunter said:
Ah, sorry I missed that.
Click to expand...
Click to collapse
But nah it's fine keep posting these as well just in case I root or somebody else might need it...

How to enable Mobile Data Icon in quick settings notification dropdown
https://forum.xda-developers.com/ne...tion-bar-status-bar-app-t3509747/post72057634

tnick84 said:
How to enable Mobile Data Icon in quick settings notification dropdown
https://forum.xda-developers.com/ne...tion-bar-status-bar-app-t3509747/post72057634
Click to expand...
Click to collapse
What do you mean by This, you can rearrange the icons how you want.

underdog_656 said:
What do you mean by This, you can rearrange the icons how you want.
Click to expand...
Click to collapse
Who is your carrier? Tmo doesn't have it enabled by default. Or do you have an app doing it. Cause the point of this thread, correct me if I'm wrong, is to avoid installing an app to do something that a simple adb command can do.

tnick84 said:
Who is your carrier? Tmo doesn't have it enabled by default. Or do you have an app doing it. Cause the point of this thread, correct me if I'm wrong, is to avoid installing an app to do something that a simple adb command can do.
Click to expand...
Click to collapse
My galaxy s8 is European unlocked so no it's not t mobile... probably that's why I have this option... yes you are correct so that we would avoid installing apps. Thank you for sharing

I'm on Sprint and I've seen videos showing that the navbar can have different colors but Sprint left it out. While there is an app to change it, I was wondering if there's an Adb command that can enable that feature?

Ramer said:
I'm on Sprint and I've seen videos showing that the navbar can have different colors but Sprintleft it out. While there is an app to change it, I was wondering if there's an Adb command that can enable that feature?
Click to expand...
Click to collapse
So sprint doesn't have this layout?
Edit: so upon research I wasn't able to find any ADB commands that would do that.... maybe someone else might know.

underdog_656 said:
So sprint doesn't have this layout?
Edit: so upon research I wasn't able to find any ADB commands that would do that.... maybe someone else might know.
Click to expand...
Click to collapse
No, they don't. I was watching S8+ YouTube videos when I noticed it was missing.

I can not get adb to recognize phone. I type in the command and get "error: no devices/emulators found". Installed drivers etc.
Edit: Got it figured out.

Gonna stick in a quick message to revive this thread. So i have certain apps set to be fully immersive using the adb method, but in the app store, this app bxbye, remaps the bixby button to have other uses, for example, toggling immersive mode. Basically when I use this feature it seems to clear all the immersive settings I had input for all my apps eg Instagram,spotify etc, and while I dont want to have to click the remapped bixby button for every app i want in immersive mode, i would like to use the button at times when an app is giving trouble to return it to non immersive mode.
I've not explained this very well but basically is it possible to enter these adb commands and run certain apps in immersive mode, and then use the remapped bixby button to toggle certain apps without it resetting back to non immersive for all apps?
Thanks in advance

Related

Bloatware and beyond (removal)

Hello so im just making this post to inform some people who are scared to disable certain things that a lot more can be done with the disable feature then just alleviated bloatware.
So far I've disabled sense launcher and I'm currently only using launcher pro. I've also disabled everything with the word twitter in it lol.
One of my pet peeves is redundent data so I was able to disable htc sense's facebook and just download the facebook app which kicks its asssss anyway.
I've disabled the lock screen however it did not actually disable the lockscreen, no idea what that lockscreen.apk is doing but i still have it disabled.
Here is a list of my disabled packages.
package:com.htc.fm
package:com.android.browser
package:com.htc.rosiewidgets.datastrip
package:com.htc.widget3d.watch
package:com.htc.lockscreen
package:com.htc.appsharing
package:com.htc.idlescreen.stock
package:com.logmein.rescue
package:com.htc.Sync3DWidget
package:com.telenav.app.android.telenav
package:com.htc.connectedMedia
package:com.htc.streamplayer
package:com.htc.clock3dwidget
package:com.mobitv.client.tmobiletvhd
package:com.htc.android.htcsetupwizard
package:com.htc.wdm
package:com.htc.FMRadioWidget
package:com.htc.htccompressviewer
package:com.htc.widget3d.weather
package:com.omnifone.android.app.htclistenstore
package:com.htc.htcsettingwidgets
package:com.android.setupwizard
package:com.htc.android.Stock
package:com.htc.rosiewidgets.photogridwidget3d
package:com.htc.rosiewidgets.powerstrip
package:com.android.protips
package:com.htc.friendstream
package:com.htc.rosiewidgets.tip
package:com.htc.MusicWidget3D
package:com.voxmobili.sync.MobileBackup2
package:com.htc.rosiewidgets.screenbrightness
package:com.muvee.video.trimer
package:com.qiktmobile.android
package:com.tmobile.vvm.application
package:com.htc.ereader.widget3d
package:com.htc.htcmailwidgets
package:com.htc.htctwitter
package:com.westtek.jcp
package:com.sdgtl.watch.pyramid
package:com.htc.feedback
package:com.htc.android.fusion.StockWidget
package:com.htc.mysketcher
package:com.android.magicsmoke
package:com.htc.idlescreen.socialnetwork
package:com.htc.launcher
package:com.htc.cs
package:com.htc.android.teeter
package:com.slacker.radio
package:com.htc.FriendStream3DWidget
package:com.htc.recommend
package:com.nuance.nmc.sihome
package:com.htc.Trends3DWidget
package:com.htc.photowidget3d
package:com.htc.Twitter3DWidget
package:com.logmein.rescuesecurity
package:com.htc.socialnetwork.facebook
package:com.htc.socialnetwork.flickr
package:com.gameloft.android.GAND.GloftNOHP
package:com.htc.fusion.htcbookmarkwidget
package:com.htc.htccontactwidgets_3d_fusion
package:com.tmobile.apppack
moral of my story, you got a lot of room to play around with. My phone runs incredible fast now and the battery life has increased but I also just bought a 1900mAh battery and popped that in.
Let me know if anyone else can add to this list. I plan on disabling the SMS client and solely using a third party in the very near future. Any words about this? Thanks!
Noob question, how exactly do you disabled that? I see some other post saying they can disable it but never really get into how they go around doing it. I'm also new to android T_T.
I had trouble at first too.
first google this: setting up android SDK for windows
Then since they probably won't tell you this, at the step where they tell you to download google usb drivers, do it anyway (can't hurt) but immediately after that- download HTC sync, and install just to get all the drivers you need for your HTC phone onto windows. At that point you want to then close HTC sync from your running applications to avoid a server out of date error in command prompt (this will get a lot easier to understand once you have the sdk tutorial infront of your face)
Once sdk is all set up and you can access your device (you will try to run adb shell in command promp in windows and you will get a $) You can go to the dev section and look at the fre3vo post.
From here you can drop the fre3vo file into C:/ and the first command in command prompt will be
adb push C:/fre3vo /data/local/tmp
- the C:\fre3vo is where the file is located on your computer and the /data/local/tmp is where your moving it onto the android device.
Next command is
adb shell chmod 777 /data/local/tmp/fre3vo - to my understanding this is just changing permissions so you can run the file thru our terminal set up.
Last command just runs the binary and is adb shell /data/local/tmp/fre3vo
After that you should be able to run the fre3vo exploit and it will kick you back to your original command promp something like C:\users\your name
Now comes the easy part: at this point type in adb shell and you will get a # sign which means you achieved temp root. The following commands will help and should only be ran after you see the # symbol because these are commands for android on your phone, not the ADB program we used to just place the fre3vo file onto the phone.
pm list packages - this shows all packages installed
pm disable (package name) use the package name from the list above where the brackets are but exclude the brackets
pm enable (package name) will enable the package incase your phone starts to bug
pm list packages -d -this will show you which packages are disabled and yes keep the minus sign infront of the d.
PM me if you have trouble.
alright i'll try to do this right now =) thanks a lot! c how it goes~
ignore post

Dual SIM switching using Tasker

Wouldn't it be cool to be able to automate the swicthing data between SIM 1 and SIM 2 using Tasker given the location of the device? Let's figure out how to do it together. Do we need root? ADB command comes to mind...
@MishaalRahman any ideas?
What do you mean by "switching data?" Sorry, I usually don't use two SIMs so I'm not sure what you mean.
MishaalRahman said:
What do you mean by "switching data?" Sorry, I usually don't use two SIMs so I'm not sure what you mean.
Click to expand...
Click to collapse
The dual sim version mha-l29 has an option to set the default 4g slot from within the settings menu
I have found already a system variable that can be changed using secure settings plugin for tasker, and running the adb command adb shell settings list system I can see that the variable switch_dual_card_slots does change from 0 to 1 when doing it from the ui, but when done from a put command nothing happens. Any ideas?
dmorales023 said:
The dual sim version mha-l29 has an option to set the default 4g slot from within the settings menu
I have found already a system variable that can be changed using secure settings plugin for tasker, and running the adb command adb shell settings list system I can see that the variable switch_dual_card_slots does change from 0 to 1 when doing it from the ui, but when done from a put command nothing happens. Any ideas?
Click to expand...
Click to collapse
The screenshot shows you doing the command from the Secure Settings plug-in, not from shell. Have you tried it from shell?
MishaalRahman said:
The screenshot shows you doing the command from the Secure Settings plug-in, not from shell. Have you tried it from shell?
Click to expand...
Click to collapse
Yes, same results executing directly from shell. Nothing happens. Is there a trigger like command to update ui from settings or something like that? Sort of:
1. adb shell command x
2. Commit?
dmorales023 said:
Yes, same results executing directly from shell. Nothing happens. Is there a trigger like command to update ui from settings or something like that? Sort of:
1. adb shell command x
2. Commit?
Click to expand...
Click to collapse
@MishaalRahman The shell command I am using is "adb shell settings put system switch_dual_card_slots 0/1"
dmorales023 said:
@MishaalRahman The shell command I am using is "adb shell settings put system switch_dual_card_slots 0/1"
Click to expand...
Click to collapse
Yeah, that seems like it would do it.
dmorales023 said:
@MishaalRahman The shell command I am using is "adb shell settings put system switch_dual_card_slots 0/1"
Click to expand...
Click to collapse
Is it working? I am trying to do same thing on my phone. No luck till now
midhunmanohar said:
Is it working? I am trying to do same thing on my phone. No luck till now
Click to expand...
Click to collapse
No luck on my side either. Did you find a solution? This seems so trivial...
dmorales023 said:
Yes, same results executing directly from shell. Nothing happens. Is there a trigger like command to update ui from settings or something like that? Sort of:
1. adb shell command x
2. Commit?
Click to expand...
Click to collapse
I am using the shell command successfully on my Honor 6X.
First I set switch_dual_card_slots to 0 or 1 , and to commit I simply kill the phone process, which will automatically restart instantly.
It is not the most elegant solution, but works flawlessly for me.
The two commands I run (with root priveleges)
1: settings put system switch_dual_card_slots 1
2: pkill phone
dual SIM data switch
RealParity said:
The two commands I run (with root priveleges)
1: settings put system switch_dual_card_slots 1
2: pkill phone
Click to expand...
Click to collapse
i tried the above.
1 executes something, no msg.
2 gives an error message: pkill: TERM->24469: Operation not permitted
the data SIM does not change. but i guess it can't, as the 2nd command fails. what other things i might try?
and yes, i'm a noob on terminal commands - please walk me through how to automate this.
Bump after disabling one sim on location has I get no signal at work
zdoe said:
i tried the above.
1 executes something, no msg.
2 gives an error message: pkill: TERM->24469: Operation not permitted
the data SIM does not change. but i guess it can't, as the 2nd command fails. what other things i might try?
and yes, i'm a noob on terminal commands - please walk me through how to automate this.
Click to expand...
Click to collapse
Not sure if you got this figured out but you need to be rooted. Then in adb shell/terminal you must type "su" first then do the pkill
Anybody tried with a Xiaomi phone?
There's an app 4 this (dual sim switch widget) but it doesn't work on Xiaomi phones
Hi, I have a xiaomi mi 9t, I wish I could change the default sim for data, how much I receive or send a call.
What command can I give tasker for modifying the data sim?

Remove all themes via ADB? Installed 8.1 Dev Preview without disabling themes first!

I installed the 8.1 Dev Preview on my Pixel XL and it can't boot due to SystemUI crashing. I think it's just because I still have overlays installed. Anyway to remove all the overlays via ADB? I'd appreciate any help! Thanks!
s1dest3pnate said:
I installed the 8.1 Dev Preview on my Pixel XL and it can't boot due to SystemUI crashing. I think it's just because I still have overlays installed. Anyway to remove all the overlays via ADB? I'd appreciate any help! Thanks!
Click to expand...
Click to collapse
Can you get into recovery? There's a script that's installed that you can run to remove themes in recovery.
Sent from my Pixel XL using Tapatalk
Acid0057 said:
Can you get into recovery? There's a script that's installed that you can run to remove themes in recovery.
Sent from my Pixel XL using Tapatalk
Click to expand...
Click to collapse
Yup, I remembered and found it. All fixed! Thank goodness for SubstratumRescue.zip! Thanks Substratum team!
s1dest3pnate said:
Yup, I remembered and found it. All fixed! Thank goodness for SubstratumRescue.zip! Thanks Substratum team!
Click to expand...
Click to collapse
Awesome!
Sent from my Pixel XL using Tapatalk
I am in the same boat. You are very ambiguous on how you actually fixed this. I am not rooted and have a Pixel 2 XL with access to adb through recovery
GBpfan95 said:
I am in the same boat. You are very ambiguous on how you actually fixed this. I am not rooted and have a Pixel 2 XL with access to adb through recovery
Click to expand...
Click to collapse
You're right, my apologies.
adb reboot bootloader (do this as soon as you hear USB connect at the Google logo)
fastboot boot twrp (I downloaded the 3.1.1.1 version from TWRP website)
Install SubstratumRescue.zip from the substratum folder on storage.
Did not install TWRP when prompted. I might have been asked one other question during the install or somewhere in TWRP but I don't recall.
s1dest3pnate said:
You're right, my apologies.
adb reboot bootloader (do this as soon as you hear USB connect at the Google logo)
fastboot boot twrp (I downloaded the 3.1.1.1 version from TWRP website)
Install SubstratumRescue.zip from the substratum folder on storage.
Did not install TWRP when prompted. I might have been asked one other question during the install or somewhere in TWRP but I don't recall.
Click to expand...
Click to collapse
Does that work even if I am locked and not rooted?
GBpfan95 said:
Does that work even if I am locked and not rooted?
Click to expand...
Click to collapse
Works without root, but not if you're locked I don't think. I'm not an expert and don't want to steer you in the wrong direction, but hopefully you can unlock bootloader via adb first, and then do the steps, but I'm not sure.
I just ended up factory resetting. Most of everything is backed up anyway. Definitely learned my lesson
Could you please post the SubstratumRescue.zip? I cannot get to the directory on my phone via ADB and want to try running the script commands manually.
EDIT: Nevermind, I tracked it down on the dev's AFH page.
I faced with same issue: Updated to 8.1 without disabling overlays first.
No root, locked bootloader.
In my case, system did load but was crashing every other minute.
I was able to launch subscratum+andromeda but they failed to disable overlays - it simply did not work.
So, I had do disable overlays manually via adb:
Code:
$ adb shell
$ cmd overlay list
$ cmd overlay disable OVERLAY_NAME_1
$ cmd overlay disable OVERLAY_NAME_2
,,,
AXP said:
I faced with same issue: Updated to 8.1 without disabling overlays first.
No root, locked bootloader.
In my case, system did load but was crashing every other minute.
I was able to launch subscratum+andromeda but they failed to disable overlays - it simply did not work.
So, I had do disable overlays manually via adb:
Code:
$ adb shell
$ cmd overlay list
$ cmd overlay disable OVERLAY_NAME_1
$ cmd overlay disable OVERLAY_NAME_2
,,,
Click to expand...
Click to collapse
Is it possible for you to guide me step by step on how to do this? My nexus 6p is locked and non-rooted. thanks
pR0wl3r said:
Is it possible for you to guide me step by step on how to do this? My nexus 6p is locked and non-rooted. thanks
Click to expand...
Click to collapse
Same with my 5X; once in ADB (using the Android SDK platform tools and Google USB drivers), when you run `adb shell` to open a shell connected to your phone, `cmd overlay list` will show all available overlays, and which are active or not. In my case (I was using BalticUI) I had...
Code:
C:\platform-tools>adb shell
bullhead:/ $ cmd overlay list
com.android.settings
[x] com.android.settings.BalticUI
com.android.systemui
[x] com.android.systemui.BalticUI
[x] com.android.systemui.navbars.BalticUI
[ ] com.android.systemui.theme.dark
So then you can enable or disable each overlay by name. E.g.:
Code:
bullhead:/ $ cmd overlay disable com.android.systemui.BalticUI
bullhead:/ $ cmd overlay list
com.android.settings
[x] com.android.settings.BalticUI
com.android.systemui
[ ] com.android.systemui.BalticUI
[x] com.android.systemui.navbars.BalticUI
[ ] com.android.systemui.theme.dark
That "....systemui.theme.dark" I presume is the new auto-theme component in 8.1 based on wallpaper color. I tried enabling it, but after trying to open a themed component, that overlay resets off. Luckily, BalticUI didn't cause any major problems like many other themes did; the main settings screen was the biggest difference, being just a text-only list of all the strings. Now to find a dark wallpaper...
jeremywh7 said:
Same with my 5X; once in ADB (using the Android SDK platform tools and Google USB drivers), when you run `adb shell` to open a shell connected to your phone, `cmd overlay list` will show all available overlays, and which are active or not. In my case (I was using BalticUI) I had...
Code:
C:\platform-tools>adb shell
bullhead:/ $ cmd overlay list
com.android.settings
[x] com.android.settings.BalticUI
com.android.systemui
[x] com.android.systemui.BalticUI
[x] com.android.systemui.navbars.BalticUI
[ ] com.android.systemui.theme.dark
So then you can enable or disable each overlay by name. E.g.:
Code:
bullhead:/ $ cmd overlay disable com.android.systemui.BalticUI
bullhead:/ $ cmd overlay list
com.android.settings
[x] com.android.settings.BalticUI
com.android.systemui
[ ] com.android.systemui.BalticUI
[x] com.android.systemui.navbars.BalticUI
[ ] com.android.systemui.theme.dark
That "....systemui.theme.dark" I presume is the new auto-theme component in 8.1 based on wallpaper color. I tried enabling it, but after trying to open a themed component, that overlay resets off. Luckily, BalticUI didn't cause any major problems like many other themes did; the main settings screen was the biggest difference, being just a text-only list of all the strings. Now to find a dark wallpaper...
Click to expand...
Click to collapse
Thanks but that did not work for me. Tried to disable but it's still there. Perhaps you need root?
bobby janow said:
Thanks but that did not work for me. Tried to disable but it's still there. Perhaps you need root?
Click to expand...
Click to collapse
You mean you tried to disable but it still shows an [X] showing enabled for that overlay? I am not rooted, nor with unlocked bootloader, and I could toggle them off (as shown above) and on. The overlays still show up for me, but are all disabled, and resolved the issues I was having as a result.
jeremywh7 said:
You mean you tried to disable but it still shows an [X] showing enabled for that overlay? I am not rooted, nor with unlocked bootloader, and I could toggle them off (as shown above) and on. The overlays still show up for me, but are all disabled, and resolved the issues I was having as a result.
Click to expand...
Click to collapse
Yeah still shows an x.
Sent from my Pixel using XDA-Developers Legacy app
Thanks!
AXP said:
I faced with same issue: Updated to 8.1 without disabling overlays first.
No root, locked bootloader.
In my case, system did load but was crashing every other minute.
I was able to launch subscratum+andromeda but they failed to disable overlays - it simply did not work.
So, I had do disable overlays manually via adb:
Code:
$ adb shell
$ cmd overlay list
$ cmd overlay disable OVERLAY_NAME_1
$ cmd overlay disable OVERLAY_NAME_2
,,,
Click to expand...
Click to collapse
Thanks so much mate this worked for me perfectly!
This can be done in a less manual fashion. It looks like many of you are on Windows, but I'm sure theres a way to accomplish something similar. I'm on Linux and this is how I did it.
Code:
➜ andromeda-substratum adb shell cmd overlay list | ag -Q [x] | awk '{ print $2 }' | xargs -n 1 echo cmd overlay disable
cmd overlay disable com.samsung.android.app.aodservice.StatusBarIconsforSamsungextras
cmd overlay disable com.samsung.android.smartmirroring.StatusBarIconsforSamsungextras
cmd overlay disable android.StatusBarIconsforSamsungextras
cmd overlay disable com.samsung.android.app.smartcapture.StatusBarIconsforSamsungextras
cmd overlay disable com.android.settings.StatusBarIconsforSamsungextras
cmd overlay disable com.samsung.android.lool.StatusBarIconsforSamsungextras
cmd overlay disable com.android.systemui.navbars.StatusBarIconsforSamsungextras
cmd overlay disable com.android.systemui.tiles.StatusBarIconsforSamsungextras
cmd overlay disable com.android.systemui.statusbars.StatusBarIconsforSamsungextras
➜ andromeda-substratum adb shell cmd overlay list | ag -Q [x] | awk '{ print $2 }' | xargs -n 1 adb shell cmd overlay disable
For reference, ag is very similar to grep. So the explanation is adb shell allows you to pass a command to it so it can run that command immediately. So adb shell cmd overlay list is the same as typing adb shell followed by cmd overlay list except it prints the output and immediately exits. So I take that output, grep (using ag in this case) for the enabled overlays and then programmatically disable them. xargs -n 1 says take at most one of the arguments passed to this command and append it to the rest of the line. So this calls adb shell cmd overlay disable __insert-overlay-here__ repeatedly.
I messed up good....
So, I tried flashing the 8.1 Final using Chainfire like a tutorial suggested. That was my second mistake.
My first one was apparently not removing my overlays. So anyway...
My device rebooted after Chainfire, and was on the G/progress bar for like 5 mins so I knew something was up.
I decided to flash the complete factory image, and I removed the '-w' from the flash-all script so it wouldn't wipe my data.
Now the device boots, and of course I have the System UI issue because I didn't clear the overlays. But wait... it gets better!
I found this thread, so I fastboot booted into TWRP to run the commands. It asks for my password- and when I enter it, it says it's invalid!! I tried numerous times, rebooted etc, and it still does not accept my passcode.
It appears I should be able to use ADB in TWRP without my passcode, so I give it a try. I am able to sideload no problem, however when I type 'adb shell' it tells me 'error:closed'. I've searched that error, which everyone says was fixed for them with either a reboot or updating their adb/fastboot. I did both of those things, and the error still persists.
I have also tried sideloading the substratumrescue.zip file I found in another thread, however it doesn't seem to be made for this systemless setup or something.
I have had to set this device up twice since I got it, and I am really not looking forward to doing it a third time, so if anyone has any suggestions that will keep my data, I would be happy to hear them out!!
What could be causing TWRP not to accept my passcode?
Why do I get the 'error:closed' when I try to adb shell?
Any help is greatly appreciated!
EDIT: Resolved. I was able to delete all overlaid apk's from /data/app.
Hi there,
Question, I got a non-rooted S8, Stock in like everything, and it runs everything fine, including Substratum!
I am wondering about one thing though after reading this thread, imagine something went wrong, what would be my options? I found the Rescue ZIP on my phone, can I apply this if needed with the original recovery from the S8? Or do I need TWRP for that?
---------- Post added at 08:44 PM ---------- Previous post was at 08:39 PM ----------
s1dest3pnate said:
Works without root, but not if you're locked I don't think. I'm not an expert and don't want to steer you in the wrong direction, but hopefully you can unlock bootloader via adb first, and then do the steps, but I'm not sure.
Click to expand...
Click to collapse
Hi mate, do I read correctly, that its possible to only boot TWRP temporaly without flashing it?
I have to put the folder/files in the same folder as platform tools?

How prevent from Auto upgrading to Oreo?

I turned off Auto download on WiFi, but I'm not confident it will stop update to Oreo.
Anyone know if/what I need to do to prevent the update?
I found in Developer Options an auto system update option that I turned off but it still updated. Dammit!
No help from anyone here either. Maybe it can't be prevented.
I have deactivated network access for the app „System Update“ and deactivated the search for updates from within the update app.
Seems to work.
I'll keep that in mind if it happens again.
Update on turning off updates in Developer options: I have since found this to be what happens after turning off auto update in dev options:
It downloads the update
It puts a notice up that it has upgraded and I need to boot (that was when I posted about it still updating)
But turns out it does not actually perform the update.
It is a bit annoying. I get that notice and it remains in the notifications, even though I have gone in and turned off that notification. As long as it doesn't update, I guess I can live with it.
As it's already downloaded, I'd say your options won't help me at this point.
To get rid oft the notification, open Settings » Apps and delete data an cache oft the Systemupdate app. Then continue restricting its network access ( all three options) and notifications. To be sure, disable its ability to change system settings.
itsjustmeagain said:
I have deactivated network access for the app „System Update“ and deactivated the search for updates from within the update app.
Seems to work.
Click to expand...
Click to collapse
I presume I disable network access under networked apps menu. The only access listed there is mobile. I would think it could still get there when hooked to Wi-Fi.
Do not see an app called update for which to disable search. But I have applied all of your other suggestions, and appreciate your help.
without root : adb shell pm uninstall -k --user 0 com.huawei.android.hwouc
Done !
I was surprised...just got another prompt to update. Wanted access to photos. I denied and cancelled. I haven't had that particular promo for a while. I bet outs prompting now because I deleted the download. Although I have auto update turned off in developer options.
use my command and you'll never get this update again
mrassol said:
use my command and you'll never get this update again
Click to expand...
Click to collapse
Ok. Thanks. I'll have to get the appropriate stuff installed on the PC to do that. Since moving to this phone from Samsungs, I've not used any of that stuff, or done any rooting (I do miss root a bit).
mrassol said:
use my command and you'll never get this update again
Click to expand...
Click to collapse
So I have just finished a fresh reload of the original ROM, and now want to trh the command you listed
adb shell pm uninstall -k --user 0 com.huawei.android.hwouc
Click to expand...
Click to collapse
But I can't get ADB to recognize the phone. I have USB Debugging turned on. I have Hisuite able to see it. But ADB does not see it.
When I search Google for how to do ADB on the Mate 9, I keep getting led to info about installing fastboot. When I go to the Huwaei site to download the fastboot / adb stuff, the site freezes.
Any suggestions?
ewingr said:
So I have just finished a fresh reload of the original ROM, and now want to trh the command you listed
But I can't get ADB to recognize the phone. I have USB Debugging turned on. I have Hisuite able to see it. But ADB does not see it.
When I search Google for how to do ADB on the Mate 9, I keep getting led to info about installing fastboot. When I go to the Huwaei site to download the fastboot / adb stuff, the site freezes.
Any suggestions?
Click to expand...
Click to collapse
have you tried to uncheck and recheck usb debugging ?
what does adb devices tells you ?
mrassol said:
have you tried to uncheck and recheck usb debugging ?
what does adb devices tells you ?
Click to expand...
Click to collapse
I don't know what was going on. AFter posting, I was chasing USB drivers. But I was having problems finding them to download too. I tried it again though, and it is now working. Not sure what was going on.
Thanks for your input. I appreciate it.
Restore update
Hm, and how it restore, again install it com.huawei.android.hwouc ?
Where is download it?
Thanks
minzak said:
Hm, and how it restore, again install it com.huawei.android.hwouc ?
Where is download it?
Thanks
Click to expand...
Click to collapse
adb shell cmd package install-existing com.huawei.android.hwouc
For me it's better to disable/enable this app:
adb shell pm disable-user com.huawei.android.hwouc
adb shell pm enable --user 0 com.huawei.android.hwouc
minzak said:
Hm, and how it restore, again install it com.huawei.android.hwouc ?
Where is download it?
Thanks
Click to expand...
Click to collapse
To disable System Update, use:
adb shell pm disable-user com.huawei.android.hwouc
If you ever want to enable it back, simply go to Settings, Apps, check to show System apps and services, scroll to System Update and Enable
Tuxozaur said:
adb shell cmd package install-existing com.huawei.android.hwouc
For me it's better to disable/enable this app:
adb shell pm disable-user com.huawei.android.hwouc
adb shell pm enable --user 0 com.huawei.android.hwouc
Click to expand...
Click to collapse
When I type in:
adb shell cmd package install-existing com.huawei.android.hwouc
Click to expand...
Click to collapse
I get error "Unknown command: install-existing"
So I tried:
adb shell cmd package install -existing com.huawei.android.hwouc
Click to expand...
Click to collapse
I get this:
Exception occurred while dumping:
java.lang.IllegalArgumentException: Unknown option -e
at com.android.server.pm.PackageManagerShellCommand.makeInstallParams(PackageManagerShellCommand.java:1070)
at com.android.server.pm.PackageManagerShellCommand.runInstall(PackageManagerShellCommand.java:139)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:94)
at android.os.ShellCommand.exec(ShellCommand.java:94)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:19505)
at android.os.Binder.shellCommand(Binder.java:468)
at android.os.Binder.onTransact(Binder.java:367)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2387)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3504)
at com.android.server.pm.HwPackageManagerService.onTransact(HwPackageManagerService.java:659)
at android.os.Binder.execTransact(Binder.java:565)
Click to expand...
Click to collapse
So I did a list of the command parameters, and do not even see anywhere that -existing would be used.
Can someone please provide me correct command to re-install the com.huawei.android.hwouc?
ewingr said:
When I type in:
I get error "Unknown command: install-existing"
...
Can someone please provide me correct command to re-install the com.huawei.android.hwouc?
Click to expand...
Click to collapse
Correct re-install command is as in the Post #15:
Code:
adb shell cmd package install-existing com.huawei.android.hwouc
See also:
https://www.xda-developers.com/uninstall-carrier-oem-bloatware-without-root-access/
https://forum.xda-developers.com/ma...-bloatware-blocking-ads-t3971297/post80526831
and attachments (batch script - rename to bat, and screenshot from PC)
Code:
ECHO OFF
CLS
adb wait-for-device devices
PAUSE
ECHO List packages
adb shell pm list packages
PAUSE
ECHO Disable System Update
adb shell pm disable-user com.huawei.android.hwouc
PAUSE
ECHO List disabled packages
adb shell pm list packages -d
PAUSE
ECHO Re-enable System Update
adb shell pm enable com.huawei.android.hwouc
PAUSE
ECHO Uninstall System Update
adb shell pm uninstall -k --user 0 com.huawei.android.hwouc
PAUSE
ECHO Re-install System Update
adb shell cmd package install-existing com.huawei.android.hwouc
PAUSE
Make sure to have ADB USB debugging enabled in Development menu. PC must be granted for debugging (from the phone side).
Ofc, drivers, etc must be installed to the PC - Minimal ADB and Fastboot package (search on XDA) will do
Problem is, I have already run the delete cmd from earlier in the thread (a reply to my original post here.) Now I need to reinstall. The post I quoted supposedly is how to do that, but I'm getting the errors noted. Going forward I will do it per your suggestion.
Hoping someone can give me correct syntax to revive the update functionality.
ewingr said:
Problem is, I have already run the delete cmd from earlier in the thread (a reply to my original post here.) Now I need to reinstall. The post I quoted supposedly is how to do that, but I'm getting the errors noted. Going forward I will do it per your suggestion.
Hoping someone can give me correct syntax to revive the update functionality.
Click to expand...
Click to collapse
There is no ADB delete cmd - could you be precise and quote exactly the command you originally used?
And the ROGHT commands for ADB re-enabling and re-installing are e.g in my previous post, there are no other 'correct syntax' commands (Google search is also your friend)
If your ADB does not recognize
adb shell cmd package install-existing ...
then something is wrong with your ADB installation on PC or settings on the phone.
Follow the first link in my previous answer and set/install ADB exactly as described in the XDA article
Ofc, if you rooted the phone and you really DELETED hwouc, then you can not reinstall by ADB - but then ADB would not complain that it did not recognize the command but would complain that package did not exist

Anyway to unfreeze a system app which is causing boot failure from within TWRP recovery?

Basically I froze a system app that should not have been frozen through TitaniumBackup the result being my system refuses to boot, looping once and giving an error "cannot load Android system" and suggesting a full wipe, which I hope to avoid in either case.
What are my options at this point, in defrosting it or undoing what TitaniumBackup has done within the confines of the TWRP recovery or adb systems? I don't remember the package by name as I froze 2-3 of them, but I assume defrosting them all would suffice.
I will try to provide some basic information about the unit and its software if it helps. Moto G Power running Android 10 and TWRP 3.4.0.0 which is not installed but booted using fastboot and it has Magisk as root.
TaZeR369 said:
Basically I froze a system app that should not have been frozen through TitaniumBackup the result being my system refuses to boot, looping once and giving an error "cannot load Android system" and suggesting a full wipe, which I hope to avoid in either case.
What are my options at this point, in defrosting it or undoing what TitaniumBackup has done within the confines of the TWRP recovery or adb systems? I don't remember the package by name as I froze 2-3 of them, but I assume defrosting them all would suffice.
I will try to provide some basic information about the unit and its software if it helps. Moto G Power running Android 10 and TWRP 3.4.0.0 which is not installed but booted using fastboot and it has Magisk as root.
Click to expand...
Click to collapse
Have you tried this?. Don't forget to thank that person if it works.
If it doesn't work, you can use ADB through twrp with the Package Manager binary from /system/xbin/pm to list all disabled apps like this:
Bash:
adb shell pm list packages -d
then you can enable those disabled apps/packages through:
Bash:
adb shell pm enable <userID> <package name>
Slim K said:
Have you tried this?. Don't forget to thank that person if it works.
If it doesn't work, you can use ADB through twrp with the Package Manager binary from /system/xbin/pm to list all disabled apps like this:
Bash:
adb shell pm list packages -d
then you can enable those disabled apps/packages through:
Bash:
adb shell pm enable <userID> <package name>
Click to expand...
Click to collapse
Thank you so much for the prompt reply, this totally answered my question into how TB freeze works in android, and solved my problem I can use my phone again =)

Categories

Resources