Closed Lemniscate317 closed 3 years ago
I know the dexlib2/baksmali api have the rewrite method can rewrite , but it seem i need to analysis the byte code which i get one by one , i think it is difficult and hard to do it . So i want to know is there any idea to write it back
My English is not very good , so i try to write my problem clearly.
After unpack the protect apk , i can get a not full dex . The method 's instruction is extract. like this
And now i can get the instruction in byte. And i also want to find a way to write it into the dex automate. I google it , stackoverflow it . But i can't find a way to solve my problem.
If the not full dex is like the above code , i can write it back use the offset. But if the not full dex not have enough space like below code , i can't write it back directly because it will cross itself's code limit.
I need some advice , hope your reply , thank you