Microsoft Windows XP [版本 5.1.2600]
(C) 版權所有 1985-2001 Microsoft Corp.
C:\apk>C:\apk\apktool.bat if f.apk
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected: string-ERR0
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected: string-ERR1
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected: string-ERR2
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected: string-zh-rHK-ERR3
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected: string-zh-rHK-ERR4
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected: string-zh-rHK-ERR5
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected: string-zh-rCN-ERR6
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected: string-zh-rCN-ERR7
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected: string-zh-rCN-ERR8
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected: string-zh-rTW-ERR9
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected: string-zh-rTW-ERR10
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected: string-zh-rTW-ERR11
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected: plurals-ERR12
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected: plurals-ERR13
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected: plurals-ERR14
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected: plurals-zh-rHK-ERR15
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected: plurals-zh-rHK-ERR16
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected: plurals-zh-rHK-ERR17
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected: plurals-zh-rCN-ERR18
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected: plurals-zh-rCN-ERR19
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected: plurals-zh-rCN-ERR20
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected: plurals-zh-rTW-ERR21
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected: plurals-zh-rTW-ERR22
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected: plurals-zh-rTW-ERR23
I: Framework installed to: C:\Documents and Settings\Administrator\apktool\frame
work\1.apk
C:\apk>C:\apk\apktool.bat if f2.apk
I: Framework installed to: C:\Documents and Settings\Administrator\apktool\frame
work\2.apk
C:\apk>C:\apk\apktool.bat d f.apk
I: Loading resource table...
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected. Dropping resources: string-ERR0
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected. Dropping resources: string-ERR1
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected. Dropping resources: string-ERR2
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected. Dropping resources: string-zh-rHK-ERR3
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected. Dropping resources: string-zh-rHK-ERR4
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected. Dropping resources: string-zh-rHK-ERR5
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected. Dropping resources: string-zh-rCN-ERR6
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected. Dropping resources: string-zh-rCN-ERR7
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected. Dropping resources: string-zh-rCN-ERR8
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected. Dropping resources: string-zh-rTW-ERR9
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected. Dropping resources: string-zh-rTW-ERR10
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected. Dropping resources: string-zh-rTW-ERR11
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected. Dropping resources: plurals-ERR12
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected. Dropping resources: plurals-ERR13
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected. Dropping resources: plurals-ERR14
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected. Dropping resources: plurals-zh-rHK-ERR15
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected. Dropping resources: plurals-zh-rHK-ERR16
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected. Dropping resources: plurals-zh-rHK-ERR17
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected. Dropping resources: plurals-zh-rCN-ERR18
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected. Dropping resources: plurals-zh-rCN-ERR19
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected. Dropping resources: plurals-zh-rCN-ERR20
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected. Dropping resources: plurals-zh-rTW-ERR21
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected. Dropping resources: plurals-zh-rTW-ERR22
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected. Dropping resources: plurals-zh-rTW-ERR23
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
C:\apk>
C:\apk>C:\apk\apktool.bat b f 34566.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'accessibility_compound_button_selected' has no default tr
anslation in C:\apk\f\res; found: bs et fr_CA is mk pt_BR zh_HK
aapt: warning: string 'accessibility_compound_button_unselected' has no default
translation in C:\apk\f\res; found: bs et fr_CA is mk pt_BR zh_HK
aapt: warning: string 'battery_low_percent_format' has no default translation in
C:\apk\f\res; found: bs es et fr_CA is mk ms pt_BR sl zh_HK
aapt: warning: string 'battery_low_subtitle' has no default translation in C:\ap
k\f\res; found: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'battery_low_title' has no default translation in C:\apk\f
\res; found: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'battery_low_why' has no default translation in C:\apk\f\r
es; found: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'battery_status_charging' has no default translation in C:
\apk\f\res; found: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'battery_status_text_percent_format' has no default transl
ation in C:\apk\f\res; found: es fr_CA zh_HK
aapt: warning: string 'contact_status_update_attribution' has no default transla
tion in C:\apk\f\res; found: fr_CA mk zh_HK
aapt: warning: string 'contact_status_update_attribution_with_date' has no defau
lt translation in C:\apk\f\res; found: bs fr_CA is mk pt_BR zh_HK
aapt: warning: string 'copyAll' has no default translation in C:\apk\f\res; foun
d: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'cutAll' has no default translation in C:\apk\f\res; found
: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'description_star' has no default translation in C:\apk\f\
res; found: bs et fr_CA is mk pt_BR zh_HK
aapt: warning: string 'l2tp_ipsec_crt_***_description' has no default translatio
n in C:\apk\f\res; found: bs et fr_CA is mk pt_BR zh_HK
aapt: warning: string 'l2tp_ipsec_psk_***_description' has no default translatio
n in C:\apk\f\res; found: bs et fr_CA is mk pt_BR zh_HK
aapt: warning: string 'l2tp_***_description' has no default translation in C:\ap
k\f\res; found: bs et fr_CA is mk pt_BR zh_HK
aapt: warning: string 'lockscreen_sim_corporate_locked_message' has no default t
ranslation in C:\apk\f\res; found: bs mk pt_BR zh_HK
aapt: warning: string 'lockscreen_sim_network_locked_message' has no default tra
nslation in C:\apk\f\res; found: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'lockscreen_sim_network_subset_locked_message' has no defa
ult translation in C:\apk\f\res; found: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'lockscreen_sim_service_provider_locked_message' has no de
fault translation in C:\apk\f\res; found: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'lockscreen_sim_sim_locked_message' has no default transla
tion in C:\apk\f\res; found: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'memory_in_phone' has no default translation in C:\apk\f\r
es; found: es_MX es_US es_VE fa
aapt: warning: string 'memory_in_sdcard' has no default translation in C:\apk\f\
res; found: es_MX es_US es_VE
aapt: warning: string 'permdesc_accessUsb' has no default translation in C:\apk\
f\res; found: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'permdesc_readOwnerData' has no default translation in C:\
apk\f\res; found: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'permdesc_writeOwnerData' has no default translation in C:
\apk\f\res; found: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'permlab_accessUsb' has no default translation in C:\apk\f
\res; found: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'permlab_readOwnerData' has no default translation in C:\a
pk\f\res; found: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'permlab_writeOwnerData' has no default translation in C:\
apk\f\res; found: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'pptp_***_description' has no default translation in C:\ap
k\f\res; found: bs et fr_CA is mk pt_BR zh_HK
aapt: warning: string 'selectText' has no default translation in C:\apk\f\res; f
ound: bs fr_CA is mk pt_BR zh_HK
aapt: warning: string 'status_bar_clear_all_button' has no default translation i
n C:\apk\f\res; found: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'status_bar_latest_events_title' has no default translatio
n in C:\apk\f\res; found: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'status_bar_no_notifications_title' has no default transla
tion in C:\apk\f\res; found: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'status_bar_ongoing_events_title' has no default translati
on in C:\apk\f\res; found: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'stopSelectingText' has no default translation in C:\apk\f
\res; found: bs es fr_CA is mk pt_BR zh_HK
aapt: warning: string 'test_version_for_develop' has no default translation in C
:\apk\f\res; found: bs es_MX es_US es_VE mk pt_BR zh_HK
I: Building apk file...
C:\apk>
加載框架時顯示錯誤“Config flags size > 36. Exceeding bytes: 0x11009C00”,
應該是定義裏沒有,反編譯時丟棄“Dropping resources”,
然後編譯時根據列表找不到已被丟棄的資源,第一行提示 “W: Could not find sources ”
編譯時出現aapt: warning string 'appname' has no default translation in ...
語言包中已經有name,但public.xml中未定義。具體見下
查看apktool參數,apktool作者已考慮到出現這種情況的可能性。
Microsoft Windows XP [版本 5.1.2600]
(C) 版權所有 1985-2001 Microsoft Corp.
C:\apk>apktool
Apktool v1.5.0.5a056e3 - a tool for reengineering Android apk files
Copyright 2010 Ryszard Wi?niewski <[email protected]>
with smali v1.3.4-ibot8, and baksmali v1.3.4-ibot8
Updated by iBotPeaches <[email protected]>
Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
Usage: apktool [-q|--quiet OR -v|--verbose] COMMAND [...]
COMMANDs are:
d[ecode] [OPTS] <file.apk> [<dir>]
Decode <file.apk> to <dir>.
OPTS:
-s, --no-src
Do not decode sources.
-r, --no-res
Do not decode resources.
-d, --debug
Decode in debug mode. Check project page for more info.
-f, --force
Force delete destination directory.
-t <tag>, --frame-tag <tag>
Try to use framework files tagged by <tag>.
--keep-broken-res
Use if there was an error and some resources were dropped, e.g.:
"Invalid config flags detected. Dropping resources", but you
want to decode them anyway, even with errors. You will have to
fix them manually before building.
b[uild] [OPTS] [<app_path>] [<out_file>]
Build an apk from already decoded application located in <app_path>.
It will automatically detect, whether files was changed and perform
needed steps only.
If you omit <app_path> then current directory will be used.
If you omit <out_file> then <app_path>/dist/<name_of_original.apk>
will be used.
OPTS:
-f, --force-all
Skip changes detection and build all files.
-d, --debug
Build in debug mode. Check project page for more info.
if|install-framework <framework.apk> [<tag>]
Install framework file to your system.
For additional info, see: https://github.com/iBotPeaches/brut.apktool
For smali/baksmali info, see: http://code.google.com/p/smali/
C:\apk>
--keep-broken-res
Use if there was an error and some resources were dropped, e.g.:
"Invalid config flags detected. Dropping resources", but you
want to decode them anyway, even with errors. You will have to
fix them manually before building.
使用“--keep-broken-res”反編譯出的文件和不用此選項反編譯出的文件做對比,基本都是語言包被Dropping了。
漢化apk的時候不過就是添加中文的語言包,那麼語言包是不是可以隨便增添的呢?
-----------------------------------------------------------------------------------------------------------------------------
string被丟棄就會產生下面的問題
“has no default translation in”
這兩張圖說明:個別語言包中存在的“string”在public中沒有定義
以下爲引用
刪除語言包後報錯?
剛剛有講到刪除了一部分語言包,有些strings是是該語言獨享,並且values中的srings.xml亦沒有,那麼刪除它們合成的時候報錯是必然的了。
報錯了怎麼辦?最簡單的就是別刪語言包。
進階方案:只想保留英簡繁三語,其他一定要刪除。請看下文:
到apk manager的主目錄下看log。
會告訴您 public.xml 行號 xxxx資源不存在。如果僅僅是刪除語言包產生的錯誤
打開public.xml,比對log文件中的行號,將其刪除(刪除時請注意保留該行\號,以免接下來的行號不對應log中的錯誤行號而導致誤刪除。)
重新執行合成步驟,看看是否報錯,如果您正確處理掉多餘的string,那麼將不再報錯。
此文形成已久,不再更正,見(2)