Programming Tools Guide
Chapter 8, adb: absolute debugger

Making changes to memory

Making changes to memory

Changes to memory, whenever a program has been executed, can also be made. If you have used an :r command with a breakpoint to start program execution, subsequent w commands cause adb to write to the program in memory rather than the file. This is useful if you wish to make changes to a program's data as it runs, for example, to temporarily change the value of program flags or constants.