Closed GoogleCodeExporter closed 9 years ago
Forgot to say that I did this on a Windows 7 64-bit machine.
Original comment by phd....@gmail.com
on 21 Jun 2010 at 12:29
Hmmmm. That looks really odd. Are the cases of the class names themselves (in
the .class directive at the top of the file) affected as well? I would assume
so, but can you doublecheck?
I'll take a look at it, thanks for the bug report :)
Original comment by JesusFr...@gmail.com
on 21 Jun 2010 at 12:54
It seems that class names are also affected.
"h.smali" and "H.smali" start both like this:
.class public final Lcom/google/android/apps/uploader/h;
"ManagerActivity.smali" like this:
.class public Lcom/google/android/apps/uploader/ManagerActivity;
I know from logcat that a class "H" (among others that could not be found) was
searched and could not be found:
E/dalvikvm( 289): Could not find class 'com.google.android.apps.uploader.H' ...
I also noticed when I open MediaUploader.odex in an text editor that I can find
both Strings:
$Lcom/google/android/apps/uploader/H;
and
$Lcom/google/android/apps/uploader/h;
So, probably smali/baksmali is correct, but windows can not distinguish lower &
uppercase files with the same name... smali/baksmali should print out a warning
or error message in this case.
I´ll try tomorrow in a linux environment.
Original comment by phd....@gmail.com
on 21 Jun 2010 at 1:22
Yeah, I've got several issue reports about that problem, e.g.:
http://code.google.com/p/android-apktool/issues/detail?id=28
Code obfuscators produce classes like "a" and "A", but Windows can't store both
of these files. Really annoying thing, but I think this is a problem of Windows
and baksmali shouldn't do some dirty hacking to fix this. If you would have jar
file with that obfuscated app, then even just unpacking it would be too much
for a crappy Windows :-/
Original comment by Brut.alll
on 21 Jun 2010 at 8:03
Hmm. Well, smali doesn't really care what the actual name of the file is. It
takes the class name from the .class directive. Maybe I can have baksmali use
some sort of naming scheme to resolve these conflicts on case insensitive file
systems.
Original comment by JesusFr...@gmail.com
on 21 Jun 2010 at 12:51
Maybe smali/baksmali can just stop with an error message if a file is
overwritten with a file that is called the same but with different
capitalization. And "-I" (or a new flag) ignores these errors.
Or more simple: Just a warning if a file is overwritten.
A naming scheme sounds good, but the results under windows & linux should be
the same, else it could be too confusing.
Original comment by phd....@gmail.com
on 21 Jun 2010 at 1:25
I agree. The results under linux are "it works". I think we need the same
result under windows :)
Original comment by JesusFr...@gmail.com
on 22 Jun 2010 at 4:12
This has been fixed in r784. if baksmali detects a case insensitive file
system, it will append a .2, .3, .4 etc. to the end of files and directories as
needed, to prevent collisions.
So if there was a Lblah; and an LBLAH;, you would have a blah.smali and a
BLAH.2.smali
Original comment by JesusFr...@gmail.com
on 2 Aug 2010 at 1:17
Original comment by JesusFr...@gmail.com
on 2 Aug 2010 at 1:17
Original issue reported on code.google.com by
phd....@gmail.com
on 21 Jun 2010 at 12:26