[Q] dumpsys batterystats working only via adb - Nexus 4 Q&A, Help & Troubleshooting

Hey all,
in terminal emulator when i try to do dumpsys batterystats as normal user, i get a permission denied error. So far so good but when i execute the command as root, it says that dumpsys didnt find the service 'batterystats'
But when executing this from adb shell on my computer, it works without complaints?!!
I tried doing this because i noticed wakelock detector not showing any data so i went to supersu log to look what command the app tried to execute and it was dumpsys batterystats
P.s. i tried su'ing to [email protected] as well hoping that it would work but i get the same response as with root
--------------------
Phone: Nexus 4
OS: rooted Lollipop LRX21T
Bootloader: unlocked
stock Recovery

Okay i just updated supersu and it is working now ?
--------------------
Phone: Nexus 4
OS: rooted Lollipop LRX21T
Bootloader: unlocked
stock Recovery

Related

[Q] [L5]Help: ADB commands not working!

Hello,
I am stuck and it is really anoying. I am trying to flash CM on my LG L5 (e610)
I have installed adb, and rooted the device already. I have su and when i do a check
for adb to work 'adb devices' it shows up with my device. but when i enter 'adb shell' hit enter
and after that typ 'su' it does nothing.. nothing pops up on my phone.. i have USB debuging enabled and
it is in charge mode. What is it i do wrong?
-Fireworkfan
EDIT: I can use other commands, rebooting my phone with ADB works perfect.. what am i doing wrong with adb shell thing.. is there something i need to instal first? i only placed the .bin file in the directory of my phone.. Also i have 'SuperSU' shouldnt 'su' be something els? i am so confused
after you write adb shell, if you have SuperUser or SuperSU on your phone, unlock your phone and accept root for adb comands and after you can go with su and do what you want
Sabyn said:
after you write adb shell, if you have SuperUser or SuperSU on your phone, unlock your phone and accept root for adb comands and after you can go with su and do what you want
Click to expand...
Click to collapse
That is the whole problem, I do not get a grant or decline messages from my SuperSU... I have checked it over a 100 times, on the mainscreen or even with the app itself open. I do however get the Grant or Decline message when I use apps like pimpmyrom on my phone itself.. I have tried it on a different computer to now, again without succes.. anyone an idea? There would be someone that would like to help me over a chat with this problem?

[Linux] Unlock bootloader and root nexus 7 from command line

I had some problems using all the toolkit around and was not able to unlock my bootloader and root my phone. (Shame on me it was already three days since I got hands on my device). I had upgraded to 4.3 some toolkits didn't support my build etc.
Some pre-reqs:
1) BACKUP ( I back uped using the helium app, but forgot to backup my internal storage, and it too got wiped)
2) Thats all
I am using the wifi only version of this tablet (grouper)
I am using debian wheezy 7.2 64 bit
Here is what I did:
1)I installed adb and fastboot using wheezy-backports repository
Code:
apt-get install android-tools*
2) I connected my phone to my laptop in usb debugging mode and ran the following commands:
Code:
adb reboot bootloader
fastboot oem unlock
3) Then I downloaded the CF-ROOT script from this link
4)Extracted the file.
5)Some more commands
Code:
cd /path/to/extracted/folder/image
fastboot boot CF-Auto-Root-grouper-nakasi-nexus7.img
thats all folks, you have an unlocked bootloader and a rooted device.
That's the normal method if you don't use a toolkit! You are able to use that for example on windows too. It's nothing new
Sent from my Nexus 4 running Android 4.3
Yeah, I figured out that later! LOL
Thanks anyways

[Q] CWM installation after towelroot

Hey!
I have tried installing cwm after doing towelroot. I am using terminal and used the command:
Code:
flash_image recovery /sdcard/recovery.img
but it ends up doing nothing. I have the proper binaries and I did chmod 777 so the command should work. But when I do:
Code:
reboot recovery
I boot into Android recovery 3e. Also after executing the command should I get any output or should it go straight to next line? Any help would be appreciated.
We have a locked bootloader which really prevents the us from replacing the stock kernel and recovery. The only working recovery we have is safestrap. Read more on the all things AT&T thread.
Sent from my SGH-I337 running GPE using Tapatalk
Oh wow can't believe i forgot that.

How to Install su binary from twrp using Ubuntu 16.04?

I managed to install twrp in Huawei P8 Lite and to have shell access via adb when on recovery by theese commands:
Code:
adb reboot recovery
# After booted sucessfully
adb shell
I also managed to obain a su binary. Now how I can move it to my device's xbin? As fas I have seen the recovery itself has it's own /system/xbin and I cannot figure out how to access the system's one (the one that uses during the normal boot).
Can you help me?
If you want root you can use Magisk

[Moto G6 Plus] developer option OEM unclock is disabeld (gray, not switchable enable)

Hi,
I have had a MotoG6 plus from a friend, but after upgrade it from 8.0 to 9.0 begans problems. The phone goes on crash and restart many time during usage of lots of Apps. I Tried a factory reset + reinstall alot of app, but nothing changed. The phone crash as well with same frequency. I decide to broke it and i tried to install a LineageOS16_9Pie. Unfortunatly during the Custom install, even if i followed a guide, unloking the bootloader, i really broke it, the bootloader and recovery partition. I have started the image of TWRP via fastboot to obtained a motoG6plus working (even without a proper bootloader) with LineageOS16_9Pie. To do it i've got the code from motorola site, to unlock the G6plus, after eneable USB debug + OEM Unlock from OS. With theLineageOS i have unlocked and locked oem many times using the OS without any problems . I have used the LineageOS for a week, after that, It started agan the same crashs i had with the stock rom 9.
I decided to reinstall the 8.0 version Evert , to remove the boot errors and because with the 8.0 was stable. After i installed the stock rom 8.0 evert i cant' unlock oem again . Into the developer option, the option "OEM unclock" is gray , disabeld not switchable . Even if i tried to unclock again from fastboot command , it say that i have to switch and anable "OEM Unlock" from the OS but i can't.
Is there a way to unclock byassing the OS or re-enable that option?
Try this command in terminal app:
Code:
:/ $ su
:/ # service call oem_lock 1 s16 allowed
The output should be:
Code:
Result: Parcel(00000000 '....')
WoKoschekk said:
Try this command in terminal app:
Code:
:/ $ su
:/ # service call oem_lock 1 s16 allowed
The output should be:
Code:
Result: Parcel(00000000 '....')
Click to expand...
Click to collapse
Thanks WoKoschekk, but i surely ' loaded a wrong rom, because the Moto G6plus don't have Wifi and connectivity via SIMs working, so I can't download any app. I am going to try to copy an app via apk on the SD. The good news is that the bootloader initial stop has disapeared, (but i still do not have any recovery)
Nothing to do with "install app unknown" o similar (sorry, my phone is in Italian). Even if i do have the apk terminal emulator, i Can't install because of the few app in list that i can unable to install unknown sources. In this list there isn't "File manager" .. i still have the error of parsing the package
If you downgrade from Pie to Oreo you will lost all connections. To get them back you must flash a Pie version of any Rom.
First of all flash the right and latest firmware.
I Would like to reburn another rom, but i can't because the option "Unlock OEM" is in "gray" not switchable, so for be is a bit hard. I am stuck..
Thanks anyway for your interest. I appreciated it.
Reggians said:
I Would like to reburn another rom, but i can't because the option "Unlock OEM" is in "gray" not switchable, so for be is a bit hard. I am stuck..
Thanks anyway for your interest. I appreciated it.
Click to expand...
Click to collapse
Flash the latest Magisk.zip to enable OEM unlock option.
WoKoschekk said:
Try this command in terminal app:
Code:
:/ $ su
:/ # service call oem_lock 1 s16 allowed
The output should be:
Code:
Result: Parcel(00000000 '....')
Click to expand...
Click to collapse
Hi
I finally copy a term.apk and installed with success ! (i have no root permissions on the device)
when i give
Code:
evert_n:/ $ su
the answer is:
Code:
/system/bin/sh: su: not found
127|evert_n:/
if send the command with #
Code:
:/ $ # service call oem_lock 1 s16 allowed
i get null
Code:
127|evert_n:/
if i send the command without # (probably it is the cli after su level) like this
Code:
:/ $ service call oem_lock 1 s16 allowed
the answer is
Code:
service: Service oem_lock does not exist
WoKoschekk said:
Flash the latest Magisk.zip to enable OEM unlock option.
Click to expand...
Click to collapse
I have installed Magistik7.3.4.apk via filesystem but, i don't have connectivity and i can't install it via TWRP because i have the device locked so i can't even try to load TWRP via fastboot , so Magistik is not fully working unfortunatly..
Are you able to start the device in fastboot mode?
What is the error message when booting in TWRP?
For the "service oem_lock" command you need super user rights...
if you haven't solved it yet, use this to enable internet connection to your phone and you will be able to unlock the bootloader
https://github.com/Genymobile/gnirehtet
Has anyone solved this? Do I need to wait the 7 days to unlock it again?
I saw a thread where someone said they skipped the 7 days by changing the date of the device and rebooting, but that didn't work for me.

Categories

Resources