Changing options trough shell - OnePlus 2 General

so, i am trying to change the gps (location) settings trough shell (root) but all methods i find are for android 5 and before.
Is there a commnd to do this or am i screwed?

lpgfinmark said:
so, i am trying to change the gps (location) settings trough shell (root) but all methods i find are for android 5 and before.
Is there a commnd to do this or am i screwed?
Click to expand...
Click to collapse
have you tried this ?

casual_kikoo said:
have you tried this ?
Click to expand...
Click to collapse
Yeah, that command has been either disabled or changed in android 6

Related

Removing App Registry?

Hi,
A few months ago I uninstalled an older version of the free mybackup Pro app which I had as at the time as I wasn't going to use it, but have decided that with the upcoming (hopefully) 2.1 update I would back up my phone however when I tried to install and run it, it would not let me use and told me to update to the full version.
How can I remove the older registry files to enable me to back up on the free version for the time being if at all?
Cheers
there is no such thing as a registry. uninstalling apps also removes the settings for the app, everything is gone then.
kendong2 said:
there is no such thing as a registry. uninstalling apps also removes the settings for the app, everything is gone then.
Click to expand...
Click to collapse
Thats what I thought but it still wont work?
choccy31 said:
Thats what I thought but it still wont work?
Click to expand...
Click to collapse
execute this in adb shell, does it give any output?
Code:
ls -1 /data/data/ | grep -i backup
if so try to delete the file.
kendong2 said:
execute this in adb shell, does it give any output?
Code:
ls -1 /data/data/ | grep -i backup
if so try to delete the file.
Click to expand...
Click to collapse
How do I access adb shell?
you need to have downloaded the sdk software, once you have setup file associations its a matter of opening up a command prompt, changing to your tools directory
c:\>cd \sdk\tools
C:\sdk\tools>
Then type the code above,
akhtar1817 said:
you need to have downloaded the sdk software, once you have setup file associations its a matter of opening up a command prompt, changing to your tools directory
c:\>cd \sdk\tools
C:\sdk\tools>
Then type the code above,
Click to expand...
Click to collapse
thanks for that, will take a look.

[Q] [Request] Charging/Accessory Overide

pokey9000 found in the kernel, drivers/accessory/30pin_con.c:
if (acc_adc != false) {
if ((2600 < acc_adc) && (2800 > acc_adc)) {
env_ptr = "ACCESSORY=OTG";
acc->current_accessory = ACCESSORY_OTG;
Which he used to figure out what was needed to put the unit into Host mode and through his help and testing I figured out that you needed a 3:1 split on the power to get the unit to think it was charging from an OEM charger.
Is it possible to change the above code and whatever the other code is that senses power on the data lines so that we can force the tablet into whatever mode we want?
I don't have the proper setup to code myself so I hope there might be a Dev out there up for the challenge.
This works, it not only allows usb charging from a computer/laptop, but it enables it to be charged from any (In my case my Kindle's wall plug.) wall plug.
Hope that helps!
FillTheVoid said:
I am having trouble with command
adb shell
echo 1 > /sys/class/power_supply/battery/force_usb_charging
Works fine from my Laptop, but when in a terminal on the tab I get
adb shell
error: device not found
I did give the terminal su permission. Anything special I have to do when running this script from the tab itself. I would like to be able to do this "on the go" since it is not persistent after reboot. Thanks.
Click to expand...
Click to collapse
Mullicious said:
You can make it persistent, slap it in a bog standard text editor, then by using script manager, create it as a script to run as root and at boot. Confirmed it to work myself, very handy.
Sent from my GT-P7510 using xda premium
Click to expand...
Click to collapse
Edit:
I see this doesn't answer your question, I'm sorry; misread.
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums and Read THIS
Moving to Q&A
Could someone put this into a package or give detailed instructions for a noob like me to get this running? I really hate that the Tab doesnt just recognize car usb power like my galaxy phone does...Thanks!
Mullicious said:
This works, it not only allows usb charging from a computer/laptop, but it enables it to be charged from any (In my case my Kindle's wall plug.) wall plug.
Hope that helps!
Edit:
I see this doesn't answer your question, I'm sorry; misread.
Click to expand...
Click to collapse
D you mean this command works:
adb shell
echo 1 > /sys/class/power_supply/battery/force_usb_charging
Did you get it to work from terminal eventually?
Can you share the script you created please?
Szadzik said:
D you mean this command works:
adb shell
echo 1 > /sys/class/power_supply/battery/force_usb_charging
Did you get it to work from terminal eventually?
Can you share the script you created please?
Click to expand...
Click to collapse
This shell command works if you are running pershoot's kernel, it is not persistent after reboot though. This doesnt bother me cause if I really need to charge it in the car I just open a terminal emulator and type in in. Takes 30 sec.
FillTheVoid said:
This shell command works if you are running pershoot's kernel, it is not persistent after reboot though. This doesnt bother me cause if I really need to charge it in the car I just open a terminal emulator and type in in. Takes 30 sec.
Click to expand...
Click to collapse
SO it does not work on stock kernel?
Szadzik said:
SO it does not work on stock kernel?
Click to expand...
Click to collapse
That is correct. Pershoot built it into his kernel.
FillTheVoid said:
That is correct. Pershoot built it into his kernel.
Click to expand...
Click to collapse
Any idea if Pershoot's kernel is available for P7500?
Szadzik said:
Any idea if Pershoot's kernel is available for P7500?
Click to expand...
Click to collapse
It is available. That's the 3G model right?
FillTheVoid said:
It is available. That's the 3G model right?
Click to expand...
Click to collapse
Yes, it is 3G. I have to look for the right thread. LEt me know if you have any pointers.
Szadzik said:
Yes, it is 3G. I have to look for the right thread. LEt me know if you have any pointers.
Click to expand...
Click to collapse
See forum.xda-developers.com/showthread.php?t=1138167

[GUIDE] Install fleksy keyboard on any android wear with ADB

hi guys, i try to install some querty keyboard like fleksy on android wear with adb comands.
after many attemps i found the way.
You should be having android platflorm Tools to use ADB.
1. Enable Android Debugging in your android wear (tap many times on build version)
2. Connect your android wear watch.
3. connect your smartwatch to phone via bluetooth
4.write: adb devices
5. see if your device is listed (if you see "unhautorized" see your smartphone to allow the permission)
6.Install App to your watch using this Command: adb install yourApkName.apk
7.Type: adb shell ime enable com.syntellia.fleksy.kb/.Fleksy (if this give you an error try com.syntellia.fleksy.keyboard/.Fleksy)
8.Type: adb shell ime set com.syntellia.fleksy.kb/.Fleksy (if this give you an error try com.syntellia.fleksy.keyboard/.Fleksy)
Done.
If i help you press thanks
fer2503 said:
hi guys, i try to install some querty keyboard like fleksy on android wear with adb comands.
after many attemps i found the way.
You should be having android platflorm Tools to use ADB.
1. Enable Android Debugging in your android wear (tap many times on build version)
2. Connect your android wear watch.
3. connect your smartwatch to phone via bluetooth
4.write: adb devices
5. see if your device is listed (if you see "unhautorized" see your smartphone to allow the permission)
6.Install App to your watch using this Command: adb install yourApkName.apk
7.Type: adb shell ime enable com.syntellia.fleksy.kb/.Fleksy (if this give you an error try com.syntellia.fleksy.keyboard/.Fleksy)
8.Type: adb shell ime set com.syntellia.fleksy.kb/.Fleksy (if this give you an error try com.syntellia.fleksy.keyboard/.Fleksy)
Done.
If i help you press thanks
Click to expand...
Click to collapse
I think its great idea, but whenever i try enabling it i get error. I tried changing lines a little bit in sooo many ways but never got "Succes". Most often i got id:null ;/
Lasiu said:
I think its great idea, but whenever i try enabling it i get error. I tried changing lines a little bit in sooo many ways but never got "Succes". Most often i got id:null ;/
Click to expand...
Click to collapse
ok no problem. the problem is that the file package (com.example....) depends on your apk file. So you can do this:
-download this application for windows: apk tool for wear from xda
-connect to your phone
-find in the list the name of your fleksy package (com.syntellia....)
-write it in the adb command. (example: adb shell ime enable "yourpackage"/.Fleksy )
fer2503 said:
ok no problem. the problem is that the file package (com.example....) depends on your apk file. So you can do this:
-download this application for windows: apk tool for wear from xda
-connect to your phone
-find in the list the name of your fleksy package (com.syntellia....)
-write it in the adb command. (example: adb shell ime enable "yourpackage"/.Fleksy )
Click to expand...
Click to collapse
My package's name was same as yours (i checked it ) Any other recommendations? Or do you mean, that i should try enabling keyboard through this tool? Though i didnt see this option when i downloaded it week ago or something
Lasiu said:
My package's name was same as yours (i checked it ) Any other recommendations? Or do you mean, that i should try enabling keyboard through this tool? Though i didnt see this option when i downloaded it week ago or something
Click to expand...
Click to collapse
The tool is only to see the exatly package name. Czn you make a screenshot of your adb command with error and the package name showed in apk tool?
fer2503 said:
The tool is only to see the exatly package name. Czn you make a screenshot of your adb command with error and the package name showed in apk tool?
Click to expand...
Click to collapse
See My apk name is: com.syntellia.fleksy.kb.apk Any ideas? ;/
Lasiu said:
See My apk name is: com.syntellia.fleksy.kb.apk Any ideas? ;/
Click to expand...
Click to collapse
The package name, not the apk name. Post the screenshot of the apktool package list.
fer2503 said:
The package name, not the apk name. Post the screenshot of the apktool package list.
Click to expand...
Click to collapse
Is that what you mean?
Lasiu said:
Is that what you mean?
Click to expand...
Click to collapse
I think that the problem is the /.Fleksy...maybe you can try /.Fleksy.kb or /.Fleksykb
fer2503 said:
I think that the problem is the /.Fleksy...maybe you can try /.Fleksy.kb or /.Fleksykb
Click to expand...
Click to collapse
No luck Maybe something like FleksyKeyboardService? Other keyboards have that in their line, though i tried it and it didnt work. I will try again. Any more ideas?
fer2503 said:
I think that the problem is the /.Fleksy...maybe you can try /.Fleksy.kb or /.Fleksykb
Click to expand...
Click to collapse
Yep it doesnt work. Btw can you post photos of your Smartwatch with this keyboard?
Lasiu said:
Yep it doesnt work. Btw can you post photos of your Smartwatch with this keyboard?
Click to expand...
Click to collapse
+1 I would like to see as well
Lasiu said:
Yep it doesnt work. Btw can you post photos of your Smartwatch with this keyboard?
Click to expand...
Click to collapse
Yes i can make a photo and post it to you. It is too small but it works
yyeah a picture would be cool

LG G8X Thinq(Sprint) adb shell

So i got the new G8X and have been trying desperatey to just access the system files to remove some bloatware.
Problem is it only gives me access from \User\0 and on. I tried to delete them through adb on windows but everytime i try and run adb shell the phone automatically disconnects.
I know i have all the updated drivers cause it recognizes the phone through windows and adb when i type adb devices
but as soon as i execute adb shell it disconnects. Does anyone have a solution for this?
Any sort of feedback would be greatly appreciated. i Have a 30 day return policy in effect if i cant gain access to any of that i plan on returning the phone.
Thanks for reading
Edit: Im dumb switching ports and usb cable resolved issue.
If anyone hears anything about root access please advise. Thanks all
I have had my phone on ADB and sending and reading data from it two nights in a row, I have not seen this problem at all. I can run adb shell no problem. Sorry! I know it's a stupid suggestion, but can you try a different USB cable/port on your PC?
SirataXero said:
I have had my phone on ADB and sending and reading data from it two nights in a row, I have not seen this problem at all. I can run adb shell no problem. Sorry! I know it's a stupid suggestion, but can you try a different USB cable/port on your PC?
Click to expand...
Click to collapse
Its not dumb, i appreciate the input i hve not tried a diff port or cable. I'm going to do that right now.
What provider are you using?
abraham3991 said:
Its not dumb, i appreciate the input i hve not tried a diff port or cable. I'm going to do that right now.
What provider are you using?
Click to expand...
Click to collapse
The problem might be that if you run from power shell command, first type cmd and press enter.
abraham3991 said:
Its not dumb, i appreciate the input i hve not tried a diff port or cable. I'm going to do that right now.
What provider are you using?
Click to expand...
Click to collapse
I bought unlocked but i'm using it with T-Mobile and its getting WiFi calling and HD Voice and everything. Works really well and am getting good service/signal with it on T-Mobile.
Yeah, as suggested, I also used it in CMD and not in powershell…
SirataXero said:
I bought unlocked but i'm using it with T-Mobile and its getting WiFi calling and HD Voice and everything. Works really well and am getting good service/signal with it on T-Mobile.
Yeah, as suggested, I also used it in CMD and not in powershell…
Click to expand...
Click to collapse
As simple as your suggestion was it lets me command it through cmd now., switching the cable worked.
Still through the phone itself i cant access system directories. and its not like i cant change things it just flat out wont let me view them at all.
The end goal is to get root/custom recoveries so i can install magisk and xposed, if you hear anything let me know.And thanks again!
abraham3991 said:
As simple as your suggestion was it lets me command it through cmd now., switching the cable worked.
Still through the phone itself i cant access system directories. and its not like i cant change things it just flat out wont let me view them at all.
The end goal is to get root/custom recoveries so i can install magisk and xposed, if you hear anything let me know.And thanks again!
Click to expand...
Click to collapse
No problem! Glad that worked.
I can view system directories, and I read them as well. However, I definitely can't change anything and don't have write access either.
Will be open to suggestions/attempts in the future!
SirataXero said:
No problem! Glad that worked.
I can view system directories, and I read them as well. However, I definitely can't change anything and don't have write access either.
Will be open to suggestions/attempts in the future!
Click to expand...
Click to collapse
Sorry or the constant questions I downloaded a file explorer and im able to see more than before but i still have some files telling me i lack access.
What file explorer are you using?
abraham3991 said:
Sorry or the constant questions I downloaded a file explorer and im able to see more than before but i still have some files telling me i lack access.
What file explorer are you using?
Click to expand...
Click to collapse
I use Solid Explorer. So, some of the files you can physically see in the explorer, but if you try to open it, the text is garbled. It was only after I started doing adb pull that I could actually see/read the files themselves.

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