What process causes "Invalid Battery" - Android Q&A, Help & Troubleshooting

Hello.
If booting magisk-patched image, my old LG K3 K100 (doing it for fun) shuts down with "invalid battery" pop-up. It works fine when booting stock boot.img so my question is:
how to find what process/config/apk forces the phone to shut down?
My guess: from adb use ps or top or logcat or pm uninstall --user 0 an apk or browse files in root directory, sadly I have like 20 seconds of which 10 are taken to grant root permission, making it hard to guess.
I'm new so cannot post normal links.
pastebin.co m/eWz7FZ2W - pm list packages
pastebin.co m/eMGSMfSM - ps
pastebin.co m/qh1ysb2j - top
pastebin.co m/YS3exaCY - logcat
likely interesting starting from the line below:
08-01 10:12:25.763 1114 1714 I ActivityManager: START u0 {act=android.intent.action.ACTION_REQUEST_SHUTDOWN flg=0x10000000 cmp=com.lge.shutdownmonitor/.LGShutdownActivity (has extras)} from uid 10045 on display 0
Update: when booting to rooted magisk image, there are more packages, namely NFC ones, despite the phone has no NFC
com.lge.NfcSettings
com.lge.ims.rcsstarter
com.lge.rcscall
com.lge.ims.rcsprovider
com.android.nfc
Removing them during that 20 second frame doesn't help, and they are reinstalled on boot.

Related

[Q] Media > DownloadService always running

hi guys, I hope you can help.. I really googled a lot about this, and also made many tests on my phone and waste a lot of time, but couldn't find a solution yet.. also this seems to be affecting many other people, so I don't understand how is possible nobody found a fix for that until now..
(I'm posting in general section because this seems to affect any kind of phones running cm10.1 + gapps)
the problem is that if I go to manage apps > running apps, I see Media process (DownloadService) always running! that could drain my battery and/or download data, in any case I don't see a point in having it always running, so I would like to get rid of it!
what I discovered so far is that the process is related to both gapps and Downloadprovider.apk package included in any CM10.1 build, in fact:
1. the process starts appearing only after installing the gapps (I use a very minimal 4.2 gapps package, about 10mb only)
2. if I delete Downloadprovider.apk package from /System/App, the process doesn't appear anymore
The problem is that if I delete the Downloadprovider.apk package then I start getting gapps related FC's and phone becomes unstable (and very probably will not be possible to download anymore things from the browser and/or play store)!
So what could I do to safely get rid of that process? Maybe disable or freeze some other apps/processes? But I wouldn't know what to disable exactly..
guys please help me I am really getting crazy with that! also that could help many other people :good:
thanks a lot in advance
EDIT: maybe it was related to Maps since I installed maps 7.x I don't see that process anymore!
moly82 said:
hi guys, I hope you can help.. I really googled a lot about this, and also made many tests on my phone and waste a lot of time, but couldn't find a solution yet.. also this seems to be affecting many other people, so I don't understand how is possible nobody found a fix for that until now..
(I'm posting in general section because this seems to affect any kind of phones running cm10.1 + gapps)
the problem is that if I go to manage apps > running apps, I see Media process (DownloadService) always running! that could drain my battery and/or download data, in any case I don't see a point in having it always running, so I would like to get rid of it!
what I discovered so far is that the process is related to both gapps and Downloadprovider.apk package included in any CM10.1 build, in fact:
1. the process starts appearing only after installing the gapps (I use a very minimal 4.2 gapps package, about 10mb only)
2. if I delete Downloadprovider.apk package from /System/App, the process doesn't appear anymore
The problem is that if I delete the Downloadprovider.apk package then I start getting gapps related FC's and phone becomes unstable (and very probably will not be possible to download anymore things from the browser and/or play store)!
So what could I do to safely get rid of that process? Maybe disable or freeze some other apps/processes? But I wouldn't know what to disable exactly..
guys please help me I am really getting crazy with that! also that could help many other people :good:
thanks a lot in advance
Click to expand...
Click to collapse
Maybe you have some program/app installed which uses the download manager? Some app trying to download an update outside of the regular mechanism? I don't see DownloadService running on my phone unless I instructed it to download something. Do you notice anything downloadmanager/media related in logcat? If in doubt, attach the phone to a PC, run the following commands and attach the resulting file ('attach_me.txt') here:
Code:
adb shell 'ps; echo -----------;logcat -v time -b main -b system -b events -d;echo -----------;dumpsys;' > attach_me.txt
Use the full path to adb if you need to.
This shows the currently running processes (ps), the contents of the main, system and event logs (logcat) and a snapshot of the current state of your phone (dumpsys). If there is anything there you don't want to show to the whole world edit the resulting file before attaching it here.
thanks a lot for the reply my friend
tonight at home I think I will be able to run the adb command you suggested me (in my home computer I have sdk installed)
so far I checked logcat in terminal ("logcat |grep edia" and "logcat |grep ownload") and this is what I got:
$ su
# logcat |grep edia
D/Vold ( 1197): Volume sdcard state changing -1 (Initializing) -> 0 (No-Media)
D/Vold ( 1197): Volume sdcard state changing 0 (No-Media) -> 2 (Pending)
W/PackageParser( 1626): No actions in intent filter at /data/app/org.wikipedia-1.apk Binary XML file line #39
I/ActivityManager( 1626): Start proc android.process.media for broadcast com.android.providers.media/.MtpReceiver: pid=1765 uid=10011 gids={50011, 1015, 1023, 1024, 1028, 2001, 3003, 3007}
V/ActivityThread( 1765): android.process.media white listed for hwui
D/SystemUIService( 1701): loading: class com.android.systemui.media.RingtonePlayer
D/SystemUIService( 1701): running: [email protected]
W/ContextImpl( 1626): Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1458 android.bluetooth.BluetoothHeadset.:273 android.bluetooth.BluetoothAdapter.getProfileProxy:1155 android.media.AudioService.getBluetoothHeadset:2198 android.media.AudioService.access$2800:104
W/ContextImpl( 1626): Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1458 android.bluetooth.BluetoothA2dp.:160 android.bluetooth.BluetoothAdapter.getProfileProxy:1158 android.media.AudioService$AudioServiceBroadcastReceiver.onReceive:4087 android.app.LoadedApk$ReceiverDispatcher$Args.run:758
$ su
# logcat|grep ownload
I/ActivityManager( 1624): Start proc com.google.android.youtube for broadcast com.google.android.youtube/.core.transfer.DownloadService$BootReceiver: pid=2305 uid=10050 gids={50050, 3003, 1015, 1006, 1028}
W/ActivityManager( 1624): No content provider found for permission revoke: file:///data/data/com.android.providers.downloads/cache/downloadfile.apk
W/ActivityManager( 1624): No content provider found for permission revoke: file:///data/data/com.android.providers.downloads/cache/downloadfile.apk
I'm attaching also screenshots of the process I'm talking about
EDIT: I reinstalled everyting from scratch as a new build by quarx came out.. it seems that installing only cm build + minimal gapps, that process doesn't show up. Later after I installed back all my apps (via app2zip flashable zip) the process showed up again.. so probably you are right and there is a certain app using that process.. but how can I understand which one has relation with that service? maybe YouTube as i see it mentioned in logcat?
delete
i could generate the logs you asked without using the pc but using the phone terminal and multiple commands.. i'm uploading them to my dropbox links are below thanks in advance..
http://db.tt/gJLBYeT7
http://db.tt/OahQ8Zf7
http://db.tt/KPUTy4et
YAFU what happened to you?
it seems to me after I installed latest maps 7.x the media > download process is not appearing anymore in running processes.. maybe it was related to sh*tty maps??? :fingers-crossed:

ADB uninstall package command: accidental space, mobile hangs

Hi I bought this brand new Samsung Galaxy J6 today. Immediately I notice the ****load amout of bloatware on it, so I've looked around and found tis ADB method of uninstalling services. (without root required)
Now I'm kind of new to this software, and I'm having fun uninstalling some crap. And then, one little finger slip and offcourse the command gets a completely different meaning and offcourse it immediately ****s up the whole phone.
From working fine 5 mins ago to 'hanging' on Samsung logo now. Really don't know what to do.
If there's some advanced user that could help me out, that would be awesome.
Here's the exact log in CMD: (Windows 7 Professional) Notice the accidental space between "rubin" and ".app" that's causing the instant drama!
j6lte:/ $ pm uninstall -k --user 0 com.samsung.android.rubin .app
android.os.DeadObjectException
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:761)
at android.os.BinderProxy.shellCommand(Binder.java:815)
at com.android.commands.pm.Pm.runShellCommand(Pm.java:334)
at com.android.commands.pm.Pm.runUninstall(Pm.java:726)
at com.android.commands.pm.Pm.run(Pm.java:174)
at com.android.commands.pm.Pm.main(Pm.java:107)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:287)
255|j6lte:/ $
And here's an example of how I intended the command: (without space)
j6lte:/ $ pm uninstall -k --user 0 com.samsung.android.rlc
Success
Many thanks in advance,
Tritium2

Tutorial: Gear S for Tab Active 2

Work in progress to make it work on a samsung tablet running android 7.1.1
Can get the watch to be seen by gear manager but it fails during set up.
This is a list of trial and errors at the moment - please add any ideas you have.
Install magisk /root
Install Magiskhide props config
Install terminal emulator
install busybox via magisk downloads
terminal emulator -> props
Add new custom value
ro.product.model
Was SM-T395
Set to GT-N7105 (note 2)
1. default (current)
y
Boots OK
Safetynet pass
download wear
download amaze file manager
navigate to /data/data/com.samsung.android.app.watchmanager/files/rules.xml
edit to allow tablets=true
set it read only(!)
restart
Safetynet pass
run gear wearables & connect
--------------Beyond this it's a bit of a guess. Trying gearmanagerstub.apk but no luck yet.
--------------Currently fails after 5-10 seconds of 'connecting to gear', which displays on phone and watch.
Sees watch and connects also shows connecting on the watch but then the app bombs back to a list of devices. So it passes the initial device checks at least, but gear2splugin is failing somehow
Maybe I need gearmanagerstub Will try downloading Note 8 7.1.1 firmware see if there is a gearmanagerstub. Yes it has one.
& use magisk app systemiser module....
terminal -> systemize
option 3
enter path of gearmanagerstub.apk e.g. /sdcard/GearManagerStub.apk (where I put mine)
where to install? 1. /system/app
Nothing shows in /system/app... watchmanager bombs again
try restart
Interesting it keep updating rules.xml now.... it is back to supports tablet=false. Both after restart, and then after starting watchmanager. (I edited it after boot then checked again)
fix is set rules.xml to read only.
So perhaps an older version of gearmanagerstub would do the trick.. (I'm using the oldest note 8 one)
run terminal ->systemize
revert app - select 1- (null??)
install note 3 5.0 gearmanagerstub.apk same process
After another failure to connect it got further to ELUA screen before bombing.
I see it thinks my watch is installed now...
It connects for maybe 10 seconds hits "back up and restore" and immediately bombs. The app acts like it is working but the gear says it's not "failed to connect"
Suddenly pops up "error your gear is disconnected" on the restore page.
Now it's back to failing after 5 seconds / 10 spins.
tried copying gearmanagerstub to /system/app and reinstalling all, no difference
This did not trigger safetynet.
Try setting to SM-950F... no change.
Try setting fingerprint to note 8 (SM-950F) (8.0 although I am running 7.1.1)
try ro.build.characteristics=phone,emulator (currently tablet,emulator)
This gives a different list of devices (watches not just earphones) when I reinstalled gear manager.
Still bombs, also the icon is still a tablet when connecting, not a phone.
If anyone has figured this out already I'm all ears
could try non samsung next
https://forum.xda-developers.com/showpost.php?p=79230009
or other ideas
https://www.youtube.com/watch?v=nKH1ykQR4iQ
Update- bluetooth crash in logcat
Looking at logcat and the apks it appears that watchmanager only checks to see if the watch is 'non samsung'. How it decides that an GT-N7105 magically makes it a samsung product but a T395 is not, I can't figure it out.
Interestingly modifying rules.xml and simply adding supportsnonsamsung = true seems to work.
In any case logcat shows a bluetooth error/crash. Why it crashes I don't know.
It looks like the trigger is
11-14 13:35:56.237 4853 4853 E SACalendarProvider::Service: CALENDAR_HOSTMANAGER_CONNECT
Shortly after this a lot of data seems to be sent over bluetooth. A few seconds later the data stops, and 200ms later an error:
11-14 13:35:59.786 3525 3609 E bt_hci : command_timed_out [BT_CORE] hci layer timeout waiting for response to a command. opcode: 0xffff
Nothing interesting happens in logcat in the 2 seconds of data transfer.
A while later the app detects that the watch is disconnected
and eventually bombs. A few seconds after that the watch reports setup fail.
Here is a list of interesting error codes
11-12 12:18:58.417 31815 31832 E BluetoothDataManager: getUartErrorInfo 000 000 000 000
11-12 12:18:58.417 31815 31832 E BluetoothDataManager: "LO_MFN":"29","LO_LMP":"8","LO_SUB":"602","LO_FWV":"BTFM.TF.1.3-00036-QCATFSWPZ-1","ERROR_REASON":"225","UART":"000 000 000 000"
11-12 12:18:58.599 22777 31958 E SABtServerListener: SA_ERROR: IOexception in UUID xxx-xxx-xxx-xxx-xxx ::Exiting Now
11-12 12:18:58.601 3600 4901 I ActivityManager: Process com.android.bluetooth (pid 31815) has died(68,798)
Here is a list of things that crashed
11-12 12:18:58.611 3600 4901 W ActivityManager: Scheduling restart of crashed service com.android.bluetooth/.btservice.AdapterService in 1000ms
11-12 12:18:58.612 3600 4901 W ActivityManager: Scheduling restart of crashed service com.android.bluetooth/.hdp.HealthService in 11000ms
11-12 12:18:58.614 3600 4901 W ActivityManager: Scheduling restart of crashed service com.android.bluetooth/.hid.HidService in 10997ms
11-12 12:18:58.617 3600 4901 W ActivityManager: Scheduling restart of crashed service com.android.bluetooth/.map.BluetoothMapService in 10994ms
11-12 12:18:58.618 3600 4901 W ActivityManager: Scheduling restart of crashed service com.android.bluetooth/.a2dp.A2dpService in 10993ms
11-12 12:18:58.619 3600 4901 W ActivityManager: Scheduling restart of crashed service com.android.bluetooth/.gatt.GattService in 10992ms
11-12 12:18:58.619 22777 22808 D SADiscoveryCore: handling msg: DEVICE_ACCESSORY_LOST...
11-12 12:18:58.619 3600 4901 W ActivityManager: Scheduling restart of crashed service com.android.bluetooth/com.samsung.ble.BleAutoConnectService in 20992ms
11-12 12:18:58.619 3600 4901 W ActivityManager: Scheduling restart of crashed service com.android.bluetooth/.hid.HidDevService in 30992ms
11-12 12:18:58.620 3600 4901 W ActivityManager: Scheduling restart of crashed service com.android.bluetooth/.opp.BluetoothOppService in 30991ms
11-12 12:18:58.620 3600 4901 W ActivityManager: Scheduling restart of crashed service com.android.bluetooth/.sap.SapService in 30991ms
I am not sure what causes this error.
I tried many versions of gear2plugin which contains the apks such as SAproviders / SAcalendarprovider code..
It seems that the bluetooth process under hostmanager-connectionmanager-databuilder works for "single chunk" but with fragmented data it receives 12 chunks of 61k (or so) before dying.
any ideas?
Just FYI
The same T395 tab-phone works pairing a Gear S3 which uses a different plugin 'gearoplugin', with rules.xml edited to say support tablet = true and set to read only. No other tricks are needed I think as supportnonsamsung is already true, all connected to the internet etc. Obviously you need root to edit rules.xml.
= Gear S plugin V2.2.03.19032541N
= Galaxy Wearable V2.2.27.19083061
The gear s uses gear2smodule. I tried the latest version I could find 2118120361, which didn't work.
aka GearModule Version 2.2.02.18120361
Does anyone have a later version?

Do not disable com.android.updater

I uninstalled com.android.updater, and fow a while everything was OK. Then today the battery was depleted, and after recharging the phone went into a bootloop. I had to install com.android.updater again, and after that everything went back to normal.
How did I find out it was com.android.updater? When in a bootloop, the Android system is actually already up and running. I was able to do adb logcat. There I saw that the system was looking for com.android.updater.
Code:
04-18 17:07:20.036 7445 7606 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: Thread-4
04-18 17:07:20.036 7445 7606 E AndroidRuntime: java.lang.RuntimeException: System error: connot find system app : com.android.updater
Note that I'm using the original China Stable ROM version 10.4.4.0(PFKCNXM), all stock, locked bootloader, not rooted. Except for the customization that we can do without root: Install Google services etc, and disable/uninstall packages through ADB.
I didn't want to upgrade to MIUI 11 because I've seen reports of it being slow and draining battery, and I want the NFC functionality, so I had to stick with China ROM.
I can't find that in my Mi 9T Pro (using the latest xiaomi.eu 20.3.27)
When I search Update I find pl.zdunex25.updater, com.android.dynsystem and com.google.android.configupdater and have all 3 frozen with SDMaid.
DeepAnger said:
I can't find that in my Mi 9T Pro (using the latest xiaomi.eu 20.3.27)
When I search Update I find pl.zdunex25.updater, com.android.dynsystem and com.google.android.configupdater and have all 3 frozen with SDMaid.
Click to expand...
Click to collapse
Oh I'm using the China Stable ROM version 10.4.4.0(PFKCNXM), sorry for not mentioning it earlier. I think custom ROMs might be immune to this sort of thing. Thanks, I've updated the post with my ROM info.
I uninstalled com.android.updater, and i cant restore it(. Do you can help me? I use redmi 4 and firmware miui_HMNote4Global_V8.5.6.0.MBFMIED_6f4b63e4fd_6.0. How i can restore one app whitout reinstall all?(
Brooont said:
I uninstalled com.android.updater, and i cant restore it(. Do you can help me? I use redmi 4 and firmware miui_HMNote4Global_V8.5.6.0.MBFMIED_6f4b63e4fd_6.0. How i can restore one app whitout reinstall all?(
Click to expand...
Click to collapse
Process of restoring generally depends on how did you 'uninstall' - please precisely describe how you did
I connect phone to computer with adb, click "debloater" and write com.android.updater in "custom" field, and click uninstall.
Brooont said:
I connect phone to computer with adb, click "debloater" and write com.android.updater in "custom" field, and click uninstall.
Click to expand...
Click to collapse
Still depending on how your debloater worked, try the folowing command(s):
adb shell cmd package install-existing com.android.updater
if it fails then:
adb shell pm enable com.android.updater
First make sure that adb connection is properly established:
adb devices
C:\adb_run\bin>adb devices
List of devices attached
NF8LHYVSNJZTGY7L recovery
C:\adb_run\bin>adb shell pm enable com.android.updater
adb server is out of date. killing...
* daemon started successfully *
/sbin/sh: pm: not found
C:\adb_run\bin>adb shell cmd package install-existing com.android.updater
/sbin/sh: cmd: not found
C:\adb_run\bin>
Something wrong...
Brooont said:
C:\adb_run\bin>adb devices
List of devices attached
NF8LHYVSNJZTGY7L recovery
C:\adb_run\bin>adb shell pm enable com.android.updater
adb server is out of date. killing...
* daemon started successfully *
/sbin/sh: pm: not found
C:\adb_run\bin>adb shell cmd package install-existing com.android.updater
/sbin/sh: cmd: not found
C:\adb_run\bin>
Something wrong...
Click to expand...
Click to collapse
Something wrong/strange with your adb deamon
Btw, you used certain Debloater - you should better ask in the corresponding Debloater forum/thread how to un-do
Тhanks!
wpyh said:
I uninstalled com.android.updater, and fow a while everything was OK. Then today the battery was depleted, and after recharging the phone went into a bootloop. I had to install com.android.updater again, and after that everything went back to normal.
How did I find out it was com.android.updater? When in a bootloop, the Android system is actually already up and running. I was able to do adb logcat. There I saw that the system was looking for com.android.updater.
Code:
04-18 17:07:20.036 7445 7606 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: Thread-4
04-18 17:07:20.036 7445 7606 E AndroidRuntime: java.lang.RuntimeException: System error: connot find system app : com.android.updater
Note that I'm using the original China Stable ROM version 10.4.4.0(PFKCNXM), all stock, locked bootloader, not rooted. Except for the customization that we can do without root: Install Google services etc, and disable/uninstall packages through ADB.
I didn't want to upgrade to MIUI 11 because I've seen reports of it being slow and draining battery, and I want the NFC functionality, so I had to stick with China ROM.
Click to expand...
Click to collapse
Would it be safe to disable in ADB, rather than uninstall?
Also, is it only responsible for OS updates, or does it handle things like updating the Google Play app?
hey guys..
is there any method for unrooted device..? disable commanda is not working.;
C:\Users\Desktop\fastboot_adb(1.0.32)_071114_r21>adb shell pm disable-user --user 0 com.android.
updater
Package com.android.updater new state: default
t-mobile_mda said:
hey guys..
is there any method for unrooted device..? disable commanda is not working.;
C:\Users\Desktop\fastboot_adb(1.0.32)_071114_r21>adb shell pm disable-user --user 0 com.android.
updater
Package com.android.updater new state: default
Click to expand...
Click to collapse
I would suggest not touching android.updater. it gives bootloop if disabled or uninstalled
What should we remove then

[Xiaomi Redmi Note 8] accidentally deleted one 'bloatware' package too many, phone is soft bricked

So this morning I got frustrated with some of the preinstalled software on my Xiaomi and I decided to connect it per adb via usb to my PC, after which I launched the shell and manually uninstalled following packages:
com.google.android.apps.wellbeing
com.google.android.googlequicksearchbox
com.facebook.services
com.facebook.system
com.facebook.appmanager
com.miui.analytics
com.xiaomi.mipicks
com.qualcomm.qti.uceShimService
com.qualcomm.qti.callfeaturessetting
com.qualcomm.qti.remoteSimlockAuth
com.xiaomi.finddevice
with the command
Code:
pm uninstall -k --user 0 <package name>
After this, my phone restarted into Redmi-Recovery 3.0, with no direct way to get out.
Trying to reinstall doesn't work because in this moment, even if adb is able to connect, I cant do anything about the packages in the shell anymore.
From what I've now read, it seems like Xiaomis "Find Device" service is essential, so I'm guessing i need to "revert" it, but how?
I started following this tutorial on youtube on "how to unbrick your xiaomi phone" (which assumes that I need to reflash my ROM via fastboot), but by now I've gotten stuck at every single sub-step of doing this with MiFlash that I'm about to give up.
So that MiFlash is able to flash, the bootloader needs to be unlocked. I tried to do that with Mi Unlock (both 4.5 and 6.5) but that app is even less comprehensible and functional. sometimes pages load blank, sometimes dialogues are suddenly in chinese, but worst of all is that even though I have a verified Xiaomi account (via email), when I try to sign in with it in Mi Unlock, it asks me to provide a phone number, and when I do, it says that "+417*******3" is not a valid phone format, what the hell?
I've been stuck on this the whole day, I think I'm missing an obvious workaround to reinstall that package, or some kind of different solution? What am I doing wrongly?
Thanks for any help.
The command
Code:
pm uninstall -k --user 0 <package name>
doesn't remove an app, but only deletes its APK.
You reinstall the now missing APK via command
Code:
adb shell "cmd package install-existing <package name>"
Thanks for your quick reply. I've already tried this, as I've said:
even if adb is able to connect, I cant do anything about the packages in the shell anymore
Click to expand...
Click to collapse
The exact output is:
Code:
pm install-existing com.xiaomi.finddevice
cmd: Can't find service: package
Can't read properly? May be you've to buy new glasses ...
Although my friend from just over the border could've phrased it more nicely, this was essentially my issue. I somehow omitted "cmd" from the install-existing command the last time.... 5 hours wasted for nothing
Merci und Gruess

Categories

Resources