zhangwenan / smali

Automatically exported from code.google.com/p/smali
0 stars 0 forks source link

Problem during smali of Froyo odexes #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What seems to be the problem?

When recompiling some baksmali'd odexes from Froyo, I get an error as shown 
below (from Browser odex)

out/com/android/browser/AddBookmarkPage.smali[396,24] mismatched input '..' 
expecting 
CLOSE_BRACE/Volumes/ROMraid/working.r16/system/app/out/com/android/browser/AddBo
okmarkPage.smali[583,24] mismatched input '..' expecting CLOSE_BRACE
out/com/android/browser/BrowserActivity.smali[5673,24] mismatched input '..' 
expecting CLOSE_BRACE
out/com/android/browser/BrowserProvider.smali[856,23] mismatched input '..' 
expecting CLOSE_BRACE
com/android/browser/BrowserProvider.smali[2053,23] mismatched input '..' 
expecting CLOSE_BRACE
com/android/browser/BrowserProvider.smali[2262,23] mismatched input '..' 
expecting CLOSE_BRACE

What is the exact smali/baksmali command that you ran?

java -Xmx512m -smali-1.2.3-jar-with-dependencies.jar out -o classes.dex

What version are you using?

r726

Please provide any additional information below: error messages, symptoms,
etc.

Original issue reported on code.google.com by p...@modaco.com on 9 Jun 2010 at 12:00

GoogleCodeExporter commented 9 years ago
Can you provide a snippet of the smali code around one of the lines that it is 
complaining about?

Original comment by JesusFr...@gmail.com on 9 Jun 2010 at 1:17

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Line 396 in AddBookmarkPage.smali:     invoke-virtual {v16 .. v16}, 
Ljava/lang/String;->length()I
Line 5673 in BrowserActivity.smali:         invoke-virtual {v16 .. v16}, 
Ljava/lang/String;->length()I
Line 856 in BrowserProvider,smali:         invoke-virtual {p2 .. p2}, 
Ljava/lang/String;->length()I

Original comment by p...@modaco.com on 9 Jun 2010 at 1:29

GoogleCodeExporter commented 9 years ago
Can you provide some context to one of those? I'd like to see the code around 
one of those locations as well

Original comment by JesusFr...@gmail.com on 9 Jun 2010 at 1:35

GoogleCodeExporter commented 9 years ago
From AddBookmarkPage.smali:

  .line 179
    .local v6, emptyTitle:Z
    :goto_31
    invoke-virtual {v13}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v16

    invoke-virtual {v16 .. v16}, Ljava/lang/String;->length()I

    move-result v16

    if-nez v16, :cond_79

    const/16 v16, 0x1

    move/from16 v7, v16

from BrowserActivity.smali:

    .line 363
    .local v10, jsFlags:Ljava/lang/String;
    invoke-virtual {v10}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v16

    invoke-virtual {v16 .. v16}, Ljava/lang/String;->length()I

    move-result v16

    if-eqz v16, :cond_28b

    .line 364
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/browser/BrowserActivity;->mTabControl:Lcom/android/browser/TabControl;

    move-object/from16 v16, v0

    invoke-virtual/range {v16 .. v16}, Lcom/android/browser/TabControl;->getCurrentWebView()Landroid/webkit/WebView;

    move-result-object v16

Original comment by p...@modaco.com on 9 Jun 2010 at 1:42

GoogleCodeExporter commented 9 years ago
Gotcha, thanks. It's using the /range style of registers for a non-range 
invoke. weird. I'll look into it, thanks

Original comment by JesusFr...@gmail.com on 9 Jun 2010 at 1:45

GoogleCodeExporter commented 9 years ago
Excellent, thanks. :-)

Original comment by p...@modaco.com on 9 Jun 2010 at 1:48

GoogleCodeExporter commented 9 years ago
Yeah, I noticed this problem too. Sometimes there are normal (not range) 
invokes for a range of registers, also there are e.g. {v1 .. v2} or even {v1 .. 
v1} invokes everywhere.

Original comment by Brut.alll on 9 Jun 2010 at 3:29

GoogleCodeExporter commented 9 years ago
Fixed :)

http://code.google.com/p/smali/source/detail?r=731

Original comment by JesusFr...@gmail.com on 10 Jun 2010 at 1:44