arshidkv12 / android-apktool

Automatically exported from code.google.com/p/android-apktool
0 stars 1 forks source link

HTC Sense 6 Apps with Android 5.0.1 #748

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Only decompiling and compiling back the apk (without any edits) makes the app 
FC 
happened so far on Telephony.apk and settings.apk 
using latest build from sources (last commit 30th december 2014)

decompiling log:

java -jar apktool.jar d -s -f Telephony.apk -o test
I: Using Apktool 2.0.0-20504d-SNAPSHOT on Telephony.apk
I: Loading resource table...
I: Decoding Shared Library (com.htc), pkgId: 2
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Adrian\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Loading resource table from file: C:\Users\Adrian\apktool\framework\2.apk
I: Decoding values */* XMLs...
Cleaning up unclosed ZipFile for archive C:\Users\Adrian\apktool\framework\2.apk

I: Copying raw classes.dex file...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...

compiling log:
java -jar apktool.jar b -f test
I: Using Apktool 2.0.0-20504d-SNAPSHOT on test
I: Copying test classes.dex file...
I: Building resources...
E/ResourceType( 1388): DynamicRefTable(0x02): No mapping for build-time package
ID 0x02.
E/ResourceType( 1388): e[0x01] -> 0x01
E/ResourceType( 1388): e[0x7f] -> 0x7f
E/ResourceType( 1388): Failed resolving ResTable_map name at 864 with ident 0x0
020042
E/ResourceType( 1388): DynamicRefTable(0x02): No mapping for build-time package
ID 0x02.
E/ResourceType( 1388): e[0x01] -> 0x01
E/ResourceType( 1388): e[0x7f] -> 0x7f
E/ResourceType( 1388): Failed resolving ResTable_map name at 2656 with ident 0x
2020032
W/ResourceType( 1388): Attempt to retrieve bag 0x02010004 which is invalid or i
 a cycle.
W/ResourceType( 1388): Attempt to retrieve bag 0x02010035 which is invalid or i
 a cycle.
W/ResourceType( 1388): Attempt to retrieve bag 0x02010035 which is invalid or i
 a cycle.
W/ResourceType( 1388): Attempt to retrieve bag 0x02010035 which is invalid or i
 a cycle.
W/ResourceType( 1388): Attempt to retrieve bag 0x02010035 which is invalid or i
 a cycle.
E/ResourceType( 1388): DynamicRefTable(0x02): No mapping for build-time package
ID 0x02.
E/ResourceType( 1388): e[0x01] -> 0x01
E/ResourceType( 1388): e[0x7f] -> 0x7f
E/ResourceType( 1388): Failed resolving ResTable_map name at 1128 with ident 0x
202002a
W/ResourceType( 1388): Attempt to retrieve bag 0x02010004 which is invalid or i
 a cycle.
W/ResourceType( 1388): Attempt to retrieve bag 0x02010004 which is invalid or i
 a cycle.
W/ResourceType( 1388): Attempt to retrieve bag 0x02010004 which is invalid or i
 a cycle.
W/ResourceType( 1388): Attempt to retrieve bag 0x02010004 which is invalid or i
 a cycle.
E/ResourceType( 1388): DynamicRefTable(0x02): No mapping for build-time package
ID 0x02.
E/ResourceType( 1388): e[0x01] -> 0x01
E/ResourceType( 1388): e[0x7f] -> 0x7f
E/ResourceType( 1388): Failed resolving ResTable_map name at 1856 with ident 0x
2020032
W/ResourceType( 1388): Attempt to retrieve bag 0x02010004 which is invalid or i
 a cycle.
E/ResourceType( 1388): DynamicRefTable(0x02): No mapping for build-time package
ID 0x02.
E/ResourceType( 1388): e[0x01] -> 0x01
E/ResourceType( 1388): e[0x7f] -> 0x7f
E/ResourceType( 1388): Failed resolving ResTable_map name at 1496 with ident 0x
2020034
W/ResourceType( 1388): Attempt to retrieve bag 0x0201001b which is invalid or i
 a cycle.
W/ResourceType( 1388): Attempt to retrieve bag 0x02010004 which is invalid or i
 a cycle.
E/ResourceType( 1388): DynamicRefTable(0x02): No mapping for build-time package
ID 0x02.
E/ResourceType( 1388): e[0x01] -> 0x01
E/ResourceType( 1388): e[0x7f] -> 0x7f
E/ResourceType( 1388): Failed resolving ResTable_map name at 776 with ident 0x0
020029
W/ResourceType( 1388): Attempt to retrieve bag 0x0201001b which is invalid or i
 a cycle.
W/ResourceType( 1388): Attempt to retrieve bag 0x02010004 which is invalid or i
 a cycle.
W/ResourceType( 1388): Attempt to retrieve bag 0x02010003 which is invalid or i
 a cycle.
W/ResourceType( 1388): Attempt to retrieve bag 0x02010004 which is invalid or i
 a cycle.
W/ResourceType( 1388): Attempt to retrieve bag 0x02010004 which is invalid or i
 a cycle.
warning: Package not found for resource #02010004
warning: Package not found for resource #02010035
warning: Package not found for resource #02010004
warning: Package not found for resource #02010035
warning: Package not found for resource #02010035
warning: Package not found for resource #02010035
warning: Package not found for resource #02010035
warning: Package not found for resource #0201000a
warning: Package not found for resource #02010004
warning: Package not found for resource #02010004
warning: Package not found for resource #02010004
warning: Package not found for resource #02010004
warning: Package not found for resource #0201001b
warning: Package not found for resource #02010004
warning: Package not found for resource #02010012
warning: Package not found for resource #0201001b
warning: Package not found for resource #02010004
warning: Package not found for resource #02010003
warning: Package not found for resource #0201001b
warning: Package not found for resource #02010004
warning: Package not found for resource #02010003
warning: Package not found for resource #02010004
warning: Package not found for resource #02010004
warning: string 'cpa_request_enable_mobile_data' has no default translation.
I: Building apk file...
I: Copying unknown files/dir...

Logcat for app FC
E/AndroidRuntime( 3157): java.lang.RuntimeException: Unable to start activity Co
mponentInfo{com.android.phone/com.android.phone.InCallScreen}: android.view.Infl
ateException: Binary XML file line #14: Error inflating class <unknown>
E/AndroidRuntime( 3157):        at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2411)
E/AndroidRuntime( 3157):        at android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2474)
E/AndroidRuntime( 3157):        at android.app.ActivityThread.access$800(Activit
yThread.java:144)
E/AndroidRuntime( 3157):        at android.app.ActivityThread$H.handleMessage(Ac
tivityThread.java:1359)
E/AndroidRuntime( 3157):        at android.os.Handler.dispatchMessage(Handler.ja
va)
E/AndroidRuntime( 3157):        at android.os.Looper.loop(Looper.java)
E/AndroidRuntime( 3157):        at android.app.ActivityThread.main(ActivityThrea
d.java:5696)
E/AndroidRuntime( 3157):        at java.lang.reflect.Method.invoke(Native Method
)
E/AndroidRuntime( 3157):        at java.lang.reflect.Method.invoke(Method.java)
E/AndroidRuntime( 3157):        at com.android.internal.os.ZygoteInit$MethodAndA
rgsCaller.run(ZygoteInit.java:1028)
E/AndroidRuntime( 3157):        at com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:823)
E/AndroidRuntime( 3157): Caused by: android.view.InflateException: Binary XML fi
le line #14: Error inflating class <unknown>
E/AndroidRuntime( 3157):        at android.view.LayoutInflater.createView(Layout
Inflater.java)
E/AndroidRuntime( 3157):        at android.view.LayoutInflater.createViewFromTag
(LayoutInflater.java)
E/AndroidRuntime( 3157):        at android.view.LayoutInflater.rInflate(LayoutIn
flater.java)
E/AndroidRuntime( 3157):        at android.view.LayoutInflater.rInflate(LayoutIn
flater.java)
E/AndroidRuntime( 3157):        at android.view.LayoutInflater.parseInclude(Layo
utInflater.java)
E/AndroidRuntime( 3157):        at android.view.LayoutInflater.rInflate(LayoutIn
flater.java)
E/AndroidRuntime( 3157):        at android.view.LayoutInflater.rInflate(LayoutIn
flater.java)
E/AndroidRuntime( 3157):        at android.view.LayoutInflater.inflate(LayoutInf
later.java)
E/AndroidRuntime( 3157):        at android.view.LayoutInflater.inflate(LayoutInf
later.java)
E/AndroidRuntime( 3157):        at android.view.LayoutInflater.inflate(LayoutInf
later.java)
E/AndroidRuntime( 3157):        at com.android.phone.InCallScreen.setContentView
Internal(InCallScreen.java)
E/AndroidRuntime( 3157):        at com.android.phone.InCallScreen.onCreate(InCal
lScreen.java)
E/AndroidRuntime( 3157):        at android.app.Activity.performCreate(Activity.j
ava:5958)
E/AndroidRuntime( 3157):        at android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1129)
E/AndroidRuntime( 3157):        at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2364)
E/AndroidRuntime( 3157):        ... 10 more
E/AndroidRuntime( 3157): Caused by: java.lang.reflect.InvocationTargetException
E/AndroidRuntime( 3157):        at java.lang.reflect.Constructor.newInstance(Nat
ive Method)
E/AndroidRuntime( 3157):        at java.lang.reflect.Constructor.newInstance(Con
structor.java)
E/AndroidRuntime( 3157):        ... 25 more
E/AndroidRuntime( 3157): Caused by: java.lang.NumberFormatException: Invalid int
: "dark"
E/AndroidRuntime( 3157):        at java.lang.Integer.invalidInt(Integer.java)
E/AndroidRuntime( 3157):        at java.lang.Integer.parse(Integer.java)
E/AndroidRuntime( 3157):        at java.lang.Integer.parseInt(Integer.java)
E/AndroidRuntime( 3157):        at com.android.internal.util.XmlUtils.convertVal
ueToInt(XmlUtils.java:128)
E/AndroidRuntime( 3157):        at android.content.res.TypedArray.getInt(TypedAr
ray.java)
E/AndroidRuntime( 3157):        at com.htc.widget.HtcImageButton.init(HtcImageBu
tton.java)
E/AndroidRuntime( 3157):        at com.htc.widget.HtcImageButton.<init>(HtcImage
Button.java)
E/AndroidRuntime( 3157):        at com.htc.widget.HtcImageButton.<init>(HtcImage
Button.java)
E/AndroidRuntime( 3157):        ... 27 more

Original issue reported on code.google.com by baad...@gmail.com on 18 Jan 2015 at 9:55

GoogleCodeExporter commented 9 years ago
if needed here is the apk and the framework files
https://www.dropbox.com/s/iqwje8wrmfbhysd/apks.zip?dl=0

Original comment by baad...@gmail.com on 18 Jan 2015 at 9:58

GoogleCodeExporter commented 9 years ago
Yeah, this is a mess.

The new aapt and this shared library support is on its first iteration. As you 
can see there it threw a lot of warnings.

On top of that, this APK utilizes private Android resources. 

Since this release of aapt has been buggy to no end and researching something 
like this will take me too long. I'm just going to put this on hold until a new 
Build Tools (aapt) version is released.

Links of interest
https://android-review.googlesource.com/113651
https://android-review.googlesource.com/113652
https://android-review.googlesource.com/113653

Original comment by connor.tumbleson on 19 Jan 2015 at 2:28

GoogleCodeExporter commented 9 years ago
Same with HTCSetupWizard. 
Are there any workarounds possible?

Original comment by JanTay.D...@googlemail.com on 21 Jan 2015 at 6:51