Comments (3)
There is not - I'm guessing before AOSP source was out - this was the interpretation of how it functions. I might go back and look at the Froyo release to confirm that, but otherwise I don't think there is any Apktool specific reason.
from apktool.
I dug a bit deeper. This table gives these examples:
mcc310
mcc310-mnc004
mcc208-mnc00
Regarding mcc field: IMSI MCC (Mobile Country Code), corresponding to mcc resource qualifier. 0 if undefined.
Regarding mnc field: IMSI MNC (Mobile Network Code), corresponding to mnc resource qualifier. 0 if undefined. Note that the actual MNC may be 0; in order to check for this use the MNC_ZERO symbol.
Which seems to imply that stored value of MNC_ZERO is -mnc0/-mnc00/-mnc000, while stored value of 0 means any/undefined mnc.
Wikipedia says that MCC is always 3-digit, while MNC can be 2-digit (European standard) or 3-digit (North American standard), and an example says "MNC of 001 is not the same as MNC of 01".
Which is odd, because the source code I linked you to doesn't make any kind of differentiation when constructing the qualifiers, and both 001 and 01 are stored as 1.
Here's a partial output of aapt2 dump resources framework-res.apk | grep mcc | sort
:
(mcc286-mnc2) true
(mcc286-mnc2) true
(mcc286-mnc3) false
(mcc286-mnc3) true
(mcc286-mnc3) true
(mcc295-mnc1) false
(mcc295-mnc1) true
(mcc295-mnc1) true
(mcc302-mnc220) 1410
(mcc302-mnc220) false
(mcc302-mnc220) true
(mcc302-mnc220) true
(mcc302-mnc221) false
...
(mcc520-mnc65535) true
(mcc520-mnc65535) true
(mcc520-mnc65535) true
(mcc525-mnc1) false
(mcc525-mnc1) true
(mcc525-mnc1) true
(mcc525-mnc17) 1380
(mcc525-mnc3) false
(mcc525-mnc3) false
(mcc525-mnc3) true
(mcc525-mnc5) false
(mcc525-mnc5) false
(mcc525-mnc5) true
(mcc530-mnc24) false
(mcc530-mnc24) false
(mcc530-mnc24) true
(mcc530-mnc5) false
(mcc602-mnc1) false
(mcc602-mnc1) true
(mcc602-mnc1) true
- We can see no leading zeros here at all.
- It's known that -mnc65535 is -mnc0 (vs. undefined), because 6553==MNC_ZERO, but it's really either -mnc00 or -mnc000 (no way to know, 00 is used in Europe while 000 by One network in Bermuda).
- For the rest, it's entirely unclear, e.g. does -mnc1 mean -mnc01 or -mnc001 when both are valid?
I'm very confused.
Eventually went with something that looks the best... (mnc doesn't appear without mcc before it, prints mnc as 2-digit or more)
if (mcc != 0) {
ret.append("-mcc").append(String.format("%03d", mcc));
if (mnc != 0) {
ret.append("-mnc");
if (mnc != MNC_ZERO) {
ret.append(String.format("%02d", mnc));
} else {
ret.append("00");
}
}
}
So looks like this
-mcc001-mnc00
-mcc001-mnc01
...
-mcc001-mnc09
-mcc001-mnc10
-mcc001-mnc11
...
-mcc001-mnc99
-mcc001-mnc100
-mcc001-mnc101
from apktool.
Did you stumble onto some issue that led you to this? I'm just weary of changing something I haven't touched in a decade.
from apktool.
Related Issues (20)
- ERROR HOT 1
- [BUG]安装不成功 HOT 1
- [BUG] Unable to recompile decompiled apk HOT 2
- [BUG] Building Discord 2.37 fails HOT 1
- [BUG] HOT 1
- [BUG] dex version changed after compilation. HOT 1
- [BUG] brut.androlib.AndrolibException: brut.common.BrutException HOT 2
- BrutException: could not exec (exit code = 2) HOT 1
- [BUG] ERROR: no input files when compiling framework-res.apk HOT 5
- [BUG] webp appears as png - this breaks building the apk HOT 5
- [BUG] After decompiling, the new instruction "invoke-polymorphic" appears, causing the packing to fail. HOT 1
- [BUG] HOT 8
- [BUG] Multiple times decompiling a particular apk, generates different output. HOT 3
- [BUG]中文字符 HOT 2
- [BUG] Windows - apktool build fails due to UTF8 filename HOT 2
- [BUG]brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1) HOT 2
- Android 15 Framework Support HOT 1
- [BUG] Attribute "android:" was already specified for element "manifest" HOT 4
- [BUG] HOT 2
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 apktool.