Comments (11)
very cool - thanks. I'll give it a shot
from microg-unofficial-installer.
the updated script works great! I ran it with lots of devices connected and no issues
I agree it's probably not possible to get the phone number for some of these devices although I am very curious to figure out why.
Here's a device that doesn't return a number:
BASIC INFO
Manufacturer: samsung
Model: SM-G991U1
Device: o1q
Android version: 14
Kernel version: 5.4.233-qgki-27920445-abG991U1UESAFXAB
Device path: 0-1.3.1.4
Serial number: RFCT7000XXX
Android ID: 73a18a000ff0f0ff
Display size: 1080x2400
Display density: 480
SLOT INFO
Slot count: 2
DEFAULT SLOT
IMEI: 352335000000000
IMEI SV: 38
ICCID (SIM serial number): 89012800000000000000
SLOT 1
Slot state: LOADED
IMEI: 352335000000000
Operator: AT&T
SLOT 2
Slot state: NOT_READY
IMEI: 355217000000000
ADVANCED INFO (root may be required)
EFS INFO (root may be required)
Here's another one which does:
BASIC INFO
Manufacturer: samsung
Model: SM-G991U1
Device: o1q
Android version: 14
Kernel version: 5.4.233-qgki-27920445-abG991U1UESAFXAB
Device path: 0-1.2.4.2
Serial number: RFCT7000XFX
Android ID: d2cfd700000000f0
Display size: 1080x2400
Display density: 480
SLOT INFO
Slot count: 2
DEFAULT SLOT
IMEI: 352335000000000
IMEI SV: 38
ICCID (SIM serial number): 89012800000000000000
Line number: 14173000000
SLOT 1
Slot state: LOADED
IMEI: 352335000000000
Operator: AT&T
SLOT 2
Slot state: NOT_READY
IMEI: 355217000000000
Line number: 14173000000
ADVANCED INFO (root may be required)
EFS INFO (root may be required)
from microg-unofficial-installer.
@jpage4500
Could you please post the result of every of these commands?
adb shell "service call iphonesubinfo 15 s16 'com.android.shell'"
adb shell "service call iphonesubinfo 16 i32 0 s16 'com.android.shell'"
adb shell "service call iphonesubinfo 16 i32 1 s16 'com.android.shell'"
adb shell "service call iphonesubinfo 16 i32 2 s16 'com.android.shell'"
from microg-unofficial-installer.
$ adb -s RFCT7103MGE shell "service call iphonesubinfo 15 s16 'com.android.shell'"
Result: Parcel( 00000000 00000000 00000000 '............')
$ adb -s RFCT7103MGE shell "service call iphonesubinfo 16 i32 0 s16 'com.android.shell'"
Result: Parcel( 00000000 ffffffff '........')
$ adb -s RFCT7103MGE shell "service call iphonesubinfo 16 i32 1 s16 'com.android.shell'"
Result: Parcel( 00000000 ffffffff '........')
$ adb -s RFCT7103MGE shell "service call iphonesubinfo 16 i32 2 s16 'com.android.shell'"
Result: Parcel( 00000000 00000000 00000000 '............')
from microg-unofficial-installer.
FWIW results from a different device (same hardware & carrier)
Result: Parcel(
0x00000000: 00000000 0000000b 00340031 00370031 '........1.X.1.7.'
0x00000010: 00300033 00360038 00380039 00000030 '3.0.8.X.X.X.X...')
Result: Parcel( 00000000 ffffffff '........')
Result: Parcel(
0x00000000: 00000000 0000000b 00340031 00370031 '........1.X.1.7.'
0x00000010: 00300033 00360038 00380039 00000030 '3.0.8.X.X.X.X...')
Result: Parcel( 00000000 ffffffff '........')
(I replaced some of the digits with X)
from microg-unofficial-installer.
I have added support for multiple slot in the script and done various improvements.
Could you please retry with version 2.0?
Please post the full output (with some parts covered) but enough to get the idea of what is working and what it isn't.
from microg-unofficial-installer.
Hi @ale5000-git -- thanks again for the changes! multiple device support works great! I did have to comment out the root/advanced checks as they caused the script to hang at one point as well as the wait_connection()
and start_adb_server()
methods. Not sure why but the devices aren't rooted anyway so I figured it wasn't necessary.
Here's the results from 2 devices - 1 that works and another that doesn't. The only differences I noticed between all of them is Kernel version
and Device path
. Other than that not much difference.
device 1:
BASIC INFO
Manufacturer: samsung
Model: SM-G991U1
Device: o1q
Android version: 14
Kernel version: 5.4.233-qgki-27920445-abG991U1UESAFXAB
Device path: 0-4
Serial number: RFCT7103MGE
�[0;33mWARNING: CPU serial number not found�[0m
Android ID: d14a411e4b4XXXXX
Physical size: 1080x2400
Physical density: 480
SLOT INFO
Slot count: 2
SLOT 1
Slot state: LOADED
IMEI: 3523352899XXXXX
Operator: AT&T
�[0;33mWARNING: Line number not found�[0m
SLOT 2
Slot state: NOT_READY
IMEI: 3552178299XXXXX
Operator:
�[0;33mWARNING: Line number not found�[0m
DEFAULT SLOT
IMEI: 3523352899XXXXX
IMEI SV: 38
ICCID: 890128043310464XXXXX
�[0;33mWARNING: Line number not found�[0m
device 2:
BASIC INFO
Manufacturer: samsung
Model: SM-G991U1
Device: o1q
Android version: 14
Kernel version: 5.4.233-qgki-27920445-abG991U1UESAFXAB
Device path: 0-1.2.3.1
Serial number: RFCT7103N6M
�[0;33mWARNING: CPU serial number not found�[0m
Android ID: da861077259XXXXX
Physical size: 1080x2400
Physical density: 480
SLOT INFO
Slot count: 2
SLOT 1
Slot state: LOADED
IMEI: 3523352899XXXXX
Operator: AT&T
�[0;33mWARNING: Line number not found�[0m
SLOT 2
Slot state: NOT_READY
IMEI: 3552178299XXXXX
Operator:
�[0;33mWARNING: Line number not found�[0m
DEFAULT SLOT
IMEI: 3523352899XXXXX
IMEI SV: 38
ICCID: 890128043310464XXXXX
Line number: 177545XXXXX
Let me know if you can think of anything else I can try
from microg-unofficial-installer.
@jpage4500
I see that it say Line number not found
on SLOT 1 even in the phone where it works so there must be an issue.
Although in most cases iphonesubinfo
follow the AOSP code there may be some OEMs that variate it.
The better thing to discover the problem is to see the output of all queries, with this code:
for i in $(seq 22); do
echo "${i:?}:"
adb shell "service call iphonesubinfo ${i:?} s16 'com.android.shell'"
done
Could you please send the result of that?
If you don't want to post it here publically, you can send me a private message here: https://xdaforums.com/m/ale5000.5627087/
from microg-unofficial-installer.
@ale5000-git - I just sent a PM with details; thanks again!
from microg-unofficial-installer.
@jpage4500
Hi,
the phone commands appear to be the same as AOSP but the line number is not returned anywhere.
I have found this: https://stackoverflow.com/questions/52041818/get-phone-number-from-sim-card-with-telephonymanager
which says: getLine1Number(); returns whatever is stored on the SIM card's MSISDN, which isn't filled by some operators
.
So I don't think there is any reliable way to get it.
- Could you please try the version 2.7 to see if it still hangs?
- What is the problem with
start_adb_server()
? This is very important otherwise the messages of the starting adb will become part ofadb devices
and it may break the parsing. - I would also like to know if now (in the phone where it worked) the line number appears correctly on both DEFAULT SLOT and SLOT 1.
I made these changes to the script:
- The code now, if it sees an offline device, waits a maximum of 5 seconds to see if it comes back online otherwise it will skip it;
- I rewrote the root and wait code so now it should NO longer hang;
- Added privacy mode with
-p
parameter to anonymize sensitive data; - Added
DEBUG=1
env to include a copy of errors and warning (without color codes) inside STDOUT when redirected to a file.
So now you could get perfect debug output with:
DEBUG=1 device-info.sh -p > output.txt
from microg-unofficial-installer.
From what I have read they say that it is the operator who can choose whether or not to write the number on the SIM.
If you want to be sure you can swap the SIM from the device where it doesn't work to the device where does it work to see if the problem follow the SIM.
I also read that on some older Android phones you can manually write the number where it says "Your number" and it will be written on the sim (but I can't confirm this).
Current problems:
-
I don't see any warning, did you include DEBUG=1 in the command?
If you included it, this may be another compatibility issue to check for. -
I also see that on the phone where it gets the phone number, he puts it in the wrong slot.
This is an annoying problem, I will try to do some tests in the emulator to try if I can reproduce the problem.
from microg-unofficial-installer.
Related Issues (20)
- Set the same file modification time under all OSes
- Magisk Rooted Android 12 Stock - Can't install by manual script or flash zip from recovery HOT 2
- Add live setup to ARM devices
- Add live setup to x86 devices HOT 1
- Ensure that the addon.d backup/restore script is compatible with A/B devices
- [REGRESSION] zip-install.sh fails (version v1.2.0-beta) HOT 5
- Google Play Store keeps trying to update GmsCore in the background HOT 1
- TWRP installation failure: error 97 HOT 7
- Sideloading results in indefititely long fallback "waiting input" HOT 20
- Failed to copy custom-setup-a5k on latest crdroid HOT 9
- Volume keys are not being identified HOT 24
- Google messages app stuck in the login window and doesn't open , says " cannot login " HOT 1
- Failed to copy custom-setup-a5k on latest Lineage 20 HOT 3
- Imei number HOT 2
- Using Fdroid apk builds so that they can be updated through any fdroid client HOT 5
- device-info.sh results in error "-bash: @: unbound variable" HOT 5
- installation options aren't accepted from the command-line HOT 3
- Can't install on 4.4.4 tablet due to missing $RANDOM generation method. HOT 17
- Play Store won't install on a device without 32bit support HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microg-unofficial-installer.