motofan logo
bill_kevin
сообщение 9.9.2011, 6:07


Интересующийся
**

Группа: Пользователи
Сообщений: 81
Регистрация: 30.11.2009
Из: Guatemala
Пользователь №: 210 479
Модель телефона: Life II EP1&EP2
Прошивка: 49R

Рейтинг: 55.5



Someone can explain me how create correctly my own asm to "port patch"??


I create this asm, patch code code is properly analyzed?

original patch:
Spoiler:

CODE

[patch_info]
sw_ver=r4513_g_08.b7.acr_rb
description=

[patch_code]
0035a1a6: 0000e59f0054e5d03000e35300011a000001e3a03e07ea000000e1a0300eea1e163ce92d4005e59f0030e3a02001e5c02000e8bd4005e3a01023e12fff1ee92d4005e59f0014e3a02000e5c02000e8bd4005e35000011a0dfacbea0dfa8a124efb90
006d8c28: ebf2056d
006d8c34: ebf20563
00adfab8: eae1e9ba
[close]

l7 sw_ver=r4513_g_08.b7.acr_rb to E398 sw_ver=r373_g_0e.30.dar

Spoiler:
CODE
code32    
    .start 0x1026fefe;0x103ec1a6
;dcb    0
;dcb    0
        nop
_loc_103ec1a8:
        ldr    r0, _off_103ec204
        ldrb    r3, [r0]
        cmp    r3, #1
        bne    _loc_103ec1c0
        mov    r3, #0x70
        b    _loc_103ec1c4

_loc_103ec1c0:                
        mov    r3, lr

_loc_103ec1c4:                
        bl    0x10814cec;0x10b71abc

_sub_103ec1c8:                
        stmfd    sp!, {r0,r2,lr}
        ldr    r0, _off_103ec204
        mov    r2, #1
        strb    r2, [r0]
        ldmfd    sp!, {r0,r2,lr}
        mov    r1, #0x23
        bx    lr
        
_sub_103ec1e4:
arg_0           =  0
arg_8           =  8
arg_10          =  0x10

        stmfd    sp!, {r0,r2,lr}
        ldr    r0, _off_103ec204
        mov    r2, #0
        strb    r2, [r0]
        ldmfd    sp!, {r0,r2,lr}
        cmp    r0, #1
        bne    0x10831024;0x1076ad30
        b    0x10830f24;0x1076ac30

;_off_103ec204    dcd 0x124efb90        



_off_103ec204 :                        ; data xref: rom:loc_103ec1a8r
                                         ; sub_103ec1c8+4r ...
                       asr     r6, r1, #9
                         dcb 0xfb; №
                         dcb 0x90; Й


.start 0x10830f1c;0x1076ac28
        bl    _sub_103ec1e4
        
.start 0x10830f28;0x1076ac34
        bl    _sub_103ec1c8

.start 0x10814ce8;0x10b71ab8
        bl    _loc_103ec1a8
[close]


and finally how to compile the Asm?

Thank you For your Help

Сообщение отредактировал bill_kevin - 9.9.2011, 6:32
Юзер вышелВ друзьяВизиткаП/Я
К началу страницы
+Ответить
 
Ответ в темуСоздание новой темы
Ответов
Andy51
сообщение 13.9.2011, 9:23


0xFFFF
******

Группа: Разработчики
Сообщений: 832
Регистрация: 28.3.2006
Из: Нижний Новгород
Пользователь №: 76 255
Модель телефона: E398, Milestone 2
Прошивка: 49R w/ElfPack2


Настроение:
^^,



Рейтинг: 1224



Цитата(Fenja @ Сегодня, 12:49)
* Try to find the firmware source address to 0x143c21f4, then find the same code in their firmware and look appeal.

Oh, right. Did not think about it - i dont port patches, i make them :D
I was using this method: you can open in IDA the original FW, open the XREFS window for 0x143c21f4 and see where it is used (function signatures). Then try to find the same functions in your target FW and see what address they use instead of 0x143c21f4.
Юзер вышелВ друзьяВизиткаП/Я
К началу страницы
+Ответить

Сообщений в этой теме


Ответ в темуСоздание новой темы
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 



Текстовая версия Сейчас: 18.7.2025, 12:32

Форум живёт: