I'm trying to set IceBox as device owner so I can free/unfreeze apps without root. This has worked on some other normal android phones for me in the past, but on the n20 5G i get
Code:
java.lang.IllegalStateException: Unexpected @ProvisioningPreCondition 99
at android.os.Parcel.createExceptionOrNull(Parcel.java:2397)
at android.os.Parcel.createException(Parcel.java:2373)
at android.os.Parcel.readException(Parcel.java:2356)
at android.os.Parcel.readException(Parcel.java:2298)
at android.app.admin.IDevicePolicyManager$Stub$Proxy.setDeviceOwner(IDevicePolicyManager.java:8665)
at com.android.commands.dpm.Dpm.runSetDeviceOwner(Dpm.java:203)
at com.android.commands.dpm.Dpm.onRun(Dpm.java:115)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:60)
at com.android.commands.dpm.Dpm.main(Dpm.java:41)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:419)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.devicepolicy.DevicePolicyManagerService.enforceCanSetDeviceOwnerLocked(DevicePolicyManagerService.java:9682)
at com.android.server.devicepolicy.DevicePolicyManagerService.setDeviceOwner(DevicePolicyManagerService.java:8700)
at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:3582)
at android.os.Binder.execTransactInternal(Binder.java:1196)
at android.os.Binder.execTransact(Binder.java:1143)
There are no accounts or users on the device.
I've managed to solve this on my own. For the Nord 20 5G, you need to use
Code:
adb shell dpm set-profile-owner
instead of
Code:
adb shell set-device-owner
like on other android devices and like how it is written in their installation docs.
So the command I used was
Code:
adb shell dpm set-profile-owner --user current --name IceBox com.catchingnow.icebox/.receiver.DPMReceiver
I hope this will help others
awesome, i was actually wondering this myself as i had difficulties doing the exact same a few months ago, not sure if it was icebox or not as i cant remember now but didnt end up using it anyways and didnt have the time to really research this. thanks for the tip @Crystawth
PsYk0n4uT said:
awesome, i was actually wondering this myself as i had difficulties doing the exact same a few months ago, not sure if it was icebox or not as i cant remember now but didnt end up using it anyways and didnt have the time to really research this. thanks for the tip @Crystawth
Click to expand...
Click to collapse
Yea I really didn't want to go through the trouble of rooting it since the only functionality I really wanted on it was to freeze apps.
It's a new phone for my wife, and she just doesn't need root. She's an App-oholic though, so freezing is kind of important! She also wants to use Google pay, and I didn't want to have to get it working with root.
I discovered how to get it working by reading through the ADB docs and through the Island install docs and gave it a try throwing together the command, and it worked.
I just hope my adventure can help others who want to do this, but don't need/want root.
Crystawth said:
I've managed to solve this on my own. For the Nord 20 5G, you need to use
Code:
adb shell dpm set-profile-owner
instead of
Code:
adb shell set-device-owner
like on other android devices and like how it is written in their installation docs.
So the command I used was
Code:
adb shell dpm set-profile-owner --user current --name IceBox com.catchingnow.icebox/.receiver.DPMReceiver
I hope this will help others
Click to expand...
Click to collapse
it work, thank you
I got this error
"calling identity is not authorized"
while tring this command
[ adb shell dpm set-device-owner com.catchingnow.icebox/.receiver.DPMReceiver]
Ù’
Andro nagy8654 said:
I got this error
"calling identity is not authorized"
while tring this command
[ adb shell dpm set-device-owner com.catchingnow.icebox/.receiver.DPMReceiver]
Click to expand...
Click to collapse
As i stated in my post above. you must use set-profile-owner NOT set-device-owner. You must also do this with no accounts on the device.
Related
Hey guys,
I currently have LeoMar Revolution ROM installed, so phone is rooted, Superuser works fine etc.
Want to start playing around with adb (am new to this) and have the device showing up when running 'adb devices' but i cannot get adb root? Although the device is rooted ok?
So question is (yes i searched but cant find the answer) are phone root and adb root different things?
If so how do i go about getting adb root so i can push apps etc from cmd line?
Thanks in advance
kangfu84 said:
Hey guys,
I currently have LeoMar Revolution ROM installed, so phone is rooted, Superuser works fine etc.
Want to start playing around with adb (am new to this) and have the device showing up when running 'adb devices' but i cannot get adb root? Although the device is rooted ok?
So question is (yes i searched but cant find the answer) are phone root and adb root different things?
If so how do i go about getting adb root so i can push apps etc from cmd line?
Thanks in advance
Click to expand...
Click to collapse
When through cmd, you write su and press enter
If you get a $ sign, then you aren't adb rooted!
If you get a # sign, then you are adb rooted!
Umm, for adb root, I guess use superoneclick root and click shell root, you will get the # sign then!
Thanks for quick reply
I run abd shell and then su and i do get the #.
id=0 so i have root in an 'abd shell' but i cant get root when i just put 'adb root'
Tried to adb push the apks manually in adb shell but adb push doesnt exist in shell?
But i am trying to run a batch file that pushes some hidden apks and i get the error "cannot run as root in production builds" when i run the batch file?
Edit: I may have had a secure kernel installed, will try another kernel and re-try. Is it possible to have su rights when booted up with a secure kernel? That would explain things ..
kangfu84 said:
Thanks for quick reply
I run abd shell and then su and i do get the #.
id=0 so i have root in an 'abd shell' but i cant get root when i just put 'adb root'
But i am trying to run a batch file that pushes some hidden apks and i get the error "cannot run as root in production builds" when i run the batch file?
Edit: I may have had a secure kernel installed, will try another kernel and re-try. Is it possible to have su rights when booted up with a secure kernel? That would explain things ..
Click to expand...
Click to collapse
I have never tried doing pushing/pulling on stock/secure kernels ... so I can't tell you what's going wrong!
Will have a play with flashing other kernels and try again.
I have the yellow triangle show up on boot so i thought i had an insecure kernel. But maybe it is just there from when i installed a previous ROM/insecure kernel?
kangfu84 said:
Will have a play with flashing other kernels and try again.
I have the yellow triangle show up on boot so i thought i had an insecure kernel. But maybe it is just there from when i installed a previous ROM/insecure kernel?
Click to expand...
Click to collapse
Yellow triangle means you have a insecure kernel, maybe, Cf-root
"adb root" was only available on the original "Google dev phones" and requires special code somewhere on the phone (in the kernal?) to support it. When you root the phone it does not include the special code for "adb root" to work. I don't know what you need to do to get it working, but most people don't bother because there are other ways to do the same thing.
{Build:KI4, Version:1.3.4 (stock, rooted)}
LouisJB said:
"adb root" was only available on the original "Google dev phones" and requires special code somewhere on the phone (in the kernal?) to support it. When you root the phone it does not include the special code for "adb root" to work. I don't know what you need to do to get it working, but most people don't bother because there are other ways to do the same thing.
{Build:KI4, Version:1.3.4 (stock, rooted)}
Click to expand...
Click to collapse
Can i adb push apk's as su in an adb shell?
If so i guess i can push the apks i want to manually instead of using the batch file which is trying to get adb root.
kangfu84 said:
Can i adb push apk's as su in an adb shell?
Click to expand...
Click to collapse
1. If you use one of my insecure kernels, adb will be running as root, issue "adb root" and it will reply "adb is already running as root"
2. Yes you can adb push when using su root.
3. Why do you want to push APKs? If its to install them, then just use adb install <FILE NAME>
adb root can be used when ro.debuggable is set to 1 in /default.prop
and on every reboot ro.debuggable is replaced by the one in kernel you are using
Why did you bump a thread from November 2011 to post this gem? Is that what "Recognized Contributors" do? I did wonder.
Geez Oinky. I could really take that comment of yours (which is true on so many levels) & run with it ;-) But I can't be arsed these days (like more than a few people on here).
Probably one of the criteria for getting RC status; how many 8 mth old threads you bump over X period of time
oinkylicious said:
Why did you bump a thread from November 2011 to post this gem? Is that what "Recognized Contributors" do? I did wonder.
Click to expand...
Click to collapse
i was googling something related to this but not this and found this thread, readed it all and found that no one had answered this
then i thought many others can also look for this and i thought of answering for others who are googling for it not for the op, because i know op had got the answer many moths ago
and real xda member never offense but help others
I'm freshly unlocked and perm rooted; I've already used Titanium Backup, Root Explorer, etc.... my Su is working.
I looked at the CleanTool thread in the Dev forum to see how to remove bloat, and executed the same commands from adb shell .... here's a small pasted section :
$ pm disable com.gameloft.android.Verizon.GloftLGolf2.lgolf2
pm disable com.gameloft.android.Verizon.GloftLGolf2.lgolf2
[1] Killed pm disable com.gameloft.android.Verizon.Glof
2.lgolf2
$ pm disable com.blockbuster.app.htc
pm disable com.blockbuster.app.htc
[1] Killed pm disable com.blockbuster.app.htc
Following a reboot, these bloat apps are still here and functioning. Anyone know what I'm doing wrong, or a more effective way to selectively remove what I consider bloat?
$ means you are not in SU
you need to type SU in ADB
The $ will change to #
Then try again (making sure if your phone asks you to allow ADB SU privs, you check allow; if that happens)
jdmba said:
$ means you are not in SU
you need to type SU in ADB
The $ will change to #
Then try again (making sure if your phone asks you to allow ADB SU privs, you check allow; if that happens)
Click to expand...
Click to collapse
This works, of course. This seems like such a duhhhhhh question, now that I know the answer.
Thanks so much
DIncLover said:
This works, of course. This seems like such a duhhhhhh question, now that I know the answer.
Thanks so much
Click to expand...
Click to collapse
Glad you were able to be helped.
Sorry for resurrecting this thread, but I was really surprised why "pm disable-user" does not work as user but also seems to require root-permissions? Makes no sense to me...
Per this issue, and specifically this comment, I'm trying to grant the BATTERY_STATS permission to GSam Battery Monitor. I've tried the adb command "pm grant com.gsamlabs.bbm android.permission.BATTERY_STATS" but can't get it to work. I've also tried "pm grant com.gsamlabs.bbm android.Manifest.permission.BATTERY_STATS" but the results are the same. Doing it through ConnectBot gives me the following error:
Operation not allowed: java.lang.SecurityException: grantRuntimePermission: Neither user 10338 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.
Doing it through adb gives me this:
Bad argument: java.lang.IllegalArgumentException: Unknown package: com.gsamlabs.bbm
This is on a stock Moto Z Play, 7.1.1
kernel:
3.18.31-perf-g757c8d9
[email protected] #1
Build number NPN26.118-22
Are you running the pro version? Then it needs to be com.gsamlabs.bbm.pro
The error is because it can't find a package named com.gsamlabs.bbm, so I would investigate why that's occurring. Either there's a typo (I don't see one) or that's not the correct package name.
ConnectBot won't work because ConnectBot doesn't have superuser permissions. Unless your device is rooted it'll have to be done through adb or using a PC-side program which effectively does the same thing.
Thanks! I think that was it, as adding .pro to the end didn't give an error. But it didn't actually say it was successful, either. It just spit out all the adb usage info like if you just type "adb" with no parameters. Any idea how I know if it worked?
vertigo_2_20 said:
Thanks! I think that was it, as adding .pro to the end didn't give an error. But it didn't actually say it was successful, either. It just spit out all the adb usage info like if you just type "adb" with no parameters. Any idea how I know if it worked?
Click to expand...
Click to collapse
Do the advanced stats in BBM work now? Also, are you on the paid version of BBM? That's the pro version, iirc.
You are typing "adb -d shell pm grant com.gsamlabs.bbm.pro android.permission.BATTERY_STATS", right?
Got busy with other stuff and just now got back to this, but I got it working. The reason I got the output I did before was because I was typing an invalid command, since pm grant isn't one of the commands of adb.exe. I had to type adb shell THEN type the command, and then it worked (and I just noticed you said that, I must have overlooked that when I looked at it before since I was busy). Also, for anyone that might come across this trying to do this, GSam didn't automatically recognize that this was done. I had to go through the steps of having it show me how to do it and at the end of that it worked. One final note, I had to update to the latest SDK for it to work, the version I was using was too old. Thanks again for the help apraetor!
Yea, I had a feeling after re-reading your original post that you were missing the "adb -d shell" portion, glad it's working.
vertigo_2_20 said:
Got busy with other stuff and just now got back to this, but I got it working. The reason I got the output I did before was because I was typing an invalid command, since pm grant isn't one of the commands of adb.exe. I had to type adb shell THEN type the command, and then it worked (and I just noticed you said that, I must have overlooked that when I looked at it before since I was busy). Also, for anyone that might come across this trying to do this, GSam didn't automatically recognize that this was done. I had to go through the steps of having it show me how to do it and at the end of that it worked. One final note, I had to update to the latest SDK for it to work, the version I was using was too old. Thanks again for the help apraetor!
Click to expand...
Click to collapse
PROBLEM SOLVED NO NEED TO REPLY
Hey, xda-developers!
Can you give me some advice? I debloated my LG v20 with adb using the following command: "pm uninstall -k --user 0 com.lge.cloudhub". It seems that I accidentally uninstalled a object that controls my phones second screen.
Can you please tell me how I can re-install said objects (without factory reset)? I'm pretty sure I know which objects I need to re-install, just don't know how to. I tried "adb shell cmd package install-existing com.lge.signboard" and got the error message "127|elsa:/ $ adb shell cmd package install-existing com.lge.signboard
/system/bin/sh: adb: not found"
So any ideas: commands, programs I can use, anything... I'm super grateful.
Thank you for reading my post!
Regards,
xdagirlrocker
xdagirlrocker said:
PROBLEM SOLVED NO NEED TO REPLY
Click to expand...
Click to collapse
If solved, why not say how - for others?
If rooted then this can be tried...
https://forum.xda-developers.com/t/...diatek-armv8-2020-08-24.3922213/post-84201415
CXZa said:
If solved, why not say how - for others?
If rooted then this can be tried...
https://forum.xda-developers.com/t/...diatek-armv8-2020-08-24.3922213/post-84201415
Click to expand...
Click to collapse
Good point! I will do so! Maybe it will help someone in future.
First I searched for possible objects that might be related to LG v20 second screen. Through the power of duckduckgo I found the following objects:
com.lge.signboard.initialguide
com.lge.provider.signboard
com.lge.signboard.setting
com.lge.quicktools
com.lge.coneshortcut
com.lge.conerecent
com.lge.signboard
In my case the (by mistake) removed object was com.lge.signboard.
From there on solved it using a software I found on xda forums. It's called ADB AppControl and it can be found on the following links. I also included the xda link. Since I couldn't find the proper command to restore the deleted item, I used this software to "un-delete" it. It was very easy.
https://appcontrol.neocities.org/index_en.html
https://forum.xda-developers.com/t/...app-manager-debloat-tool-for-android.4147837/
Cheers
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.