Question S22+ IMEI via ADB not working - Samsung Galaxy S22 Plus

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.

Related

[Q] Bricked with adb access, no root

So I bricked my Kinde Fire HDX by changing the build.prop and not fixing permissions. I have adb access but no root (I don't know why :S). Would a factory reset work? If not, how can I get to fix the build.prop or replace it with the old one? thank very much, I've been a couple hours looking for solution but I couldn't find any.
No, a factory reset would only break it further. It would remove your adb access and not fix anything. What makes you think you lost root? Have you tried "adb shell" then "su"?
Sent from my Amazon Tate using Tapatalk
r3pwn said:
No, a factory reset would only break it further. It would remove your adb access and not fix anything. What makes you think you lost root? Have you tried "adb shell" then "su"?
Sent from my Amazon Tate using Tapatalk
Click to expand...
Click to collapse
I used the HDX ToolKit v0.92 to check the root access, and it said "Please grant root on your device"
I've also tried "adb shell", and then "su", but it just returns "su" again. I am new with adb commands so I don't really know what it should show.
Thank you very much for your help
May I ask what version you were on before you bricked?
Sent from my Amazon Tate using Tapatalk
14.3.2.3.2, last update I think.
?
peter_b93 said:
14.3.2.3.2, last update I think.
Click to expand...
Click to collapse
Fixed?
jimyv said:
Fixed?
Click to expand...
Click to collapse
Nope, I couldn't find any way to get root acces again. But nevermind, my new kindle fire will be here in two days. I am surprised how well amazon costumer service works. Even though I bought my kindle in the US and now I am in Spain (not going back), they called me from the US for free, and they are paying all the shipping costs and sending it by priority shipping.
I am still interested if anyone knows how to fix it, just for fun
well
peter_b93 said:
Nope, I couldn't find any way to get root acces again. But nevermind, my new kindle fire will be here in two days. I am surprised how well amazon costumer service works. Even though I bought my kindle in the US and now I am in Spain (not going back), they called me from the US for free, and they are paying all the shipping costs and sending it by priority shipping.
I am still interested if anyone knows how to fix it, just for fun
Click to expand...
Click to collapse
It sounds like to me that you still root access you just were not mounted RW in other words it would not boot up completely so you could hit allow to the adb Shell. So you will have to mount system rw manually Try last 3 pages of this thread http://forum.xda-developers.com/showthread.php?t=2588608. He can fix you most likely if you can comprehend and follow directions.. or if ur understanding adb is fair you'll be able to probably extract your repair from the thread as is.
jimyv said:
It sounds like to me that you still root access you just were not mounted RW in other words it would not boot up completely so you could hit allow to the adb Shell. So you will have to mount system rw manually Try last 3 pages of this thread http://forum.xda-developers.com/showthread.php?t=2588608. He can fix you most likely if you can comprehend and follow directions.. or if ur understanding adb is fair you'll be able to probably extract your repair from the thread as is.
Click to expand...
Click to collapse
I've tried what it is said in the other thread. However, the problem there is that the guy cannot get his device to be recognized.
I've tried this:
adb root
adb shell
su
mount -o rw,remount /system *****- if this fails, try: mount -o remount /system
chmod 644 /system/build.prop
chown root.root /system/build.prop
reboot
But adb root gives me this error:
adbd cannot run as root in production builds
On the other hand if I skip the "adb root" step I cannot go further than "su" since I don't get the "[email protected]:/ #" line.
well
peter_b93 said:
I've tried what it is said in the other thread. However, the problem there is that the guy cannot get his device to be recognized.
I've tried this:
adb root
adb shell
su
mount -o rw,remount /system *****- if this fails, try: mount -o remount /system
chmod 644 /system/build.prop
chown root.root /system/build.prop
reboot
But adb root gives me this error:
adbd cannot run as root in production builds
On the other hand if I skip the "adb root" step I cannot go further than "su" since I don't get the "[email protected]:/ #" line.
Click to expand...
Click to collapse
Well since you do have ADB connectivity why can't you hook a bruting utility and push root ? Romaster_3.4.3.7593_Setup use as describe back in the roll back thread and the rooting thread 4 the new yes I kno wat is in chinese but this is the 1 that you must use sent you cannot install the apk install software plugin your tablet look at the upper right corner you will see an gear icon tap that then second row down second icon over "root"
jimyv said:
Well since you do have ADB connectivity why can't you hook a bruting utility and push root ? Romaster_3.4.3.7593_Setup use as describe back in the roll back thread and the rooting thread 4 the new yes I kno wat is in chinese but this is the 1 that you must use sent you cannot install the apk install software plugin your tablet look at the upper right corner you will see an gear icon tap that then second row down second icon over "root"
Click to expand...
Click to collapse
FIXED!!!!!
The chinese software worked! Thank you very much! As I first rooted with towelroot I wasn't aware that it was possible to root without booting into android! I think I won't edit the build.prop again lol.
peter_b93 said:
FIXED!!!!!
The chinese software worked! Thank you very much! As I first rooted with towelroot I wasn't aware that it was possible to root without booting into android! I think I won't edit the build.prop again lol.
Click to expand...
Click to collapse
Ok now use this http://forum.xda-developers.com/showthread.php?t=2532818 and uninstall romanager from pc...and reboot... And BTW modifying your build prop is alot easier useing build prop editing app. It takes care of permissions anyway as long as you entrys are correct..
jimyv said:
Ok now use this http://forum.xda-developers.com/showthread.php?t=2532818 and uninstall romanager from pc...and reboot... And BTW modifying your build prop is alot easier useing build prop editing app. It takes care of permissions anyway as long as you entrys are correct..
Click to expand...
Click to collapse
Good call on RomMaster. I have no idea what it is doing since I haven't had any time to look at it, but I'd figured it was an app like TR. At any rate, nicely done. :good:
sweet
GSLEON3 said:
Good call on RomMaster. I have no idea what it is doing since I haven't had any time to look at it, but I'd figured it was an app like TR. At any rate, nicely done. :good:
Click to expand...
Click to collapse
I'm not sure either that's why when I used it I was on a blacklisted unit and I kept the PC and the tablet and airplane mode at all times. Until I was certain I got all the files off of both before I let them go to Wi-Fi Chinese files that is.. But one thing I was very curious about is if you open that tool up the Chinese tool that is an you go to the same page you would hit the anchor to root to your device just below that it says fastboot I'm wondering if they have a fastboot working for also too bad nobody here know Chinese..

Need help spoofing MAC address on my Amazon Fire (Cyanogenmod 12.1)

I have an Amazon Kindle Fire 7 inch 5th generation tablet running the unofficial build of Cyanogenmod 12.1 for this device (main thread). I've got root, I'm running without GApps, and my setup is working great. The only thing I have yet to resolve is that I cannot spoof my MAC address. If I try to do so with something like:
Code:
su
busybox ifconfig wlan0 down
busybox ifconfig wlan0 hw ether 00:11:22:33:44:55
busybox ifconfig wlan0 up
it will fail on "busybox ifconfig wlan0 hw ether 00:11:22:33:44:55" with the message:
Code:
ifconfig: SIOCSIFHWADDR: Operation not supported on transport endpoint
I also tried two similar approaches:
Code:
su
busybox ifconfig wlan0 down && macchanger -r wlan0
fails with
Code:
[ERROR] Could not change MAC: interface up or insufficient permissions: Operation not supported on transport endpoint
while
Code:
su
ip link set wlan0 address 00:11:22:33:44:55
fails with:
Code:
RTNETLINK answers: Operation not supported on transport endpoint
From the googling I have done, it seems that this may be due to a limitation of the hardware, kernel or wifi drivers? Hopefully that doesn't mean there is nothing I can do and nothing more to try. Are there perhaps other methods that would bypass this problem?
For a bit of additional info, the application "Dalvik Explorer" shows under device details "Hardware: MT8127", which I hope is a useful piece of information to someone with more technical expertise than me. If it is a driver issue, are there perhaps newer drivers for that I could manually load somehow? If it is a kernel issue, is there anything I can do to modify the kernel (not something I have the slightest bit of experience with, but I'll be damned if I can't try). Any guidance or ideas would be extremely helpful.
Spoofing your MAC ID would require a kernel mod.
Our bootloader is locked so this is not achievable right now.
ggow said:
Spoofing your MAC ID would require a kernel mod.
Our bootloader is locked so this is not achievable right now.
Click to expand...
Click to collapse
Aw.
Well, thanks for letting me know. And thank you for bringing Cyanogenmod to this device, I have been enjoying it greatly!
ggow said:
Spoofing your MAC ID would require a kernel mod.
Our bootloader is locked so this is not achievable right now.
Click to expand...
Click to collapse
cyanogen_aw_yeah said:
Aw.
Well, thanks for letting me know. And thank you for bringing Cyanogenmod to this device, I have been enjoying it greatly!
Click to expand...
Click to collapse
Unless Amazon has deprecated this (e.g. with a kernel update?),
on my 2015 Fire + CM12.1 (per OP's link) I'm able to spoof my MAC address using the idme command.
Code:
su -c idme mac_addr 38aa3c123456
su -c idme print mac_addr # check to see that it set it
Then restart the device. After rebooting, go to CM Wi-Fi settings -> Advanced and see if it worked. It seems certain OUIs (first half) are rejected by the OS.
I found this while poking through the kernel code earlier this year. But per @ggow's comment, maybe they've nixed it since then.
Working On FireHD 10 2017
jrodat said:
Unless Amazon has deprecated this (e.g. with a kernel update?),
on my 2015 Fire + CM12.1 (per OP's link) I'm able to spoof my MAC address using the idme command.
Code:
su -c idme mac_addr 38aa3c123456
su -c idme print mac_addr # check to see that it set it
Then restart the device. After rebooting, go to CM Wi-Fi settings -> Advanced and see if it worked. It seems certain OUIs (first half) are rejected by the OS.
I found this while poking through the kernel code earlier this year. But per @ggow's comment, maybe they've nixed it since then.
Click to expand...
Click to collapse
I can confirm this is working on my fire hd 10 2017!!! You have made my day I wish you the best of luck in life!!!
AustinR66 said:
I can confirm this is working on my fire hd 10 2017!!! You have made my day I wish you the best of luck in life!!!
Click to expand...
Click to collapse
Hi can you tell me how to do this i want to do it on a fire 7 do i need root access? If so what do i need to install and where do i type these idme commands? Sorry bit of a noob to all this.
saupe2005 said:
Hi can you tell me how to do this i want to do it on a fire 7 do i need root access? If so what do i need to install and where do i type these idme commands? Sorry bit of a noob to all this.
Click to expand...
Click to collapse
Hey,
If you have Cyanogenmod, you should be able to do it without installing anything.
These directions are for my Fire 7 2015. Screenshots included at the bottom.
Go to your Settings app and click "About tablet"
Find the line that says "Build number" and tap repeatedly on it. Eventually it will say "Developer settings unlocked" (or something like that).
Now go back to the main Settings page and open "Developer options". On this page you must enable 2 things:
"Root access" - enable this for 'apps'
"Local terminal" - enable this too.
Then reboot the device.
(This is needed for enabling root access.)
The Terminal app may not show directly on your launcher, but you will see it if you list all your apps.
Open the Terminal app, and enter the following commands, on separate lines:
Code:
su
idme mac_addr 4c0b3a000002
idme print mac_addr
(The "su -c" version wasn't working for me with the built-in Terminal app, I had to enter "su" by itself)
- The first line ("su") may show a popup asking you to confirm Root access
- The second line should display to your screen "Writing idme data..."
- The third line prints the mac address to make sure you set it successfully.
After this, you must reboot your device, to activate the new MAC address.
Sometimes the kernel will ignore the new mac, if the first 6 chars (the oui) are unrecognized. The prefixes "4c0b3a" and "38aa3c" both work for me. Or you can use the 6 chars that are built-in for your device. (run the "idme print mac_addr" line to see what they are.)
A mac address is all Hex chars, so only 0-9 and A-F are valid characters.
Check your Wi-Fi settings -> Advanced to make double-sure that it worked.
Hope this helps
Here are the screenshots (Click to zoom)
jrodat said:
Hey,
If you have Cyanogenmod, you should be able to do it without installing anything.
Thanks for your reply.
I dont seem to have the same options as you i have a fire 7, 7th gen i have managed to enable developer options by tapping my serial number but dont see any options about root access any ideas?
Click to expand...
Click to collapse
saupe2005 said:
I dont seem to have the same options as you i have a fire 7, 7th gen i have managed to enable developer options by tapping my serial number but dont see any options about root access any ideas?
Click to expand...
Click to collapse
The instructions were for Cyanogenmod OS 12.1 (thread title), that could be why it looks different.
I should've paid attention when you said "7th gen", my bad. I didn't realize, there's no way to root the 7th gen yet (or install a custom ROM):
https://forum.xda-developers.com/am...th-gen-2017ask-question-t3636919#post73033591
If/when someone cracks it, basically what you would need is a Terminal app from the Play Store, and root. Then the rest of the steps should work.
sorry about that :/
jrodat said:
The instructions were for Cyanogenmod OS 12.1 (thread title), that could be why it looks different.
I should've paid attention when you said "7th gen", my bad. I didn't realize, there's no way to root the 7th gen yet (or install a custom ROM):
https://forum.xda-developers.com/am...th-gen-2017ask-question-t3636919#post73033591
If/when someone cracks it, basically what you would need is a Terminal app from the Play Store, and root. Then the rest of the steps should work.
sorry about that :/
Click to expand...
Click to collapse
You gotta root it but if there is no root available then your out of luck. Sorry mate.

Difficulty granting permission with adb / terminal

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

Is it possible to backup an app and its data without root?

I got a new phone and there is an app on my old phone that I've lost the login info to. I'd like to try backing up the app and it's data from the old phone and moving it to the new phone but at least in the app I was trying (Swift Backup) this feature requires root. Is there any way to accomplish this without root?
I'm on a Verizon Pixel 5 so I don't think it will be possible for me to root for quite some time.
skytbest said:
I got a new phone and there is an app on my old phone that I've lost the login info to. I'd like to try backing up the app and it's data from the old phone and moving it to the new phone but at least in the app I was trying (Swift Backup) this feature requires root. Is there any way to accomplish this without root?
I'm on a Verizon Pixel 5 so I don't think it will be possible for me to root for quite some time.
Click to expand...
Click to collapse
Have you tried this
https://play.google.com/store/apps/details?id=com.google.android.apps.pixelmigrate
Good idea, I skipped this step when initially setting up my phone because I wanted to start fresh. I only realized my problem with this one app a while later.
Looking at that Data Transfer Tool it appears there is no actual way to open the app after you've set up the phone. Do you know if there might be some way? It does appear that this might fix my issue, but I cannot open this app. I can't see it in my app drawer but when I search on my settings I can find the app info for it, however there is no option to open the app. Very frustrating.
YES.
You might use HELIUM app. It requires a desktop companian app got installed, too.
How-to:
Install Helium on Android
Install Helium on your PC
Windows Users must also install Android drivers and restart.
Open Helium Desktop on PC
Open Helium on Android (and follow any instructions there)
Helium should now be enabled!
If adb is enabled...
adb backup still works although it isn't mentioned in the adb's help anymore...
At least still in Q that is...
basically: adb backup -f package.name.ab package.name
or with more stuff included: adb backup -apk -obb -f cxz.johnnysquirrel.riddleofthebox.ab cxz.johnnysquirrel.riddleofthebox
list the packages: adb shell pm list packages
or: adb shell cmd package list packages
find particular package, add grep: adb shell "pm list packages | grep cxz"
output is like : package:cxz.johnnysquirrel.riddleofthebox
The package used as an example doesn't have any extra data to be saved really...
CXZa said:
adb backup still works although it isn't mentioned in the adb's help anymore...
At least still in Q that is...
basically: adb backup -f package.name.ab package.name
or with more stuff included: adb backup -apk -obb -f cxz.johnnysquirrel.riddleofthebox.ab cxz.johnnysquirrel.riddleofthebox
list the packages: adb shell pm list packages
or: adb shell cmd package list packages
find particular package, add grep: adb shell "pm list packages | grep cxz"
output is like : package:cxz.johnnysquirrel.riddleofthebox
The package used as an example doesn't have any extra data to be saved really...
Click to expand...
Click to collapse
Nice, I think I'll give this a try. Once I back it up where do those files go? How do I then restore it on my new device?
skytbest said:
Nice, I think I'll give this a try. Once I back it up where do those files go? How do I then restore it on my new device?
Click to expand...
Click to collapse
To the same folder from which you are running that adb. There is adb restore command too.
adb restore <file> - restore device contents from the <file> backup archive
It "should" work when you go upwards. Restoring to an older android version is less certain...
CXZa said:
To the same folder from which you are running that adb. There is adb restore command too.
adb restore <file> - restore device contents from the <file> backup archive
It "should" work when you go upwards. Restoring to an older android version is less certain...
Click to expand...
Click to collapse
Ok, I think I see. In your original response for the adb backup command you included two params cxz.johnnysquirrel.riddleofthebox.ab and cxz.johnnysquirrel.riddleofthebox. Is one of those the apk and the other the app data?
I see here there are two different restore command, one for the actual app "adb install application.apk" and one to restore the data "adb restore application.backup"
skytbest said:
Ok, I think I see. In your original response for the adb backup command you included two params cxz.johnnysquirrel.riddleofthebox.ab and cxz.johnnysquirrel.riddleofthebox. Is one of those the apk and the other the app data?
Click to expand...
Click to collapse
after -f is the file name where to backup. The last is the package name.
skytbest said:
I see here there are two different restore command, one for the actual app "adb install application.apk" and one to restore the data "adb restore application.backup"
Click to expand...
Click to collapse
First one installs the apk, next one restores... so you should do like:
adb restore cxz.johnnysquirrel.riddleofthebox.ab
No idea how it works like if you have that app as an newer system app in that new phone....
These things can be tricky so other exceptions are also possible...
CXZa said:
adb backup still works although it isn't mentioned in the adb's help anymore...
At least still in Q that is...
basically: adb backup -f package.name.ab package.name
or with more stuff included: adb backup -apk -obb -f cxz.johnnysquirrel.riddleofthebox.ab cxz.johnnysquirrel.riddleofthebox
list the packages: adb shell pm list packages
or: adb shell cmd package list packages
find particular package, add grep: adb shell "pm list packages | grep cxz"
output is like : package:cxz.johnnysquirrel.riddleofthebox
The package used as an example doesn't have any extra data to be saved really...
Click to expand...
Click to collapse
ADB backup / restore doesn't allow you to backup things on the one phone and then restore them on the other phone.
jwoegerbauer said:
ADB backup / restore doesn't allow you to backup things on the one phone and then restore them on the other phone.
Click to expand...
Click to collapse
If you say so...
Switching phones like a pro: How our reviewers do it. (September 25, 2020)
https://www.androidauthority.com/how-to-switch-phones-901221/
skytbest said:
I got a new phone and there is an app on my old phone that I've lost the login info to.
Click to expand...
Click to collapse
The login info is lost to the phone or the app?
If to the phone then confirming the backup might be quite challenging...
CXZa said:
If you say so...
Switching phones like a pro: How our reviewers do it. (September 25, 2020)
Click to expand...
Click to collapse
The article linked to is absolutely useless.
OK, the backups created from ADB have no "checks" to see if the device you are restoring to is the same device.
But you'll run into big troubles if devices aren't of same version: by same version I mean the same actual Android version as well as the same manufacturer.
skytbest said:
I got a new phone and there is an app on my old phone that I've lost the login info to. I'd like to try backing up the app and it's data from the old phone and moving it to the new phone but at least in the app I was trying (Swift Backup) this feature requires root. Is there any way to accomplish this without root?
I'm on a Verizon Pixel 5 so I don't think it will be possible for me to root for quite some time.
Click to expand...
Click to collapse
While answering to another question I came to think that it might work to this situation too.
So, the adb works? No use to write anything more if it doesn't...
Also that app must be signed with testkeys or some other known keys...
CXZa said:
While answering to another question I came to think that it might work to this situation too.
So, the adb works? No use to write anything more if it doesn't...
Also that app must be signed with testkeys or some other known keys...
Click to expand...
Click to collapse
I tried the ADB backup and restore (without root) but it did not work. I was still prompted to log in on my new phone. Unfortunately it seems like I'll need to transfer the whole app's state from my old phone to new, which I'm not sure is possible.
skytbest said:
I tried the ADB backup and restore (without root) but it did not work. I was still prompted to log in on my new phone. Unfortunately it seems like I'll need to transfer the whole app's state from my old phone to new, which I'm not sure is possible.
Click to expand...
Click to collapse
Remember that you were told ADB Backup / Restore doesn't work as expected.
skytbest said:
I tried the ADB backup and restore (without root) but it did not work. I was still prompted to log in on my new phone. Unfortunately it seems like I'll need to transfer the whole app's state from my old phone to new, which I'm not sure is possible.
Click to expand...
Click to collapse
Okay, so adb works. It gives some possibilities...
So, you have a locked with what, pin or pattern. It's basically just like 10 000 of those that you have to test...
(Bad idea really , if the phone is the locked one...)
Better written apps allow for backup.
I put those files on my SD card as well as a complete copy of all loaded user apps and system apk updates. My SD card is my data drive as well. I can do a full reload from it alone.
Without a data drive life is a lot more painful...
CXZa said:
Okay, so adb works. It gives some possibilities...
So, you have a locked with what, pin or pattern. It's basically just like 10 000 of those that you have to test...
Click to expand...
Click to collapse
Not really sure what you're getting at here. It's locked because I no longer have access to the phone number I signed up for the app with. So when I install the app on my new phone it sends a verification pin to a number that I do not have, and I am not able to change the number associated with the account.
That's why I 'd need to transfer the whole app state over so I can open the app on my new phone and be exactly where I was on my old phone, with no need to log in.
skytbest said:
Not really sure what you're getting at here. It's locked because I no longer have access to the phone number I signed up for the app with. So when I install the app on my new phone it sends a verification pin to a number that I do not have, and I am not able to change the number associated with the account.
That's why I 'd need to transfer the whole app state over so I can open the app on my new phone and be exactly where I was on my old phone, with no need to log in.
Click to expand...
Click to collapse
You still have the same email address? Just reset the password.
Or are things a bit more complicated?
What app are you referring too?
skytbest said:
Not really sure what you're getting at here. It's locked because I no longer have access to the phone number I signed up for the app with. So when I install the app on my new phone it sends a verification pin to a number that I do not have, and I am not able to change the number associated with the account.
That's why I 'd need to transfer the whole app state over so I can open the app on my new phone and be exactly where I was on my old phone, with no need to log in.
Click to expand...
Click to collapse
So the old phone isn't locked, but the app is...
CXZa said:
So the old phone isn't locked, but the app is...
Click to expand...
Click to collapse
All my registered apps are by email.

Question Unable to set device owner [SOLVED]

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.

Categories

Resources