Hi all
I just moved from my old phone HTC A9 to Samsung S10.
For my old phone, I used a "ADB method" learnt from this form to disable head up notification for all applications while MAINTAINING regular notifications in the status bar. It works well. Reference <https://forum.xda-developers.com/android/general/howto-4-to-disable-heads-notifications-t3197660>.
However, now with my Samsung S10, I tried the same way following the same steps (listed below). But it is NOT WORKING. This is very frustrating. I tried for many times with different laptops. Could anyone give me some advices here?
============================================================================================
a) Open a terminal and check if the device is connected using the following command:
Code:
adb devices
b) You should see your phone on the list that appears. Now use the following command:
Code:
adb shell settings put global heads_up_notifications_enabled 0
c) Reboot your phone.
d) Done!
Related
I am trying to get adb setup so I can root my NC and install some apps. The problem i'm having is I don't think I can get the proper drivers to install. I am following these steps ADB SETUP but when I get to step 3
My computer doesn't see "Android Composite ADB Device". It sees "Android adb interface". When I go to step 4
IV. Verify that everything worked
Start > Run > cmd > Enter
cd\
cd android-sdk-windows\platform-tools
adb kill-server
adb devices
If you get output that looks like the following you have succeeded:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
[YOUR NOOKCOLOR SN] device
If you did not succeed, identify each nook entry in device manager (each device with a Hardware ID of USB\VID_2080&..., right click and uninstall it. There may be several. Uninstall all of them. Unplug the nookColor, replug it, and restart from Section III.
Further debugging: If you have an Android ADB composit interface and you still do not get your serial number listed, please repeat section 2, step 2, then verify that the file \users\yourname\.android\adb_usb.ini is exactly six characters long, and contains exactly 0x2080
I don't get my device listed. What have I done wrong?
Also when I uninstall all the drivers to start over if I connect the NC and look under device manager "NOOK" pops up for just a min then goes away and then its listed "under universal serial bus controllers"
I may have just figured it out. Do I have to do the whole sdcard boot thing before I can enable adb?
Uninstall the "android adb interface" then plug your nook to a USB port that is on the back of your computer, not from the front panel.
I hadn't done the root process before trying to setup adb but I got it now. Thanks for the help
Hey guys, to the best of my abilities I couldn't find a thread regarding this specific usage of ADB for the Xperia Z range so here I am!
With a little incite from the lovely gentleman that posted this thread I decided to expand on that knowledge to apply to any system app that bothers people.
First of all the disclaimer:
If you don't know what you're doing, do not try this.
If you screw your phone up then it's on you pal!
I am not responsible for things that you do, nor am I responsible for kicking your dog or killing your gold fish.
Anyway the worst possible case scenario would make you need to flash a new FTF using Androxyde Flash Tool, so no biggy
Prerequisites
Grab the basic ADB package from here
Or here (mirror)
Go to this thread and install the Universal ADB Drivers
If you need help installing the Universal ADB Drivers: Go to that thread and ask for help. Keep comments in this thread on topic please.
Unlock the developer options on your phone, by going to settings > about > tap the build number section about 10 times until it says "Congratulations you're a developer!"
Now go back to the main settings page, and open up the new Developer Options section.
Go down to Debugging tab and check "USB debugging"
Now connect your phone via USB connection to your computer
In this section anything with 'quotes' should be typed without quotes, the quotes are just there for readability.
Open CMD (admin privileges) CD to the location of the ADB.exe file you recently extracted (RIGHT?) and (with device connected with Debugging mode enabled via USB connection) type 'adb usb'.
That'll start ADB via usb connection mode.. For interests sake: to list all the ADB commands type 'adb help'
Once started adb in usb mode type 'adb shell' (that'll effectively open a direct terminal connection with your phone).
While inside the shell you can type 'pm' to list all the Package Manager commands.
Pretty simply really, but unless you have root don't bother trying to uninstall system apps... It won't work. Instead just use the 'block' command which effectively does the same thing except it doesn't remove it.
Basic commands I've been using:
pm - lists all commands available for use regarding the package manager built into ADB.
pm list packages -s - lists all system packages
pm list packages -s 'name' - lists system packages with a filter of 'name' (don't use quotes)
pm block 'packagename' - self explanatory
pm unblock 'packagename' - self explanatory
To try and find a specific package name that can't be found using the name filter (some are tricky believe me) use google to the best of your abilities, otherwise simply use very inaccurate filter search results such as listing all of the sony packages..
Ie.. pm list packages -s sony then take your sweet time trying to take a shot at which one it is (make sure to unblock the ones you block that aren't the one you were after)
After you've blocked the ones you were after, type exit
That'll launch you out of the adb shell, then type adb reboot
that will force the phone to reboot. ALL DONE!
If you need help then post in this thread, I'll do my best to help out but I have a life (now anyway) so I'm hoping some kind gents that browse this thread will help you when I'm busy :highfive:
Plus I have instant email notification turned on, so it's by far the fastest way to contact me
Best of luck guys: Keep in mind that if you aren't sure what a package does then please do your best to Google it and find out what it does before blocking it and blowing up Jupiter or destroying earth's orbit.
I kind of like Earth, it's been good to me! But if you block the wrong thing, always keep in mind you can simply UNBLOCK the package. So yeah..
Hit thanks if you're awesome!
So we are not uninstalling bloatwares with this procedure. We are just blocking them, right?
Clever... Can you provide a list of packages you managed to block successfully? This could help avoid some of the duplicate trial and error for readers of this thread.
Sent from my Xperia Z3 Compact
So, after owning my beautiful Moto X for 1 month, I found that the screen is not nearly as shatter resistant as my old iPhone 4S. After managing to completely shatter it, I called Motorola up for a replacement (which for a customized Pure cost $125) and it was on its way, but before that I needed to get my old data off. Luckily I have unlocked my bootloader and rooted my phone in advance, but i had turned off USB debugging and had a passcode lock. All of the guides for making a full backup assume that you have screen access. After messing around for a few days, I finally managed to make a full backup of my phone. I thought I'd put together this guide for anyone else who has the same issue.
Assumptions
Your bootloader is unlocked and phone rooted (do not try to unlock it now or it will wipe the phone)
Your phone is not encrypted (there's still a way around this which I'll cover but I did not have to use)
You have ADB/fastboot set up on your computer (and have tested it at least once)
Required files/guides
CWM recovery file - http://motoxroot.com/cwmtwrp-recovery-for-moto-x/
Lock Screen removal guide - http://forum.xda-developers.com/showthread.php?t=1409304
SQLite DB editor (I'm on Windows) - http://sqliteadmin.orbmu2k.de/
Androidscrencast - https://code.google.com/p/androidscreencast/
ADB keystroke events - http://thecodeartist.blogspot.com/2011/03/simulating-keyevents-on-android-device.html
Steps
The first thing I did was download the customer CWM image for the 2014 Moto X which can be found here:
Code:
http://motoxroot.com/cwmtwrp-recovery-for-moto-x/
Next I went rebooted the phone into bootloader mode by holding "Volume Down + Power" for about 15 seconds. I could not see images on the screen but I could tell when it lit up.
Note: If you have an encrypted phone, you can use an OTG cable and a standard USB keyboard to type in the password blind. I used something similar for the PIN code, however this guide does not actually need to worry about that
Test that you have fasboot access by running
Code:
fastboot devices
You should see your device listed
Boot the CWM recovery image (you do not have to flash it which is nice)
Code:
fastboot boot XT1095recovery.img
Wait a few seconds and verify that you can now access your phone via ADB
Code:
adb devices -l
If this works, you now have a shell to be able to do the next part which is removing the passcode and enabling USB Debugging I followed the guide at http://forum.xda-developers.com/showthread.php?t=1409304 to do remove the lock screen
Mount the data partition of your phone by running
Code:
adb shell mount data
adb shell mount system
Grab the settings DB from the phone and copy it locally (Other guides say to copy to an intermediary, but since you're using a recovery ROM the files can be directly accessed)
Code:
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
Open the file in your SQLite editor of choice and run the following statements
Code:
UPDATE secure SET value=65536 WHERE name='lockscreen.password_type';
UPDATE secure SET value=0 WHERE name='lock_pin_autolock';
While we have the settings DB open, it's also a good time to enable ADB Debugging by running the following statements (credits to http://stackoverflow.com/questions/13326806/enable-usb-debugging-through-clockworkmod-with-adb though I had to mod some more stuff)
Code:
UPDATE global SET value=1 WHERE name='adb_enabled';
UPDATE global SET value=1 WHERE name='development_settings_enabled';
Push the file back to it's original location
Code:
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
From here, the next set of commands should be run within the shell. You can access it by running
Code:
adb shell
Remove some existing property files
Code:
rm /data/property/persist.service.adb.enable
rm /data/property/persist.sys.usb.config
Add in the ADB settings
Code:
echo "persist.service.adb.enable=1" >>/system/build.prop
echo "persist.service.debuggable=1" >>/system/build.prop
Correct the permissions for the settings.db file
Code:
chown system:system /data/data/com.android.providers.settings/databases/settings.db
chmod 660 /data/data/com.android.providers.settings/databases/settings.db
At this point, everything is ready to go and we're ready to reboot to your real install with no pin code and ADB enabled.
Reboot your phone
Code:
adb reboot
Run androidscreencast (don't worry about the keyboard/mouse instructions they don't work). Chances are the screen will be blank, press the Power button your phone and wait (it's got a *very* slow refresh rate)
Once you see your desktop, you can now run an ADB backup. I like getting everything, but this will take a while because it grabs all images, music, SD card stuff, etc.
Code:
adb backup -apk -shared -all -f backup.ab
On the screencast you'll see the prompt pop up asking you to enter a password and confirm. This was the part that took me a while and you have to do it fairly quickly otherwise it'll time out. In a separate windows run
Code:
adb shell input text <yourpassword>
adb shell input keyevent 61
adb shell input keyevent 61
adb shell input keyevent 66
At this point, you should see a full backup kicking off and running. You can run a logcat to watch the process of it. In some cases a full backup may hang if a resource has a file open, the two commands to work with this are:
Code:
adb shell logcat | grep BackupManagerService
To kill a process the backup is hanging on, enter the shell
Code:
su
ps | grep <nameOfProcess>
am force_stop <nameOfProcess> (the clean way)
kill <pid> (the dirty way)
Hope this helps! This took me a little while to figure out but now I have a full backup and my new Moto X will be here within the
week.
Okay so an ADB full backup sucks for a restore. Luckily I got a nandroid backup instead and that worked much better. There's some stuff you have to do with mapping /sdcard for it to work on the Moto X. I'll update this post soon with that information.
Thanks a lot for this! Helped me recover all my data from a Moto X with a completely broken blank screen!
This is an awesome Guide! Congrats!! I have a different situation. My Moto X 2014 is the XT1097 variant. The phone was neither rooted nor had an unlocked bootloader before the screen died. I downloaded the stock rom for my device, and flashed it with RSD Lite, since the program sees the phone connected in fastboot mode. Do you think I could use this method to reach the desktop? Also, the recovery.img in your guide is for the XT1095. Would it work for the XT1097? I know I can unlock the bootloader via fastboot, but what about rooting? Thanks in advance!!
Note: I've only tried this on Oppo Find X2 Lite running Color OS 11.1 (Android 11), and I'm not responsible if you screw up something.
Note: you don't have to revert before every monthly update. But just to be safe, revert back before a major software update (like the Android 12 update).
This method doesn't require root nor a custom recovery. it's simple and you can revert back if you wish.
The reason why we can't get the Google Discover Feed on the home screen is because of Oppo's Smart Assistant app. So we'll be uninstalling it (kinda, see Note 2 at the end of the post), as soon as that's done, you'll get the Discover feed on the left page of your home screen (of course you'll need to have the Google app installed). If you would like to get Smart Assistant back, follow the steps in the To Revert back section.
By the way, if you don't want to bother with Command prompt, you can always just use a custom launcher like Lawnchair, that will give you the ability to use Google Discover without any ADB commands. If you want the safest route, go with this.
Steps:
1- Enable Developer Options (by going to Settings>About Phone>Version then clicking Build Number a bunch of times).
2- On your PC, download Platform Tools from this link: https://developer.android.com/studio/releases/platform-tools .
3- Extract the zip file to a folder.
4- Copy the path to that folder, then open open Command Prompt as an administrator and type "cd (the path you copied)" (example: cd C:/platform-tools ).
5- Enable ADB Debugging (by going to Settings>Additional Settings>Developer options then enable USB debugging).
6- Plug your phone to your PC, then change the connection method on your phone to "Transfer Files / Android Auto".
7- A pop-up saying " Allow USB debugging? " will appear, click Allow.
8- On your the command prompt window on your PC, type "adb devices" , you should see: "[your serial number] device".
9- Now type
Code:
adb shell pm uninstall -k --user 0 com.coloros.assistantscreen
and hit enter, wait for it to finish.
10- Reboot your phone, you should see the Discover Feed on the the left screen. Enjoy !
To Revert back:
If you want to bring back Smart Assistant, repeat steps 4 through 8, then type in command prompt
Code:
adb shell cmd package install-existing com.coloros.assistantscreen
Notes:
- After you're done, I recommend going back to Settings>Additional Settings>Developer options and disabling USB Debugging.
- The command doesn't actually delete the app from the phone, it just removes it for the main user, i.e. you.
- the monthly system updates don't bring back Smart Assistant, but I'd recommend reverting back before updating to Android 12 (if we're getting it ).
Full credit goes to @klanbo78 for this, thank you so much !
Thanks for the guide!
Have you been able to test it out on ColorOS 12?
zonzo3 said:
Thanks for the guide!
Have you been able to test it out on ColorOS 12?
Click to expand...
Click to collapse
I still didn't receive the ColorOS 12 update on my device. Although I can confirm that this still works in the ColorOS 11.1 March 2022 update.
Have you managed to receive the ColorOS 12 update on this device? if so, would you mind mentioning from which country?
So while walking it slipped out from my hand and hit the lower left corner.. The screen didnt even work anymore (after removing the glas, it was clear why, as the connector is lower left corner).
Good thing is, I have adb debugging enabled and my keys are known.. So I can access adb shell and various commands..
My problem is: It rebooted and now, the important stuff is NOT mounted.. Also via scrcpy or MonkeyRemote, I cannot send any touch event... Its not reacting at all.. Honestly, I dont know what it is doing, but its quite busy writing for ever logs in logcat, that the sensors have errors (which is no wonder).
So I tried various "adb shell input XXX", but its not working at all..
Tried to connect a mouse via normal usb-c hub, but I dont know if I would need an OTG cable or if it would even work.
DrFone and some other software, already wants the money, before unlocking anything.. And I would be Ok, if it would be 5-10€.. But buying the whole thing for 1 test, is a big no.
So my status:
adb shell working.
scrcpy at least showing a screen
phone is not reacting on anything else, besides the lockscreen to wake it up.. volume keys are also kinda ignored.
I tried the adb shell input stuff from stackoverflow, but nope.
Can I boot in any recovery thing and mount sdcard there? Does scrcpy work there?
What he heck is my phone even doing?? If I connect another phone in lockscreen and use scrcpy, I can also wake it up normaly.. So probably not only the screen got dmg while flying :/
Most annoying things: It has alarms going off all the time, as I can only snooze them -.-
Is there no command, to unlock it from adb/terminal? I know the damn pin
When I run top, the top most things are sufaceflinger and logd (between 2-15). So its not like sth is always at 100% cpu load..
So little status update:
all adb shell input XXX are simple not working, as Xiaomi needs another setting for that.. Which I cannot activate, without screen.
I will try a manual keyboard at home..
Is there a way, to root it with adb only? Would help me alot..
MIUI security center requires you bonded MI account to enable adb input commands in developer options. scrcpy has OTG mode and can emulate HID device.
scrcpy also didnt work, without that stupid setting set to be true/1.
Tested with my old Mi6. When I enabled the option in dev-settings, it worked fine.
But I was able to unlock it with a keyboard plugged in (+ mouse). Looks like the CPU also has some issues, as everything is slow-motion..
So I just tried, what do I need to press on the Mi6 -> then did it on the Mi9.
"hitting space -> pin -> enter", "hitting space -> pin -> enter".
But was able to rescue all my data + turn off the alarms.
PS.: I then tried to enable this setting, for inputs, but you need to have a SIM cart inserted, to activate it
PPS.: Oh.. Now I got you.. I have to enable this option in scrcpy.. OMG Will test that now
PPPS.: Yeah, with that otg mode, the keyboard and mouse would have also worked.. Well, for the next time I know it
alecxs said:
MIUI security center requires you bonded MI account to enable adb input commands in developer options. scrcpy has OTG mode and can emulate HID device.
Click to expand...
Click to collapse
Ok, thanks - that was missing
If you figure out the command line to enable it from adb settings put global I am very grateful
alecxs said:
If you figure out the command line to enable it from adb settings put global I am very grateful
Click to expand...
Click to collapse
Ok, so I dumped all settings and props to files:
Code:
adb shell settings list global > global.txt
adb shell settings list secure > secure.txt
adb shell settings list system > system.txt
adb shell getprop > props.txt
then searched for adb, usb and similar butfound only the following:
SETTINGS GLOBAL:
adb_enabled=1
adb_wifi_enabled=0
verifier_verify_adb_installs=1
GETPROP:
persist.security.adbinput=1
persist.security.adbinstall=1
(My phone: Mi 11 Lite 5G NE, MIUI 13)
That is, eg ADB can be enabled/disabled as settings global adb_enabled
However, ADB Input is not in settings but as persistent prop persist.security.adbinput and it can be only manipulated by Magisk - and by TWRP but on the old devices where System is not read-only
IMO, it would be theoretically possible on the Mi 9T Pro, but not if display is broken where TWRP cannot be used (I doubt there is anything like scrpy that works for TWRP)
zgfg said:
Ok, so I dumped all settings and props to files:
Code:
adb shell settings list global > global.txt
adb shell settings list secure > secure.txt
adb shell settings list system > system.txt
adb shell getprop > props.txt
then searched for adb, usb and similar butfound only the following:
SETTINGS GLOBAL:
adb_enabled=1
adb_wifi_enabled=0
verifier_verify_adb_installs=1
GETPROP:
persist.security.adbinput=1
persist.security.adbinstall=1
(My phone: Mi 11 Lite 5G NE, MIUI 13)
That is, eg ADB can be enabled/disabled as settings global adb_enabled
However, ADB Input is not in settings but as persistent prop persist.security.adbinput and it can be only manipulated by Magisk - and by TWRP but on the old devices where System is not read-only
IMO, it would be theoretically possible on the Mi 9T Pro, but not if display is broken where TWRP cannot be used (I doubt there is anything like scrpy that works for TWRP)
Click to expand...
Click to collapse
Btw (sorry, OT for the originally reported problem), Netflix cannot be fooled (DRM) to display over scrcpy, only subtitles are displayed on the PC
YT works fine (although without sound - I will try with sndcpy), and strcpy properly recognizes landscape orientation, hence window on the PC can be stretched over the whole monitor
Edit: On the other PC I tried, audio works fine with scrcpy
zgfg said:
However, ADB Input is not in settings but as persistent prop persist.security.adbinput and it can be only manipulated by Magisk - and by TWRP but on the old devices where System is not read-only
Click to expand...
Click to collapse
Nice! I was curious because I don't have Mi account. Although I didn't have this property, just set it from resetprop anyway and it worked!
We can set it from magisk patched boot.img ramdisk/overlay.d/custom.rc systemless. or just add it in init.rc directly.
Code:
on boot
setprop persist.security.adbinput 1