FORUMS

Make Your Network Smart – XDA Xposed Tuesday

We rave about the features and abilities of our smartphones. However, in order for … more

Dr.Ketan Brings The S6 Theme Store To The Note 4

Dr.Ketan has submitted a video to the forums showing a functional port of the Galaxy S6 … more

Do You Have Insurance on Your Smartphone?

While affordable smartphones are becoming more available, the majority of high-end flagships … more

Apple Music Will Increase iTunes Match to 100,000 Songs

The battle for music streaming subscription dominance is starting to really heat … more

[TUTORIAL]Add the "Delete" button on the screenshot preview

293 posts
Thanks Meter: 252
 
By sportik555, Senior Member on 14th December 2014, 10:17 PM
Post Reply Subscribe to Thread Email Thread
Requirement:
1. apktool 1.5.2
2. Notepad++
3. Deodex System
---------------------------------------------------
1. Decompile SystemUI.apk
2. Download delete_button.rar from attachment and merge to your SystemUI.apk
3.Open /res/value/stings with Notepad++ add the following lines:
Quote:

<string name="screenshot_delete_action">Delete</string>
<string name="screenshot_delete_confirmation">Screenshot deleted.</string>
<string name="permdesc_screenshot">Capture screenshot</string>
<string name="permlab_screenshot">Allows the app to cature a screenshot. This is protected by SystemUI.</string>
<string name="screenshot_toast">Screenshot in %1$d seconds</string>

4.Now compile your SystemUI.apk
5.Now decompile the SystemUI.apk you just compiled
6.Navigate to com/android/systemui/screenshot/DeleteScreenshot.smali
7. find 0x7f090049 delete id
And replace your id
Quote:

<public type="string" name="screenshot_delete_confirmation" id

8.Navigate to SystemUI\smali\com\android\systemui\screenshot\Sav eImageInBackgroundTask.smali
find id and delete id and replace your id
Quote:

0x10405b7 (-Framework-res- public.xml) = <public type="string" name="share"
0x7f09007b = <public type="string" name="screenshot_saving_ticker"
0x7f09007c = <public type="string" name="screenshot_saving_title"
0x7f09007d = <public type="string" name="screenshot_saving_text"
0x7f0200f2 = <public type="drawable" name="stat_notify_image"
0x7f020022 = <public type="drawable" name="ic_menu_share"
0x7f020021 = <public type="drawable" name="ic_menu_delete"
0x7f090048 = <public type="string" name="screenshot_delete_action"
0x7f09007e = <public type="string" name="screenshot_saved_title"
0x7f09007f = <public type="string" name="screenshot_saved_text"

9. AndroidManifest.xml
find
Code:
<service android:exported="false" android:name=".screenshot.TakeScreenshotService" android:process=":screenshot"/>
and change to
Code:
 <service android:name=".screenshot.TakeScreenshotService" android:permission="android.permission.SCREENSHOT" android:exported="false" android:process=":screenshot">
            <intent-filter>
                <android name="android.intent.action.SCREENSHOT" />
            </intent-filter>
        </service>
        <receiver android:name=".screenshot.DeleteScreenshot" android:exported="true" />
        <service android:name=".LoadAverageService" android:exported="true" />
find
Quote:

<uses-permission android:name="android.permission.CRYPT_KEEPER" />

change to
Code:
<uses-permission android:name="android.permission.CRYPT_KEEPER" />
    <protected-broadcast android:name="android.permission.SCREENSHOT" />
    <protected-broadcast android:name="android.intent.action.SCREENSHOT" />
    <permission android:label="@string/permlab_screenshot" android:name="android.permission.SCREENSHOT" android:protectionLevel="signatureOrSystem" android:description="@string/permdesc_screenshot" />
10. Save the file and close it.
11. Now recompile your SystemUI.apk and sign it.
12. Enjoy!
Thanks - grisha84
Attached Files
File Type: rar delete_button.rar - [Click for QR Code] (7.1 KB, 480 views)
Last edited by sportik555; 16th December 2014 at 10:41 AM.
The Following 17 Users Say Thank You to sportik555 For This Useful Post: [ View ]
 
 
14th December 2014, 10:17 PM |#2  
sportik555's Avatar
OP Senior Member
Flag Almaty
Thanks Meter: 252
 
More
Screenshotes
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2014-12-15-04-15-41.png
Views:	2190
Size:	240.1 KB
ID:	3064339  
The Following User Says Thank You to sportik555 For This Useful Post: [ View ]
15th December 2014, 01:32 AM |#3  
MT27i's Avatar
Senior Member
Flag Brebes, Indonesia
Thanks Meter: 961
 
More
Nice bro, will try it
15th December 2014, 01:37 AM |#4  
dipesh1502's Avatar
Recognized Themer
Flag MUMbai
Thanks Meter: 3,801
 
Donate to Me
More
A very useful tutorial indeed great work!!
15th December 2014, 01:42 AM |#5  
Dzepar's Avatar
Senior Member
Flag Ohrid
Thanks Meter: 394
 
Donate to Me
More
@sportik555
Nice work m8 as always.
Do you know how to add clear all button in recent apps? Or know some tutorial?
Thanks
15th December 2014, 05:12 AM |#6  
devilmaycry2020's Avatar
Senior Member
Thanks Meter: 157
 
More
thanks

please fix all
Quote:

.parameter "xxx"

because i use apktool_2.0.0rc3 to decompile my systemUI and its dont have .parameter only have .param p1, "xxx"

p/s : i've fixed it already but why dont have delete confirm message ?
Last edited by devilmaycry2020; 15th December 2014 at 05:29 AM.
15th December 2014, 05:22 AM |#7  
sportik555's Avatar
OP Senior Member
Flag Almaty
Thanks Meter: 252
 
More
Quote:
Originally Posted by devilmaycry2020

thanks

please fix all because i use apktool_2.0.0rc3 to decompile my systemUI and its dont have .parameter only have .param p1, "xxx"

you need Apktool 1.5.2
15th December 2014, 05:41 AM |#8  
sportik555's Avatar
OP Senior Member
Flag Almaty
Thanks Meter: 252
 
More
Quote:
Originally Posted by Dzepar

@sportik555
Nice work m8 as always.
Do you know how to add clear all button in recent apps? Or know some tutorial?
Thanks

I know, but you need to check, give systemUI and I try
15th December 2014, 05:56 AM |#9  
devilmaycry2020's Avatar
Senior Member
Thanks Meter: 157
 
More
Quote:
Originally Posted by sportik555

you need Apktool 1.5.2

why dont use newest apktool ? old apktool can't decompile android 4.4
and maybe you missed add a call parameter to DeleteScreenshot.smali in GlobalScreenshot.smali .i'm using android 4.3
15th December 2014, 06:15 AM |#10  
sportik555's Avatar
OP Senior Member
Flag Almaty
Thanks Meter: 252
 
More
Quote:
Originally Posted by devilmaycry2020

why dont use newest apktool ? old apktool can't decompile android 4.4
and maybe you missed add a call parameter to DeleteScreenshot.smali in GlobalScreenshot.smali .i'm using android 4.3

smali for apktool 1.5.2 , old can decompile 4.4
Quote:

maybe you missed add a call parameter to DeleteScreenshot.smali in GlobalScreenshot.smali

no it is not necessary to do,tested 3 sony android 4.4 phones and work delete button
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes