FORUMS
Remove All Ads from XDA

[GUIDE][GB] how to add ScreenShot EPM

722 posts
Thanks Meter: 936
 
Post Reply Email Thread
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="0x010404d6" />
<public type="drawable" name="ic_lock_screenshot" id="0x010804b4" />
10. the bold text is what we need for next step
Attached Thumbnails
Click image for larger version

Name:	HiShoot-1362228274420.jpg
Views:	38654
Size:	35.3 KB
ID:	2091875  
The Following 20 Users Say Thank You to ocoot For This Useful Post: [ View ] Gift ocoot Ad-Free
 
 
4th July 2013, 04:40 PM |#2  
ocoot's Avatar
OP Senior Member
Flag Semarang, Central Java
Thanks Meter: 936
 
More
+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

6. then, look at the pict

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

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
The Following 10 Users Say Thank You to ocoot For This Useful Post: [ View ] Gift ocoot Ad-Free
4th July 2013, 04:40 PM |#3  
Account currently disabled
XDA
Thanks Meter: 993
 
More
Will this work with other devices?
The Following User Says Thank You to nolinuxnoparty For This Useful Post: [ View ] Gift nolinuxnoparty Ad-Free
4th July 2013, 05:09 PM |#4  
ocoot's Avatar
OP Senior Member
Flag Semarang, Central Java
Thanks Meter: 936
 
More
Quote:
Originally Posted by nolinuxnoparty

Will this work with other devices?

If you focus and understand, it will probably work on other devices
The Following 2 Users Say Thank You to ocoot For This Useful Post: [ View ] Gift ocoot Ad-Free
4th July 2013, 05:21 PM |#5  
CharsiBabu's Avatar
Senior Member
Flag Mumbai
Thanks Meter: 320
 
More
Thumbs up
Nice guide, thanks pressed.
The Following User Says Thank You to CharsiBabu For This Useful Post: [ View ] Gift CharsiBabu Ad-Free
4th July 2013, 05:51 PM |#6  
ocoot's Avatar
OP Senior Member
Flag Semarang, Central Java
Thanks Meter: 936
 
More
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)

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
The Following 5 Users Say Thank You to ocoot For This Useful Post: [ View ] Gift ocoot Ad-Free
4th July 2013, 05:58 PM |#7  
ocoot's Avatar
OP Senior Member
Flag Semarang, Central Java
Thanks Meter: 936
 
More
Quote:
Originally Posted by CharsiBabu

Nice guide, thanks pressed.

thankyou
5th July 2013, 08:32 AM |#8  
jpdesuasido's Avatar
Senior Member
Flag Meycauayan City
Thanks Meter: 91
 
More
Post RE:[GUIDE][GB] how to add ScreenShot EPM
Will try it now

Reserved.
5th July 2013, 12:07 PM |#9  
ocoot's Avatar
OP Senior Member
Flag Semarang, Central Java
Thanks Meter: 936
 
More
Quote:
Originally Posted by jpdesuasido

Will try it now

Reserved.

good luck bro
The Following User Says Thank You to ocoot For This Useful Post: [ View ] Gift ocoot Ad-Free
5th July 2013, 01:05 PM |#10  
jpdesuasido's Avatar
Senior Member
Flag Meycauayan City
Thanks Meter: 91
 
More
Post
Quote:
Originally Posted by ocoot

good luck bro

Thanks (2 times pressed )
The Following User Says Thank You to jpdesuasido For This Useful Post: [ View ] Gift jpdesuasido Ad-Free
6th July 2013, 06:05 AM |#11  
ocoot's Avatar
OP Senior Member
Flag Semarang, Central Java
Thanks Meter: 936
 
More
up
Post Reply Subscribe to Thread

Tags
epm, extended power menu, guide gb, screenshot epm

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes