Question Battery Capacity : how can i chceck ? - OnePlus Nord 2 5G

Hi
did someone know how can we chceck capacity in our nords? Oneplus Care app is shi... and dont work for me. Service codes for dialer also didnt work. I don't want to chceck it by apps like accuwheater etc. How it can be done ?

chytrypch said:
Hi
did someone know how can we chceck capacity in our nords? Oneplus Care app is shi... and dont work for me. Service codes for dialer also didnt work. I don't want to chceck it by apps like accuwheater etc. How it can be done ?
Click to expand...
Click to collapse
adb shell dumpsys battery
via adb
dumpsys battery
from terminal
The battery info is in
/sys/class/power_supply/battery/
Yo can read every file with cat.
Root requiered. I use termux as terminal.
Hope helped.

Related

Better shell ?

does anyone know how to add new commands to shell ? or it is possible to install bash or something similiar inside, once we have root now ?
this shell inside is really "cuted" and almost all "ordinary(standart)" command I am missing
e.g: more vi and so on
maybe it works in different way , if yes just correct me
Any try to help is appreciated , but please stay on topic. because I can see it is one of the biggest problem here ..
Have you downloaded the newest version of busybox in the marked? This gives you a lot more commands then the first version posted with the initial root, one if them is vi.
thermoska said:
does anyone know how to add new commands to shell ? or it is possible to install bash or something similiar inside, once we have root now ?
this shell inside is really "cuted" and almost all "ordinary(standart)" command I am missing
e.g: more vi and so on
maybe it works in different way , if yes just correct me
Any try to help is appreciated , but please stay on topic. because I can see it is one of the biggest problem here ..
Click to expand...
Click to collapse
I did this:
Download bash binary from here: http://forum.xda-developers.com/showthread.php?t=537827
You can either replace the default "sh" with this (warning: the "sh" binary is the one that gives you root privileges in the first place, so you might loose them, I'm about to experiment with this and would post more details soon) or keep them both.
Download ASE from here: http://code.google.com/p/android-scripting/
This gives you an easy bridge to Android java using a scripting language of your preference.
When you use adb you will have VI and such available. I don't know much about the varios unix/linux shells available but I know that ADB is offering a lot of ****
Diabolico said:
When you use adb you will have VI and such available. I don't know much about the varios unix/linux shells available but I know that ADB is offering a lot of ****
Click to expand...
Click to collapse
no.. that's what busybox is for

SOLVED - [Q] Get system info such as CPU, clock speed, GPU, RAM, storage, etc...?

Hi Everyone!
I am pretty new to Android Development but have a great app idea for the Play Store, one small part of it, requires me to get the device info such as CPU Speed, CPU Name, device model number, device manufacturer, RAM, storage on sdcard, and some other stuff like that.
My main concern is how would I get those things? I know some apps out there get that info already like Quadrant or Android System Info, but I don't want to decompile them.
So what is the best way you recommend to get those specs from the system and put it into an app variable.
I can't seem to find the correct forum to post this in so I apologize if it is in the wrong section as this doesn't have to do with ROM Dev.
Thanks!
Michael
greenglue said:
Hi Everyone!
I am pretty new to Android Development but have a great app idea for the Play Store, one small part of it, requires me to get the device info such as CPU Speed, CPU Name, device model number, device manufacturer, RAM, storage on sdcard, and some other stuff like that.
My main concern is how would I get those things? I know some apps out there get that info already like Quadrant or Android System Info, but I don't want to decompile them.
So what is the best way you recommend to get those specs from the system and put it into an app variable.
I can't seem to find the correct forum to post this in so I apologize if it is in the wrong section as this doesn't have to do with ROM Dev.
Thanks!
Michael
Click to expand...
Click to collapse
This forum works fine, we use it for app questions as well. I would suggest you look into the Linux command line commands to perform those functions, and then look at what the /proc interfaces do in a Linux system.
Good luck.
thewadegeek said:
This forum works fine, we use it for app questions as well. I would suggest you look into the Linux command line commands to perform those functions, and then look at what the /proc interfaces do in a Linux system.
Good luck.
Click to expand...
Click to collapse
Thanks for your reply!
I found online before this command just it doesn't really give me any useful info like cpu speed, it just gives the cpu type (ex: armv7) and the serial number/device ID. Here's the command: adb shell getprop | grep abi
I will look into more specific commands like that one though for RAM, storage, etc...
Also, how would I make the APP ITSELF run the command through Java? I know how to do it with adb shell just not in java...
Thanks!
Michael
greenglue said:
Thanks for your reply!
I found online before this command just it doesn't really give me any useful info like cpu speed, it just gives the cpu type (ex: armv7) and the serial number/device ID. Here's the command: adb shell getprop | grep abi
I will look into more specific commands like that one though for RAM, storage, etc...
Also, how would I make the APP ITSELF run the command through Java? I know how to do it with adb shell just not in java...
Thanks!
Michael
Click to expand...
Click to collapse
Let me google that for you...
http://developer.android.com/reference/java/lang/Runtime.html
Sorry but as for the rest you need to figure it out for yourself, part of the learning bit my friend.
thewadegeek said:
Let me google that for you...
http://developer.android.com/reference/java/lang/Runtime.html
Sorry but as for the rest you need to figure it out for yourself, part of the learning bit my friend.
Click to expand...
Click to collapse
Ok thanks for all your help! I am getting somewhere now!
greenglue said:
Ok thanks for all your help! I am getting somewhere now!
Click to expand...
Click to collapse
You're welcome, glad you're taking initiative to figure it out for yourself.
greenglue said:
Thanks for your reply!
I found online before this command just it doesn't really give me any useful info like cpu speed, it just gives the cpu type (ex: armv7) and the serial number/device ID. Here's the command: adb shell getprop | grep abi
I will look into more specific commands like that one though for RAM, storage, etc...
Also, how would I make the APP ITSELF run the command through Java? I know how to do it with adb shell just not in java...
Thanks!
Michael
Click to expand...
Click to collapse
Please don't use system binaries and run shell commands unless that binary is local to your application. Android has APIs to gather properties use that. Use Java to read files for information in /proc.
Local binaries will always change and will be different. Controlling everything through java logic is the best way to go.
Sent from my Galaxy Nexus using xda premium
greenglue said:
Hi Everyone!
I am pretty new to Android Development but have a great app idea for the Play Store, one small part of it, requires me to get the device info such as CPU Speed, CPU Name, device model number, device manufacturer, RAM, storage on sdcard, and some other stuff like that.
My main concern is how would I get those things? I know some apps out there get that info already like Quadrant or Android System Info, but I don't want to decompile them.
So what is the best way you recommend to get those specs from the system and put it into an app variable.
I can't seem to find the correct forum to post this in so I apologize if it is in the wrong section as this doesn't have to do with ROM Dev.
Thanks!
Michael
Click to expand...
Click to collapse
you can use cat /proc/cpuinfo also
More or less complete tool using shell.

Get MCC/MNC from shell script

Hi everyone,
I would like a shell script (/bin/sh) running on Android though Terminal Emulator, to get MCC/MNC values from network.
Is it possible ? The phone is not rooted.
I don't know if Android have some commands to get that information...
Thank you.
Flo
FloBaoti said:
Hi everyone,
I would like a shell script (/bin/sh) running on Android though Terminal Emulator, to get MMC+MNC values from network.
Is it possible ? The phone is not rooted.
I don't know if Android have some commands to get that information...
Thank you.
Flo
Click to expand...
Click to collapse
The first thing you would need is the IMSI of the device. This would require you to put a SIM card inside. I wouldn't know of any way to get it through the command line, but I believe there are apps on the google play store that will give you this information. I know the root essentials app gives you the IMSI, and I think that app doesn't even require root if you aren't doing anything root specific. There are also secret codes that give you access to this information, I know Samsung has one.
Using the IMSI, you can find the MCC/MNC values.
IMSI will give the operator of SIM card, not the current network MCC/MNC (roaming...)
I think I can do what I want using
getprop gsm.sim.operator.numeric
&
getprop gsm.operator.numeric
I will try.

How to change screen resolution on LG G6 from the phone itself

Hello community ?
i hope you are doing great ?
I don't know if this app was posted before because ihave never seen it but it ill be useful anyway
Today,I found an app on the playstore by accident in which we can now change the screen resolution of our loved G6 without using ADB command eachtime . because it's annoying .yes,seriously ?
you just need to run one ADB command for the first time to grant the app yo work and then,you can enjouy your enhanced and premuim experience like you want ?
Playstore's link :
https://play.google.com/store/apps/details?id=com.draco.smresolutionchanger
ADB command :
adb shell pm grant com.draco.smresolutionchanger android.permission.WRITE_SECURE_SETTINGS

Question S22+ IMEI via ADB not working

Hello,
I'm using some scripts that gather information from phones. Mainly IMEI number. However this stopped working;
adb shell service call iphonesubinfo 1
Normally it would return something like that:
Result: Parcel(
0x00000000: 00000000 0000000f 00350030 00320095 '........1.2.3.4.'
0x00000050: 00380035 00330030 00654083 00320058 '4.5.6.7.8.9.0.1.'
0x00000060: 00370097 00000033 '2.3.4... ')
But... with S22+ it does this:
Result: Parcel(fffffffc ffffffff 00000000 '............')
Something have changed... any one have any idea how to get IMEI from S22+ via ADB?
PS: phone is rooted, model SM-S906B
PPS: this method was working form S6 to S21
Edit:
It seems to be an FW issue, on first released S906BXXU1AVA7 it was working (with and w/o root).
Now I have issues on S906BXXU1AVC6.
BR, Doman.
use phone info from samsung, you have a lot of info
pitelasssss said:
use phone info from samsung, you have a lot of info
Click to expand...
Click to collapse
Nope. ADB only. I know that there are apps...
Update; I can confirm that this is an FW issue. I've rolled back to S906BXXU1AVA7 and all is ok. Any thoughts?
Update 2; well... I know "whats up" now. Staring from S906BXXU1AVBF (second available FW) there is a change in Android 12 that deprecated some functions... there is possibility for a workaround, but it's not elegant. I'm currently working on it.
I am having the same issue. Were you able to make any progress?
Hey, yes, I have a method... you need to call a code *#06# an then retrieve IMEI from it.
Here's a working example:
adb shell "imei=$(input keyevent KEYCODE_CALL;sleep 1;input text '*#06#'; uiautomator dump --compressed /dev/stdout|sed s/\>\<\/\\n/g|grep -A1 IMEI|tail -n1|sed -e 's/.*text=\"//' -e 's/\".*//'); echo ${imei:0:16}"
The above line is not mine, I'm doing it a bit differently, but it still works.
You guys able to rewrite original imei?
i'm in trouble with my s22 U
This even works for older devices,
Code:
adb shell service call iphonesubinfo 1 s16 com.android.shell | cut -d "'" -f2| grep -Eo '[0-9]'| xargs| sed 's/\ //g'
Let me know if this works!
Thank you
luckk said:
You guys able to rewrite original imei?
i'm in trouble with my s22 U
Click to expand...
Click to collapse
I haven't tryed to change IMEI on any new phone, as I remember it was a hassle 10 years ago...
uncommonthinker said:
This even works for older devices,
Code:
adb shell service call iphonesubinfo 1 s16 com.android.shell | cut -d "'" -f2| grep -Eo '[0-9]'| xargs| sed 's/\ //g'
Let me know if this works!
Thank you
Click to expand...
Click to collapse
Ha! It works on Android 13 (S23) and Android 8 (S8). Thats awesome, thanks!
I mean:
adb shell service call iphonesubinfo 1 s16 com.android.shell
The whole oneliner doesn't work on windows (but can be run in linux/android shell).
BR, Doman.
Doman2011 said:
I haven't tryed to change IMEI on any new phone, as I remember it was a hassle 10 years ago...
Ha! It works on Android 13 (S23) and Android 8 (S8). Thats awesome, thanks!
I mean:
adb shell service call iphonesubinfo 1 s16 com.android.shell
The whole oneliner doesn't work on windows (but can be run in linux/android shell).
BR, Doman.
Click to expand...
Click to collapse
Cool
Hi,
I have created a script to extract device information (including IMEI) which theoretically works on all Android versions.
For those interested: https://github.com/micro5k/microg-unofficial-installer/blob/main/utils/device-info.sh
Note: My script also works on Windows, it just need BusyBox for Windows to be executed.
ale5000 said:
Hi,
I have created a script to extract device information (including IMEI) which theoretically works on all Android versions.
For those interested: https://github.com/micro5k/microg-unofficial-installer/blob/main/utils/device-info.sh
Click to expand...
Click to collapse
These service calls can vary for the different versions of Android! You should be aware of this because you don't know what will happen for all the different devices and versions. It could be very dangerous for users to execute them.
Where to find info on Android's "service call" shell command?
Using adb shell or a terminal emulator on the device, entering this will clear all notifications (requires su) service call notification 1 This will send an sms (doesn't require su) service call...
stackoverflow.com
WoKoschekk said:
These service calls can vary for the different versions of Android! You should be aware of this because you don't know what will happen for all the different devices and versions. It could be very dangerous for users to execute them.
Where to find info on Android's "service call" shell command?
Using adb shell or a terminal emulator on the device, entering this will clear all notifications (requires su) service call notification 1 This will send an sms (doesn't require su) service call...
stackoverflow.com
Click to expand...
Click to collapse
Have you looked at the script?
It execute the right command for every Android version.
Doman2011 said:
PS: phone is rooted, model SM-S906B
PPS: this method was working form S6 to S21
Edit:
It seems to be an FW issue, on first released S906BXXU1AVA7 it was working (with and w/o root).
Now I have issues on S906BXXU1AVC6.
BR, Doman.
Click to expand...
Click to collapse
Anybody seeing Odin silently disappearing when trying to flash April security patch level firmware (Snapdragon S22+ SM-S9060)? Was fine all previous firmwares...
Edit: Post removed
I need to use adb cuz the screen is shattered. How do I pull imei while in stock recovery?
Rootmaster906 said:
I need to use adb cuz the screen is shattered. How do I pull imei while in stock recovery?
Click to expand...
Click to collapse
Stock recovery only accepts 'adb sideload'. There is no cmd to pull IMEI.
WoKoschekk said:
Stock recovery only accepts 'adb sideload'. There is no cmd to pull IMEI.
Click to expand...
Click to collapse
Can you assist me then? I cannot get any information off the phone because the screen is shattered and I can't see what is on it and my uncle forgot his password to get into it and we need the IMEI to do a trade-in
Rootmaster906 said:
Can you assist me then? I cannot get any information off the phone because the screen is shattered and I can't see what is on it and my uncle forgot his password to get into it and we need the IMEI to do a trade-in
Click to expand...
Click to collapse
IMEI is also written on the phone's package.

Categories

Resources