[GUIDE][GB] how to add ScreenShot EPM

Search This thread

ocoot

Senior Member
hi guys. i'll tell you how to add Screenshot EPM. for screenies, check attach
first, download this file


note: DO BACKUP FIRST.

Stuff:
1. android.policy.jar
2. Framework-res.apk
3. Tools to decompile and compile .apk files like apk multitool or baksmali manager for .jar files . you can search it to google
4. brain
5. patient

+FIRST STEP:
1. decompile framework-res.apk
2. extract the files we have downloaded
3. put the ic_clock_screenshoot.png to the drawable-ldpi
4. open strings.xml
5. add this
Code:
<string name="screenshoot">Capture Image</string>
before line
Code:
</resources>
6. save and compile. make sure you don't get any errors when compiling
7. after all finished, decompile again the result was
8. go to public.xml
9. then see the hex code from the image and the strings that we created earlier like this
Code:
<public type="string" name="screenshoot" id="0x0[B]10404d6[/B]" />
<public type="drawable" name="ic_lock_screenshot" id="0x0[B]10804b4[/B]" />
10. the bold text is what we need for next step
 

Attachments

  • HiShoot-1362228274420.jpg
    HiShoot-1362228274420.jpg
    35.3 KB · Views: 38,788
Last edited:

ocoot

Senior Member
+LAST STEP:
1. decompile android.policy.jar
2. put the GlobalActions$12.smali and GlobalActions$12$1.smali to the com\android\internal\policy\impl\here
3. then, open GlobalActions.smali
4. search this line
Code:
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
5. above it, there is const /4 v0, 0x3, change to const /4 v0, 0x4
1001842_4439641969105_151778229_n.jpg

6. then, look at the pict
5881_4439653329389_455604170_n.jpg

7. add this line below it
Code:
const/4 v1, 0x3

    new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$12;

    const v3, 0x108xxxx -> ic__lock_screenshoot.png

    const v4, 0x104xxxx -> screencapture string

    invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$12;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V

    aput-object v2, v0, v1
8. see on this
993922_4439665689698_1753054855_n.jpg

9. change const/4 v1, 0x3 to const/4 v1, 0x4
10. save and compile
11. after all steps completed, flash it via CWM



NB:
-i made this guide from original based stockrom DXLF, it will different if you have EPM (data mode, reboot mode, recovery mode, download mode) first. for who have epm first and will add this features, go to HERE
-if you don't understand / get error, report here and i'll help you
 
Last edited:

ocoot

Senior Member
For who have epm

this is for you who have EPM (Sound mode, Data mode, Airplane mode, Reboot mode, Recovery mode, Download mode, Power Off). little modification on smali

Tuts:
1. for editing Framework-res.apk, it same as like first post
2. decompile android.policy.jar
3. search
Code:
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
4. look above it, if showing const/4 v0, 0x7 ignore it. if not, if showing anything else like const/4 v0, 0x6, change 0x6 to 0x7
5. on this step, you need to editing the download mode line (i think download mode is useless, the features like reboot/restart and doesn't lead to download mode)
996521_4439840334064_1836942637_n.jpg

6. change the bold to
Code:
const/4 v1, 0x3

    new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$12;

    const v3, 0x108xxxx -> ic_lock_screenshoot.png

    const v4, 0x104xxxx -> screenshoot string

    invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$12;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V

    aput-object v2, v0, v1
7. save and compile. make sure you don't get errors
8. flash it via cwm
 

samsoul16

Senior Member
Apr 17, 2012
1,395
511
26
Thane
Just 1 word required to define this Guide. AWESOME

Sent from my GT-S6102 using Xparent BlueTapatalk 2
 
  • Like
Reactions: ocoot

zangge34

Member
Aug 26, 2013
15
0
I can not find it or anything like it, you can help me put it in another location not
Code:
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
 

zangge34

Member
Aug 26, 2013
15
0
I want you to help me review my file GlobalActions.smali.
If you help me I will be very happy and thank you.
mediafire.com/download/3wzk47a10w93cv9/GlobalActions.smali[/url]
 

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    hi guys. i'll tell you how to add Screenshot EPM. for screenies, check attach
    first, download this file


    note: DO BACKUP FIRST.

    Stuff:
    1. android.policy.jar
    2. Framework-res.apk
    3. Tools to decompile and compile .apk files like apk multitool or baksmali manager for .jar files . you can search it to google
    4. brain
    5. patient

    +FIRST STEP:
    1. decompile framework-res.apk
    2. extract the files we have downloaded
    3. put the ic_clock_screenshoot.png to the drawable-ldpi
    4. open strings.xml
    5. add this
    Code:
    <string name="screenshoot">Capture Image</string>
    before line
    Code:
    </resources>
    6. save and compile. make sure you don't get any errors when compiling
    7. after all finished, decompile again the result was
    8. go to public.xml
    9. then see the hex code from the image and the strings that we created earlier like this
    Code:
    <public type="string" name="screenshoot" id="0x0[B]10404d6[/B]" />
    <public type="drawable" name="ic_lock_screenshot" id="0x0[B]10804b4[/B]" />
    10. the bold text is what we need for next step
    10
    +LAST STEP:
    1. decompile android.policy.jar
    2. put the GlobalActions$12.smali and GlobalActions$12$1.smali to the com\android\internal\policy\impl\here
    3. then, open GlobalActions.smali
    4. search this line
    Code:
    new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
    5. above it, there is const /4 v0, 0x3, change to const /4 v0, 0x4
    1001842_4439641969105_151778229_n.jpg

    6. then, look at the pict
    5881_4439653329389_455604170_n.jpg

    7. add this line below it
    Code:
    const/4 v1, 0x3
    
        new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$12;
    
        const v3, 0x108xxxx -> ic__lock_screenshoot.png
    
        const v4, 0x104xxxx -> screencapture string
    
        invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$12;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
    
        aput-object v2, v0, v1
    8. see on this
    993922_4439665689698_1753054855_n.jpg

    9. change const/4 v1, 0x3 to const/4 v1, 0x4
    10. save and compile
    11. after all steps completed, flash it via CWM



    NB:
    -i made this guide from original based stockrom DXLF, it will different if you have EPM (data mode, reboot mode, recovery mode, download mode) first. for who have epm first and will add this features, go to HERE
    -if you don't understand / get error, report here and i'll help you
    5
    For who have epm

    this is for you who have EPM (Sound mode, Data mode, Airplane mode, Reboot mode, Recovery mode, Download mode, Power Off). little modification on smali

    Tuts:
    1. for editing Framework-res.apk, it same as like first post
    2. decompile android.policy.jar
    3. search
    Code:
    new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
    4. look above it, if showing const/4 v0, 0x7 ignore it. if not, if showing anything else like const/4 v0, 0x6, change 0x6 to 0x7
    5. on this step, you need to editing the download mode line (i think download mode is useless, the features like reboot/restart and doesn't lead to download mode)
    996521_4439840334064_1836942637_n.jpg

    6. change the bold to
    Code:
    const/4 v1, 0x3
    
        new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$12;
    
        const v3, 0x108xxxx -> ic_lock_screenshoot.png
    
        const v4, 0x104xxxx -> screenshoot string
    
        invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$12;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
    
        aput-object v2, v0, v1
    7. save and compile. make sure you don't get errors
    8. flash it via cwm
    2
    Will this work with other devices?

    If you focus and understand, it will probably work on other devices
    1
    Will this work with other devices?