Konloch / Konloch/bytecode-viewer
worng long value in smali editor
- Dominant language
- Java
- Stars
- 15.6k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
decompiled with apkeasytools -
```
.method protected onCreate(Landroid/os/Bundle;)V
.locals 2
.param p1, "savedInstanceState" # Landroid/os/Bundle;
.line 15
invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
.line 16
const/high16 v0, 0x7f040000
invoke-virtual {p0, v0}, Lbhakar/manoj/helloWorld/MainActivity;->setContentView(I)V
```
decompiled by byteCodeViewer
```
.method protected onCreate(Landroid/os/Bundle;)V
.registers 4
const/4 v1, 0
invoke-super { p0, p1 }, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
const/high16 v0, 32516
invoke-virtual { p0, v0 }, Lbhakar/manoj/helloWorld/MainActivity;->setContentView(I)V
```
notice that 0x7f040000 is converted to 32516
i love this tool, because it shows live editing of smali. i open smali with editing in one pannel and java in second pannel. then when i edit smali, it shows java version of smali code by pressing refresh button.
you may not realise how revolutionary it is in world of modding.
i mean i do know now that where i am doing mistake in smali editing.
but this bug is a problem. recently i tried to mod a apk that had multiple resource ids in smali. after moding , there is no way saving back that to apk.
so what i did is , copied paste smali from this tool to the smali file generated by apktool so that i can recompile with one click. but code did not compile due to this error.
can anyone also add the option to replace compiled .class file in .dex file and then replace dex file with apk's dex file ?
Contributor guide
Research direction
Start in the smali editor's handling of const/high16 values and compare the displayed 0x7f040000 with the 32516 output shown in the issue. Confirm the corrected representation remains valid when copied into apktool-generated smali and recompiled; the separate request to replace compiled classes in a dex file needs scope clarification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- reverse-engineering
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100