反编译APK,Catlog“ClassNotFound”错误

时间:2016-02-04 21:59:26

标签: android eclipse apk

您好我正在尝试为我的小米易相机改装应用程序,以便在相机电池电量不足时发出通知。该应用程序有一切都在那里做,只是没有我需要的功能。所以我用APKStudio反编译并导入到eclipse中,但是我收到了一堆ClassNotFound错误。

我认为这是因为lib实际上由.smali而不是.class组成。但我不是百分之百确定。

这是catlog:

02-04 13:16:47.426: I/art(2347): Not late-enabling -Xcheck:jni (already on)
02-04 13:16:47.435: W/System(2347): ClassLoader referenced unknown path: /data/app/com.xiaomi.xy.sportscamera-1/lib/x86
02-04 13:16:47.435: D/AndroidRuntime(2347): Shutting down VM
02-04 13:16:47.435: E/AndroidRuntime(2347): FATAL EXCEPTION: main
02-04 13:16:47.435: E/AndroidRuntime(2347): Process: com.xiaomi.xy.sportscamera, PID: 2347
02-04 13:16:47.435: E/AndroidRuntime(2347): java.lang.RuntimeException: Unable to instantiate application com.ants360.z13.activity.CameraApplication: java.lang.ClassNotFoundException: Didn't find class "com.ants360.z13.activity.CameraApplication" on path: DexPathList[[zip file "/data/app/com.xiaomi.xy.sportscamera-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xiaomi.xy.sportscamera-1/lib/x86, /vendor/lib, /system/lib]]
02-04 13:16:47.435: E/AndroidRuntime(2347):     at android.app.LoadedApk.makeApplication(LoadedApk.java:578)
02-04 13:16:47.435: E/AndroidRuntime(2347):     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4680)
02-04 13:16:47.435: E/AndroidRuntime(2347):     at android.app.ActivityThread.-wrap1(ActivityThread.java)
02-04 13:16:47.435: E/AndroidRuntime(2347):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
02-04 13:16:47.435: E/AndroidRuntime(2347):     at android.os.Handler.dispatchMessage(Handler.java:102)
02-04 13:16:47.435: E/AndroidRuntime(2347):     at android.os.Looper.loop(Looper.java:148)
02-04 13:16:47.435: E/AndroidRuntime(2347):     at android.app.ActivityThread.main(ActivityThread.java:5417)
02-04 13:16:47.435: E/AndroidRuntime(2347):     at java.lang.reflect.Method.invoke(Native Method)
02-04 13:16:47.435: E/AndroidRuntime(2347):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
02-04 13:16:47.435: E/AndroidRuntime(2347):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
02-04 13:16:47.435: E/AndroidRuntime(2347): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.ants360.z13.activity.CameraApplication" on path: DexPathList[[zip file "/data/app/com.xiaomi.xy.sportscamera-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xiaomi.xy.sportscamera-1/lib/x86, /vendor/lib, /system/lib]]
02-04 13:16:47.435: E/AndroidRuntime(2347):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
02-04 13:16:47.435: E/AndroidRuntime(2347):     at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
02-04 13:16:47.435: E/AndroidRuntime(2347):     at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
02-04 13:16:47.435: E/AndroidRuntime(2347):     at android.app.Instrumentation.newApplication(Instrumentation.java:981)
02-04 13:16:47.435: E/AndroidRuntime(2347):     at android.app.LoadedApk.makeApplication(LoadedApk.java:573)
02-04 13:16:47.435: E/AndroidRuntime(2347):     ... 9 more
02-04 13:16:47.435: E/AndroidRuntime(2347):     Suppressed: java.lang.ClassNotFoundException: com.ants360.z13.activity.CameraApplication
02-04 13:16:47.435: E/AndroidRuntime(2347):         at java.lang.Class.classForName(Native Method)
02-04 13:16:47.435: E/AndroidRuntime(2347):         at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
02-04 13:16:47.435: E/AndroidRuntime(2347):         at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
02-04 13:16:47.435: E/AndroidRuntime(2347):         at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
02-04 13:16:47.435: E/AndroidRuntime(2347):         ... 12 more
02-04 13:16:47.435: E/AndroidRuntime(2347):     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

看起来没有像ProGuard那样的任何反编译器。

的AndroidManifest.xml

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.xiaomi.xy.sportscamera" platformBuildVersionCode="22" platformBuildVersionName="5.1.1-1819727">
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.GET_TASKS"/>
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <uses-permission android:name="android.permission.GET_ACCOUNTS"/>
    <uses-permission android:name="android.permission.MANAGE_ACCOUNTS"/>
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
    <uses-permission android:name="android.permission.READ_LOGS"/>
    <uses-permission android:name="android.permission.WRITE_SETTINGS"/>
    <uses-permission android:name="android.permission.MEDIA_CONTENT_CONTROL"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.RESTART_PACKAGES"/>
    <uses-permission android:name="android.permission.BATTERY_STATS"/>
    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
    <uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION"/>
    <uses-permission android:name="com.xiaomi.market.sdk.UPDATE"/>
    <uses-permission android:name="com.xiaomi.permission.AUTH_SERVICE"/>
    <uses-permission android:name="android.permission.ACCESS_DOWNLOAD_MANAGER"/>
    <uses-permission android:name="android.permission.BLUETOOTH"/>
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
    <uses-permission android:name="android.permission.VIBRATE"/>
    <uses-permission android:name="com.xiaomi.channel.GAME_SERVICE_PERMISSION"/>
    <uses-permission android:name="android.permission.USE_CREDENTIALS"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:largeHeap="true" android:name="com.ants360.z13.activity.CameraApplication" android:supportsRtl="true" android:theme="@style/AppTheme">
        <meta-data android:name="veengine_version" android:value="5"/>
        <activity android:name="com.ants360.z13.activity.LogoSplashActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <activity android:name="com.ants360.z13.activity.LocalPicEditActivity" android:screenOrientation="portrait" android:theme="@style/PicEditStyle"/>
        <activity android:name="com.ants360.z13.activity.CameraVideoSplendidActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:launchMode="singleTask" android:name="com.ants360.z13.activity.SnsHomeActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:configChanges="keyboardHidden|orientation|screenSize" android:name="com.ants360.z13.activity.LandscapeCameraControlActivity" android:screenOrientation="landscape" android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
        <activity android:name="com.ants360.z13.activity.SnsPhotoActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.activity.SnsViewPhotoActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:configChanges="keyboardHidden|orientation|screenSize" android:name="com.ants360.z13.activity.SnsVideoActivity"/>
        <activity android:launchMode="singleTask" android:name="com.ants360.z13.activity.CameraConnectionFailedActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.activity.CameraQuickRecordShareActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.activity.QuickRecordEditActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.activity.DownloadPhotoShowActivity" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.activity.CameraMediaShowActivity" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.activity.PhotoSetDetailShowActivity" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.activity.LocalVideoPuzzleActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.activity.CameraFileDownLoadActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.activity.CameraSettingActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.activity.CameraSDCardActivity" android:screenOrientation="portrait" android:theme="@style/SDCardSettingTheme"/>
        <activity android:name="com.ants360.z13.activity.CameraWifiSettingActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.activity.CameraUpgradeActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:launchMode="singleTask" android:name="com.ants360.z13.activity.CameraUpgradeWaittingActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.activity.CameraUpgradeSuccessActivity" android:screenOrientation="portrait"/>
        <activity android:name="com.ants360.z13.activity.CameraUpgradeFailActivity" android:screenOrientation="portrait"/>
        <activity android:name="com.ants360.z13.activity.FirmwareDownloadActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.activity.SettingActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.activity.VideoCropActivity" android:screenOrientation="portrait"/>
        <activity android:name="com.ants360.z13.activity.VideoEditActivity" android:screenOrientation="portrait"/>
        <activity android:name="com.ants360.z13.activity.LocalMediaShowActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.activity.SnsWebViewActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.activity.SnsVideoMoreActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.activity.FeedbackActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.moments.NotificationListActivity" android:screenOrientation="portrait" android:theme="@style/MomentsTheme" android:windowSoftInputMode="stateHidden"/>
        <activity android:name="com.ants360.z13.moments.EditPersonalActivity" android:screenOrientation="portrait" android:theme="@style/MomentsTheme" android:windowSoftInputMode="stateHidden"/>
        <activity android:name="com.ants360.z13.moments.ReportLowersActivity" android:screenOrientation="portrait" android:theme="@style/MomentsTheme"/>
        <activity android:name="com.ants360.z13.activity.CameraUpgradeHelpActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.activity.CameraHelpActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.activity.FaqActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:configChanges="orientation" android:label="@string/xiaomi_login" android:name="com.xiaomi.account.openauth.AuthorizeActivity" android:windowSoftInputMode="stateHidden"/>
        <activity android:configChanges="keyboardHidden|orientation|screenSize" android:name="cn.sharesdk.framework.ShareSDKUIShell" android:screenOrientation="portrait" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:windowSoftInputMode="adjustResize|stateHidden">
            <intent-filter>
                <data android:scheme="tencent100371282"/>
                <action android:name="android.intent.action.VIEW"/>
                <category android:name="android.intent.category.BROWSABLE"/>
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
        </activity>
        <activity android:configChanges="keyboardHidden|orientation|screenSize" android:name="com.mob.tools.MobUIShell" android:screenOrientation="portrait" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:windowSoftInputMode="adjustResize|stateHidden">
            <intent-filter>
                <data android:scheme="tencent100371282"/>
                <action android:name="android.intent.action.VIEW"/>
                <category android:name="android.intent.category.BROWSABLE"/>
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
        </activity>
        <activity android:configChanges="keyboardHidden|orientation|screenSize" android:exported="true" android:launchMode="singleInstance" android:name="com.xiaomi.xy.sportscamera.wxapi.WXEntryForXiaoyiActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
        <activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize" android:label="@string/app_name" android:name="com.facebook.FacebookActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
        <activity android:name="com.ants360.z13.activity.LocalVideoEditActivity"/>
        <receiver android:name="com.ants360.z13.recevier.CheckFirmwareUpgradeRecevier">
            <intent-filter>
                <action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
                <action android:name="android.intent.action.DOWNLOAD_COMPLETE"/>
                <action android:name="camera.intent.action.cancel.firmware.download"/>
            </intent-filter>
        </receiver>
        <receiver android:name="com.ants360.z13.recevier.DownloadCompleteRecevier">
            <intent-filter>
                <action android:name="android.intent.action.DOWNLOAD_COMPLETE"/>
            </intent-filter>
        </receiver>
        <activity android:name="com.ants360.z13.activity.DetailGridViewActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.activity.CameraVideoEditActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.community.AccountActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.community.CommunityMessageActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.community.CommunityDetailActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme" android:windowSoftInputMode="stateAlwaysHidden|stateAlwaysVisible|adjustResize"/>
        <activity android:name="com.ants360.z13.community.CommunityThemeActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.community.AccountSettingActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme"/>
        <activity android:name="com.ants360.z13.community.ReportOrShareActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme" android:windowSoftInputMode="stateVisible"/>
        <activity android:name="com.ants360.z13.community.TestActivity" android:screenOrientation="portrait" android:theme="@style/CameraTheme" android:windowSoftInputMode="stateVisible"/>
        <activity android:name="com.ants360.z13.community.FullScreenImageActivity" android:screenOrientation="portrait" android:theme="@style/FullImage"/>
        <receiver android:enabled="true" android:name="com.google.android.gms.analytics.AnalyticsReceiver">
            <intent-filter>
                <action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH"/>
            </intent-filter>
        </receiver>
        <service android:enabled="true" android:exported="false" android:name="com.google.android.gms.analytics.AnalyticsService"/>
        <receiver android:exported="true" android:name="com.google.android.gms.analytics.CampaignTrackingReceiver">
            <intent-filter>
                <action android:name="com.android.vending.INSTALL_REFERRER"/>
            </intent-filter>
        </receiver>
        <service android:name="com.google.android.gms.analytics.CampaignTrackingService"/>
        <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
        <meta-data android:name="com.google.android.gms.analytics.globalConfigResource" android:resource="@xml/global_tracker"/>
        <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/application_id"/>
    </application>
</manifest>

根文件结构:

src <-- empty
gen
Android 5.1.1
assets
bin
lib
original
res
smali
unknown <-- just contains unimportant "mistats_version" text file
AndroidManifest.xml
project.properties

1 个答案:

答案 0 :(得分:1)

如果您想为应用添加新功能,则需要学习 SMALI ,无法将 APK 完全转换为 JAVA 即可。我从来没有使用过APKStudio,但我可以推荐你 dex2jar APKtool ,在THIS网站上你可以找到如何解码和再次构建APP。