a=0;// const-string v16, "STRING" a=0;// invoke-static {v16}, Lcom/example/Utils;->dump(Ljava/lang/String;)V
Hi Jaime, most of dalvik instructions can only access first 16 registers. Registers above them are basically for storing values for later use and can't be accessed directly by math operations, etc. As far as I know only move instructions can use these registers - and not all variants of move.
--
You received this message because you are subscribed to the Google Groups "apktool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apktool+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Look for some register that you can "export" above 16, then use it for your needs and then "import" its value back before it's used by original code. Quite awkward, but this is how it is done - even in the code created by dx tool.
I'm not 100% sure this is the case, but I think so.
The problem is: pX registers are just regular vX registers and above limits affects them as well. p0 is always the first free vX register, so in your case p0 = v14. Actually you can use both of these names - they are the same. If you replace ".locals v14" with ".locals v15" then p0 remains in first 16 registers, so it should be ok. p2, if there is one, was above 16 regs from the beginning, so it should be ok as well. Unfortunately p1 was v15 and now it's v16, so existing code isn't valid anymore, because it tries to use this register directly.
I don't see a straightforward way to fix this problem. I think you will have to modify existing code.
No problem :-)